RF Temperature Sensor
Low Power  Low Cost Wireless Sensor

using nRF24L01+

A few years ago I designed the Low Power Temperature Sensor.  It has severed me well and I have sold boards all over the USA and Europe.  Although the performance of the board has been good there is the problem of cost.  The project was based on the XBee radios.  They are not inexpensive; and, of course, you need at least two.  So I undertook to design something similar using the very low cost nRF24L01+ radio.

 

To the left is a photo of the nRF24L01+.  It is slightly more than an inch long and half an inch wide.  Here is a data sheet from the manufacture.  It is important to note that it is a part designed to operate on a maximum of 3.3 volts, although signal lines are 5 V tolerant.

 

 

To the left is a rendering of the silkscreen.  This is Version 2.0 of the board; very similar to Ver. 1 but a little larger with an improved layout.  Photo to the right.  Click on either to get a larger image.

Here is the schematic of Version 1

Here is the schematic of Version 2

Here is the schematic of Version 2.1  (same as Ver 2 except for JST connector)

Here is BOM

  You can order a set of three bare boards from OSH Park.  Version 1 or Version 2.  I am selling a Version 2.1 bare board for $5 ea.
A preprogrammed ATmega 328 is available for $10.  See my order page.
 
If you buy preprogrammed microcontrollers from me then you don't have to worry about programming the board but if you want to do it yourself then you need the file to the right.  Edit it into your Arduino boards.txt file.

When you open Boards in the Arduino IDE you should see the bootloader as in above.

##############################################################
lopower.name=Arduino Ultra Low-Power (<2.4V, 8 MHz) w/ ATmega328 
lopower.upload.protocol=arduino
lopower.upload.maximum_size=30720
lopower.upload.speed=57600 
lopower.bootloader.low_fuses=0xFF
lopower.bootloader.high_fuses=0xDA
lopower.bootloader.extended_fuses=0x06
lopower.bootloader.path=atmega
lopower.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex
lopower.bootloader.unlock_bits=0x3F
lopower.bootloader.lock_bits=0x0F 
lopower.build.mcu=atmega328p
lopower.build.f_cpu=8000000L
lopower.build.core=arduino
lopower.build.variant=standard
##############################################################

The easiest way to install the bootloader is to unzip Ultra Low Power.zip into your hardware folder in Arduino Sketchbook. If there is no “hardware” folder then create one.



 

 

The test unit ran almost eight months reporting data every 20 seconds.  Powered by two AAA batteries. The unit stopped when the voltage dropped to 2 volts but the sensor still reported temperature data even though it was 0.3 volts below its spec.

Click on graph for larger view.

Lowest Cost Option

The lowest cost configuration of the board is to use the MCP9700A low cost temperature sensor.

Its advantage is that it will operate at a voltage of 2.3 to 5.5 volts and has a low operating current of 6 µA.  This allows the use of a two cell AAA battery pack and the elimination of the voltage regulator.  Solder a jumper between Vin and Vout on the printed circuit board.  There is also no need for the LEDs or pushbutton switch.

The disadvantage is that the MCP9700A is not very accurate.  The spec is ± 2º C  The output is a voltage of 10.0 mV/ºC  This means the ATmega368's 10 bit A/D and internal reference of 1.1 Volt add to the inaccuracy.

On the other hand, if you order the MCP9700A and ATmega368 preprogrammed from me I will calibrate it at room temperature with a laboratory grade mercury in glass thermometer with one tenth degree C resolution.  A trim value is stored in the ATmega368's EEPROM and used by the software.  This is not a bad option unless you are a fanatic, like me, for wanting fractional degree resolution with high accuracy.

 
 

Maniacbug Wireless Sensor Networking Option

If you install the three LEDs, the pushbutton switch and jumper JP10 so that the switch is connected to pin S1 the board will be compatible with with the maniacbug wireless network sensor node.  I found the maniacbug network software too difficult to understand but it is easy enough to load his software into the ATmega 368

DS18B20 Temperature Sensor Option

The DS18B20 is a much more accurate sensor.  The spec is ± 0.5 ºC  The temperature is converted by its internal 12 bit A/D and conveyed to the microcontroller digitally.  Although they cost around $5 at the major electronic distributors, the DS18B20 can be obtained for a little over $1 from Chinese sources found on eBay.  It is also available mounted into various special purpose housings.

On the printed circuit board the IC can be directly soldered at the IC4 location or you can use the Molex header H1.

DHT22 Temperature and Humidity Option

If you desire humidity data as well as temperature then you can use the DHT22.  I was skeptical of this device because of its resemblance to the crappy DHT11 however after I used it I found it to be an accurate and reliable sensor.  Like the DS18B20 the DHT22 formats its data internally and sends it to the microcontroller digitally (but with a different format).  The sensor can be found on eBay for less than $4  Here is the sketch I use.

DX.com has a protective cover

Here is an extremely well done report on the DHT22.

 

TSic ®506F Option

This sensor is also like the DS18B20 in that it has a digital output.  The output is its own unique format but there is an  Arduino library for the device.  It is the most accurate electronic sensor I know of.  Here is data sheet and application note.  I have not used this sensor, as yet, it is very expensive and, even worse, there is a minimum fright of $20 for one little IC.  If anyone knows of another source please contact me.

With an accuracy of ±0.1 K, the sensor is more accurate than a class F0.1 (DINEN 60751) platinum sensor.

 

Battery Power Options

With the first two options above the lowest cost is with a two cell battery pack.  You need to solder a jumper between pins 2 & 3 ( Vin & Vout) of IC1.  The sensor will run until the voltage sinks down to 2.3 Volts.

If you use the option of a DS18B20 or DHT22 sensor you need a supply of 3.3 to 5 volts.  In this case use a three cell battery pack or a Li-Po.  There is a spot for a JST connector on the Ver. 2 board.  Install the MCP1700-3302E/TO regulator which powers only the nRF24L01+.  The rest of the circuit runs directly off the battery.

Line Power Option

If the sensor board is to be operated within reach of the power mains you can power it directly without using batteries.  One way is to solder a 2x3 male header to the bottom on the board (JP3, JP4, JP6 on schematic) see photo to right and plug the sensor board into a breadboard with a power supply power rails.  See photo to left of a Ver. 1 board; click on photo for a larger view.

If you jumper out the regulator like with the two cell battery option then select 3.3 Volt on the breadboard power supply.  Otherwise, if the MCP1700 regulator is in place select 5 Volts.

You don't have to use my RF Temperature Sensor board for the receiver side.  There are a number of Arduino clone boards and shields on the market that have the nRF24L01+ header on board.

Here are some, there are surely others.

Here is a sketch you can use.

iTreadStudio has a number of boards and shields.  Click in the nRF24L01 tag.
Embedded Coolness has three different Arduino compatible boards sold as kits or bare
Firebirduino has several boards that are through hole and bare boards can be obtained from OSH Park.
proMini 3.3V shield
DevDuino Sensor Node
Elecrow Sensor Node V1.2
nRF24L01+ module breadboard friendly
Wireless board V2.0
Joystick Shield For Arduino nRF24L01 many sources from China like this one from eBay
The nRF24L01+ is interfaced with SPI.  There are two control signals CE and CSN.  There is no standard as to which Arduino pins are connected to these signals so you must edit your Arduino sketch to match whatever board or shield you are using.

Mostly I send the sensor data to the computer screen but it could also be displayed on a LCD as in the photos to the right.

Click on photo for a larger view.

 

 

This is from a 2.2" TFT LCD

Actually it is a TFT LCD mounted on a prototype shield called the TFT-Pro that I am helping to test for the designer.  The shield also has a nRF24L01+ interface and a Real Time Clock.   Expect Version 2 of TFT-Pro to be released in early 2015.

 

 

Or a four line LCD if you are using a DHT22 sensor.  This is from a Version 1 board.

Here is a sketch for this.

 


Roger's Embedded Microcontrollers Home Page     


This page written by Roger Schaefer. Last updated March 1, 2015