#73 nRF24L01 Send (and receive) data with your Arduino!

Поделиться
HTML-код
  • Опубликовано: 4 фев 2017
  • New! ralphbacon.blog
    Use your Arduino to transmit (and receive) data reliably with this easy-to-use module.
    The nRF24L01 module achieves this beautifully - and with the excellent RF24 library from TMRh20 we can do just about anything you might think of.
    However, in this absolute beginners' guide, we just scratch the surface but still managed to produce a useful transmit and receive sketch (originally taken from the above library but simplified even further).
    The nRF24L01+ boards (but available in many places):
    www.amazon.co.uk/dp/B010N32X3U
    The breakout board that prevents power-related issues:
    www.amazon.co.uk/gp/product/B...
    The library I use is very mature, s/he has several others too. See his/her homepage here, choose the RF24 library as I showed in the video.
    github.com/TMRh20 or a copy from here:
    github.com/RalphBacon/nRF24L0... or here
    github.com/nRF24/RF24 (thanks Ed19601)
    Note that there are several good nRF24L01 libraries available out there. If you use another one bear in mind that the pin connections will be different. I chose the one above as it seemed to give us Arduinites a decent interface to the nRF24L01 module without too much mucking around.
    My sketches (one for receive, one for transmit) even though both do actually transmit anyway (remember that each module will automatically acknowledge receipt of data unless you specifically switch off that capability - why would you do this?).
    IMPORTANT NOTE: thanks to the Eagle Eyes of Arduinite viewer whitefields5595 please remember that pin 10, although not connected to the nRF24L01+ in this demo must NOT be used as a general purpose IO pin - it remains the standard CS pin of the SPI bus - and if that doesn't mean much just remember to leave pin 10 on your Uno or Nano unconnected whilst running this sketch!
    ------------------------------
    DOWNLOAD HERE
    ------------------------------
    github.com/RalphBacon/nRF24L0... --- click the Download button and choose the zip file, unzip and place each sketch in its own folder (of the same name as the sketch) in your usual Arduino sketches folder.

    If you like this video please give it a thumbs up, share it and if you're not already subscribed please do so :)
    My channel is here:
    ------------------------------------------------------------------
    / ralphbacon
    ------------------------------------------------------------------
    How can I remember this? Memory tip: "See" Ralph Bacon, geddit?
  • НаукаНаука

Комментарии • 753

  • @topquark22
    @topquark22 10 месяцев назад +6

    For the integrated Nano3/nRF24L01 modules, you need to use CE=10 and CSN=9. This is opposite from what's given in all online examples I've seen. It caused me endless confusion until I followed the traces on the board to the pinout of the chip! People need to get in this habit and stop posting confusing information!

    • @RalphBacon
      @RalphBacon  10 месяцев назад +3

      You know how it is, Cut & Paste from one example to another.

  • @oversizedsloth3748
    @oversizedsloth3748 4 года назад +14

    Thank you so much for this video! My class really appreciates the content you put out (our teacher showed us this video) and we are looking forward to your future videos.

    • @RalphBacon
      @RalphBacon  4 года назад +2

      I'm glad it helped you and your classmates, GingerSkips! And thanks to your teacher for pointing you to this channel, great to have you along for the Arduinite journey. Thanks for posting.

  • @eljefe400
    @eljefe400 6 лет назад +1

    there are dozens of these nrf tutorials that I have looked through (and tested many). This was the one that made it all work. Excellent Job . thank you so much for sharing. Well done!

    • @RalphBacon
      @RalphBacon  6 лет назад

      Wow! that's great news, Jeffrey, although I cannot take all the credit. Albert Einstein famously said "Make it as simple as possible but no simpler". So I do. Once Arduinites have grasped the simplest example they can build on that all by themselves, usually. So thanks for endorsing my "simple" approach (my brain can't handle complex anyway!), appreciated.

  • @BOBANDERSON5150
    @BOBANDERSON5150 6 лет назад

    Thank you for explaining everything down to the smallest details. Made working with these modules so much easier. Getting your example up and running made first, helped me see what goes on in the software. Thanks again, Bob. Subscribed to your channel.

    • @RalphBacon
      @RalphBacon  6 лет назад

      Glad you liked it Bob, and thanks so much for subscribing too. I do like these nRF24L01+ modules, they are very powerful, especially the ones that have an external antenna (not needed for most home use unless you live in a castle). Great to hear from you.

  • @minoz55
    @minoz55 4 года назад +2

    Thank you! Your video helped me to sort it all out. The tip to open two separate instances of the IDE: Wow!

    • @RalphBacon
      @RalphBacon  4 года назад

      And I'm very glad about that, Thomas, if this channel helps in any way then I have succeeded. Thanks so much for posting.

  • @randallknox2141
    @randallknox2141 7 лет назад

    Ralph--great video! My grandson and I watched it, put together a couple of NRF24L01 circuits, put a send sketch on his laptop and the receive sketch on my laptop and it worked flawlessly the first time. We really appreciate your help. Thanks, Randy

    • @RalphBacon
      @RalphBacon  7 лет назад

      Hello Arduinite! I'm currently on vacation 5,000 miles away from home so I'll have to be brief with these comments until my return, mid-July.
      That's great new Randall, and I'm pleased you're sharing the fun with the younger generation too. Brilliant!

  • @tonydonnelly
    @tonydonnelly 7 лет назад

    I just received my NRF24L01 modules that I ordered off of ebay 4 months ago, so I'm quite anxious to give them a try. Your tutorial is a fantastic jumping off point. Thanks!

    • @RalphBacon
      @RalphBacon  7 лет назад

      Yes, indeed, Tony, just follow my video *exactly* and you will have no issues. And if you have not yet bought the (very cheap) adapter plates for these modules do so *now* as it sorts out all the power issues that people stumble over! Great to hear from you.

  • @MCGearhead
    @MCGearhead 3 года назад +2

    Fantastic tutorial! Very easy to follow and the sketches loaded up and ran without any issues. Thank you!

  • @markhill8389
    @markhill8389 6 лет назад +2

    Thank you so much for explaining this so clearly, i even learned how to properly add to library.
    You have made my day.

    • @RalphBacon
      @RalphBacon  6 лет назад +1

      That's great news, Mark, it's not often I get to make someone's day. You may have seen the humorous quote: "I can only please one person per day. Today is not your day. Tomorrow doesn't look good either." How WRONG that is, as you have proved! Seriously, I appreciate the post and it's great to hear from you.

    • @markhill8389
      @markhill8389 6 лет назад +1

      Ralph S Bacon
      Keep up the good work. I'm definitely guided by your footsteps for this rf project.

  • @wolenyo
    @wolenyo 4 месяца назад +2

    Oooh, Mr. Ralph, THANKS SO MUCH!! I've watched a lot of tutorials on YT and not a single one has given me code that works, until I found your video. You've now erased hours and hours of frustration that I've accumulated from my other attempts. Great job with this video, Mr. Ralph! I will definitely check out your other videos. Excellent teaching style. Thanks again!!

    • @RalphBacon
      @RalphBacon  4 месяца назад +1

      Glad it helped! And you're Welcome! Glad you got it working.

  • @airthrow
    @airthrow 6 лет назад +1

    By far the best NRF24L01 tutorial on YT, can't believe how frustrating this can be. Hope I am up and running tonight with your assistance, thanks!

    • @RalphBacon
      @RalphBacon  6 лет назад

      Let's hope you're successful, do let us know!

    • @airthrow
      @airthrow 6 лет назад

      I've got the library installed fine and the transmitter code uploads fine to my Uno! However, the code fails to upload to my pro micro (other example sketches and ones I have written upload to this pro micro fine, but I just bought it)- is the code incompatible with a Pro Micro? Because I was have space constraints with the transmitting device. Thanks for the help, I feel confident with some fiddling I will finally get it!

    • @RalphBacon
      @RalphBacon  6 лет назад

      If you have selected the correct board / CPU / speed etc then it should upload. I choose the Leonardo board for my Pro Micro (from Sparkfun) and my computer even says these on the COM port allocation - check there too, see how it identifies itself. Take care with this board, as it's easy to brick it (I did a video on that too). TBH I'd try a Mega if you can't get this working, you can get one for about £5 / $6.50 from the Far East these days, which will sort out your memory constraints.

  • @shiister
    @shiister 6 лет назад

    Thank you for this video. I am using this to confirm all the NRF24L01 I ordered are functioning.

    • @RalphBacon
      @RalphBacon  6 лет назад

      Yes, indeed, shiister, this would be a very good sketch to prove that the units work as expected. Thanks for suggesting this and for posting.

  • @stevea3717
    @stevea3717 7 лет назад +2

    Hello Ralph, thank you for a great tutorial .It worked straight away for me . this is an excellent platform for newbies to start from ,very simple and easy to understand .This can be the basis of many projects. Well Done! Keep those videos coming.

    • @RalphBacon
      @RalphBacon  7 лет назад

      Glad you liked the video Steve. +Raad Yacu (see below) reminds us all that the data length is limited to 32 bytes at a time. I will have to look at the libraries for this device to see how they get around that (probably multiple transmits). Thanks for posting!

  • @JulioSalim
    @JulioSalim 6 лет назад

    Excellent explanation. I've just reproduced at my lab with two Arduinos Pro Mini and it is working very well.

    • @RalphBacon
      @RalphBacon  6 лет назад

      Excellent news, Julio. Did you use the adapters to plug in the nRF24L01 modules? If not, get some (they are very cheap, I got mine from Amazon) and prevent lots of problems due to the power being insufficient at anything above Minimum Power Level!

  • @asaadiftikhar6564
    @asaadiftikhar6564 5 лет назад

    This is the only useful tutorial for beginners on RUclips. Bless you man!

    • @RalphBacon
      @RalphBacon  5 лет назад

      You are most welcome Asaad Iftikhar, I'm glad you like the video. Nice to hear from you.

  • @tonybell1597
    @tonybell1597 7 лет назад

    Ralph, thank you soooo much for this video, found your channel this weekend...... have been wrestling with these little blighters for for ages, couldn't get anything working, this has re-kindled a project idea I have had a for a while... thanks.... keep up the good work!

    • @RalphBacon
      @RalphBacon  7 лет назад

      Welcome Tony! Yes, once you have a demo it all becomes very simple, does it not? I'm hoping your interest extends beyond nRF24's and into all things Arduino, in which you have definitely found a channel for you! Enjoy (and subscribe if you think this is for you). Good to hear from you.

  • @Vhbaske
    @Vhbaske 4 года назад

    I tried during a whole month to have some success with the nRF2401 modules, I almost abandoned Arduino programming for my dissilutionment, until, mr. Ralph Bacon appeared in my RUclips browsing. The first moment, the sketches worked, and he explained here why you make the regular mistakes we make with these modules! Thanks, Mr. Bacon, and may you have good health to keep teaching us as you do.

    • @RalphBacon
      @RalphBacon  4 года назад

      I'm very glad it helped you, Pedro, thanks for letting me know of your success!

  • @miniminerx
    @miniminerx 6 лет назад +1

    I love your videos! The best I have found. Keep it up! I also like how you keep on uploading too.

    • @RalphBacon
      @RalphBacon  6 лет назад

      You are most welcome MiniminerX, I'm glad you like the videos. Nice to hear from you.

  • @markchurch8037
    @markchurch8037 6 лет назад

    I found this tutorial very clear to understand well explained in layman's terms for us beginners i look forward to viewing more of your tutorials in the near future, Thank you very much Ralph . Mark

    • @RalphBacon
      @RalphBacon  6 лет назад

      Thanks for your kind words, Mark, I'm very glad you found it clear and easy to understand - especially for beginners. That is the whole point of my RUclips channel. Great to hear from you.

  • @stevenalbright3363
    @stevenalbright3363 7 лет назад

    Thank you very much, this really got me understanding the NRF24L01 and its up and running great.

    • @RalphBacon
      @RalphBacon  7 лет назад

      Hello Arduinite! I'm currently on vacation 5,000 miles away from home so I'll have to be brief with these comments until my return, mid-July.
      Glad it helped you, Steven, that's what this channel is all about!

  • @tbddevelops
    @tbddevelops 7 лет назад +9

    Really clear tutorial and has encouraged me to pick these back out of my electronics bin. Thank you.

    • @RalphBacon
      @RalphBacon  7 лет назад

      Glad it has inspired you to re-try these devices, Terry, they're pretty easy to set up (usually!). Thanks for posting, good to hear from you.

  • @Ilikeridin
    @Ilikeridin 5 лет назад

    Thank you for the tutorial. I’ve watched a bunch but this is the first which I’ve followed. Worked a treat.
    The only error which I ran into was I used an external power source and forgot to ground a board. Obviously worked straight away once I realised the problem.
    Again, thank you.

    • @RalphBacon
      @RalphBacon  5 лет назад +1

      Glad it worked, Chris, I hope you're using the adapter boards?!? Cheap and save a lot of heartache.

    • @Ilikeridin
      @Ilikeridin 5 лет назад

      Ralph S Bacon I am not. Not been doing this long but a lot of parcels are starting to arrive from China ha. I’ve ordered one today. Couldn’t find one for a Pro Mini, so will make something similar on perf board. Cheers

    • @RalphBacon
      @RalphBacon  5 лет назад +1

      I was referring to the adapter boards for the nRF24L01+ modules.
      If you use them bare (like I did in my video, I know, bad example) you have to wire them "from underneath", easy to get wires crossed (don't ask me how I know this) and the power for the 3v3 module cannot be successfully supplied by the 3v3 pin from the Arduino unless you're using the lowest power possible (like my demo).
      Once I got the adapter boards it was *so* much easier to wire up and all power issues disappeared because you supply the adapter board with 5v not 3v3 and the Arduino has enough 5v current to go around!

    • @Ilikeridin
      @Ilikeridin 5 лет назад +1

      Ralph S Bacon I did use the adapter boards but I want to use them within a project with everything powered by 3.3V. So I was considering not using the adapters. So I’m glad you mentioned that, as it probably wouldn’t work. I’ll have to supply the Pro Mini with 5V and take a supply from the source for the nRF24L01+

  • @robertpatton6700
    @robertpatton6700 7 лет назад

    The video helped, I had stayed away from the nRF24L01 as they seemed to complicated. Thanks I plan to order some and give it a try.

    • @RalphBacon
      @RalphBacon  7 лет назад

      That's great news Robert! Let's face it, if you replicate exactly what I had in the video (with or without the adapter although I recommend those too, especially for anything other than low power usage) then it's going to work. So you have a working prototype that you can then enhance it to suit. Glad you feel inspired, thanks for posting.

  • @johnmellor6065
    @johnmellor6065 4 года назад

    just built the above circuit and really made up as this is my first success on arduino wfi using nrf24lo1 thanks alot

    • @RalphBacon
      @RalphBacon  4 года назад

      Well done, John, so glad it worked for you. Thanks for posting.

  • @jeffbeck6501
    @jeffbeck6501 6 лет назад

    AFTER 1,000,000 TRIES, WITH 100,000 PIECES OF CODE, THIS IS THE FIRST ONE THAT WORKED. THANKS. I have never had a harder time with a piece of code and devices. How ridiculous this took so long. It must have been just a combination of many things. I can now finally do stuff. Great tutorial. Subscribed. Thumbs up. Thanks.

    • @RalphBacon
      @RalphBacon  6 лет назад

      I can feel your relief from here, Jeff, and it is so rewarding that I can help people get their projects off the ground. Thank you so much for posting this, it's feedback like this that keeps me going! One caveat: are you using the plug-in adapter boards for this device? If not, do yourself a huge favour and get them, they are really cheap (even on Amazon) and stop any power supply-related problems down the line. Thanks again for posting, great to hear from you.

    • @jeffbeck6501
      @jeffbeck6501 6 лет назад

      Absolutely I am using them, thanks. I tried one time for 3 weeks using the high powered versions and I could never even get them working. This time I bought the normal versions, plus the adapters, plus your code, and finally it worked. Now that I have this working, I will go back and test the high powered versions. You do a really great job with your videos. It is the clear thinking and clear explanations that people appreciate. I need to check out some of your other projects. I see one there with EEPROM basics. That was another hurdle I had to get over as well. None of this stuff is simple when you combine all the hardware, software, and gotchas. I don't have a youtube channel but I do have some really cool projects related to some of your stuff. I may send you some links someday so you can check them out. ...because most people I know are just not interested. They just don't get it.

    • @RalphBacon
      @RalphBacon  6 лет назад

      Some people "just don't get it" in the same way that I just don't get sport. Really. I just don't care about football, rugby, tennis, golf... the list goes on. I probably watch about 5 minutes of sport a year on the TV. I just don't get it. People are different I guess, thank goodness, imagine if there were more of me! But keep going, Jeff, because you *do* get it.

  • @whitefields5595
    @whitefields5595 6 лет назад +10

    Transmission of multiple variables
    As a give-back to the channel, here is the code to use if you want to transmit multiple variables. It uses structures in C. Note each variable can be any data type and all can be different (int, float, unsigned long). However the max size of the whole package is 32 bytes = 256 bits
    TRANSMITTER ...
    // Top of file, in declarations, before SetUp
    typedef struct{ //declare the structure for transmission
    int A0; // 16 bits
    float Temp; // 32 bits
    unsigned long Heartbeat; // 32 bits
    // add next one(s) here, but keep total struct package size to 256 bits (= 32 bytes)
    } xfer; // name of the structure above
    xfer TXpackage; // TXpackage is a type of structure xfer
    void loop(){
    // read the sensors and put the elements into the structure
    TXpackage.A0 = analogRead(A0);
    TXpackage.Temp = sensors.getTempCByIndex(0); // Read Dallas18B20 on OneWire
    TXpackage.Heartbeat = millis()/1000; //used as a heartbeat to confirm transmission
    // add the next one(s) here
    radio.write(&TXpackage, sizeof(TXpackage));
    ---------------------------------------------------------------------------------------------------------------------------------------
    RECEIVER ...
    // Top of file, in declarations, before SetUp
    typedef struct{ //echo the structure so variables can be received in the same order
    int A0;
    float Temp;
    unsigned long Heartbeat;
    } xfer;
    xfer TXpackage;
    radio.read(&TXpackage, sizeof(TXpackage));

    • @RalphBacon
      @RalphBacon  6 лет назад +5

      Excellent contribution, whitefields5595, very useful and easy to follow using a struct, an underused data structure that is so easy to use.
      Thanks for contributing this.

    • @jzmartin11
      @jzmartin11 3 года назад

      Makes life a lot easier, thanks

  • @willofirony
    @willofirony 7 лет назад

    Excellent Video, Ralph. The R24 looks to be a Godsend. They appear to have encapsulated a LOT of admin and distilled the developers contribution to be no more complicated than using Serial. As to dupont cables: positively the worst plasticine I have ever tried to use. Keep up the good work Ralph. Brilliant channel!

    • @RalphBacon
      @RalphBacon  7 лет назад

      You're too kind Michael (but I'll take all the praise I can get)!
      Yes, I like these little RF24 units. I was going to use them to monitor my water tanks et al in the attic but I think I might use an ethernet enabled Arduino instead (my next video, oops, spoiler alert). BTW I like dupont cables (I have dozens, all lengths and configurations) but if you ever strip the insulation hoping to use them as real cables to wire stuff up with, then -- don't! They only have about 6 strands in them! OK for breadboard lash-ups but no good for real project work.
      Thanks for posting, good to hear from you.

    • @willofirony
      @willofirony 7 лет назад

      Thanks for the heads up on stripping Dupont wiring. I have found similar results when trying to strip the cables that come with "wall wart" power supplies. It is almost as if the insulation is just sprayed on to copper strands as fine as human hair.
      Your thoughts on using ethernet instead of the RF24 units are interesting. I was thinking of using the RF24s in place of ESP2866 wifi units.; having the various nodes communicating with a base which is also in circuit with just one ESP8266. The base would thus handle the IOT & time-of-day admin for all the nodes; including buffering node data, should the WiFi router (or the ISP network) go down temporarily. Do you suspect the reliability of a network of RF24s?

    • @RalphBacon
      @RalphBacon  7 лет назад

      I don't suspect the reliability of a network of RF24s but you can only use about six, I think, without creating a mesh. But the same chap who wrote the RF24 library I used also has a library for that. I suspect it's a bit more work for you but you can read up about and then decide. I like the idea though, of a network all controlled by an ESP8266 hub. Your house will be truly part of the IoT movement!

  • @HaseebAdnan0
    @HaseebAdnan0 7 месяцев назад +1

    So i commented 2 days and some hours ago that PA+LNA modules were not working. What i had done was i had plugged the antenna into a breadboard to kind of understand better(although it was harder to understand), then the breadboard forwarded the connections to arduino uno, effectively using 2 cables. Turns out my code wasnt working properly because the wire length does matter, cuz we are in the Microseconds. Thanks SIr and the guy who commented about using shorter wires down in the same video!!!

    • @RalphBacon
      @RalphBacon  7 месяцев назад +1

      Does the module not just have a standard IPEX connector, or something else where you connect the antenna directly?
      Mine certainly have an IPEX connector (I chose them because of this) so no wires to solder at all - precisely because of the issues I knew could be lurking which you have discovered (and fixed 👍)

    • @HaseebAdnan0
      @HaseebAdnan0 7 месяцев назад +1

      idk what ipex means but it could mean 8 pins that are easily connectable, in this case, unlike cameras that need to have an adapter board. I thought it would be easy for me to connect the antenna to the breadboard and remember the configuration 1,3,5,7,2,4,6,8 pins and wire that way.@@RalphBacon

    • @RalphBacon
      @RalphBacon  7 месяцев назад +1

      The IPEX connector is a tiny gold circular connector on board (only about 3mm diameter), to which an aerial cable snaps into: bit.ly/ipex-and-cable
      But I have also used this type where the antenna screws directly into the module: amzn.to/3GBdxZu
      Just easier than trying to wire up an antenna.

    • @HaseebAdnan0
      @HaseebAdnan0 7 месяцев назад +2

      @@RalphBacon oh i have an old remote with 2 ipex connectors, it has a fulhan microprocessor which is a chinese company, i couldn't find any documentation for it. But these have screwable antennas here.

  • @rosswaring2835
    @rosswaring2835 3 года назад

    This video was super helpful in getting my self balancing robot and remote controller to work. I would have spend days sorting it out otherwise! Thanks Ralph!

  • @Zubin19
    @Zubin19 6 лет назад

    Dear Ralph, Firstly Congratulations and thank you so much on a brilliant piece of work on nrf24l01 module. I have been watching a lot of videos with respect of IOT and especially on Arduino and trust me this was so simple and easy to understand am very sure Albert Einstein, would be super proud of you.
    I am yet to lay my hands on this both the Arduino & nrf24l01 and will keep you posted on the results that I get.
    Thank you once again for your efforts, God Bless.
    Best Regrads
    Zubin.

    • @RalphBacon
      @RalphBacon  6 лет назад +1

      Glad you found it useful and easy to follow. I think Mr Einstein would say that I could have made it even simpler but, hey, it's a good starting point. When you order the nRF24L01 modules DO remember to order the adapter plates too. Makes everything much easier (and safer) to wire up.

    • @zubinhakim2147
      @zubinhakim2147 6 лет назад

      Dear Ralph,
      I finally managed to build the solution at home and it worked just as expected. I did mess up with the Pins initially as I was doing this exercise by looking at 2 different videos, but then it was good to make a mistake and I realized that using a wrong pin the Transceiver looped into itself. I am yet to receive those adapter plates that you mentioned, they are on their way. Thank you once again for your efforts and time that you took to post this video.
      I shall keep you posted on my next work that I plan to do on this. I plan to extend this exercise to switch on and off a relay to switch on and off a bulb. Till then Good Bye and God Bless.

  • @Fogaata
    @Fogaata 6 лет назад

    Masterful, thank you very much!

    • @RalphBacon
      @RalphBacon  6 лет назад

      You are most welcome Fogata, I'm glad you like the video. Nice to hear from you.

  • @jacobendure262
    @jacobendure262 5 лет назад

    Yes, I also tried a number of NRF24L01 transceiver project some worked but soon after they stopped for no apparent reason. I am quite sure it had to do with interference from other channels so the key difference here is the line: // Use a channel unlikely to be used by Wifi, Microwave ovens etc
    radio.setChannel(124); I just started it an hour ago and it's still going!
    Thank you so much !

    • @RalphBacon
      @RalphBacon  5 лет назад

      You are most welcome Jacob Endure, I'm glad you like the video and found a solution. Nice to hear from you.

  • @BenDover-ci2wi
    @BenDover-ci2wi 7 лет назад +1

    Thank You very much for this tutorial. I finally menaged to get this thing working :)

    • @RalphBacon
      @RalphBacon  7 лет назад

      Hey Ben, I'm trying to interpret your post's meaning:
      1. After a lot of trouble following your video, Ralph, I FINALLY got it working anyway.
      2. I've had this unit in my box of components for ages and now thanks to your video, Ralph, I've FINALLY got it working.
      I'm hoping it's #2, especially as you are good enough to post your thanks here, which I humbly accept. Good to hear from you (and I knew what you were saying but it's Sunday afternoon so a bit of humour is OK here, right?).

    • @BenDover-ci2wi
      @BenDover-ci2wi 7 лет назад +1

      Yes it is :) Now I can move on with my project. I subscribed your channel and hope you will keep up the good work.

  • @nolihernandez
    @nolihernandez 4 года назад

    nothing compares to British education - great learning resource that actually works mate! thanks!

    • @RalphBacon
      @RalphBacon  4 года назад

      Glad it helped, Noli, thanks for posting.

  • @fasihullahsaleem
    @fasihullahsaleem 2 месяца назад

    Great Sir, I have watched so much videos and non of them worked for me. I thought it maybe due to the noise but your single code worked for me and my wasted days are paid off. Thank You Sir.

  • @artbecker5618
    @artbecker5618 7 лет назад

    I have several of the power adapters shown at 4:26. They can be used without a breadboard by using the 8 connectors on top; 2 each 5v & 3.3v plus 4 ground pins. Stick the pins on the bottom in a piece of non-conductive foam to protect them.

    • @RalphBacon
      @RalphBacon  7 лет назад

      A great way of using those power adapters, Art, thanks for pointing this out. A clever piece of lateral thinking, that they don't *need* a breadboard to work! Thanks for the post, others will doubtless find it useful too.

  • @ThuanDuong-pv3xu
    @ThuanDuong-pv3xu 5 лет назад

    Thank you so much from your lenson !

    • @RalphBacon
      @RalphBacon  5 лет назад

      Thanks for your post, Thuan Duong, good to hear from you.

  • @binarybox.binarybox
    @binarybox.binarybox 6 лет назад

    Today, I connected together a couple of nRF24L01 with adapter boards using two nano arduinos on breakout boards. One unit had a pot and the other nano had a servo connected. Servos cause current surges and need a 10uF 25v cap and without it, the servo doesn't work. I fitted a tantalum cap to both nRF24L01 boards between GND and VCC near the xtal and the servo worked really smoothly. I followed Howtomechatronics video. Dan does say a cap is needed. Hope this helps anyone having problems with the nRF24L01.

    • @RalphBacon
      @RalphBacon  6 лет назад

      Excellent, thanks for sharing that useful tip, Binary box.

  • @whitefields5595
    @whitefields5595 6 лет назад

    Ralph, Followed this and it all works OK, so thanks. I bought the bare bones NRF24L01 board in Jan 2018 which may not have been available when you first made this video. The board terminates in 8 holes in a line (not breadboard friendly though as pitch is small), but I wanted minimal size.
    I soldered wires onto these pins and connected as follows
    nRF pin 1 is TOP RIGHT if you hold it with the pinouts uppermost and chip facing you ....
    nRF24L01 pin Arduino pin
    1 VCC 3.3 V from external source
    2 GND GND
    3 CE 7
    4 CSN 8
    5 SCK 13
    6 MOSI 11
    7 MISO 12
    8 IRQ GND note the IRQ is not used here so tied to GND for safety
    I did not add any external capacitors or other componentry. If you add this to your next update others will benefit.

    • @RalphBacon
      @RalphBacon  6 лет назад

      Interesting development there, whitefields5595. Is it one of these (from AliExpress): www.aliexpress.com/item/2PCS-2-4G-nRF24L01-RFID-Wireless-Transmission-Module-2dBm-1mW-2-4GHz-wireless-adaptor-100m/32848645230.html
      I notice that you are supplying 3.3v from "an external source" - as long as it's not an Arduino then that will prevent a lot of power-related issues that everyone seems to have (who does not use a 5v adapter board). Thanks for the heads up.

    • @whitefields5595
      @whitefields5595 6 лет назад

      Ralph, yes it is similar to the one in your link. I traced the terminations back to the chip. It is not a good idea to use the Arduino as a power supply, and you have pointed this out. I think you should stress it every time as newcomers may become complacent. One of the first things to go wonky is the Arduino's A/D converter. The adapter boards you use are as cheap as chips ;)) so there is no excuse for not doing things correctly. You have to do it right in the project, so start the way you mean to go on. Of course, none of this high moralising is a result of experience as I would never dream of doing it..

    • @RalphBacon
      @RalphBacon  6 лет назад

      Ha ha! Of course not, we all do it right first time every time, right? That said, my video shows that I didn't use the adapters for the demo, but I was irritated by the wiring from below and as Amazon were doing them cheap as chips it seemed obvious to try them out. Cranking up the power was then fault free. Thanks for the update, I will take note of these new offerings.

  • @BEGRProductions
    @BEGRProductions 6 лет назад +13

    **READ**
    Ok, to try to save everyone the headache I had when trying to replicate this tutorial, follow these steps.
    1. DELETE all other RF24 libraries you have on your computer, they're not all the same even if they have the same name and seem to have similar functions.
    2. Down Ralphs's folder (includes a wiring schematic, sketches shown in the video, and the library) provided in his description.
    3. Add RF24 library from downloaded folder in step 2
    4. Open Ralph's sketches and see if they're working as shown in the video. If they are, then tweak to fit your own design.
    I spent a lot of time trying to make this example work on a different library (same name) I had installed on my computer. It almost worked, but the data got stuck sending it back to the master.
    Thank you so much Ralph for helping with this excellent, concise and organized tutorial.

    • @RalphBacon
      @RalphBacon  6 лет назад +1

      Thanks for posting this, it will sure help everyone who tries to follow this demo, that's for sure.

    • @Taran72
      @Taran72 5 лет назад +1

      It's definitely helping me! I couldn't get it to work even after I soldered a 10uF capacitor to the NRF module. :) I will follow your instructions and hopefully I'll be ok. :)

    • @Taran72
      @Taran72 5 лет назад

      I just did that and it doesn't work: I'm not quite sure why. I tried another code and that other one works. Could it be something about the module I'm using? Maybe it's a cheap brand and it may not be reliable? Is there a way that I can do a step by step check?

    • @alexliu694
      @alexliu694 5 лет назад

      @@Taran72 BIG OOF

    • @Taran72
      @Taran72 5 лет назад

      @@alexliu694 : I'm learning....just asking a question. :) By the way, since I added this comment I managed to resolve all the issues I had. :)

  • @tropicaljantie
    @tropicaljantie 7 лет назад

    I am going to try to apply this.

    • @RalphBacon
      @RalphBacon  7 лет назад

      Indeed, Jan, go for it. BUT please take note of the following, to avoid some of the "speed bumps" that others have come across.
      1. Use the adapter plates for the nRF24L01 boards! They avoid all sorts of power issues that manifest themselves, and make it easier to connect the device using Dupont cables (as the cables are on TOP of the board not underneath it).
      2. Use the EXACT same sketches that I have used (one as the 'master' transmitter, one as the 'slave' receiver that also transmits back a reply.
      3. Use the exact same nRFL01+ transceiver modules that I have used - others have discovered that different modules won't, for example, allow you to transmit at 250kbps (and who knows what other differences there might be!).
      And do let us know when you have it all up and running! Good luck.

  • @1larrydom1
    @1larrydom1 7 лет назад

    Ralph, just subscribed after watching this video. I am working on getting analog sensor information back to an Arduino in the sun room that runs my irrigation. I didn't want to lay cable to the sensors to cover the 30 feet or so, so I ordered 2 of these to do the trick. Your video helped a great deal as my garden irrigation project is my first one! Just have to now learn how to send the data from the sensors back to the main Arduino. Thank you again for the well thought out presentation.

    • @RalphBacon
      @RalphBacon  7 лет назад

      Hello Arduinite! I'm currently on vacation 5,000 miles away from home so I'll have to be brief with these comments until my return, mid-July.
      I'm so pleased it helped you, Lawrence (Larry?), really I am. Remember that although I have called one a transmitter and one the receiver, they BOTH send data to each other in my demo, it's just the transmitter that initiates the whole process.

    • @1larrydom1
      @1larrydom1 7 лет назад

      Ralph - I hope you enjoy holiday, and thanks for the reply. I am awaiting the modules to regulate the 5v to ease the hookup. I certainly do remember that both units talk to each other. Once the modules come, I will start trying to get the soil moisture sensor and the rain sensor to transmit back to the main unit. One idea I had to prevent, or at least slow the corrosion of these sensors, was to power them on only when I need a reading, about once every half hour. Lots to figure out still!! Larry

    • @RalphBacon
      @RalphBacon  7 лет назад

      Yes, exactly what I do for my rain sensor. Power it up, take a reading, power off. No noticeable corrosion after several weeks. But mine are not buried in damp soil so your mileage may differ!

  • @tino8015
    @tino8015 3 года назад +1

    Such a good video, I was about to quit trying to program these antennas, but this video saved me, thanks.

    • @RalphBacon
      @RalphBacon  3 года назад +1

      Great to hear! They are very good modules (but be aware - and beware - that there are fakes out there, always get original Nordic devices).

    • @tino8015
      @tino8015 3 года назад +2

      @@RalphBacon thanks for the answer, and i'm sad to announce that mines might be fake cause I tryed every tutorial out there, copy and pasted the code. But no signal reveived or sent. I will buy some new ones thanks for telling me. Btw I got the ones sold by WayinTop, they are the only on amazon( the ones with the antenna).

  • @sameerk12982
    @sameerk12982 4 года назад

    Hello from India.... Thank you very much Sir for the great tutorial ...I am planning to make water level indicator for water tank in my house which is on first floor and should send data at ground floor... So planning to use this transceiver..your tutorial is great help.

    • @RalphBacon
      @RalphBacon  4 года назад +1

      That sounds like a great way to use this device, Sameer. Good luck with your project.

  • @mendimano
    @mendimano 7 лет назад

    Nice tutorial thanks for sharing, I wonder is it possible to send and recive the internet signal or for example the cable TV signal through this system.

    • @RalphBacon
      @RalphBacon  7 лет назад +1

      Not a chance, Armend, sorry! This is not a computer network packet transporter, nor a TV signal repeater either (far too slow). But it is good at transmitting (small packets of) data from one Arduino to another, at moderately high speed (up to 2Mbps) but that's about it. If you think about computer networks, they have a minimum speed these days of 100Mbs and usually 1Gb or higher. Internet TV requires something like 3Mb per second for standard definition and 5Mbps for HD. So...
      So forget that idea but do use this wonderful device for your Arduino needs,it really does work well (with the adapter boards); especially nice is the auto-confirm and auto-retransmission feature, all without a single line of code! I'll be using this in a future project (after my imminent vacation). *Good question*, though, thanks for posting it here.

  • @szehenry
    @szehenry 6 лет назад

    Very clear and simple. Big thanks for making it. Btw, it would even better if you put the wiring section at the end of video to the front. Tks!

    • @RalphBacon
      @RalphBacon  6 лет назад

      True, sze Henry, true, and hindsight is a wonderful thing. I think we all should have more of it! But I'm glad you like the video, they are really quite wonderful modules, especially when used with their adapter plates. Thanks for posting.

  • @pranavshinde9529
    @pranavshinde9529 4 года назад

    First of all thank you so much, I've been struggling with nrf finally got it working. In my project I'll be controlling a bot with nrf, does the nrf needs to aligned in a certain position for effective tx and Rx.Also the range sometimes suffers even if I move one nrf little bit.

    • @RalphBacon
      @RalphBacon  4 года назад

      The position of the nRF24L01 should not be critical. However, a couple of other things are:
      1. Are you using the adapter plate so you can run it off 5v? This is a very common source of problems.
      2. What power setting did you set in the code? LOW should be OK but try the higher power settings too. Only use MIN for workbench use (about 30cm range).

  • @victormironescu
    @victormironescu 3 года назад

    Very clear tutorial, Thank you.

  • @billglass5160
    @billglass5160 2 года назад +1

    Channel 124 is a good one for me here in Grenoble, France. Thanks for the tip, Ralph!!!

    • @RalphBacon
      @RalphBacon  2 года назад

      Fantastic! Well away from microwave ovens!

    • @billglass5160
      @billglass5160 2 года назад

      @@RalphBacon Default channel gave short range (2 meters). I live in a WIFI jungle. Channel 124, 2 brick walls, 2nd floor, and my birdnest breadboard yields 0/100 CRC errors. Waiting for LNA with antenna to top this score.

  • @male22male22
    @male22male22 3 года назад

    @Ralph Thanks for the video, I have a question.
    1. which pin in Arduino nano connect to the pin IRQ, and CE in NRF24.

    • @RalphBacon
      @RalphBacon  3 года назад

      The Nano is _exactly_ the same as the UNO in this respect, same pins etc.

  • @tukukode
    @tukukode 4 года назад

    Thank you so much 😊👍

  • @giniterminator
    @giniterminator 7 лет назад +3

    Hello Ralph, this is the best explanation about nrf24l01! Just one question. How do you send more the one variable in one package? Thanks.

    • @RalphBacon
      @RalphBacon  7 лет назад +2

      Hi Gustavo! The way I would do it is to send either a concatenated fixed length string of several variables, or, if you can't be sure of the length, separate them with a delimiter such as a "|". Convert all the variables to strings if you do it this way. Then reconstruct them at the receiving end. I might be tempted to use a struct to do this.

    • @RalphBacon
      @RalphBacon  7 лет назад +2

      I think you are limited to 32 bytes of data though... will have to check this.

  • @jameshaefner8880
    @jameshaefner8880 7 лет назад

    thanks for the video, planning a project using these and it was very helpful! quick question however, where would you adjust the code to have 2 main transmitters and one main receiver? I am thinking of having two separate sensors with arduino nanos transmit different data back to a main arduino mega to process and display the data. Thanks

    • @RalphBacon
      @RalphBacon  7 лет назад

      Hey James, glad you found the video useful!
      As soon as you have multiple transceivers you run into the challenge of logistics; who is sending to whom, when, how often and so on.
      I would assign your sensor transceivers different channels so that your master controller can then poll for the results every few seconds, minutes or whatever. In fact, the transceivers have 124 channels to choose from (Wi-Fi and microwave interference notwithstanding) and can be used to "channel hop" anyway.
      So your sensors wait for a "Give me your data request" (in much the same way as my demo showed) and transmit the values back to the master. The master then moves onto the next sensor and repeats the request albeit on a different channel (probably in a simple loop).
      There are doubtless other ways to do this with a sensor mesh perhaps (there are examples in the library which I must admit to not having read, my requirements being fairly simple), but I've no reason to think my above suggestion would not work with several sensors, all on different channels.
      I hope this helps and good luck - please post back your success, failure, issues, problems so I (and other readers here) can see what works and what doesn't. Great question!

    • @jameshaefner8880
      @jameshaefner8880 7 лет назад +1

      Thanks for the reply! I have been looking through different videos on simple communication, mesh, and networks to see what will work well for what I am trying to do, and what will also allow for easy expansion after the initial installation (adding additional sensor nodes). I am thinking of moving towards a simple network, but am still doing research and planning for this. Your video was a lot of help in getting started with everything

  • @davidbond9360
    @davidbond9360 6 лет назад

    Hello Ralph, great video, it lead me to success! I've built a remote sensor using the nRFL2401+, is there anyway I can get the nRFL2401+ to tell me when its battery is running low?

    • @RalphBacon
      @RalphBacon  6 лет назад +2

      You can get the Arduino to tell you this by monitoring the battery level on an analog pin, David. I'd use a simple 1K and 10K ohm potential divider for this. Two resistors, the 1K from +ve and the 10K to -ve with the analog pin connected to where the two resistors join. The Arduino can then transmit a data packet that you interpret and that tells you the battery is low. Experiment on a local Arduino so you get the correct measurement. Any good?

  • @LucaDiStefano
    @LucaDiStefano 4 года назад

    Couldn't be any clearer than this. Thanks :)

  • @user-zc7yj2kl1f
    @user-zc7yj2kl1f 6 лет назад

    I enjoyed your video. so i would like to ask a question.
    I want to control this sensor's signal emission using the clock in the arduino. Because I want to set it up to be transmitted simultaneously with other ultrasonic wave signals.
    is it possible? if so, I would appreciate it if you could give me the relevant information or source.
    thank you for great explanations.

    • @RalphBacon
      @RalphBacon  6 лет назад

      I'm not totally sure what you're trying to do, Jeong Dong-ho. Describe to me what you want the project to do and I'll see if I can help, ok?

  • @DrexProjects
    @DrexProjects 7 лет назад

    I have a 1/2 dozen of these and never used them. My plan was to have 1 in each greenhouse ( 3 at the moment ) to transmit temp, light level and such back to the main house and to the IOT thing. ( Mobile App thing ) Perhaps it's about time I started getting familiar with these devices. Thanks for the kick in the ass to get me going.

    • @RalphBacon
      @RalphBacon  7 лет назад +1

      Indeed, Darrell, consider this an Arduinite kick in the ass!
      Now that you have an ultra-simple demo to follow, I reckon you'll only have to change the amount of data to transmit. If you make a fixed string size (temp + light level + humidity + whatever) as a string or char[ ] then you will have no trouble doing this. It's how I did it in my 433Mhz rain sensor project a while back. In some ways I wish I had used this nRF24 device if only because it guarantees reception (or tells you it failed). That said, my rain sensor project has worked beautifully ever since I installed it so maybe I have a (new) solution looking for a problem (and what's wrong with that? heh heh!).
      Anyway, I hope this has fired you up to get that greenhouse project underway ready for the Spring 2017 (assuming you live in the northern hemisphere).

    • @DrexProjects
      @DrexProjects 7 лет назад

      Spring will be here any day now as I live on Vancouver Island In Western British Columbia. Although for a known mild climate this year winter is sticking around much longer than usual. Global warming my ass.

    • @RalphBacon
      @RalphBacon  7 лет назад

      I shamefacedly admit to having to look up that location, Darrell, but having discovered it is in Canada, no wonder it's cold! I think UK weather is sometimes weird but at least we don't have bears wandering around . Now if you could just slip a nRF24 on a collar round a bear's neck to track him that would be a good project...

  • @aarongellado9547
    @aarongellado9547 5 лет назад

    IT WORKS!!! I've been trying multiple tutorials. Yours was the only one that worked for me. Could you try doing an NRF24 network next?

    • @RalphBacon
      @RalphBacon  5 лет назад

      You sound surprised, Aaron! No more than me, really. 😱
      But I'm not going to do a (mesh) network though, sorry, as I have no need and it just seems like an overly complicated way to send data around! There is a demo sketch in the stuff I put on my GitHub so you could always have a go. May the force be with you...
      Thanks for posting, good to hear the positive feedback.

  • @demetriosdemetriou1114
    @demetriosdemetriou1114 7 лет назад

    Yes it does the random numbers communication is perfect
    also the pulses from the digital potentiometer I can see them on the transmitter also the pulses. on the receiver side I see the random numbers produced but nothing of the potentiometer. God bless you thank you

    • @RalphBacon
      @RalphBacon  7 лет назад

      OK Demetrios, that is good (I asked because some viewers are having difficulties in getting that demo sketch running, probably as a result of noisy power issues or frying their nRF24L01s by using 5 volts).
      What you need to do is read the potentiometer value via the analog port (you suggested A1) then transmit that *instead of* the random number. However, in my demo sketch I am only transmitting ONE BYTE - which can contain a maximum value of 255 whereas the analog value can be from 0 to 1023. So for test purposes only, you can *map* the analog value to a range of 0 - 255 like this (which I have demonstrated in other videos):
      char getPotValue() {
      int potValue = analogRead(A1);
      return map(potValue, 0, 1023, 0, 255);
      }
      Which means, take the potentiometer value and constrain it from its value of between 0 and 1023 to the new range of 0 and 255.
      I'll leave you to experiment but this should be very straightforward (and help on the *map* command is on the Arduino.cc web site too).
      Good luck!

  • @rodrigoecharren8055
    @rodrigoecharren8055 5 лет назад

    Hola, es imprescindible usar adaptadores de tension para los pines SPI? Lei en algunos foros que los SPI pueden manejar los 5v de arduino directamente. Gracias.

    • @RalphBacon
      @RalphBacon  5 лет назад

      Hola Rodrigo! Es un riesgo Podría funcionar o podría destruir el chip nRF24L01. O podría funcionar por un tiempo y luego fallar de repente. Si solo quieres experimentar, adelante. Pero para un proyecto verdadero, usaría yo un nivelador de voltaje. Gracias por publicar una pregunta interesante.
      Rodrigo asked whether the 5v Arduino could directly control the nRFL0124's SPI pins without a voltage leveller:
      It's a risk. It might work or it might destroy the nRF24L01 chip. Or it might work for a while and then suddenly fail. If you just want to experiment then go ahead. But for a true project, I would use a voltage leveller.

  • @danhcong5234
    @danhcong5234 4 года назад

    Thanks for sharing. I have got a question. Co D10 pin work in pwm mode with this rf module? Thanks.

    • @RalphBacon
      @RalphBacon  4 года назад +1

      As we are not using pin D10 for the nRF24L01+ I don't see why you could not use for anything you wanted to, including PWM, Danh.

    • @danhcong5234
      @danhcong5234 4 года назад

      Ralph S Bacon thanks. I tried this module. One with antenna and one without. I tried indoor, but distance is not far as advertised. Just approximately 6 meters. Do you have any information about this?

  • @paulhurd954
    @paulhurd954 6 лет назад

    Thank you, made things easy to set up.
    Question about the nrf24lo1 with the extended antenna. Does that just increase its range or does it make receiving/transmitting better. Less prone to interference?

    • @RalphBacon
      @RalphBacon  6 лет назад

      Both, I think you'll find to be true, Paul. A better antenna lets more power to be transmitted, and a bigger signal to be received. So it's a win-win on all fronts if you choose one of the walkie-talkie style antennas for these modules. Make sure you use the adaptor plates for these units if you using anything above minimum power though (in fact, at all times)! Good question, thanks for posting.

    • @paulhurd954
      @paulhurd954 6 лет назад

      Ralph S Bacon thanks for the response. Makes sense. Could I then use a module with Antenna to do the transmitting(more power) to a module with built in antenna to only receiver data? Or do they need to be identical modules?

    • @RalphBacon
      @RalphBacon  6 лет назад +1

      No, they don't need to be identical but (part of) the benefit of a higher power transmission would be lost, because of the less efficient receiver's aerial. However, either/or is better than no high power aerial, that's for sure - a higher power transmitter will transmit further and a more sensitive receiver will be able to grab a signal from the noise. Do bear in mind that although I've called the sketches "transmitter" and "receiver", they *both* transmit, even if only to auto-acknowledge. And do make sure you use the adapters (I've said it before and I'll say it again!).

    • @paulhurd954
      @paulhurd954 6 лет назад +1

      Ralph S Bacon thanks!!!

  • @webslinger2011
    @webslinger2011 4 года назад

    Nice! I didn't notice there was an option to send audio using an rf24. Gotta explore that in the future.

    • @RalphBacon
      @RalphBacon  4 года назад +1

      Sending audio is tricky. Here you have just 32 bytes max to send in a single packet. Given that a simple .mp3 will have some 4Mb for a quality CD track, that's a LOT of packets. There's probably a better way to send audio, probably BT.

  • @TOMTOM-nh3nl
    @TOMTOM-nh3nl 4 года назад

    Thank You for the Tut

  • @JerryEricsson
    @JerryEricsson 4 года назад

    Cool, several years ago, I purchased a lot of these, ten I think it was for not a lot of cash. Back then everyone said solder a capacitor on so I did that after they arrived, then put them in my storage bin, where they have lived, untouched by human hands ever since. You see, right after that, we were introduce to the ESP8266 which was much easier to play with and includes a micro-controller on board. So it is, when I need to communicate, I just do it over wifi, or if need be, go to the ESP32 and use Bluetooth which is so much easier now in its version 5 on my new Christmas/50th Anniversary gift from my wonderful wife. Since it was a combo, and since my old laptop has given up the ghost, I opened it early and am typing on it now. Man what a difference, I love the instant on with the solid state drive, the 4K display is so sharp I now see all the blemishes on the talking heads on FOX News, and as I say the Bluetooth works much better with very quick connect and very few dropped audio to my hearing aides.

    • @RalphBacon
      @RalphBacon  4 года назад

      Oh dear. That is very bad news for me then, Jerry, With a 4K UHD screen you will see all the flaws and artifacts in my videos too! I don't think I will record in 4K just yet - not without a soft focus filter over my camera, anyway!!!

  • @michaelstevens630
    @michaelstevens630 7 лет назад

    Hi Ralph, a nice simple explanation of these little modules. I bought two over a year ago and never did anything with them. Time for a project I think. Have enjoyed watching several of your videos. Can we see more of Benny the Cat?

    • @RalphBacon
      @RalphBacon  7 лет назад

      Ha Ha! Benny is definitely getting star-struck, Michael, there will be many opportunities I'm sure where Benny will set me straight. Glad you liked the video and even better that you are now enthused into getting this little beauties working (I've just ordered a set of 10 from Amazon UK for the SAME price as they were selling for in China - not sure how they managed this but I've now got them delivered today). I can see many uses for these going forward. Thanks for posting and I'll let Benny know too. :)

  • @mohammedzaman1937
    @mohammedzaman1937 7 лет назад

    nice video! is there a way to turn on/off a led remotely when the temperature reaches a certain level (provided a temp. probe is attached to the arduino)?

    • @RalphBacon
      @RalphBacon  7 лет назад

      Certainly you can do this Mohammed. I would get it working first locally, that is, get an Arduino to turn off its own LED when connected to a temperature sensor such as a DHT11 or a DS18B20 (see video #28). That way, you learn how to control the LED first, then you can send that information using a single byte using the nRF24L01 to another Arduino and turn off its LED remotely.

    • @mohammedzaman1937
      @mohammedzaman1937 7 лет назад

      thanks for the reply. i am going to video #28....

  • @gaya6352
    @gaya6352 3 года назад

    Hi Ralph!
    first of all thank you for sharing this video with us.
    I would like to ask you a question; is it possible to receive data on the spatial position?

    • @RalphBacon
      @RalphBacon  3 года назад +1

      Do you mean where the other system is positioned, like a GPS signal? If so, then no, although you could install a simple GPS module and send the coordinates back to the initiator, I guess.

  • @thormarum995
    @thormarum995 7 лет назад +1

    Just found your channel and I have a question. I bought 433 MHz modules but they interfere with my weather station and they are very sensitive to noise. I need to transmit a RS-232 signal (5 bytes) from a PC to an Atmel microcontroller. Is this possible using these modules?

    • @RalphBacon
      @RalphBacon  7 лет назад

      Hi Thor! Yes, I've found the 433Mhz modules are pretty dumb inasmuch that they interfere with one another as well. You can certainly transmit data from your PC to an Arduino but I have only done this using two Arduinos (one transmitter, one receiver) and using Python on the PC to send data via the standard USB to the transmitter Arduino (all simple stuff). No RS-232. Do you need that or is it just a communications protocol you thought might be required? This is reasonably straightforward, so much so others might benefit with a video on how to do it... let me know exactly your requirements.

    • @thormarum995
      @thormarum995 7 лет назад

      Hi Ralph. Thanks for your answer. I'm a modelrailway enthusiast and would like to have small scale 1:87 trucks driving, just like they have at Miniatur Wunderland in Hamburg. If you don't know this please check out their website. You can also find lots of videoes on YT. I control my trains from a PC using homemade MS VB software. Partly using industrial I/O and partly RS-232 communication. My experience is that USB and VB 6.0 is unreliable. In Hamburg they use IR to control their vehicles but I can't get the range I need and therefore thought of radio communication. My plan is to put a receiver in each vehicle and send commands to each vehicle. Each vehicle will have an AtMega 88 to control it's functions as well as receiving data. Each vehicle will have it's own unique address, hence 5 bytes. 1 address byte, 3 bytes data and 1 byte checksum. I'm an electronics engineer so I can make my own hardware, I can develop SW for Atmel and program chips using the Atmel STK-500. I haven't tried using STK-500 with Arduino but it should be possible. Hope this gave you an idea of my project.

    • @RalphBacon
      @RalphBacon  7 лет назад

      I don't know about USB and VB6.0 being unreliable as I stopped using VB6 about 10 years ago and now it's just a dim and distant memory!
      If you used a more recent programming language (Python seems to be the "in-thing" right now) you would have no problems using USB. Python (to me) is a strange mixture of C-like syntax with Visual Basic included (from someone who has never programmed in Python). But you could use the Python "Processing" IDE that is *very* similar to the Arduino IDE (see processing.org/reference/environment/) which I also demonstrate briefly in my video #76 which reads in some Arduino-generated data.
      Just some thoughts. Once you have cracked the reliability of USB to Arduino then this project is very do-able. Thanks for letting me know the background, a very interesting project you have there.

  • @gsambolin
    @gsambolin Год назад

    Great video thanks !

  • @MDFRESCUER
    @MDFRESCUER 7 лет назад

    Good video.

    • @RalphBacon
      @RalphBacon  7 лет назад

      Nice to hear that MDF Rescuer, I hope you enjoy the other videos too.

  • @KalterKrieger
    @KalterKrieger 6 лет назад

    Have you ever had modules that dont communicate with eath other? I know every register and every bit of these chips, use them with ARM Cortex M1 CPU and a self written lib. I used th scan bit and found out, that the middle frequency of each channel is not the same in every module. You can improve distance if you shield the chips with a GND plane.

    • @RalphBacon
      @RalphBacon  6 лет назад

      I personally have never had that issue, Kalter Krieger, but several reports on the internet (and in the comments here) indicate that some Arduinites have problems - mostly power-related because they did not use the adapter boards but maybe this has something to do with it too. Good tip about the ground plane, thanks for posting and vielen Dank für deine Infos.

    • @KalterKrieger
      @KalterKrieger 6 лет назад +1

      Hello, you accent sounds "British" ;-) The problem is, that these chips are clones. The original ones from Nordic are much more expensive, about 5 USD / pc. I have aprox. 30 of them and only 20 are worht to be used in applications. Schöne Grüße aus Deutschland.

  • @artbecker5618
    @artbecker5618 7 лет назад +1

    You can get adapter plates for $.50 or less, postpaid, on AliExpress.com -- Bangood looks to be almost always way overpriced. You can also get the same two boards with SMA connector and antenna at AliExpress for $1 less than you paid. Or you can go on Ebay and pay 5x to 10x the same price as buying direct from China. The only advantage I've found to using Bangood is occasionally/rarely they have something that AliExpress doesn't offer. Thanks for all your great videos.

    • @RalphBacon
      @RalphBacon  7 лет назад +1

      Do you know what Art? I too have found Banggood to be quite expensive lately. I put it down to the value of the British Pound dropping but even looking at the $ prices makes me think you are absolutely spot on. And AliExpress is like a mini-eBay in itself, the service is good and the prices competitive. I've bought some stuff from AliExpress but Banggood (and Gearbest) were always convenient but now... well, your experiences seem to coincide with mine. Interesting that you point this out, not just for me but others too who read this, why pay more when you don't have to? Thanks, too, for the encouragement, it's great that my Arduinite viewers like my videos. Great post, appreciated.

    • @johnfiott
      @johnfiott 5 лет назад

      @@RalphBacon Unfortunately Ali Express does not accept Paypal, unlike Banggood. And somehow I always feel better when using Paypal rather than sending out my credit card details.

  • @RaadYacu
    @RaadYacu 7 лет назад

    These are great nRFs easy to use but no SOC. newer ones have both. Just be aware that you can only transmit 32 bytes of data. Also receiver can go up to 5 or 6(not sure of the number of the top of my head ) kind of like Xbee
    But then it's more of mesh network I am talking about
    One more thing is possible to use Struct to send diff kinds of data as one block
    Great video Ralph

    • @RalphBacon
      @RalphBacon  7 лет назад +1

      Hi Raad! The author of the RF24 library even has one for audio so I guess he gets round the 32-byte limit (perhaps he just transmits 32-byte chunks, I haven't looked!). He also has a library for that *mesh* network you mention. But frankly, I think most Arduinites will just want a fairly simple system and for that purpose these cheap (but very clever) units really do fit the bill, don't you think?
      Thanks for pointing out those caveats, it's this sort of information sharing that makes the Arduino collaboration so very powerful - and ensure we buy hardware with both eyes open!
      And I'm glad you liked the video, I'm hoping it was as simple as could be so beginner Arduinites could follow it!

    • @RaadYacu
      @RaadYacu 7 лет назад +1

      I do agree - keep it simple is my motto for sure
      I run into trouble with these when I hooked them up to ESp8266. The power the ESp8266 was giving out was not enough to power the nRF, so I used the capacitors.
      Again, enjoyed the video. Keep them coming

  • @airthrow
    @airthrow 6 лет назад

    How important is it for both arduinos to be identical?

    • @RalphBacon
      @RalphBacon  6 лет назад

      Nope, don't have to be identical, airthrow. As long as the code compiles for your platform it will be fine. So you could use a Mega, an Uno or a Nano. You could probably use a Leonardo (Sparkfun Pro Micro) too but a bit of a waste on this. Do let us know if you succeed in getting it working - are you using the adapter boards (saves hours of head scratching)?

  • @vivekvenkatsubramaniam437
    @vivekvenkatsubramaniam437 7 лет назад

    Hey, Mr Bacon! I found this very useful. I do have a question, though. In my computer, there's just two ports, while yours seems to have more. Can I "add" multiple COM ports, or is it unchangeable?

    • @RalphBacon
      @RalphBacon  7 лет назад +1

      Hey, Vivek! Com ports are not added (not by you anyway).
      When Windows is notified by the USB bus that a device has been attached it will allocate it a COM port number, not randomly but in a more-or-less sequential way. As you disconnect devices those ports "disappear". The same port number is (usually) allocated to the same physical USB socket you plug stuff into. So if you plug your Arduino into the leftmost USB socket of your hub, and is allocated to COM 5 then it will almost always be allocated that COM port number if it is plugged into that socket again (unless already in use). That's why it is good to always plug USB devices into the same socket otherwise it will re-enumerate and re-install any drivers (for that COM port).
      If you go to the Device Manager, View, Show hidden devices you'll see the COM ports that were previously assigned to stuff you previously plugged in.
      All clear as mud?

    • @vivekvenkatsubramaniam437
      @vivekvenkatsubramaniam437 7 лет назад

      Ralph S Bacon So basically, the more new devices I plug into my device's USB port, the greater the number of COM ports that appear in it. Am I getting this correctly?

    • @RalphBacon
      @RalphBacon  7 лет назад

      That's exactly how it works, Vivek.

  • @romanhuante
    @romanhuante 7 лет назад

    Hi Ralph! Thank you for taking the time to make this video. It has been a tremendous help for me in learning how these little modules work. As an absolute beginner to this kind of technology though, i still get kind of lost when it comes transmitting data of different types and sizes. I'm looking to transmit an array comprised of 5 values from one arduino nano to another. Could you please explain a little more in depth as to what I would need to do to make that work and why? Thank you so much!

    • @RalphBacon
      @RalphBacon  7 лет назад +1

      I'm pretty sure that you can transmit up to 32 bytes of data in one go (concatenated as a simple string). Hmm, maybe I should talk about this when I do my video on the Benny IN/OUT indicator (using my TFT screen but also a couple of nRF24L01s too). Thanks for the prompt, I'll include that info.

    • @romanhuante
      @romanhuante 7 лет назад +1

      Thank you sir! I have it figured out now (:

    • @azysgaming8410
      @azysgaming8410 2 года назад

      @@romanhuante pls tell me how. I wanna send multiple values too.

  • @demetriosdemetriou1114
    @demetriosdemetriou1114 7 лет назад +1

    Thank you so much Ralph but I wouldn't do it with infra red . As you probably noticed it will be the receiver which will be implanted and to perform a task it needs to adjust frequency and amplitude of stimulation and this can be done with a transmitter and with a digital potentiometer and behave like an oscillator. Thank you as I have at least piqued your interest on my project. God bless you.

    • @RalphBacon
      @RalphBacon  7 лет назад

      You did more than pique my interest, I have ordered one of the digital potentiometer chips but I will (probably) just use it as a simple volume control, controlled by infrared. At least it will demonstrate the possibilities. However, it will take several weeks to arrive from China so I must be patient!

    • @demetriosdemetriou1114
      @demetriosdemetriou1114 7 лет назад

      Dear Ralph, I am happy for your interest and you are welcomed to join in, after all I am a lousy programmer(LOL) I know that I am waiting to hear from the Eurostars, but I hope and pray that will go through. I have intrigue the interest of worldwide Medical device manufacturers and all of them came to London for a conference but all of them wanted proof and FDA pass. Now we are near as I have partners for almost every discipline except a programmer and as it is very huge this project ($30 billion per year)it is better I end up having 5-10% than 100% and no partners. If I know your address I could sent you the digital potentiometer and from its data sheet I stole the program that I am using but please shhhhh don't anything to anyone about my infringement and can work as an oscillator. As always you can email me at demetrios@nevadatechnology.co.uk privately and may God bless you and family and the your cat.

  • @alisonmccarthy374
    @alisonmccarthy374 7 лет назад

    I am trying to test out my transmitter and receiver using your set up and no matter what I do I don't seem to be able to get them to 'talk' to each other. The transmitter is continuously outputting "No acknowledgement of transmission - receiving radio device connected? No response received- timeout!" and the Receiver just says the startup line of "THIS IS THE RECEIVER CODE - YOU NEED THE OTHER ARDUINO TO TRANSMIT" I have the bigger NRF24L01+ with the antenna attached and the connection board NRF24L01 YL-106. I saw you said to someone in the comments below that with the attachment board you power it with the 5V port but I am just wondering if I could be doing something else wrong. It seems that the transmitter isn't recognizing the receiver and vice versa

    • @RalphBacon
      @RalphBacon  7 лет назад

      Hi Alison, sorry to hear you're having issues. Look at the post in the comments on this video from "nouar" who is also having problems and ensure you have followed the suggestions I have made there first. I have to assume you have wired it up correctly (the pin-out diagram is a TOP view with the wires coming in underneath, so it can be a little confusing).
      If you are using the adapter board into which you have plugged the nRF24L01, the yes THAT board needs 5volts. The bare module alone needs only 3.3 volts (or you will fry it).
      Also make sure you have kept the power to both modules to the LOW settings (in my sketch you will see RF24_PA_LOW. You can even change that to RF24_PA_MIN to keep power to an absolute minimum, although the range will be about 30cm / 1ft).
      Also set the speed of transmission to RF24_250KBPS for the most reliable transmission. So change this line: radio.setDataRate(RF24_2MBPS); replacing the 2MBPS to 250KPS on BOTH sketches.
      Finally, many users report that the 3.3 volt supply is too noisy to work reliably and solder a capacitor on the module itself between VCC and GND with a value of 1.0µF - 10.0µF. You can solder this directly on the board underneath - it doesn't have to be pretty, you just want it so it doesn't short out - that is why I recommend the plug in adapter boards, it gets round all the power issues.
      Try all this out and post back! Fingers crossed.

  • @baswansink7068
    @baswansink7068 6 лет назад

    Dear Ralph, i have setup a similar setup as your video here, the thing i have is that i'm seeing the "No aknowledgement" message, but on the receiver side it still states "Sent response .." and counting up. what could be the cause of this? I expected that if the transmitting side does not work well, the receiver side doesn't do anything right? At least if i disconnect the transmitter from USB the receiver stops sending out responses, so something reaches the receiver. Any thoughts, many thanks ahead.

    • @RalphBacon
      @RalphBacon  6 лет назад

      Well now, Bas, you are sure the receiver is getting the correct value (from the transmitter) but the transmitter is not getting the auto-acknowledgement? I'm firstly assuming you haven't programmed the nRF24L01 to disable that feature as that would be too silly for words. In which case, are you running the nRF24L01's on their adapter boards? If you don't have adapter boards do yourself a huge favour and get some, they are very cheap and solve 99.9999% of all problems with these devices. If you do have the adapter boards already, let me know and I'll think of what else we can do.

  • @drelmetbrown
    @drelmetbrown 4 года назад

    Thanks for the video Ralph, very informative and helpful for a newcomer to the subject. I am awaiting arrival of 2 Rf nano's - so no separate tx / rx modules. Have you come across these yet ?

    • @RalphBacon
      @RalphBacon  4 года назад +1

      Do you mean the new Arduino Nano 33 IoT? I've not got any experience with that (yet). A bit pricey for my shallow pockets! It uses via WiFi not the (same frequency) 2.4GHz _bespoke_ comms of the nRF24L01 though. It will be interesting how those communicate; I'd expect that you would have to know the other's IP address.

    • @drelmetbrown
      @drelmetbrown 4 года назад

      @@RalphBacon. Sorry no Ralph i was referring to this... www.aliexpress.com/item/32980796969.html?spm=a2g0s.9042311.0.0.785e4c4doapbjE
      I am a little limited on space so thought this was helpful being integrated all in one. Oh, Nano 33 IoT just had a look at that and may have to play with that one in the future !

  • @adabill295
    @adabill295 7 лет назад

    Great project, I have a need for a Garage Door monitor. I have two doors and sometimes ( Not very often, but once is too many) I forget to close the door after I came in. It would be nice to be able to have a display inside showing the position of the doors. It is an attached garage so the doors are about 30 feet away from living area ( through a wall). I would also appreciate an idea ass to how to tell if the garage is not fully closed. What type of sensor to use?
    I have really appreciated your videos and they come across ( at least to me) in a very understandable manner and you explain everything important like where the specific library you use is located.

    • @RalphBacon
      @RalphBacon  7 лет назад

      Hi AdaBill, I'm glad to like the videos! As a (wireless) garage door monitor this would be ideal. You can also use a Hall Effect transistor that responds to a magnet to determine whether the doors are *fully* closed (not left ajar). I've done a video on those too. Even a microswitch would be OK (like I used in my stepper motor project). Anything that could connect to an Arduino that then sends out the correct status via the nRF24L01. Sounds like a nice project. Let us all know when you get it working, right? Thanks for posting!

    • @adabill295
      @adabill295 7 лет назад +1

      Thanks again, I went back and looked at video #55 and I'm in the process of ordering some hall effect sensors to try it out.

  • @jacobtony5053
    @jacobtony5053 6 лет назад

    hi ralph i really love your channel and wanted to know where you got the code from

    • @RalphBacon
      @RalphBacon  6 лет назад

      Hello Jacob, thanks for the kind words. The original code I used here was probably included with the library I'm using but I felt it was far too complicated for the beginner (it tried to do too much) so I modified it to meet Einstein's mantra: "Make it as simple as possible but no simpler", or words to that effect. From the feedback I've had I think I achieved that, what do you think?

  • @MrArslanAhmad97
    @MrArslanAhmad97 7 лет назад

    Thank you so much Ralph for putting up this tutorial video. I finally got my setup up & working..!!
    Just one question, how can we send and receive multiple analog data from Tx to Rx? Can you please share me a small example of variable declaration & way to use in the code.
    Much appreciated !

    • @RalphBacon
      @RalphBacon  7 лет назад

      Congrats on getting this working, Arslan. I reckon you can code the next bit without an example, because it is very easy: you are limited to something like 30 characters but just concatenate the data you want into a string (instead of a single character like I am doing) and it should 'just work'. Let me know if it doesn't for you.

  • @neilw2O
    @neilw2O 5 лет назад

    Thanks Ralph. Like you say, had to jump through hoops to get two USB ports working at the same time. Windows 7
    End up swapping the mouse with other USB port forcing driver reload. Then it worked.
    Is it safe to close the Arduino windows? Unplug USBs last is my guess. We will see. Plug 'em in first? I will try tomorrow..

    • @RalphBacon
      @RalphBacon  5 лет назад

      Yes it can be very tricky. Saw your later reply so I guess you have it cracked now!

  • @mortalrahu
    @mortalrahu 5 лет назад

    Thank you very very very very much

    • @RalphBacon
      @RalphBacon  5 лет назад

      You are most welcome rahul gupta kodarapu, I'm glad you like the video. Nice to hear from you.

  • @francismwangi5676
    @francismwangi5676 5 лет назад

    A good tutorial here!But am a bit stuck. I accidentally powered my modules with 5v and am not sure if i damaged them,,,is there a way i can test the modules just to be 100% sure in case anything happened to my modules??Regards.

    • @RalphBacon
      @RalphBacon  5 лет назад

      Oh dear. I guess you weren't using the adapter boards I keep banging on about then, Francis? The easiest way to test out your boards is to implement my demo sketch _exactly_ ideally using the adapter boards so you know it's not a silly power issue that is causing it to not work. Luckily these nRF24L01 boards are cheap, so if you have damaged them you can replace pretty cheaply. But please do yourself a favour and buy the adapter boards which are even cheaper and will stop you connecting 5v directly to the board. Good luck!

  • @EngrShaukatAliKhanIslampur
    @EngrShaukatAliKhanIslampur 6 лет назад

    This is Clear and the best explanation.
    Is it possible to do "Master-less serial or parallel communication between multiple arduinos through Nrf24L01?
    I'm working on a project that will have more than 10 arduinos.
    I'm looking for a way to have any of the arduinos broadcast a stream of data to any of the other arduinos at any time. when two or more arduinos are in range, they must automatically connect and start communication. it should be two way communication.

    • @RalphBacon
      @RalphBacon  6 лет назад

      You probably need a *mesh network* (and Google can be your best friend here). There is an example, I believe, in the library used in this demo. I didn't go down that route as it's more advanced but may be what you need. I hope this helps.

  • @Brandon-qo6mp
    @Brandon-qo6mp 3 года назад

    Hi Ralph your video has been very helpful on learning the nRF24L01 module as I've been trying to learn them for the past month, however I am still having issues.
    I am able to get my transmitter to work in the serial monitor but it will always receive "0's". The receiver on the other hand will not work. I've tried swapping the modules, as well as my arduinos. I am also using the adapters as you mentioned in your video and have thoroughly checked my wiring and still have not had any luck. Do you know what I might be doing wrong?
    One additional note, I noticed that when I have my RF24 radio set to (7, 8) in the transmitter, nothing appears in the serial monitor at all. (Even though I know this wiring is correct and true to my CE and CSN pins). However if I change that radio set to anything else, for ex: (8, 7), (7, 7) (9, 7) etc. without changing any of my wiring, the transmitter will then work in the serial monitor while still receiving 0's. Not sure if this could have something to do with my overall issue or if it's even an issue at all.

    • @RalphBacon
      @RalphBacon  3 года назад +1

      Are you using my two sketches without ANY modifications at all? And you say you are using the adapter plates (so these are connected to 5v)?
      The transmitter side should tell you what it is trying to send (eg 42) but then also tell you it did not get back an auto-acknowledgement from the receiver. If it does not say this then the receiver has received the value and has auto-acknowledged.
      The receiver side should receive the SAME value (obviously) and tell you this (or you can put in extra Serial.println statements), add 1 to it and send it back, at which point the transmitter will tell you what it got back. You might need further Serial.println statements just to debug these areas.
      Step 1. Load the two unmodified sketches into two Arduinos and connect up.
      Step 2. Power up the transmitter only and check what I said above. Get that working first.
      Step 3. Power up the receiver and follow the notes above.
      Keep the two units close (eg within 30cm as you are using very low power in the sketches). You can change that in line 22 of the sketches. Try RF24_PA_LOW rather than RF24_PA_MIN.
      Most problems are caused by:
      1. Not using the power adapter plate (the Arduino cannot supply enough 3v3 current)
      2. Wiring errors (I've even done this, oops).
      3. Faulty (fake) nRF24L01 modules. I had one (fake) module that failed whilst it was running on my workbench. However, they are cheap so buy a few (not fake ones. but difficult to know. Larger suppliers will probably have genuine products; Chinese warehouses not so).
      Changing the pin numbers in your sketch doesn't show much except you're getting random results because you are not actually connected to the nRF24L01. If you use the same coloured Dupont cables as I did in the DupontWiring folder in my GitHub (github.com/RalphBacon/nRF24L01-transceiver ) it should help check things.

    • @Brandon-qo6mp
      @Brandon-qo6mp 3 года назад

      ​@@RalphBacon Hi Ralph thank you so much for your speedy reply. After going through your instructions, I re-downloaded your sketches just in case, tested with serialprints, and then finally realized I made a mistake I wouldn't have noticed on my own. I have been using the adapter plates with the same wiring to my arduino that I had before using them, so one dupont cable was still going from the VCC to 3v3 instead of the 5v. I only realized this after reading your instructions and saw what you including in your first paragraph about the 5v.
      As soon as I swapped over to the 5v pin I restarted the sketches and things seem to work fine with no issues I was experiencing before. Seems like my issue fell directly into the category of a wiring error haha, but I'm glad I asked because I don't think I would have been able to make that realization on my own.
      Thank you again for your help and time of thoroughly walking me through this. As I said in my previous comment I've been trying to get my nRF24L01 modules to work for the past month (with only having heard about the adapters a few days ago from your video). So this is a huge win for me.

    • @RalphBacon
      @RalphBacon  3 года назад +1

      Excellent! I'm so glad you got it working. Now the world is your (nRF24L01) oyster!

  • @oncledan282
    @oncledan282 5 лет назад

    Good day, Ralph.
    Simply the best ever tutorial on the nRF24L01+ I’ve tumble upon as of yet .. AND IT WORKED THE FIRST TIME !!
    Superb explanations and I WILL follow you since my objective is to make a Weather Station as mentioned in your video. I said to myself « This guy just read my mind !! .. Yes, YES !! Teach me how to send Strings variables over this module … ‘Master’ ! » Hahaha!
    My Weather Station is complete. I’m using DS3231 RTC for time reference and a BME280 for Temperature, Humidity and Pressure. Also using a CdS Cell to read illumination .. just for kicks and .. why not ? For the present time, I display this info on a minuscule SD1306 OLED Display on the exterior station. I plan on using a small 2,4 inch TFT display and graph the information for the last 48 hours on the interior part of it. I’m not there yet, since I still have to learn how to work the TFT.
    My main concern for now, is sending Strings to the other side. I’ll try to find the information on your other videos before seeking your help on that specific point. I hope to find it soon.
    Until then, I wish you a good day and keep on the good work.
    Best regards,
    Daniel Lachance .. aka « Uncle Dan ».

    • @RalphBacon
      @RalphBacon  5 лет назад

      Glad you found it useful Daniel!
      Now, strings are an uncommon thing to pass around; much more useful is a flag or integer that means the same as a string. What are you doing with strings, Oncle? Remember you only have 32 bytes in a packet to transmit.

    • @oncledan282
      @oncledan282 5 лет назад

      Good Day, Ralph. It was with great pleasure that I read your reply, and I thank you for doing so.
      Actually, I could get away with pushing long integers values through that Pipe. The actual informations I want to transfer is Year, Month, Day, Hour, Minute, Second. The rest of the informations are mainly of float type, since they have two decimal values. They are Temperature, Humidity, Atmospheric Pressure and Degree of Illumination. It would look like this (I added the comas to separate the values) :
      « 2019, 06, 19, 15, 24, 00, 25.34, 45.39, 1003.84, 19.35 »
      I kind of tweaked your Code a bit but with mixed results. I guess I need more tutoring on ways of passing data in the Pipe. Hahaha! Last night, while loosing sleep on the matter, I thought about shoving the info into an Array of [11] cells, and finding a way of passing it through the Pipe one [cell] at a time. This is still under work. Any help from your part would be well appreciated.
      Until next time we chat, I wish you a very good day and, like I said before, keep on the good. work !!

    • @RalphBacon
      @RalphBacon  5 лет назад +1

      The way to do it is not with an array, but with a struct. A struct simply defines a group of otherwise unrelated variables both on the sending and receiving side. You have 32 bytes max available to send in a single packet with the nRF24L01 so you could reduce that by, for example, sending 19 instead of 2019 as the year (two bytes saved). If you need further help, find my email address in the About tab on my channel and I'll send you an example. Don't lose sleep on this!

    • @oncledan282
      @oncledan282 5 лет назад

      Hi again ..
      Well, I thought sending the temporal data at first, the the environmental data as s second burst. This way, I can't bust that 32 bytes barrier .. But I just can't see how the « struct » works. (Yes, you can call me 'Green'). Hahaha !
      Thanks for the helping hand, Ralph. I greatly appreciate it. Have a nice day.

    • @RalphBacon
      @RalphBacon  5 лет назад +1

      If you find my email address in the About tab I'll send you a quick example.

  • @nastynxt
    @nastynxt 6 лет назад

    very helpful

    • @RalphBacon
      @RalphBacon  6 лет назад

      Thanks for that, Nitin Dangwal, nice to hear from you.

  • @johnfiott
    @johnfiott 5 лет назад

    First of all, thank you for an excellent video. Your explanation was clear and easy to follow and I feel like I have now moved up a notch in the potential uses of my Arduino. I would just like to ask where I can access the data sheet (library commands to set power level etc) for the module please. Thanks again.

    • @RalphBacon
      @RalphBacon  5 лет назад +1

      Good you liked this, John, and there's now a detailed specsheet for the chip in my GitHub. However, the best way to find out the available commands is to look inside the RF24 library header to see what functions have been defined. For example...
      For example, the command radio.setPALevel(RF24_PA_MIN) shows that the function setPALevel accepts a defined constant for power level; find that function in the header (or .cpp file) and see what the alternatives are.
      A bit of digging may bring up nuggets of gold!

    • @johnfiott
      @johnfiott 5 лет назад +1

      @@RalphBacon Thank you so much Ralph. You are my idea of what a tutor should be all about. Show how something is done, then point the student to other resources, because that is how one learns. If you ever decide to release courses on Udemy or similar platforms (and you really should consider this) please let me know and I will definitely consider subscribing. Cheers from Malta. :-)

  • @user-eu2yf6ij2t
    @user-eu2yf6ij2t 2 года назад

    Great tutorial. What do you think about encapsulating data for mesh networking with these?

    • @RalphBacon
      @RalphBacon  2 года назад

      There are some code examples in the library that deal with mesh networks but I have to admit I've never needed one so have not experimented (yet).

  • @JDI4DAVID
    @JDI4DAVID 6 лет назад

    I found it easy enough to plug the black board power supply into a 6 way and a 2 way female pcb header. The nRF24 plugs up into the supply and overhangs the prototype pcb.

    • @RalphBacon
      @RalphBacon  6 лет назад

      You're talking about *not* using the standard adapter plate, David? Can you just expand on what you're doing here as I didn't fully grasp how you're powering the nRF24L01, it would be useful not just to me but others reading your post too.

    • @JDI4DAVID
      @JDI4DAVID 6 лет назад

      Ralph S Bacon I am sorry not to be clear. The power supply board I am referring to is the Black Socket Adapter Board www.amazon.co.uk/dp/B00NJCB7FS/ref=cm_sw_r_cp_apa_awLXzb5ACAMN0. This can be plugged into a couple of socket headers at the edge of a pcb. The radio board plugs up into the adapter board and overhangs the edge of the pcb. .

    • @RalphBacon
      @RalphBacon  6 лет назад

      Ah, yes, all is clear now. Those adapter boards are the same ones I use, and yes, they can easily be plugged into a couple of socket headers on the main PCB, good idea. In fact, on that topic, I'm definitely in favour of having things 'unpluggable' for ease of maintenance or eventual replacement, it makes the whole process so much easier. Thanks for clarifying, David.

    • @JDI4DAVID
      @JDI4DAVID 6 лет назад

      Ralph S Bacon I am very keen on pluggable modules after soldering a TFT display to a prototype board and then changing my mind. I find it is good to be able to swap out modules too to fault find. I have two sensor units sending data to my display and data logging hub. To keep it simple the hub has a NANO for the radio coms and another for the screen and SD card. I don't think the radio on SPI and the display on the same SPI bus will work without messing with the libraries. Would you agree?

    • @RalphBacon
      @RalphBacon  6 лет назад

      If the libraries (and modules) follow the SPI standard then, yes, they should play nicely together (NB: nicely, adj, constantly fighting to see who is boss). No really, as long as the CS pin is kept high for the module not being used, and LOW for the one that is, then they should work together. That's the whole point of a shared bus, right? Back on Planet Earth, they may not work together at all. I've seen libraries that just put the SPI CS pin LOW and keep it there!!! But that could be corrected of course. If you have a Logic Analyser then it would be simple to see what each bit of code does to the SPI bus (and something on my wishlist). I guess you could try it, you may be pleasantly surprised. Or you may think, what the hell, another $2 Nano and I avoid all that potential pain!

  • @merkabaenergy9558
    @merkabaenergy9558 6 лет назад

    Could you link to these breakout boards please :)

    • @RalphBacon
      @RalphBacon  6 лет назад

      I certainly can and I'm surprised no-one else mentioned yet, Merkaba Energy! I've added a link to the video description where I got them from (Amazon) but they are available in many of the usual haunts (AliExpress, Banggood, eBay):
      The adapter board:
      www.amazon.co.uk/Socket-Adapter-NRF24L01-Wireless-Module/dp/B00NJCB7FS
      And whilst we're at it the actual module itself, also from Amazon but available everywhere:
      www.amazon.co.uk/dp/B010N32X3U
      I hope this helps and thanks for pointing this out to me.

  • @kondordv
    @kondordv 4 года назад

    I was looking for send and receive via AcknowledgePayload, I need this for reducing power consumption, but it is not here.

    • @RalphBacon
      @RalphBacon  4 года назад

      I'm not using the ACK payload here, just the general auto-acknowledge but you can add it in fairly easily - but not something for a beginner video. I'm not sure that using the ACK payload is going to reduce your power consumption much though?

    • @kondordv
      @kondordv 4 года назад

      @@RalphBacon with ack i send and receive an information just one time per minute this is reducing a lot of radio also of power consumption.

  • @anushka-ru
    @anushka-ru 5 лет назад

    Again one more superb video. Ralph i followed all your steps seems like my receiver does gets request from transmitter but transmitter never prints anything it always say. "No response received - timeout!
    No acknowledgement of transmission - receiving radio device connected?" .. Is there any incorrect PIN which could cause this?

    • @RalphBacon
      @RalphBacon  5 лет назад

      Let's use the terms MASTER and SLAVE for these devices, Akshey, it makes more sense. So the Master is sending a value out, the SLAVE receives the _correct_ value but does not auto acknowledge back to the Master?
      Two things stop these devices working:
      1. Incorrect wiring because you have to wire 'from underneath' so it's easy to get wires crossed
      2. Lack of the plug in adapter that allows you supply 5v to the board which then steps it down to the required 3v3 at the necessary current. It also makes the wiring easier as it's all done from the top.
      So I would firstly get the adapter boards, firstly, very cheap, from Amazon or Banggood or Gearbest or somewhere. Whilst you are waiting for them, check your wiring and power configuration of both boards. Set the power level to _minimum_ and ensure the boards are physically close together (within 30cm).
      If you are using my sketch then you _know_ the code works so it can only be (1) or (2) above!

    • @anushka-ru
      @anushka-ru 5 лет назад

      @@RalphBacon Thanks Ralph i was able to resolve issue with adding capacitor at nrf40, but now the problem is both are sending messages but neither Master nor Slave display message send. I put comments so it does work just that Master always says 0 received when slave does say it send value. Where as slave always say received but doesn't have any value. Signal for both seems to be working it seems that data is either getting lost or not able to read..

    • @RalphBacon
      @RalphBacon  5 лет назад

      Get the adapters, that's the first thing to do, really it is.

  • @gsuresh2u
    @gsuresh2u 2 года назад

    Good explanation is there any library available for Black Pill ? I mean STM34F401CC or STM32F411CE ?

    • @RalphBacon
      @RalphBacon  2 года назад

      It looks like the standard libraries for the STM32 should work - but I'm guessing. This video is a good intro though:
      ruclips.net/video/b1123kz_3MM/видео.html

  • @giusepperandazzo5357
    @giusepperandazzo5357 5 лет назад

    Hi Ralph thanks for your tutorial. I'm trying to make these modules work for two days but without results. Everything is wired correctly. The power supply is given by a stabilized power supply at 3.3V. I also put a 470uF capacitor between + and - Unique thing that I didn't try is the adapter boards because I have no one near me. I have to order them. With the oscilloscope, I see that the power is stable....strange very strange. Anyway with your sketches I get: Sent response: Random numbers for example 128 .....in other part I get : Sent: random numbers for example 254 Received: always 0! Any suggestions besides the adapter boards? thanks in advance for your time. Giuseppe

    • @RalphBacon
      @RalphBacon  5 лет назад

      OK, Guiseppe, here goes:
      1. Check and double check your wiring. Because you are not using the power adapters it is easy to make a mistake because you are wiring from UNDERNEATH the board. I can only strongly recommend that you *buy the adapters*, they are cheap by mail order. And solve all sorts of power issues.
      2. Put some debugging statements in the RECEIVER module. So do various Serial.println statements to see what it is receiving and sending back. It can get a bit messy on the Serial Monitor window but it's the only way to see what is going on.
      Believe me, this demo sketch works just fine. So if it does not work for you it is either power adapter boards and/or wiring that is wrong!

  • @whitefields5595
    @whitefields5595 6 лет назад

    I have been using these a lot over the last few days running on 2 Arduino Pro-Minis (8Mhz 3.3V) both on batteries via 3.3V regulator. The Tx code tends to hang up. The Rx code seems OK. I put a 10uF electrolytic across the 3.3V input on both Tx and Rx chips and all is well with the world. There may be a synchronisation issue with the WiFi chip during the Tx pulse.

    • @RalphBacon
      @RalphBacon  6 лет назад

      Most issues seem to centre around the 3.3v power to the modules, especially if users are powering them directly from the (cloned) Arduino board's 3.3v pin which can severely limit the amount (and quality) of power available. The solution that always seems to work is the use of adapter boards so you can power them from 5v and let the on-board regulator take control. You've sort of done a similar thing but I'd still lean towards a proper adapter board which is designed to give enough current even for full power transmissions (and you can then connect the cable from the top too). But this is undoubtedly very useful information, Whitefields, given the large number of queries on this topic so thanks for posting. PS there is a post under this video that details the cloned chips' centre frequency is *not* what it should be - another source of potential problems, maybe?

    • @whitefields5595
      @whitefields5595 6 лет назад +1

      Ralph, I was not clear enough above. I want a low weight, compact portable WiFi so I am running on one single 18650 Li-ion cell to power each my Arduino pro-mini and associated nRF. The power supply to the nRF is via a low drop out (80mV) 3.3 V regulator www.ti.com/lit/ds/symlink/lp2951-n.pdf. I have the 10uF capacitor near to the nRF board. All works well, but I will be lowering the voltage down to 3.0 as the data sheet of the (original!) nRF gives a range of 1.9 > 3.6V. The Pro-Mini has its own on-board regulator so the battery goes straight to this, at least for now. I started off using the adapter boards (see post below) but eventually Arduinites are going to need a specific power supply for their projects so I use these regulators which are made for the 3 common TTL voltage levels. So far reliability is perfect, but I'll let you know how things go at 3.0V which I need to get the most out of the battery. fyi a video or 2 on low voltage / wearable projects would be useful. Thanks again.