TempTX V2 Wireless Temperature Sensor Module

The original wireless temperature sensor module that I built at the end of October is still happily working away proving that the concept of a very minimal wireless node works and that it is quite happy running from two AA batteries.

There were a couple of factors that influenced the previous boards design that meant is was less than ideal, firstly the need to remove the RFM12B when programming using a 5V FTDI cable complicated things and due to Royal Mail dragging their feet and my impatience to get the thing built I only had a piece of stripboard 18 rows high which necessitated placing the RFM12B alongside the ATmega instead of in line with it .

Now, armed with new supplies of stripboard and some new ideas I’ve made a new improved and smaller (40x65mm) board. To resolve the voltage issue I decided to make a small adapter board which contains a voltage regulator and smoothing caps (I didn’t want to put these on the main board in order to keep it as minimal as possible) and I’ve also moved the capacitor and pull up resistor for the reset on to this board meaning the TempTX (as I’ve been calling it) now requires two less components and a little less space. Of course only one adapter is required for as many of the TempTX nodes that are used so in the long run the saving of components required and time to build will make more sense. This adapter also allowed me to re-order the programming pins on the main board which further reduced the number of links required and therefore the space required. Other than using a resonator instead of the crystal and load capacitors I think this is as minimal as this board is going to get. I suppose you could omit the programming header and program the ATmega in another board but that’s probably taking minimalism a bit too far.

One thing I overlooked in the original design was that the DS18B20 temperature sensor was constantly powered up, so even when the ATmega was put to sleep it was still sat there wasting power, they don’t draw much power when idle but every little helps so I’ve changed this in the new design by connecting the power pin to an output that is only turned on long enough to get a reading, turns out this is only around 840ms.

Smaller, simpler and more efficient; The TempTX V2:

I’ve also cleaned up the code and updated it for Arduino IDE 1.0, adding plenty of comments along the way and removed a rogue delay that was causing the previous version to stay awake for longer than required for each reading. To further reduce the power consumption I’ve changed the time between each reading to once a minute as every 10 seconds was a bit over the top on reflection. That and the other improvements mean it is now only fully active for around 900ms out of every minute, for the rest of time the RFM12B is in standby, the DS18B20 is off and the ATmega is in low power mode waiting for the watchdog timer to wake it.

I’ve done some measurements and it is drawing approx 7mA for the 900ms it is awake and the idle current is too low for my cheap meter to read (its going to be in the µA range). Should have some nice improvements on the already good battery life.

I’ve also run some tests on the voltage required to keep it running and it seems to run fine until it drops below 2.71V. I’ve put a fresh set of batteries in and will see how long it runs, don’t expect an update on that any time soon!

Here is a picture of the FTDI to TempTX adapter and one with it connected.


The code is available on GitHub here and this is the code I’m running on a NanodeRF (actually a Nanode 5 with an RFM12B) to upload the readings from these and the sensors I’ve built into my graphical displays to my installation of emoncms.

Here is a screenshot of emoncms showing power usage and readings from 5 temperature sensors.

Cost to build one of the TempTX units is approx £12 (a couple of pounds less while I still have some of the cheap ATmegas that I bought when Proto-PIC had them on special offer) and that is almost all the cost of the ATmega, RFM12B and DS18B20.

Parts list for the TempTX:
Stripboard min 15 holes x 24 rows (40x65mm)
RFM12B transceiver
ATmega328P-PU with Arduino bootloader
28 pin DIL socket
16MHz Crystal
2 x 22pF ceramic capacitors
DS18B20 temperature sensor
4K7 resistor
2 AA Battery holder
5 pin right angle male header
3 pin header & connector for sensor (optional)
Wire for links
Wire for antenna (165mm for 433MHz or 82mm for 868MHz)

Parts list for the programming adapter:
Stripboard min 10 holes x 6 rows
6 pin right angle male header (with one pin pulled out)
5 pin right angle female header
MCP1702-33 voltage regulator
10uF electrolytic capacitor
3 x 100nF ceramic capacitors
2 x 10K resistor

24 thoughts on “TempTX V2 Wireless Temperature Sensor Module

  1. Hi Nathan!

    Just found all of this Open Energy Monitor concept which *is* awesome.
    I think I’m going to replace my CurrentCost Envi, sooner than I expected…

    About this wireless sensor, can you please tell me if is it possible to add barametric and humidity sensors to this module? (with expense of battery life, of course)
    I would like to build/have one of these to log outside weather conditions.

    Thanks for making such good projects freely available.


  2. Hi Nathan,

    Thanks for the great website.

    I’m very new to this (it’s my first electronics project) and I’ve just bought a Nanode RFX and all the bits to build the programmer and the wireless sensor node. It’s all built and h/w seems fine having tested it with a multimeter to check all connections are where they should and shouldn’t be.

    The only thing I changed in the code so far is the frequency which the RFM12B is operating at since I bought the 868Mhz module in order to be compatible with the standard Nanode RFX. I also added some serial print statements to figure out where it is hanging and to confirm that freq = 2 after the rf initialisation.

    When I look at the serial output on the wireless node it is hanging at the rf_write(); function. I’ve had a look at the rf libraries to see if it would give me a clue but it’s not easy to figure out where to start in terms of troubleshooting.

    The voltage and temperature will print correctly when I include serial print before the fr_write(); function.

    Any thoughts on how I should proceed with troubleshooting would be really appreciated.



  3. …..I solved that problem. Obviously my wiring verification wasn’t up to much. I forgot to include the wire going from nIRQ on the RFM12B up to the atmega. The wireless sensor node doesn’t freeze at all now and seems to do what is required by the code when i debug using the serial print.

    However, I am getting the following serial output from my Nanode RFX:
    Sending to emoncms: {rf_fail:1}

    And I can’t figure out why. The Nanode RFX is connected to my network and getting IP etc. but is not able to send data to a server though I am assuming I can test that the RF connection is working correctly before going on to getting the data online.



  4. @Luis Yes, plenty of scope for adding extra sensors, it’s something I’ve thought about myself but haven’t evaluated anything yet.

    @Glenn That’s great that you are building one. As you’ve probably figured out the rf_fail:1 indicates that the Nanode hasn’t received anything for 30 seconds, if you are getting a good result between these, eg. {rf_fail:0,node_rx:1002,node10_v:4171} then increase the ((millis()-lastRF)>30000) from 30000 to say 180000. I’m running 5 sensors each transmitting every 60 seconds plus an emontx transmitting every 10 seconds so I should always receive something within each 30 second period. If you only have one transmitter sending every 60 seconds then this won’t be the case.

    If you are only ever getting rf_fail:1 then it would be worth trying these simple RFM12B test sketches to check communication between the two: https://github.com/ichilton/nanode-code/tree/master/test_rfm12b
    Note it says there that it needs updating for Arduino 1.0 but it doesn’t, it will work fine as is.

    If that doesn’t work then it has to be hardware related.


  5. Thanks lots for your helpful answer Nathan.

    I just put the sketches you suggested on the wireless sensor node and Nanode RFX.

    With the test_tx on the wireless sensor node I get the following repetitive output on serial from the wireless sensor node:

    Woke up…
    Sent 8
    Going to sleep…
    Woke up…
    Sent 9
    Going to sleep…
    Woke up…
    Sent 10
    Going to sleep..

    I get nothing appearing on serial from the Nanode RFX.

    When I reverse the sketches I get nothing on the wireless sensor node and the following followed by a long (potentially indefinite) pause on the Nanode RFX:

    Going to sleep…
    Woke up…

    This suggests I guess that there is something up with the Nanode RFX?

    I don’t think it’s the cause but one thing playing on my mind is the Board setting I use in the Arduino IDE when uploading to the Nanode RFX. I use Arduino Duemilanove w/ ATmega328 since it didn’t work properly with Arduino Uno and I realised the ATmega328 was the chip I had on the board…. If I’ve done that wrong could that be causing some problem?



  6. You are using the right board setting there. I agree it sounds like a problem with the Nanode RFX, if it is one of the pre-built units you wouldn’t be the first to get a duff one. Check there are no shorts on the RFM12B connections and check for continuity between it and the ATmega.

    Hopefully you can make sense of my rather poor diagram here:
    The pin numbers refer to the Arduino pins indicated in red here:

    The only difference on the Nanode being that the nIRQ shown as going to pin 2 will actually go pin 5 on the 74HCT125 (14 pin buffer chip) and then pin 6 on that goes to Arduino pin 2/ATmega pin 4.


  7. Thanks again for helping me with this.

    The capacitor is definitely installed in the space for the ICSP header so thats ok.

    I’ve checked all the connections between RFM12B and the ATmega and all seem ok too.


  8. engineer : Nathan Chantrell . Esquire

    Can I switch IC ATmega328P-PU to the PIC16F628. Possible that guided me through the link and programmable IC PIC 16F628 and I’ll be happy with my service engineer Nathan Chantrell

  9. Hello Nathan,

    Don’t want to be boring, but could you give me some pointers on how can I attach other sensors (BMP085 and DHT022) to your TempTX?
    I just need the “big picture” on how to connect these other sensors to a remote TempTX to learn the basics on how to connect these sensors to the TempTX node.
    Should/can I use the ATMega pinout to figure this out?

    Thanks for any help.
    P.S.: Congratulations for your new ATtiny TempTX. You’re taking this seriously 😉

  10. Hi Nathan,

    Thanks for answering.
    With your help – not only your answers but also your posts on this subject – last weekend I finally made my first TempTX V2.(in a breadboard).
    This was only to have more flexibility and to be able easily connect other sensors.
    I will follow your tip on connecting the BMP085 and see how it goes.

    Thanks for your help.

  11. Hello Nathan, i am new to programming. I want to build your TempTX V2 for a project at my university. But i don’t figure out, how i contect the TempTX V2 to the PC. I see that you use 433MHz or 868MHz. Do i only need a receiver for 433 Mhz or 868Mhz.

    Sorry for my bad english 🙂

  12. Hi Nathan, I programming my Jeenode V6 with your code Temptx wireless temperature node,

    I put in debug mode but at the serial console See:

    Voltage: 3352

    I think is a problem with the port can you help me ? I don’t understand the correct way to translate the Arduino port to Jeenode port
    Please let me Know

    Best Regards

  13. Thanks for answering,

    this evening I will be trying with the new version and the port you suggested.

    Thanks for your help.
    Best Regards


  14. Hi nathan,,its very useful data for me ,,As part of my research i need to take the temperature reading of rotating system,, Is it possible to do they same thing for rotating system of 10 points of thermocouple at a distance of 25 feet,,,can you please suggest the specification for the same..

  15. Hi Nathan, thanks for keeping this page, I’ve used it as inspiration for a 6-thermometer monitoring node. In this particular application, temperatures can change as quickly as 1 deg/10s, but can also be steady for hours. Hence the temperature sampling interval is set to 10s, however I do not want to transmit readings at that rate as it would drain the battery and generate lots of (identical) readings that need logging. Therefore the code is extended to only transmit the temperatures if any of the readings differs by more than 1.0 degree from the readings that were sent previously. This reduces the data volume / battery consumption a lot (but makes the plotting of the logged data a lot harder).

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.