loading
So this Lazy Old Geek (LOG) loves gadgets. My friend told me about and sent me a couple of NRF24L01+ modules.
 
So, being a Geek, I needed an application for them and I decided on a bunch of wireless temperature modules sending information back to a central location. Actually I have to give some of the credit and inspiration to Maniacbug:
http://maniacbug.wordpress.com/2012/03/30/rf24network/

Step 1: NRF24L01+ Module

So what is an NRF24L01+ ? Technically, it’s that little black chip in the middle of those modules in the picture. It allows wireless communications between similar devices. That’s how cellphones work. That’s how wi-fi works. The chip is called a transceiver as it has both a transmitter and receiver in it so it can send and receive information. The ‘+’ is just an upgraded version of the NRF24L01.
 
Simple: Basically, it allows two devices to communicate wirelessly over a distance. It’s similar to Bluetooth.
 
TechnoGeek: Here is the website for the IC itself.
http://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRF24L01
 
The NRF24L01+ module includes all the supported electronics to make a complete transceiver that will easily interface with an Arduino. They’re available on eBay for about $2 a piece.
http://www.ebay.com/itm/Leatest-2-4Ghz-nRF24L01-RF-Transceiver-Module-ISM-/270986572433?pt=LH_DefaultDomain_0&hash=item3f180ef291
 
Warning: Most modules are fairly standard with eight pin interface but I guess there are some with 10 pins.
 
And there is a version with an amplifier and antenna for longer range:
http://www.ebay.com/itm/2-4G-Wireless-nRF24L01-PA-And-LNA-Module-/280924811830?pt=LH_DefaultDomain_0&hash=item41686c7236
With some power modifications, this one should work fine with my PCBs.
 
NRF24L01+ and the Arduino: As I like to work with the Arduino, I searched for an Arduino library for the NRF24L01+. My favorite is the one from Maniacbug, again:
http://maniacbug.github.io/RF24/
https://github.com/maniacbug/RF24Network
And here’s some getting started info:
http://maniacbug.wordpress.com/2011/11/02/getting-started-rf24/

Step 2: DS18B20 Temperature Sensor

There are a lot of temperature sensors out there. I’ve used a lot of them in different projects. The LM35 is pretty cheap. But for this project, I chose the DS18B20. It’s only about $1.30:
http://www.ebay.com/itm/2PCS-IC-DALLAS-TO-92-DS18B20-/250814818630?pt=LH_DefaultDomain_0&hash=item3a65ba6946
 
Here’s the datasheet
http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf
 
The primary reason I selected the DS18B20 is the accuracy. It is calibrated to +/- 0.5C. Most of the other cheap temperature sensors have to (or should be) calibrated at various temperature points to achieve better accuracy.
Irrelevant Information: Calibration: A typical two point calibration is to use freezing temperature of water, 32F (0C)and boiling point of water, 212F (100C). But wait! This boiling point is only true at sea level. My altitude is about 4600 ft. so boiling water is about 203F. Okay, this is a lot of work and I’m LAZY so I will just assume that the DS18B20 is as accurate as claimed.
Secondary reason: the DS18B20 is digital as opposed to analog. Analog sensors accuracy varies with associated components and noise. Digital data is not subject to any of that.
Technobabble: The DS18B20 data is transferred serially, specifically SPI (Serial Peripheral Interface). But serial is digital. Simply speaking, there are two versions of digital data, serial and parallel.
Third reason: This one only a Geek can love. The DS18B20 uses something called a 1-wire buss. In theory what this means is that you only need one wire to connect the DS18B20 to the receiver (Arduino, in this case). In practice you need two wires as the circuit needs a ground. And full disclosure, I’m using three.
Mostly irrelevant Info: Some readers may have noticed that the picture shows the DS18B20 labeled as Dallas but the datasheet is Maxim. And I’m pretty sure the DS in DS18B20 stands for Dallas Semiconductor. Well, Dallas Semiconductor designed and manufactured a lot of really great ICs. I’m fairly certain they developed the 1-wire devices. Alas, they were bought out by Maxim.
 
DS18B20 and the Arduino: So, of course the Arduino needs a special library for the DS18B20 or actually for the One wire. I think there may be variants on this library or at least different versions but I used this one:
http://www.pjrc.com/teensy/td_libs_OneWire.html
 
Here’s some more info on DS18B20:
http://arduino-info.wikispaces.com/Brick-Temperature-DS18B20
 
I am also using the Dallas Temperature library. I think the only thing I’m using it for is the conversion of Centigrade to Fahrenheit, which I could’ve written myself. However, there’s a lot of other things you can do with this library.

Step 3: Putting It Together

So I could buy a bunch of Arduino UNOs or clones and proto shields but that gets expensive.
Since I’ve been in to making PCBs, I decided to make my own Arduino with NRF24L01+ modules.
WARNING: If you design your own PCBs, be careful with where you place the NRF24L01+ module. On my first PCBs I had it hanging over the Atmega328 IC and I couldn’t get it to work. I’m pretty sure it’s because of RF interference. The NRF24L01+ module and the AtMega328 both have 8/16MHz clocks and I’m pretty sure they were interfering with each other. I moved the module so that it sticks away from the AtMega. See picture.
 
So one PCB has the AtMega, a NRF24L01 connector and a DS18B20 on it. This one needed to be portable, so I needed battery power.
Power Requirements:
AtMega328      2.7Vdc  Arduino (2.9Vdc??)
Apparently the AtMega with 16MHz clock won’t work at less than 3.78Vdc.
          NRF24L01+     1.9Vdc
          DS18B20          3.0Vdc
Anyway, I decided to use 18650 Lithium ion batteries, which have voltages from about 4.2Vdc down to 2.0Vdc. With this design, the temperature module will operate at decreasing voltage as the battery discharges over time.
WARNING: Since the LOG Temperature PCBs don’t have a voltage regulator, you need to connect an 18650 battery to them even to load an Arduino sketch.
To make the project more complicating, I decided to use the AtMega328P at 8MHz so that they should be able to work at lower voltages.
 
The second PCB has the AtMega328P, a NRF24L01+ connector and a Nokia 5110 LCD on it.
Nokia 5110:
http://www.ebay.com/itm/1PCS-84X48-84-48-LCD-Module-with-White-Backlight-Adapter-PCB-For-Nokia-5110-/370820681047?pt=LH_DefaultDomain_0&hash=item5656a28d57
 
This will display the temperatures and the battery voltages from the Temperature PCBs.
 
PROBLEM: When I tested some of the Temperature PCBs, I noticed that the battery voltages were a little high. This design sets the Arduino using its internal 1.1Vdc reference and uses a voltage divider to bring it into useable range.
SOLUTION: Well, I don’t know if my voltage divider resistors are too far out of tolerance or the 1.1V reference isn’t great but I put a correction factor in the sketches. The calculated multipler is 4.2 but I tried 3.9 to get better results.

Step 4: Power Consumption

Some Arduinoites may have seen 3.3V Arduinos and noticed that they have 8MHz clocks instead of the usually 16MHz clocks. For example:
https://www.sparkfun.com/products/10914
Well, there is a reason why they run at 8MHz instead of 16MHz:
https://www.sparkfun.com/tutorials/244
If my calculations are right, this means that at 16MHz, the AtMega328P is guaranteed to work down to about 3.78V, so is not guaranteed to work down to 3.3Vdc or lower. I suspect that most AtMega328Ps will run at lower voltages but they may not.
 
My Temperature modules are powered by 18650 Li-Ion batteries. I am hoping to allow operation down to 3Vdc so I decided to go with the 8MHz.
Implementing 8MHz: The hardware is pretty easy, just use an 8MHz crystal instead of the usual 16MHz. Software is a little harder. To work properly at 8MHz, the Arduino has to have an 8MHz bootloader installed.
 
8MHz Bootloader:
Some of you may already have a method to do this but here is one fairly simple way to do it:

http://arduino.cc/en/Tutorial/ArduinoISP

Now I have a special ISP cable to do this and I recently converted my MTS_Optiloader PCB to do this but I use the same basic software procedure as above.
When selecting the Atmega328 8MHz bootload, I think the following will work:
          Arduino Fio
          Lilypad Arduino w/Atmega328
         Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328
I like to use the last one.
Once the Atmega328P is bootloaded, I would suggest you label it as 8MHz.
Caution: Being a GEEK, I’m programming a lot of Arduinos, some which are 16MHz and some 8MHz. Try to remember to select the correct ‘board’. I just tried to program an 8MHz with Arduino UNO selected, it failed to program. So it shouldn’t cause major confusion.
 
So I got a few of these PCBs made and working.  I installed some charged 18650 batteries in the Temp modules and ran them.
PROBLEM: The batteries lasted less than a day.
SOLUTION: Since the Temp modules aren’t doing anything between samples, I decided to try to put them to sleep.
Well, I found a pretty nice little library that does what I need:
https://code.google.com/p/narcoleptic/
https://code.google.com/p/narcoleptic/downloads/list

This is used in the battery-operated sketches to reduce battery drain.



Step 5: LOG PCBs

My Remote Temperature PCB and TemperatureLCD5110 PCB schematics are shown. The Boards are available in the Eagle ZIP file.
 
Remote Temperature PCB BOM
1  Remote Temperature PCB
4  0.01uFd capacitor
2  22pF capacitor
1  47uFd capacitor
1  1n4148 diode
1  DS18B20 Temp sensor
1  Atmega328P microcontroller
1  28pin IC socket
1  NRF24L01+ module
1  10K resistor
1  4.7K resistor
1  240K resistor
1  75K resistor
1  1.5k resistor
1  JST2.0 connector
1  8MHz crystal
1  tactile pushbutton
1  LED 3mm
1  18650 battery and holder
Male and female header pins
 
Estimated total cost is about $12@
 
TemperatureLCD5110 PCB BOM
1  TemperatureLCD5110 PCB
1  JST2.0 connector
4  0.01uFd capacitor
2  22pF capacitor
1  47uFd capacitor
1  DS18B20 Temp sensor
1  Atmega328P microcontroller
1  28pin IC socket
1  NRF24L01+ module
1  LCD5110 display
5  10K resistor
1  4.7K resistor
1  1K resistor
1  16MHz crystal
1  tactile pushbutton
1  L78L33 voltage regulator
Male and female header pins
 
Estimated total cost is about $17
 
Notes:
 
Both PCBs are single sided so some jumpers are needed.
GN1 and GN2 are ground points. I usually hook a wire between them for testing purposes. It’s a good place to attach DMMs and/or oscilloscope.
The NRF24L01+ will work from 1.9 to 3.6Vdc. Since a fully charged 18650 is about 4.2V, diode, D1, is added so the voltage to NRF24L01+ doesn’t exceed 3.6Vdc.
The TemperatureLCD5110 PCB can be powered by USB or by a 5Vdc supply. There are places for two DS18B20 temperature sensors on this PCB but the sketch only supports one.

Step 6: Sketch Setup

So this is a rather complicated project for Arduino sketches.
I used Arduino 1.0.3 version.
The following libraries need to be added. They are in a zip file:
Adafruit_GFX                    LCD5110
Adafruit_PCD8544            LCD5110
DallasTemperature           DS18B20
One Wire                          DS18B20
Narcoleptic                        Atmega328 sleep
RF24Master                      NRF24L01+
RF24NetworkMaster          NRF24L01+
 
DS18B20 Address
Each DS18B20 sensor has a unique address. You need to know that address so that you can talk to it.
I would recommend that you test each DS18B20 on a breadboard and get its address.
If you haven’t done this or can’t remember, here’s a way to find it after it’s already installed on one of these PCBs.
 
Connect the TemperatureLCD5110 PCB or RemoteTemperature PCB to your PC with a USB adapter. I use a PL2303 module but you can also use a USB-BUB.
WARNING: Since the RemoteTemperature PCBs don’t get voltage from the USB, you need to connect an 18650 battery to them even to load an Arduino sketch.
 
In the Arduino environment, make sure the correct serial port is selected. Make sure the correct Board is selected:
TemperatureLCD5110 PCB      Arduino UNO
RemoteTemperature PCB         Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328
 
Under ‘File’ ‘Examples’ scroll down to OneWire and select
DS18x20_Temperature
In the sketch about eight lines down, you will see this
OneWire  ds(10);  // on pin 10 (a 4.7K resistor is necessary)
10 is the Digital pin used in the example. Change it to:
OneWire  ds(4);  // on pin 10 (a 4.7K resistor is necessary)
Upload the program. Open your Serial Monitor and set for 9600 baud. You should see something like the next picture.
The first line shows the address: 28 6B 88 B4 4 0 0 D1
FYI, this is in hexadecimal. Write it down or put it in a database.
When you exit the environment, you don’t need to save the changes.
 
NRF24L01 address:
The NRF24L01+ modules also have an address but unlike the DS18B20 they are not unique to the physical module. The addressing is done in software.
Now, I am using ManiacBug’s network addressing, RF24NetworkMaster which is an extension of his RF24 library.
For this version, the channel is 90, node 0 is the TemperatureLCD5110 PCB and the RemoteTemperature PCBs are nodes 1 – 5. This sketch will not support more than 5 RemoteTemperature PCBs.
 
TemperatureLCD5110 PCB sketch setup:
The TemperatureLCD5110 PCB sketch needs to be setup for your particular situation. First the DS18B20 address must match the sensor.
Using a text editor (I use Notepad++ but Notepad or Wordpad will work), open up LCD5110Receive.ino.
Find the line similar to this one:
DeviceAddress Therm1 = { 0x28, 0x6B, 0x88, 0xB4, 0x04, 0x00, 0x00, 0xD1 };
Change it so that the hexadecimal numbers match the address you found on your DS18B20. ( NOTE: That each number is prefixed with 0x so that it is identified as hexadecimal. Either 0x0 or 0x00 should work)
 
Next you will need to select the number of RemoteTemperature PCBs you will be using:
// Number of Temperature sensors
#define NumNodes 3
Change this as needed (maximum of five)
 
One other line you may want to change is the LCD5110 contrast:
          display.setContrast(55);     // Choose best contrast
This is under void setup(){
Try various values and decide on your preference.
 
Fahrenheit or Centigrade:
If you want Centigrade instead of Fahrenheit, change:
          bool centigrade = false;
to:
          bool centigrade = true;
 
RemoteTemperature PCB sketch setup:
Note in the picture I put a red number in the lower right corner. This identifies the RemoteTemperature PCB.
I could have been clever and elegant and maybe stored module specific information in the EEPROM but I’m LAZY so I just wrote individual sketches for each module. What I would suggest is copy the TempTransmit1 directory to TempTransmit2 and change the .ino file to TempTransmit2 and make the following changes to all. Repeat for other modules.

One, you need to put in the correct DS18B20 address as above:
DeviceAddress Therm1 = { 0x28, 0x6B, 0x88, 0xB4, 0x04, 0x00, 0x00, 0xD1 };
  The 0x prefix comverts it to hexadecimal.
Two, you need to put in the correct node address
// Address of our node
const uint16_t this_node = 1;
Change it to the number you marked on the PCB. Start with 1 and sequence up.
You might also want to change the sleepDelay.
          int sleepDelay = 10000;     // in milliseconds
This is the length of time (10 seconds), the AtMega sleeps between sending samples. I’m fairly certain this is limited to a maximum of about 32 seconds. If you increase the sleepDelay, it means the battery will last a little longer between charges.

Step 7: Operation

So if you have the TemperatureLCD5110 PCB and at least one RemoteTemperature module running, the LCD should display the temperature and voltage of the module. This may take a while depending on the sleepDelay you set. My setup isn’t very robust and some samples may not be received. Many factors may influence this:
Voltage of 18650
Distance and obstructions between the modules
About every minute, the LCD temperatures and voltages will clear to zero. This is so you can tell if the modules are sending new data or you’re just seeing old data. If a module stays at 0, it probably means the battery voltage is too low. I suspect the modules will run down to about 3Vdc.
 
Temperature module LEDs should blink about every 10 seconds (sleepDelay). If they don’t blink, the AtMega has probably stopped working. Try pushing the Reset button or replacing the 18650 battery.
Caution: the blinking LED does not necessarily mean it is transmitting.


You can scatter the RemoteTemperature modules around in various rooms and maybe outside to monitor temperatures in different spots.
 
Battery life: You can tell if the battery is probably dead if the LED is no longer blinking and/or the LCD shows zero. Well, I’ve had various problems with my modules but had a couple where the battery lasted over 30 days. This depends on many factors, battery capacity, charger, components. But that is long enough for my needs.
<p>Hi,</p><p>Can someone explain to me how to extract values of each node string in a &quot;float&quot;.</p><p>I tested several method but no luck. I would put these value in MySql database. </p><p>When i Serial.print(payload.tempC) i obtain the value but she is generic if i connect other nodes to base.</p><p>Thanks in advance. Sorry for my english...</p><p>Regards</p>
<p>Sorry, I don't quite understand what you are asking.</p><p>I'm assuming you want to take the Arduino output data and put it into your database.</p><p>So the Arduino writes the data to a Serial port on the computer (Windows? Linux?)</p><p>If you are using MySql you are probably using something like PHP or Perl or Linux.</p><p>You will need to write a computer program to read the serial data and write it to the database. </p><p>Things you need to know:</p><p>The serial baud rate. Serial.begin(9600); probably 9600</p><p>And the Com port #. This is the Com port that you use to connect to the Arduino.</p><p>So if tempC is defined as a float, then you should be able to read it in as a float in your computer program. </p><p>WARNING: you cannot run the Arduino environment at the same time as your computer program. </p><p>Hope this helps.</p><p>LOG</p>
<p>Thanks you;</p><p>My problem is i want to put tempC(node 1) and tempC(node2) and </p><p>tempF(node 1) and tempF(node2)</p><p> in String.</p><p>I have code for sending my other sensors like that:</p><p>data = &quot;temp=&quot; + String(t) + &quot;&amp;humi=&quot; + String(h);</p><p>String request = &quot;GET /add.php?&quot; + data + &quot; HTTP/1.0\r\n&quot;;</p><p>If i put for example :</p><p>data =NodeTempF[header.from_node]; //NO OK</p><p>Serial.print(NodeTempF[header.from_node]); //OK</p><p>I have an error.</p><p>I hope i explain myself well.</p><p>Thank you</p><p>Regards.</p>
<p>I think I see the problem. data is a string but NodeTemoF{header.from_node] is a float. (( Serial.print() automatically converts it))</p><p>There is an Instructable that explains this.</p><p><a href="https://www.instructables.com/id/Converting-Float-to-string-and-character-array-in-/step2/Improvised-Function/">https://www.instructables.com/id/Converting-Float-t...</a></p><p>There is a function called dtostrf(), I think it would be something like this:</p><p>dtostrf(NodeTempF[header.from_node], 4, 4, data);</p><p>Hope this works.</p><p>LOG</p>
<p>I have this error with these code:</p><p>cannot convert 'float' to 'char*' for argument '4' to 'char* dtostrf(double, signed char, unsigned char, char*)'</p><p>I want to extract each value separately if possible</p><p>I don't understand.</p><p>i see dtostrf()</p><p>Thank!</p>
<p>Sorry, I don't understand pointers. </p><p>I think you need to define data like this.</p><p>char data[10];</p><p>Then you shouldn't get that error.</p><p>But I don't know if this will work with the rest of your program.</p><p>LOG</p>
<p>Hi msuzuki777,</p><p>I've tested char data[10] and it seems to work. Thanks a lot for that. I tested more this afternoon.</p><p>Thank you!!</p>
<p>Glad it worked.</p><p>LOG</p>
<p>I tryed and it's works fine with some trick. Many thhank for your help and a your time.</p><p>This instructable is the best base that i have tested for multi nodes.</p><p>Regards</p>
<p>Is there really a need to put &quot;network.update();&quot; line in the transmitter code? It seems that I get very long delay here and sometimes even stuck.. </p>
<p>I do not know but I think you may be correct. I wrote these sketches a long time ago probably from some examples. Unfortunately, I don't understand the current version of the library so not sure. You might try just taking the update() out and seeing if it works.</p><p>LOG</p>
<p>Sorry for digging this out :) </p><p>You mentioned about unwanted interference with both micro-controllers, I have the same, they are too close. The &quot;stuck&quot; is in the network.update() line. I'm not sure if I have good rx code also, because I have other kind of display etc.. so I have some work to do with it ;) </p>
<p>Hi msuzuki777. Nice<br>project.</p><p>I am trying<br>to build the<br>temperature unit talking with Arduino Mega 2560.</p><p>I have two questions:</p><ul><li>a) In the materials list, you write<br>about 0,01 uFd capacitors but in Eagle schematics you write 0,1uFd. Which is<br>the right one?<li>b) I am going to put the temperature<br>unit static, not movable, so I am going to use 16MHz crystal because I have<br>enough power supply. Shall I change anything in the schematics?</ul><p>Thank you,</p><p>CaptainJ</p>
<p>Hi again<br>and thank you for you replay. I order to construct you PCB, I put the materials<br>I need schematically upon your PCB schematic. </p><p>I would<br>appreciate if you check it and tell you if I do it right (this will be my first<br>PCB&hellip;).Also in your previous message you<br>said that I can remove the R3 and R4 resistors. Ok with R4, but if I remove R3<br>I must remove and the Vcc+ connection too? </p><p>Thank you </p><p>Captainj56</p>
<p>PCB looks good. As far as R3 and R4, just leave the PCB and Vcc connection as is but do not install anything at R3 and R4. </p><p>If you are using 5Vdc that is probably too much for the nrf24L01. But one thing you can do is put two diodes in series in place of D1.</p><p>Good luck, </p><p>LOG</p>
<p>Good catch. The values are not critical but I used 0.1uFd capacitors. </p><p>If you are using 5Vdc you should have a 3.3Vdc regulator like the one shown in the LCD5110 module as the nrf24L01 needs to be powered with 1.9 to 3.6Vdc.</p><p>Also you might want to remove R3 and R4 as they won't calculate the Vcc correctly. And you really need to monitor it anyway.</p><p>LOG</p>
<p>I have a problem with the library RF24Network .<br>It does not work communication. I checked that the system works properly because communication by way of example &quot; GettingStarted.pde &quot; from the library RF24Master without RF24Network works OK on two Remote Temperature PCBs. Please help.</p>
<p>Already it works OK</p><p>Cold joint pin module and update RF24 and RF24Network library.</p><p>Thanks.</p>
<p>Sorry, I don't know what's wrong. You might check some of the other comments for some clues but I don't know.</p><p>LOG</p>
<p>Actually works with 2 nodes</p>
<p>Great job.</p><p>LOG</p>
<p>Hi <a href="https://www.instructables.com/member/msuzuki777/" rel="nofollow">msuzuki777</a>,</p><p>many thanks for share your work. I am tring to make a small sensor network to monitor laboratories' temperature around -20C where I work. I was able to reproduce a scenario with a receiver and a transmitter, but my goal is to have a receiver and multiple tranceivers, and i a second phase to store temperatures on a mysql database. Any suggestion to get a multi-transmitters scenario????</p><p>Best regards.</p>
<p>This Instructable is already set up for multiple transmitters up to 5. Each transmitter has to have a unique sketch with it's own node address. You can probably do more than 5 (see comments) but I haven't tried it.</p><p>Getting it onto a database is tricky. You could hook the receiver up to a computer serially and write a program to read the serial data. </p><p>LOG</p>
<p>so I have only to change this line??</p><p>// Address of our node<br>const uint16_t this_node = 1;</p><p>What does it mean this line???<br>// Address of the other node<br>const uint16_t other_node = 0;</p><p>On the receiver sketch i read this line</p><p>// Number of Temperature sensors<br>#define NumNodes 3</p><p>If I start to count from zero (the receiver) I can have 3 receivers. Is it correct???</p><p>Other question, actually with one receiver and transmitter I see on the receiver console 4lines of each packet sent by the node, why ???</p><p>For mysql data storage, I have another project where an arduino box with a DS18B20 read the temperature and push it via an HTTP request to a linux server with a php page that grab the data and store it on mysql db</p>
<p>The other node is the receiver module and will always be 0: </p><p>So the first transmitter would be:</p><p>const uint16_t this_node = 1;</p><p>The second would be:</p><p>const uint16_t this_node = 2;</p><p>Yes, it starts with 0 and you can have 3 transmitters. You can change NumNodes up to (I think 5) if you have more transmitters. With just one transmitter, you can change NumNodes to 1 and it should just display two lines, the transmitter and the receiver.</p><p>LOG</p>
<p>What does it mean this line???</p><p>// Address of the other node<br>const uint16_t other_node = 0;</p>
<p>The nrfl24L01 transceivers have six different addresses that it can transmit and receive on. this_node is the address for the transmitter module. other_node is the address of the receiver module. When the transmitter module sends data, it sends it to node 0. Part of the data sent is the this_node value. That is so the receiver knows which module it is receiving data from. If you'll notice in the receiver module sketch this_node is 0.</p><p>I like to think of addresses like mailing addresses, e.g., 1427 Main Street. For the nrfl24L01, it's limited to 0 - 6.</p><p>By the way, if you look at the sketches there is also a channel # 90 for all transmitters and receivers. As I understand it, this can be any value from 0 - 125 as long as both the transmitter and receiver have the same value.</p><p>In my example this is like Main Street. </p><p>LOG</p>
<p>help me! it not working</p>
<p>One possibility is that the DS18B20 is connected wrong.</p><p>But the most likely is that you don't have the right address for the DS18B20. As shown in step 6, you need to find the address of each DS18B20 and put that address in the sketch for that module.</p><p>Hope this helps.</p><p>LOG </p>
<p>thank you so much, I was successful</p>
<p>Glad you got it working.</p>
<p>I think that node numbers can be only 5, but there can be multiple &quot;same number nodes&quot; (like node5 clones) node5(id1), node5(id2)... sending data to node0. Data must be filtered, so that clones sends some ID also...</p>
<p>yes You are right the first repeater nodes can only be 5 than each of them can have 5 children ( leaf ) nodes, and again each children ( leaf ) node can have 5 more, and they have octal address so receiver is 00 repeater is 01 and the childs ( leafs ) are 011 ... 051.</p><p>But even when i am adressing it like this, and it is good addressing in min of RF24Network library and i set up repeater node to only network.update ( for non packet to be lost it must be in continious loop without delay or sleep ) something is wrong and i am not getting data from 011 through 01 to 00.</p>
<p>I would suggest you write some troubleshooting code for repeater node (01). Check to make sure you are getting data from child 011 by connecting to PC and displaying data to computer (serial). Make sure it has the correct node 011. </p><p>If that's okay, then I would write some different troubleshooting code for the repeater node and put some fixed dummy data like 123 and see if 00 receives it. (Make sure it is sending it to the correct node 00. It's possible, the code never reaches the Transmit section of the code. </p><p>The typical troubleshooting method I use is to write special code to test each portion of the code separately to see what portions are working and what isn't. </p><p>Hope this helps.</p><p>LOG</p>
<p>Hi there again :)</p><p>Maybe You can help me i tried to make repeater nodes with no effort, </p><p>I want to exteand the range of my transmitter as shown on maniacbugs blog. I have transmitter in basement and its sending data to nearly roof and sometimes i got loost packets. What i want to do is make that transmitter a leaf node with number 011 for example so it will communicate with node 1 and then to node 0. I am trying to do it few days by now without any luck. The electronic part is ok because when i gather everything in same room and change address form 011 to 02 ( than i am having 01 and 02 ) then i have communication from both nodes to receiver nr 0.</p><p>Can You please help me a bit ?</p>
<p>I've never tried this but here is a guess. For the intermediate Arduinos, you have to write special code so that they receive the roof sensor data and retransmit it (along with it's own data) to the basement device. </p><p>I'm afraid I'm too OLD to give you more specific coding but I think that's the general idea.</p><p>Good Luck.</p><p>LOG</p>
<p>Hi there, </p><p>At the beginning i would like to tell You that this is avesome job :)</p><p>I'm experimenting with this project, and i have a question.</p><p>You said that there can be only 5 nodes on 1 radio, i read a lot about RF24Network and found that Master Receiver hav address 0</p><p>than we have repeater nodes with address from 1-5</p><p>then we have child nodes / leaf nodes with coresponding address of repeater node i.e. : repeater node have leaf / child nodes 11, 12, 13 and so on.</p><p>the data goes from node 11 to node 1 and then to node 0 our receiver.</p><p>Do You know if there is possibility to implement it in Your code ?</p><p>It would be a good range extender in my case </p><p>Hope You will reply </p><p>With regards </p><p>Shalvan :)</p>
<p>ShalvaN,</p><p>Yes, you are correct that repeater nodes could be used. I think the maniacbug libraries I used already have this implemented so I'm pretty sure this could be implemented in my code. </p><p>One of the reasons, I limited it to five is that the LCD I used doesn't have enough room for more than five. Plus I didn't want to figure out how to do repeater nodes.</p><p>So if you want to implement this you will need to write the code yourself. I'm not that good of a programmer and since I'm LAZY and OLD it would be too hard for me to do it. If you'll have more than five sensors you may need to use a different LCD or just use the serial output for display.</p><p>I have some suggestions for extending sensors in the comments below.</p><p>LOG</p>
<p>I've already changed few things for example the mentioned above LDC i am using HD44780 type with I2C interface also to my receiver board I've plugged DHT-22 humidity sensor, BMP180 Pressure Sensor and as You DS18B20 but two of them one for inside temp and one for outside. Also my Transmitter is driving two pumps for my boiler and i have a simple LED tied to receiver to see &quot;from distance&quot; that temperature on boiler reached HIGH temp lets say its wery poor monitoring and automation system for my boiler :)</p><p>But this is only a beginning i am planing to go further :)</p>
<p>sir please help to how to increasing the nodes on above 5 nodes..... </p>
<p>This should be fairly simple. In the LCD5110Receive.ino sketch, there is a line</p><p>#define NumNodes 3</p><p>This is for three remote nodes and the receiver node is the fourth. Change it to </p><p>#define NumNodes 4</p><p>and you should be able to have a total of five nodes. I'm pretty sure that's all you need to do.</p><p>(I think you could also use #define NumNodes 5.)</p><p>LOG</p>
<p>thank u sir.</p><p>I want to received 15 node datas . For data logger parpes. I think its received maximum 5 nodes in one channel. How to find the channels in the receiver section in automatically give the some ideas.</p>
<p>Yes, you are right about 5 nodes per channel. So I think you would need a separate network for each channel</p><p><strong>Original code segments:</strong></p><p>// Network uses that radio</p><p>RF24Network network(radio);</p><p>// Channel of our node</p><p>const uint16_t channel = 90;</p><p>// Address of our node</p><p>const uint16_t this_node = 0;</p><p>// network.begin(/*channel*/, /*node address*/);</p><p>network.begin(channel, this_node);</p><p><strong>Multichannel code:</strong></p><p>RF24Network networkA(radio);</p><p>RF24Network networkB(radio);</p><p>const uint16_t channelA = 90;</p><p>const uint16_t channelB = 91;</p><p>const uint16_t this_nodeA = 0;</p><p>const uint16_t this_nodeB = 0;</p><p>networkA.begin(channelA, this_nodeA);</p><p>networkB.begin(channelB, this_nodeB);</p><p>Then you would have to modify or add a getRadioData() so that you're reading data from both networks</p><p>done = networkA.read(header . . . </p><p>done = networkB.read(header . . .</p><p>Then you could do the same with networkC.</p><p>Anyway, this is all based on maniacBugs RF24Network library:</p><p><a href="http://maniacbug.wordpress.com/2012/03/30/rf24network/" rel="nofollow">http://maniacbug.wordpress.com/2012/03/30/rf24netw...</a></p><p>I hope this helps you.</p><p>LOG</p>
<p>sir give the example programs for multi nodes </p>
<p>I don't know if I can explain it better than I did before. You need a unique sketch for each remote module. The sketch is a copy of TempTransmit1.ino, I have in the zip file but you have to modify it. Each remote module has a DS18B20 that has a unique address. You can find it using the method I show in step 6. This must be changed in the sketch for that remote module.</p><p>Also you must have a different node address for each remote module. node address 0 is reserved for the receiver module so I start with 1. So the first remote would be </p><p>const uint16_t this_node = 1;</p><p>The next woud be</p><p>const uint16_t this_node = 2;</p><p>You can do this up to this_node = 5;</p><p>Then if you have more, you will have to change:</p><p>const uint16_t channel =90; to </p><p>const uint16_t channel=91; and start over with</p><p>const uint16_t this node = 1;</p><p>In summary, each remote module will have a unique DS18B20 address and a unique network address which consists of channel and this_node.</p><p>LOG</p>
<p>sir i want example programs for multi nodes(15nodes) receiver section sir</p>
<p>Sorry, I am not in the business of writing programs. If you cannot write programs with the information that I provided, than I cannot help you. Perhaps you have friends that are more familiar with electronics and programming?</p><p>LOG</p>
<p>hi,I just want to know how DS18B20 can provide the voltage information output? just like &quot;3.9V&quot; shown on the last picture ?</p>
<p>I guess I didn't explain that part of the circuit. The voltage information is provided by the resistors R3 and R4. This is a voltage divider and the voltage is read by the Arduino. It doesn't use the DS18B20 for this.</p><p>LOG</p>

About This Instructable

108,917views

204favorites

License:

Bio: Lazy Old Geek
More by msuzuki777:Senior Moments Weather Station 5 IP Time Clock Part 2 
Add instructable to: