I love all your videos, but this is definitely my favorite!. Super clear information about rf communication. Thank you very much for all your teachings and professionalism!
I build a Halloween Haunt each year and the NRF24L01 along with your video will come in handy as I upgrade to a more automated system with less wires all over the place. Great video -- Thank you.
Andreas, many thanks for this tutorial - and obviously the code as well. I am just about to start experimenting with nRF24L01 modules and have been reading a lot of words and watching a lot of uTube. Your tutorials have worked in bringing all together for me. A Merry Christmas and a Happy New Year to you and your family. Alan
Very interesting series. I have a level sensor in the heating oil tank in my garden which transmits data back to two receivers in the house, and I often get problems with the connection, you have given me a few ideas to improve this. I have indeed found that using the amplified unit and larger antenna at the transmitter has helped - the traffic is one way only without acknowledge. Thanks for sharing!
+jix177 I hope it will work for you. Maybe you use a similar setup like mine to test the connection and find the right "spots" for the antennas or a free channel. After that, you still can go on with the one way transmission...
Thanks dude! Really good explanation especially about the ACK. I'm currently working on my final project involving the RF24 and is tempted to try the RF24Mesh feature. Maybe you could make a video about it too! (if you're also interested of course haha).
I agree with all the positive comments about your content and presentation... some "So called" tutorials on here make you want to hurt the presenter :) Thanks for your time and efforts Andreas, great job.
very interesting. I have ignored the nf24l01 but recently bought two nf24l01+ high power modules. the ones with the rubber ducky antenna. works well but I noticed the auto knowledge not to work in 1mbps and 250kbps. would only work in 2mbps. going to try your software to see if the issue is with my software or with my modules
+Flo wey No, 32bits would only be two 4 bytes which would be really small compared with the overall message size. 32 bytes is still not a lot, but for my application it was sufficient.
Great video. I found it best in this topic among other videos on youtube. Working on a project very similer to your one. I got a clear idea about RF24 arduino codes now. but I need a little help. I am a beginner in arduino platform. Don't know all the functions and definations. Some of those in your sketch is not clear to me. Specially starting with "#". So I am listing those below. Some of these seems to me that the function works same as another basic function which I understand well. In such case I'm attaching my well known basic functions. Sl. Function used. Can I use instead? other question 1 #define NEO_PIN 6 int NEO_PIN = 6; Are they same? 2 #define COUNT 10 Is a pin? looks same as previous, what is the difference? 3 #define DATARATE radio.setDataRate Does the Same work? RF24_2MBPS (DataRate); 4 typedef enum { } Can't understand. 5 roleDef; roleDef role; 6 #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) RF24 radio(48, 53); #else RF24 radio(9, 10); #endif Thank you for the 2 videos. If you have a little time to response to my request, I will be greatly thankful to you.
Your questions are very general and show me, that you should first develop your Arduino programming skills. Maybe, this is not the project to do that because it is quite complicated. I did not start with these kind of projects. A few hints: Google for "constants and arduino" and you find informatiion about the #define statement and its differences to variables Google "(__AVR_ATmega1280__" and you find the explanation about this constant Google "enumeration and arduino" and you find the information about the enum statement Google "SPI pins Arduino uno and "SPI pins arduino mega" and you find th info concerning the pins 9,10,48,53 (arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo) All three questions are not easy to answer and it will take time till you understand. Good luck!
Thank you I have been trying to find a way to program my arduinos after first seeing mysensors video on controlling a relay. I see you are an amateur radio operators as well. Need antenna theory in the production.
There are a few channels around which are dedicated to hamradio. So, I will not add another one. But you will see combinations of microcontrollers and radio.
I've got a few of these and some pro mini's to set up temperature sensors. I'll use an ESP???? as a receiver and connect to an mqtt broker. I can then use openHAB to turn up my nest heating as the thermostat room is normally too hot. If I ever get time. Baby boy takes up most if it.
This is good if you do not have Wi-Fi where your sensors are. Otherwise it might be better to use an ESP also for the sensors. Unless you have a special need (power saving for example)
Hello Andreas, nice video and still valid. Fun of learning programming, electrotechnic and playing around with MC's I am following your channel. I'm building me a DIY RC Transmitter/Reciver and did order a NRF24L01+ PA LNA SMA mit Antenne. In your video at approx 13:27 your speaking about λ/4 ground plinth antenna and would like to know your calculations, length of your 3 extra annetnas and where you did solder it on the PCB of the nRF24L0I. I did see in an calculation of 868mhz A. Vertical Monopole Radiating Element (λ*0.25)*vf=82.1mm and B. Radials (λ*0.28)*vfActual =91.9mm with Velocity Factor 0.95. but if I look at your video the B looks shorter then 91.9mm (I don't know your A length and MHz) so long sprach short would love to hear something here or perhaps you have made a video in the past or you know about a video/url. I could not find so much how to do it. Thanks Per
The element on 2.45GHz should have a length of about 2.9 cm and the radials 3.3 cm ( m0ukd.com/calculators/quarter-wave-ground-plane-antenna-calculator/ )
@@AndreasSpiess Hi Andreas, thanks I used the same URL. Last question the 3 Radials on which pins on the nRF24L0I do you solder them? Thanks in advance. BR Per
These boards just have more power and a better receiver. The rest is the same. You have to try how far they go and if they are of use in your situation.
Sir thanks for this outstanding tutorial, I have learned a lot from your videos. thanks for sharing knowledge. this is my first request to you to do a video about antenna modification of nrf24l01 PA LNA module. I am not able to find any information about the modification you did and its benefits on the internet.
Who knows you can also touch the OpenThread someday. It seems to be an excellent option for IoT applications. I learned that the new Particle boards will be leveraging thread in an Adafruit's Feather form-factor. Seems very cool! Thank you!
I am unable to recieve structures on the reciever module. the code runs smoothly and the radio available check goes through yet i am unable to recieve the sent data using the radio.read command. help me out please
@@AndreasSpiess indeed I started with simple examples like sending integers and those are working fine. I'm having trouble with sending structures though. Can you provide a program that transmits structures and one that receives structures.
a Great video! Thanks. I was curious about the hardware set up you showed in the video. Could you share the schematics of the nrf01+ and micro pro mini or more pictures of them please? Also the customized antennae are impressive.
+myoungki Jung I just posted the eagle files here: github.com/SensorsIot/NRF24L01-Board-with-Arduino-Mini-Pro. I am not sure if they contain errors. They are quite old... For antennas I would look at: czcams.com/users/8bitandrewmcneil This is a great channel!
TX struct Telemetry{ char* compass_bearing; float azimuth; float altitude; float temperature; float Speed; double Longitude; double Latitude; byte Time; float voltage; float rpm; float pressure; }; Telemetry data; ..... radio.write(&data, sizeof(Telemetry)); ... RX : radio.read(&data, sizeof(Telemetry)); Are my data sent in the package too long? My telemetry TX RX is NOT working in the transmission & receiver.
When you openReadingPipe(1,pipes[1]) are you not naming the receiver end of pipe 1? When you openWritingPipe(pipes[1]) are you not simply defining the address label which should be attached to the next message? Are your pipes[ ] actually addresses?
I have to admit, I do not remember the details. I just remember it took me a while to understand the concept of pipes and I had to consult the datasheet extensively. If I remember right, the pipes are a sort of address to distinguish between different devices on the same channel and also the direction.
i waited the complete video tat ur gonna make reliable connections of the hardware.... also y did u use radio.PowerUp() in the setup also wot about using 10uF cap between VCC and GND? also what power source did u use to power up the nRF chip for PA_MAX?
Great video but i have a question. Can we send a picture ? I was trying to encode a picture into a txt file and send it using nrf. But i don,t know how to do it. Please HELP.
@@AndreasSpiess ok no worries i just made it check if the correct data was received from the right node and that seems enough for my situation. love your videos :)
Can you use these to inform them each other? Means that use a button for one side and if you push this button , other nrf24l01 side which has a LED will get information to switch on its LED.After that if we use a button which is in other Nrf24l01 , this will cause to inform nrf24l01 to do something.I hope you understand .d
@@AndreasSpiess No problem, it's an internet meme. It's a popular format of comments meaning that everybody seems tough until [insert something sad/heroic/badass] happens.
8:33 in my project the receiver can't receive messages from 6 pipes at the same time, they need different time min 1500 us for 32 bit payload, i just think why not we use only one address for receiver, note: add the id pipe in payload, what do you think about this sir? Sorry for my English
Hi I have a question. I want to use nrf24l01 and 5110 lcd together, but i cannot do that. When i activated one of them. It will work perfectly, but when i use them together, only nrf24l01 works. I am using nrf24l01p library for dual communication. Can you build like that, or explain in comment? Thanks
Maybe you google "nrf24l01 5110 arduino". I got these two where it seems to work: www.instructables.com/id/Arduino-Wireless-NRF24l01-Battery-Voltage-Monitor-/ www.instructables.com/id/Nrf24l01-With-5110-and-3-Sensor-Plantation-Control/
@Andreas Spiess Beschäftige mich gerade auch mit dem NRF, ich blick nur noch nicht ganz durch, wie du die gewünschte Frequenz definierst. Habe mich etwas eingelesen und mittlerweile die Library auch schon etwas weiter durchforstet. Wie genau wird die zu verwendende Frequenz festgelegt? Edit: Habs gefunden, viel einfacher als Frequenzen in HEX o.ä. umzurechnen... Vielleicht hilft es irgendjemandem weiter ;) setChannel(NUMMER); void RF24::setChannel(uint8_t channel) { const uint8_t max_channel = 125; write_register(RF_CH,rf24_min(channel,max_channel)); } Der NRF arbeitet im ISM frequency band at 2.400 - 2.4835GHz und teilt diese 126 Kanäle dementsprechend auf die 83,5 MHz auf, wenn ich das soweit richtig verstanden habe.
I love all your videos, but this is definitely my favorite!. Super clear information about rf communication.
Thank you very much for all your teachings and professionalism!
Thank you for your nice words!
Great follow up video. I see another rabbit hole I'm about to disappear into for an unspecified amount of time😀
Are you back yet ;-)
@@northshorepx I start to worry by now
I build a Halloween Haunt each year and the NRF24L01 along with your video will come in handy as I upgrade to a more automated system with less wires all over the place.
Great video -- Thank you.
You are welcome. Still some time till the next Halloween ;-)
Andreas, many thanks for this tutorial - and obviously the code as well. I am just about to start experimenting with nRF24L01 modules and have been reading a lot of words and watching a lot of uTube. Your tutorials have worked in bringing all together for me. A Merry Christmas and a Happy New Year to you and your family. Alan
Merry Christmas and a Happy New Year to you, too. Hope you have fun with the NRF. It is a nice little thing...
Very interesting series. I have a level sensor in the heating oil tank in my garden which transmits data back to two receivers in the house, and I often get problems with the connection, you have given me a few ideas to improve this.
I have indeed found that using the amplified unit and larger antenna at the transmitter has helped - the traffic is one way only without acknowledge.
Thanks for sharing!
+jix177 I hope it will work for you. Maybe you use a similar setup like mine to test the connection and find the right "spots" for the antennas or a free channel. After that, you still can go on with the one way transmission...
Ditto.....Thank you for investing your time to produce a pair of excellent NRF24L01 tutorial videos! Very well presented!
Thank you!
I really enjoy your guidance, clear spoken language (as I am not a native English speaker). Subscribed!
Thanks for your nice comment!
I don't consider myself as a follower but a student, caus you are a great teacher Sir
Thank you!
Thanks dude! Really good explanation especially about the ACK. I'm currently working on my final project involving the RF24 and is tempted to try the RF24Mesh feature. Maybe you could make a video about it too! (if you're also interested of course haha).
The NRF24 is quite an old chip. So I do not plan do do more with it.
I agree with all the positive comments about your content and presentation... some "So called" tutorials on here make you want to hurt the presenter :)
Thanks for your time and efforts Andreas, great job.
Thank you!
very interesting. I have ignored the nf24l01 but recently bought two nf24l01+ high power modules. the ones with the rubber ducky antenna. works well but I noticed the auto knowledge not to work in 1mbps and 250kbps. would only work in 2mbps. going to try your software to see if the issue is with my software or with my modules
These are cheap little things and good for point-to-point connections...
Andreas Spiess indeed. in spite of the auto acknowledge issue I could bridge 300-400 meter. maybe more but I didn't try that
definitely the best info out there!
:-)
agree with that
This video helped me so much with the struct package, thank you so much
Glad it helped!
Thx a lot Andreas!
I spent too many time looking for something like that!
So helpful to my school project! :D
Again... thank you a lot!
You are welcome!
Appreciate your videos! Thank you for making them.
My pleasure!
I thought every message could be 32 bits =^) Much more versatility than I expected.
+Flo wey No, 32bits would only be two 4 bytes which would be really small compared with the overall message size. 32 bytes is still not a lot, but for my application it was sufficient.
This is what I need.. thanks for the great explanation
You are welcome!
Great video. I found it best in this topic among other videos on youtube. Working on a project very similer to your one. I got a clear idea about RF24 arduino codes now. but I need a little help.
I am a beginner in arduino platform. Don't know all the functions and definations. Some of those in your sketch is not clear to me. Specially starting with "#".
So I am listing those below. Some of these seems to me that the function works same as another basic function which I understand well. In such case I'm attaching my well known basic functions.
Sl. Function used. Can I use instead? other question
1 #define NEO_PIN 6 int NEO_PIN = 6; Are they same?
2 #define COUNT 10 Is a pin? looks same as previous,
what is the difference?
3 #define DATARATE radio.setDataRate Does the Same work?
RF24_2MBPS (DataRate);
4 typedef enum { } Can't understand.
5 roleDef;
roleDef role;
6 #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
RF24 radio(48, 53);
#else
RF24 radio(9, 10);
#endif
Thank you for the 2 videos. If you have a little time to response to my request, I will be greatly thankful to you.
Your questions are very general and show me, that you should first develop your Arduino programming skills. Maybe, this is not the project to do that because it is quite complicated. I did not start with these kind of projects.
A few hints:
Google for "constants and arduino" and you find informatiion about the #define statement and its differences to variables
Google "(__AVR_ATmega1280__" and you find the explanation about this constant
Google "enumeration and arduino" and you find the information about the enum statement
Google "SPI pins Arduino uno and "SPI pins arduino mega" and you find th info concerning the pins 9,10,48,53 (arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo)
All three questions are not easy to answer and it will take time till you understand. Good luck!
+Andreas Spiess
Thanks a ton.
It seems really hard to understand these.
Thank you again for your reply.
Thank you I have been trying to find a way to program my arduinos after first seeing mysensors video on controlling a relay. I see you are an amateur radio operators as well. Need antenna theory in the production.
There are a few channels around which are dedicated to hamradio. So, I will not add another one. But you will see combinations of microcontrollers and radio.
Thank you so much, best tutorial ever, awsome!
Glad it helped!
I've got a few of these and some pro mini's to set up temperature sensors. I'll use an ESP???? as a receiver and connect to an mqtt broker.
I can then use openHAB to turn up my nest heating as the thermostat room is normally too hot.
If I ever get time. Baby boy takes up most if it.
This is good if you do not have Wi-Fi where your sensors are. Otherwise it might be better to use an ESP also for the sensors. Unless you have a special need (power saving for example)
Hello Andreas, nice video and still valid. Fun of learning programming, electrotechnic and playing around with MC's I am following your channel. I'm building me a DIY RC Transmitter/Reciver and did order a NRF24L01+ PA LNA SMA mit Antenne. In your video at approx 13:27 your speaking about λ/4 ground plinth antenna and would like to know your calculations, length of your 3 extra annetnas and where you did solder it on the PCB of the nRF24L0I. I did see in an calculation of 868mhz A. Vertical Monopole Radiating Element (λ*0.25)*vf=82.1mm and B. Radials (λ*0.28)*vfActual =91.9mm with Velocity Factor 0.95. but if I look at your video the B looks shorter then 91.9mm (I don't know your A length and MHz) so long sprach short would love to hear something here or perhaps you have made a video in the past or you know about a video/url. I could not find so much how to do it. Thanks Per
The element on 2.45GHz should have a length of about 2.9 cm and the radials 3.3 cm ( m0ukd.com/calculators/quarter-wave-ground-plane-antenna-calculator/ )
@@AndreasSpiess Hi Andreas, thanks I used the same URL. Last question the 3 Radials on which pins on the nRF24L0I do you solder them? Thanks in advance. BR Per
8:15 well yes but how can I read the data? I need to create the same struct on the other arduino?
Yes
@@AndreasSpiess thanks :D
thank you so much one of the best tutorial. can you explain nrf24l01 + pa +lna, how to get a better transmission?? antenna pointing directions...
These boards just have more power and a better receiver. The rest is the same. You have to try how far they go and if they are of use in your situation.
Sir thanks for this outstanding tutorial, I have learned a lot from your videos. thanks for sharing knowledge.
this is my first request to you to do a video about antenna modification of nrf24l01 PA LNA module. I am not able to find any information about the modification you did and its benefits on the internet.
I most probably will no more cover the NRF24L01
@@AndreasSpiess thanks for your reply sir
Excellent Andreas, I'd love to see your explanation on using XBee modules in a MESH IoT network. Any plans on that?
So far I never used Xbee or mesh. We will see. I have an idea with mesh, but not on Xbee...
Who knows you can also touch the OpenThread someday. It seems to be an excellent option for IoT applications. I learned that the new Particle boards will be leveraging thread in an Adafruit's Feather form-factor. Seems very cool! Thank you!
i like your TOTORIAL
annd the earlier MORSAY communication
Thank you!
I am unable to recieve structures on the reciever module. the code runs smoothly and the radio available check goes through yet i am unable to recieve the sent data using the radio.read command. help me out please
I cannot do any remote diagnostics. But I am sure you will find the problem. Maybe you start with a very simple example.
@@AndreasSpiess indeed I started with simple examples like sending integers and those are working fine. I'm having trouble with sending structures though. Can you provide a program that transmits structures and one that receives structures.
My self balancing robot uses structures:; github.com/SensorsIot/Self-Balancing-Robot/blob/master/Robot14/Robot14.ino
Very helpful! Great job! :-)
:-)
a Great video! Thanks. I was curious about the hardware set up you showed in the video. Could you share the schematics of the nrf01+ and micro pro mini or more pictures of them please? Also the customized antennae are impressive.
+myoungki Jung I just posted the eagle files here: github.com/SensorsIot/NRF24L01-Board-with-Arduino-Mini-Pro. I am not sure if they contain errors. They are quite old...
For antennas I would look at: czcams.com/users/8bitandrewmcneil
This is a great channel!
Thanks very much. I will learn this and apply the style to my project. this will definitely accelerate my development. Thanks again!!
can you demonstrate nrf24l01on stm32f103 under arduino?
I assume it would be very similar.
TX
struct Telemetry{
char* compass_bearing;
float azimuth;
float altitude;
float temperature;
float Speed;
double Longitude;
double Latitude;
byte Time;
float voltage;
float rpm;
float pressure;
};
Telemetry data;
.....
radio.write(&data, sizeof(Telemetry));
...
RX : radio.read(&data, sizeof(Telemetry));
Are my data sent in the package too long? My telemetry TX RX is NOT working in the transmission & receiver.
Maybe you calculate the length of the structure?
When you openReadingPipe(1,pipes[1]) are you not naming the receiver end of pipe 1? When you openWritingPipe(pipes[1]) are you not simply defining the address label which should be attached to the next message? Are your pipes[ ] actually addresses?
I have to admit, I do not remember the details. I just remember it took me a while to understand the concept of pipes and I had to consult the datasheet extensively. If I remember right, the pipes are a sort of address to distinguish between different devices on the same channel and also the direction.
i waited the complete video tat ur gonna make reliable connections of the hardware....
also y did u use radio.PowerUp() in the setup
also wot about using 10uF cap between VCC and GND?
also what power source did u use to power up the nRF chip for PA_MAX?
This is an old video and I do not remember the details. :-(
THANKS
You're welcome!
Hi ,how can i use nrf24l01 for many to one communication i.e i want multiple nrf24l01(node side) data will comes to one nrf24l01(gateway side) ?
Maybe you have a look at the radiohead library. It has addressing features and should support the NRF24 chips
Sir can we use nrf24l01 as wifi module
No.
hey can i put setchanell function in loop code and change channel while runnig programe. so that i can send data for two nrf set at different channel?
But how would then the receiver know that the sender changed the channel?
Thank you for the video. How are you using printf statements in the arduio IDE ?
Maybe you google?
Thanks VERY much!!!
You are welcome!
Perfeito!!!
Obrigado
You are welcome!
Great video but i have a question. Can we send a picture ? I was trying to encode a picture into a txt file and send it using nrf. But i don,t know how to do it. Please HELP.
You can only send 32 bytes. Not enough for a picture.
Hi. I have a question. Can i use the same transmitter to transmitted 2input (switch1 and switch2) to give output of the same receiver (LED1 and LED2)
You have to solve this problem with your Arduino sketch.
@@AndreasSpiess can i have some example of the arduino sketch to solve this problem. i have done it but my switch1 and 2 controlling the same LED
can you do this with the NRF24L01 network library?
I do not know, I never used it.
@@AndreasSpiess ok no worries i just made it check if the correct data was received from the right node and that seems enough for my situation. love your videos :)
Can you use these to inform them each other? Means that use a button for one side and if you push this button , other nrf24l01 side which has a LED will get information to switch on its LED.After that if we use a button which is in other Nrf24l01 , this will cause to inform nrf24l01 to do something.I hope you understand .d
Ass you see I use 2-way communication.
Andreas Spiess ok, i misunderstood.Thank you.
everybody gangsta until he talks about transmitting refugees in the 1982 Lebanon war.
??
@@AndreasSpiess I'm talking about what you say at 3:15
Aha. But what does "everybody gangsta" mean? I am no native English speaker :-(
@@AndreasSpiess No problem, it's an internet meme. It's a popular format of comments meaning that everybody seems tough until [insert something sad/heroic/badass] happens.
Thanks for the explanation. I always learn from my viewers :-)
8:33 in my project the receiver can't receive messages from 6 pipes at the same time, they need different time min 1500 us for 32 bit payload, i just think why not we use only one address for receiver, note: add the id pipe in payload, what do you think about this sir? Sorry for my English
This is an old video and I do not remember the details. So I cannot answer your question.
Hi I have a question. I want to use nrf24l01 and 5110 lcd together, but i cannot do that. When i activated one of them. It will work perfectly, but when i use them together, only nrf24l01 works. I am using nrf24l01p library for dual communication. Can you build like that, or explain in comment?
Thanks
which pins are you using for the communication?
nrf24l01 -> 7,8,11,12,13
5110 lcd -> 2,3,4,11,13
I tried other pins but it doesnt work
Maybe you google "nrf24l01 5110 arduino". I got these two where it seems to work:
www.instructables.com/id/Arduino-Wireless-NRF24l01-Battery-Voltage-Monitor-/
www.instructables.com/id/Nrf24l01-With-5110-and-3-Sensor-Plantation-Control/
Thank you very much.
It would be helpful to learn if you shared the code also.
I do not understand :-(
@@AndreasSpiess I mean link to download your code?
If it is not in the video description I do not have it.
@Andreas Spiess Beschäftige mich gerade auch mit dem NRF, ich blick nur noch nicht ganz durch, wie du die gewünschte Frequenz definierst. Habe mich etwas eingelesen und mittlerweile die Library auch schon etwas weiter durchforstet.
Wie genau wird die zu verwendende Frequenz festgelegt?
Edit: Habs gefunden, viel einfacher als Frequenzen in HEX o.ä. umzurechnen...
Vielleicht hilft es irgendjemandem weiter ;)
setChannel(NUMMER);
void RF24::setChannel(uint8_t channel)
{
const uint8_t max_channel = 125;
write_register(RF_CH,rf24_min(channel,max_channel));
}
Der NRF arbeitet im ISM frequency band at 2.400 - 2.4835GHz und teilt diese 126 Kanäle dementsprechend auf die 83,5 MHz auf, wenn ich das soweit richtig verstanden habe.
Fast richtig: f_OP ist von 2.400 GHz bis 2.525 GHz => 125 MHz => 126 Kanäle
Du musst die Kanalnummer nicht in hex angeben. Eifach das 0x weglassen und Arduino weiss, dass du eine dezimalzahl meinst
Hello ı would like to know can ı send 2mb payload 10 - 15(second) by nrf24
No
@@AndreasSpiess can you recommend another communication model to do that task please. Thanks for helping
Wifi
@@AndreasSpiessthanks