#37 Advanced Tutorial for NRF24L01 and Arduino #1

Поділитися
Вставка
  • Опубліковано 1 січ 2016
  • NRF24L01 chips use the 2.4GHz band. This band is used by many other devices like Access Points or Smartphones. In this video I show how to find empty channels and discuss all the prerequisites for a successful communication between two NRF24L01 modules.
    In the next video I will continue with the software part: defining data structures, establish a protected to-way communication, and give you some hints for increasing the range of the devices.
    This communication system is used in my robot to transfer commands in one direction and telemetry data in the other.
    I use the Arduino IDE and the built-in RF24 library.
    Useful lings are: • How to work with the N...
    • Getting Started with t...
    www.himix.lt/arduino/arduino-a...
  • Наука та технологія

КОМЕНТАРІ • 157

  • @MajdMazin
    @MajdMazin 4 роки тому +7

    This Was so helpful. My NRF24s finally work. This was the only place where the channels on the scanners are explained well. Thank you.

  • @mecatronicsforeveryone9565
    @mecatronicsforeveryone9565 3 роки тому +1

    Five years have passed and people like me are still using these videos, thank you very much.

    • @AndreasSpiess
      @AndreasSpiess  3 роки тому

      Great to hear! That is an advantage of UA-cam.

  • @akhilrajbaranwal
    @akhilrajbaranwal 7 років тому

    This is the most precisely explained tutorial,, conceptually as well as practically, of all the beginner tutorials on nRF24L01 I've seen. Highly recommended.

  • @jon_raymond
    @jon_raymond 8 років тому +1

    As always a very informative video! I always have to watch your videos several times as they have such a plethora of information to digest. Keep up the great work!

    • @AndreasSpiess
      @AndreasSpiess  8 років тому

      +Jon Raymond I try to keep my videos below 10 minutes. This might lead to a certain compression. But it happens to me sometimes, too with other videos. I think this is a big advantage of UA-cam: If I didnt get it the first time I just rewind a few seconds or minutes and then, most of the times, it is clearer.

  • @wjn777
    @wjn777 4 роки тому

    The best, clearest video on the NRF24, essential watching if you are planning a project using this module

  • @deangreenhough3479
    @deangreenhough3479 8 років тому +3

    Another interesting, full of relevant information. I admire the use of graphs and the amount of time you invest in scientifically arriving at your conclusions. I believe you will reach 10k subscribers very quickly.
    There is something very special about your videos. You always just seem to explain enough to make me very interested about subjects I would have avoided.
    It's official, I like the Swiss very much after having the pleasure of hearing and watching you.
    Please keep up both the quality and quantity of your videos.
    Thank you kind sir for sharing

    • @AndreasSpiess
      @AndreasSpiess  8 років тому

      +Dean Greenhough Thank you. You are very kind! Avoiding things is a solution which often works in our busy lifes ;-)

  • @nikrous5996
    @nikrous5996 6 років тому

    One of the most thoroughly best explanation i have ever heard and seen.Thanks a lot.

  • @ehvway
    @ehvway 5 років тому

    I really love your numbering of your video's sir! Keep up the good videos and I love your Swiss accent! Danke schön!

  • @HarikaOsman
    @HarikaOsman 8 років тому +1

    Thanks for your understandable english and subtitles.. They are very helpfull

    • @AndreasSpiess
      @AndreasSpiess  8 років тому

      Thanks. The subtitles, however, are not from me. Must be google who transcripts it...

  • @GuitarPeter04
    @GuitarPeter04 8 років тому

    great and very helpful ! really love your videos and btw super swiss akzent:)

    • @AndreasSpiess
      @AndreasSpiess  8 років тому +1

      +GuitarPeter04 Thank you for your compliement, also about my accent. Because I cannot change it, I tought, I use it as a "brand"

  • @jeffkrueger8939
    @jeffkrueger8939 8 років тому

    Thanks for a great tutorial. You help me out a lot on the pipe control. Works great on Windows 8.1 and Arduino v1.7.9 using a nano ATmega 328

    • @AndreasSpiess
      @AndreasSpiess  8 років тому

      +Jeff Krueger Thanks for the feedback. I am glad that it works!

  • @juana.barria9770
    @juana.barria9770 6 років тому

    hi Andrea! live your tutorial and your accent!. ... your explanation about everything great... thanks you for everything.

  • @VolthausLabElectronics
    @VolthausLabElectronics 8 років тому +1

    Very good tutorial. Thank you for the information.

  • @noweare1
    @noweare1 7 років тому +3

    Suscribed, not the usual electronics. Thank you

  • @richardneal3841
    @richardneal3841 4 місяці тому

    By far the best explaination of how to setup an NRF2401 radio module. You have already answered a few of the questions that I had. So, the signals you use on the TX(CE and CSN) or RX don't have to be the same pins. I and many others have been looking for ways to trouble shoot our system after building it as we have had many problems. One was a bad library file. The one You suggest is the correct one as it works. Two, the antana must have 3.3 volts or it won't work as mine was 2.1 volts?! bad connection.Three, using print statments help, but only that the software is functioning properly and not the signal going out of the antana.
    I look forward to the next session, thanks
    Rick

  • @nitishchennoju5427
    @nitishchennoju5427 3 роки тому

    Your 60k viewer. Thanks for the great content!

    • @AndreasSpiess
      @AndreasSpiess  3 роки тому

      You are welcome! Now there are already 60029...

  • @aske1602
    @aske1602 8 років тому

    Thank you for the great info

  • @endronesia1
    @endronesia1 7 років тому

    thanks, this tuto is helping me (beginer) much, i am planing build audio sender for my project

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      This is exactly why I made these videos...

  • @EdRuano
    @EdRuano 3 роки тому

    Great explanations. Thank you.

  • @space_0027
    @space_0027 5 років тому +3

    Hey there, first off great video, thank you so much! At 6:56 when you show the serial output from the scan result, you highlight channel 25 however that is not channel 25. It is in hex, so it is actually channel 37.

  • @UmbraAtrox_
    @UmbraAtrox_ Рік тому

    Very helpful. thank you

  • @biplabroy8991
    @biplabroy8991 Рік тому

    Thank you for the video.

  • @norm1124
    @norm1124 5 років тому

    Ui, das Audio auf Deinem Channel hat einen grossen Sprung nach vorne gemacht. Cool

    • @AndreasSpiess
      @AndreasSpiess  5 років тому

      Danke! Da hast du aber ein ganz altes Video ausgegraben...

  • @hfe1833
    @hfe1833 Рік тому

    I always watching your video regarding nrf24,please make updated video for latest firmware

    • @AndreasSpiess
      @AndreasSpiess  Рік тому

      This chip is quite old and I have no plans for it :-(

  • @katrinapq
    @katrinapq 7 років тому

    great video. hope you could feature how to control multiple robots using a single controller using nRF24L01 modules. thanks

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      This project is closed. So, I will not work anymore on it...

  • @jumbo999614
    @jumbo999614 3 роки тому

    8:38 I don't understand openReadingPipe Function. Why there are 2 paramenter for openReadingPipe (parameter#1, parameter#2) but there's only one parameter?
    What is purpose of 1st parameter for openReadingPipe?
    What is the different between openReadingPipe(0, ...) and openReadingPipe(1,...)?

  • @oscarilmio7148
    @oscarilmio7148 5 років тому

    I'm curious Andreas,do you think it's possible to do the same "noise" test on our beloved esp 8266-32 ?

    • @AndreasSpiess
      @AndreasSpiess  5 років тому

      Maybe you have a look at this project? github.com/moononournation/ESP8266WiFiAnalyzer

  • @Olavotemrazaodenovo
    @Olavotemrazaodenovo 4 роки тому +1

    Here is the guy with brazilian accent. Thank you.

  • @mauriziosomenzi3479
    @mauriziosomenzi3479 3 роки тому

    Great, I have a question: I have a NRF24 network, how can I tell when I lose communication with a NRF24 on the network?
    I use the RF24 and RF24Network library.
    Thanks.

    • @AndreasSpiess
      @AndreasSpiess  3 роки тому

      You have to have some sort of time out and a "watchdog" transmission.

  • @webslinger2011
    @webslinger2011 6 років тому

    Experimenting on a smaller version of this NRF2401L. Got additional info : Status 0x00 RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=0 TX_FULL=0, RX_ADDR_PO-1 = 0X0000000000, RX_ADDR_P2-5 = 0X00 etc. Only getting zeros inside my room. I hope it´s working.

    • @fifoflo
      @fifoflo 5 років тому

      Yes, same for me but it does not work ..

  • @NikhilSehgal21
    @NikhilSehgal21 3 роки тому

    Hi Sir,
    radio.printdetails() are not printing anything. Serial monitor is blank. Do we have any alternative?

    • @AndreasSpiess
      @AndreasSpiess  3 роки тому

      This is an old project and I do not remember the details :-(

  • @TheTrblesm
    @TheTrblesm 7 років тому

    How many channels can this thing handle? Or am I not understanding how it works? I'm more familiar with radio control hobby cars/drones.

  • @Shadowcruise99
    @Shadowcruise99 7 років тому

    Andreas, very informative video, thank-you. I have two points of confusion, where clarification would be helpful.
    I've been able to get the raw noise data from the serial monitor, but I fail to understand how you differentiate between channel numbers and what the binary information means. From a layman's point of view it seems you pull channel 24 out of a hat. the channel number isn't contiguous and I see nothing in the raw data, that differentiates specific channel numbers from the rest of the data.
    You also reference video #3 in regard to importing data into Excel, however there doesn't seem to be a 3rd part to your NFR24L01 videos.

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      The first two rows show the channel number and the other rows show the signal strenth on this channel at a particular time. If you see 0, the channel is free. So, you search for channels which stay free for a long time.

    • @Shadowcruise99
      @Shadowcruise99 7 років тому

      Thanks so much for the response Andreas. I'll go back and see if I can make some sense of it, now that I have an understanding of how to delineate the information.

  • @ifithegr8
    @ifithegr8 5 років тому

    @Andreas any plan to do an in-depth tutorial on NRF52?

    • @AndreasSpiess
      @AndreasSpiess  5 років тому

      No. But I am interested in the BLE of the chip.

    • @ifithegr8
      @ifithegr8 5 років тому

      @@AndreasSpiess I guess then its time for you to lead the way for your followers, including me. I was surprised when i compared BLE data sending current consumption. ESP32 on full throttle consumed 150mA (including IMU and WiFi disabled + no computation on processor) but NRF52 only consumed 38mA which is a huge difference.

  • @lucasrsalazar
    @lucasrsalazar 6 років тому

    I have a question. When I use ESP8266 wifi module i'm using the IEEE 802.11 protocol, so when i use nrf24l01 what is the protocol?

    • @AndreasSpiess
      @AndreasSpiess  6 років тому +1

      It uses a proprietaryprotocol. You might find information in the datasheet of the chip

    • @lucasrsalazar
      @lucasrsalazar 6 років тому

      Hmmm thank you so much for your awnser, now I understand...

  • @MPElectronique
    @MPElectronique 6 років тому

    Andreas, my results of the scanner is : 000000000000000011111111111111112222222222222222333333333333333344444444444444445555555555555555666666666666666677777777777777
    0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd
    000000010000000000000000000000000000000000000000000000011110000000200000000000000000000000000000000000000000000000000000000000
    is it normal?
    I dont understand the result..
    thank you.
    Marc.

    • @AndreasSpiess
      @AndreasSpiess  6 років тому

      Just read each column vertically. So, channel 01 has no signal. Channel 39 has a signal

  • @saajidthakur6027
    @saajidthakur6027 2 роки тому

    Hello Sir,
    Thanks for your guidance.
    Kindly know me the procedure "how can arduino serial result to excel and chart"

    • @AndreasSpiess
      @AndreasSpiess  2 роки тому

      I made a video on how to fill Excel sheets with an arduino.

  • @marioalvoh655
    @marioalvoh655 7 років тому

    hello, I am a student and i need some help for my project, may you help me? i want to display information from a soil moisture sensor(from the serial monitor in percentage) using nrf24l01 from one arduino to another, do you know how I might to do that?
    sorry i am still a beginner it.... and thank you for the video it is great :)

    • @AndreasSpiess
      @AndreasSpiess  7 років тому +2

      I would propose to start out with a block diagram. There, you should see, which problems you have to solve and you can start with one part and go on to the next. With this method, it is also easy to google for particular solutions because you can formulate your problem and questions very precise. Google is not good in answering broad questions.
      You find many tutorials for each aspect of your project, and if you are patient, you will be able to solve it. I also did not know anything about electronics when I was born and had to learn everything ;-)

  • @aarif5940
    @aarif5940 4 роки тому

    Well explained ,but i just want to know how to convert scanner output into graphical form as u have doen.

    • @AndreasSpiess
      @AndreasSpiess  4 роки тому

      If I remember right I transferred the data to Excel

    • @aarif5940
      @aarif5940 4 роки тому

      @@AndreasSpiess ohk then, i correct my question , how to convert scanner output into Excel and how to read it ? How do we know that this channel is free or not ?
      Bdw thanks for the response😊

  • @drakkorvladimir4012
    @drakkorvladimir4012 3 роки тому

    I am working on a project like this but I really need help in making it 'Failsafe' . If the Tx fails, I want the Rx to shut down. ANY help would be much appreciated : )

    • @AndreasSpiess
      @AndreasSpiess  3 роки тому +1

      You can use the "watchdog" concept I showed in other videos. But you will never know if the "TX failed", only that the RX did not get any info

    • @drakkorvladimir4012
      @drakkorvladimir4012 3 роки тому

      @@AndreasSpiess Thank you so much. I will look for your other videos.

  • @omkarbansode6305
    @omkarbansode6305 6 місяців тому

    at 6:57 you have shown 2 graphs/charts using the traffic data , can you please provide some useful links on how to do it, or tell yourself what was the process in brief

    • @AndreasSpiess
      @AndreasSpiess  6 місяців тому +1

      This is plain Excel. I made a video on how to transfer data to Excel using an Arduino-like MCU

    • @omkarbansode6305
      @omkarbansode6305 6 місяців тому

      @@AndreasSpiess thankyou so much , I will look into it

  • @AzharKhan-cy5kt
    @AzharKhan-cy5kt 11 місяців тому

    Hi can you use 4-5 nrf24l01 with single esp32 and all nrf's send same data at the same the ...no receiver setup

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      You always can transmit things in parallel (each module needs a different CE). The problem is what happens on the receiver side.

    • @AzharKhan-cy5kt
      @AzharKhan-cy5kt 10 місяців тому

      @@AndreasSpiess The question i asked was for a mini jammer do you think 4-5 nrf's transmitting data at the same time will has the jammer effect

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      @@AzharKhan-cy5ktI do not comment on jammers because I do not like them.

    • @AzharKhan-cy5kt
      @AzharKhan-cy5kt 10 місяців тому

      @@AndreasSpiesswhat! Jammers are fun why would someone not like it... you are old i think that's why you don't like them ...come on old man I'm stuck help me out

  • @michaelbowman4919
    @michaelbowman4919 7 років тому +2

    How do I get the data into excel to draw a chart. thanks

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      See video #3. This is how I do it usually.

    • @JDI4DAVID
      @JDI4DAVID 6 років тому +2

      Add commas into the scanner sketch as in printf(",") in the for i loops. The data can then be copied from the monitor screen and pasted into Excel. Select the data in Excel and copy it then paste special transpose. Add a channel number column 0 to 124 then insert an x-y chart.

    • @pdpadsl
      @pdpadsl 5 років тому

      Andreas Spiess Hi Andreas, I didn‘t find the video #3!!

  • @BD-33
    @BD-33 5 років тому

    i have nrf24l01 with antenna and i have one without antenna .. They can not communicate with each other
    ..
    Should they be the same type
    ..

    • @AndreasSpiess
      @AndreasSpiess  5 років тому +1

      They should work together.

    • @BD-33
      @BD-33 5 років тому

      @@AndreasSpiess 🌷

  • @abdelrhmanhany6733
    @abdelrhmanhany6733 7 років тому

    Very great tutorial but using the library Tmrh20 results that the receiving rf24 doesn't start unless the serial monitor of the transmitter starts, how can i fix that??

    • @AndreasSpiess
      @AndreasSpiess  7 років тому +1

      This is an old project and I do not remember the details. Sorry.

    • @abdelrhmanhany6733
      @abdelrhmanhany6733 7 років тому

      Ok thank you for your reply, but i have another question related to the nrf24l01, when i send an array of 12 elements (6x2), i use serial printing, i got the first 6 only

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      +Abdelrhman Hany if i remember right, the 24l01 can only transport a payload of 32 byte. Check how long your payload is.

    • @abdelrhmanhany6733
      @abdelrhmanhany6733 7 років тому

      Thank you Mr Andreas so much , ive learned a lot of your tutorials :D

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      :-)

  • @Qubnix
    @Qubnix 6 років тому +1

    How can I transfer scanning results to excel?

  • @Anton-sz6ef
    @Anton-sz6ef 5 років тому

    Hey! I know it's out of context but can I use a motor driver in order to create sinusoidal or just alternating current ? Will it burn down ? I know it's possible but I was thinking that since it's not made for this I will fry the hell out of him :)) Thanks in advance!

    • @AndreasSpiess
      @AndreasSpiess  5 років тому

      I do not know. Maybe you google?

    • @Anton-sz6ef
      @Anton-sz6ef 5 років тому

      @@AndreasSpiess I tried! Thanks anyway. I will start with low frequency and observe and then step it up...

  • @damedaE90
    @damedaE90 7 років тому

    @Andreas Spiess Der Hitmi Link funktioniert nicht mehr

  • @mamdobreklapki0
    @mamdobreklapki0 8 років тому

    That could be very helpful in my project - temperature sensors network. I were so optimistic abou it, but an error get me to the ground.. When I compile "scanner" I get the message "sketch\output\scanner.cpp:1:22: fatal error: WProgram.h: No such file or directory #include " I did some research and I found out that i must change in scanner.cpp "WProgram.h" to "Arduino.h" and I did.. and I get more error messages,... I'm fresh user of Windows 10. Could You have some advise for me?

    • @AndreasSpiess
      @AndreasSpiess  8 років тому

      +mamdobreklapki0 Which library do you use? RF24? Which IDE version do you use? Did you include the library with Sketch->include library-> manage libraries (and search for NRF24). Then install RF24 by TMRh20 library.
      It has nothing to do with Windows10.

    • @mamdobreklapki0
      @mamdobreklapki0 8 років тому

      +Andreas Spiess thank You for quick response. I use IDE 1.6.7, I installed RF24 library by TMRh20, as You recommended.

    • @AndreasSpiess
      @AndreasSpiess  8 років тому

      +mamdobreklapki0 I still use 1.6.5. This version seems to be quite stable.
      I see no obvious readon for your error. So, I cannot help you because I will not upgrade to a higher version for the moment.

    • @mamdobreklapki0
      @mamdobreklapki0 8 років тому

      +Andreas Spiess I think I'll get 1.6.5 version also.

    • @mamdobreklapki0
      @mamdobreklapki0 8 років тому

      +mamdobreklapki0 It works fine on 1.6.5 IDE version.. thanks!

  • @jayrajbhagat8200
    @jayrajbhagat8200 4 роки тому

    I ha;ve tested, but it shows "f" for all the 128 cha;nnels. I don't understa;nd this.

    • @AndreasSpiess
      @AndreasSpiess  4 роки тому

      Unfortunately I cannot do remote debugging.

  • @damirkuzjaev
    @damirkuzjaev 5 років тому

    hello. could you tell me how to transfer scanner results to excel

    • @AndreasSpiess
      @AndreasSpiess  5 років тому

      I do not know. Maybe you google?

    • @damirkuzjaev
      @damirkuzjaev 5 років тому

      @@AndreasSpiess of course. I tried I couldn't find anything. Then I found your video when you did it. So I would like to know how?

  • @DwipayanGupta
    @DwipayanGupta 5 років тому

    how to send an image file between two nrf
    ?

    • @AndreasSpiess
      @AndreasSpiess  5 років тому +1

      I cannot imagine that this is a good idea. ESP8266 and Wi-Fi would be much better, I think.

    • @DwipayanGupta
      @DwipayanGupta 5 років тому

      Andreas Spiess thank you for this information sir , it would be very helpful to me.

  • @HarikaOsman
    @HarikaOsman 8 років тому

    I am finding free channel but how can i convert channel number to uint64_t type? Regards

    • @AndreasSpiess
      @AndreasSpiess  8 років тому

      I do not understand your question? Why would you use uint64_t ?

    • @HarikaOsman
      @HarikaOsman 8 років тому

      +Andreas Spiess pipe addresses for nodes are uint64_t ype, is this addresses showing comminication channels?

    • @AndreasSpiess
      @AndreasSpiess  8 років тому

      Pipe address and channels are something completely different. Pipe addresses must be the same for both NRF if they should communicate. For ease, use my examples.
      The channel is set with the command radio.setChannel(0x34); or similar.

    • @HarikaOsman
      @HarikaOsman 8 років тому

      +Andreas Spiess thanks, i understand.. I wish, i want to be your student :) regards..

    • @AndreasSpiess
      @AndreasSpiess  8 років тому +2

      You are always a student if you open ears and eyes...

  • @shubhamsaxena508
    @shubhamsaxena508 7 років тому

    will it get disturbance if someone is using nrf near me?

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      Yes, if you use the same channel. I deal with this issue in one of my NRF videos, but I do not remember, in which one.

    • @shubhamsaxena508
      @shubhamsaxena508 7 років тому

      ok thanks

    • @shubhamsaxena508
      @shubhamsaxena508 7 років тому

      can it use frequency hopping? or channel hopping?

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      No, you have to program it yourself, I think,this is not easy.
      Because these devices work only on short distance, it is usually enough if you scan your channels from time to time and select a free one.

    • @shubhamsaxena508
      @shubhamsaxena508 7 років тому

      ok

  • @simostha99
    @simostha99 6 років тому

    I want to control 4 servo motors using nrf24l01 and 4 pot....... Arduino....
    Simply 4 channel control.... Using nrf24l0q

    • @AndreasSpiess
      @AndreasSpiess  6 років тому

      Sounds interesting! Hope you will suceed.

  • @kampkrieger
    @kampkrieger 3 роки тому

    the scanner sketch does something else now :(

    • @AndreasSpiess
      @AndreasSpiess  3 роки тому

      I do not understand.

    • @kampkrieger
      @kampkrieger 3 роки тому

      ​@@AndreasSpiess Ich habe wohl seit Jahren ein Pinout an der Wand ausgedruckt das MISO und MOSI vertauscht hat :( Dazu kommt dass die RF lib nicht merkt, wenn kein Device da ist sondern einfach behauptet es sei ein nrf24l01+.
      Das scanner-Sketch hat noch einen Sender-Modus, wenn man sich den Code anschaut. Und der NRF braucht mehr Strom als mein Arduino Nano am 3V3 anbieten kann... Das alles war sehr verwirrend aber jetzt geht's! Danke

  • @GNDBK
    @GNDBK 2 роки тому

    Set play back speed to 1.25. Thank me later.

  • @zhuk462
    @zhuk462 4 роки тому

    Where is advanced info? I watched the superficial basics here.