NRF24 Frustration - Radio module doesn't work?
HTML-код
- Опубликовано: 8 июл 2024
- High quality PCB prototypes: www.pcbway.com
3D & CNC service: www.pcbway.com/rapid-prototyp...
🔥Can't make the NRF24 work well? Well, here are some reasons why that could happen... Power, SPI communication, noise, antenna and more...
🔀LINKS
-------------------------------------
More Information:
Arduino Code: electronoobs.com/eng_arduino_...
My tools: electronoobs.com/eng_afiliate...
False/True T-Shirt: teespring.com/it-s-funny-beca...
🤝SUPPORT
-------------------------------------
Join my Arduino Course (Spanish): bit.ly/2JY8icE
ELECTRONOOBS.io: electronoobs.io
Donate on PayPal: www.paypal.com/donate?hosted_...
Help my projects on Patreon : / electronoobs
my Q&A page: electronoobs.io/forum/index.php
Facebook page: / electronoobs
Canal en Español: / electronoobs en español
00:00 Intro
01:42 The NRF24
02:28 SPI connections
03:31 Noise errors
05:49 Power errors
08:35 Antenna & Amplifier
10:40 Code Problems
12:18 Thank you!
Like share and subscribe to motivate me. Thank you
#NRF24
#Arduino
#Tutorial - Наука
You nailed it! Perfect timing because I had a headache working with this modules last weak.
I had the same issues until I learned from your previous videos. Now you have all the info in one place! I greatly appreciate your effort!
This video is utterly brilliant, one of the most solid practical knowledge sharing ..... worth for a great appreciation!
Hi, I want to thank you for your excellent video. After implementing your suggestions I managed to get the modules working just as I was about to throw them out! I have several students whose projects suffered as they could not get them to communicate. They are now about to become successful. Thank you again
thank you so much for this video! I thought I bought a bad module with a weak antenna, until i realized that it was the MISO/MOSI connection, who was responsible 70% of the transmissions failing. The trick with the ground wire twisting around mosi/miso cables did the job and now all my transmission suceed with 0% loss!
I used several pairs of these in an escape room. Most of my problems went away when I put caps directly on the board's power and ground pins. I got away with "hanging" the radio boards off of harnesses several inches long, with no apparent SPI problems, though I was likely just lucky there. These can be extremely frustrating, but once you get it all figured out, they're pretty reliable.
The problem with your noise errors is most likely because you are not using a good ground reference. So the signal couples with the power or other signal trace because that is the closest return path. If you grab your existing design make it 4 layers and add two ground planes on layer 2 and 3 so the SPI has a solid reference a lot of your issues will vanish. Also if you switch layers with a digital signal put a ground via close to where you change layers (near the signal via). Otherwise the signal loses its reference when you switch layers. Basically you want your reference plane to be the closest thing to any signal so that plane acts as the return path and not some other signal or power trace.
Also its a good idea to include some RC filter on digital signals (33 Ohm and 330pF is usually fine for SPI stuff) . Best case is you dont need them and you can add a 0 Ohm resistor or a blob of solder. But if you have noise problems the RC filter can smooth out the edges.
Wow, this is a super valuable comment, thanks for laying down the deep RF knowledge @trip . RF issues like this, where you need to be an EE with deep experience to understand how to get anything to communicate, is why I stick to esp32s these days almost exclusively and use esp32-now or udp over wifi, it's less fuss. Bluetooth always comes up, but for prototyping and one-offs, BT is so disappointing, it's so complex and challenging that microcontroller board manufacturers w/ BT hardware can't even get it to work on their own products.
Bro wrote entire essay
4 layers with a contiguous ground plane is excellent advice for any RF circuitry. One slight problem: these modules are sold as they are, on 2 layers. There is a mostly-solid ground plane below all the RF stuff, but on a 2-layer, it's 1.5 mm away - much farther than the second layer of a 4-layer would be. Don't know if this makes a difference, but it certainly should... Now, RC filters, picofarad caps: are you suggesting ordering PCBs (and stencils) and DIYing the modules from scratch just to make the damn chip work?..
Designing some PCB's for my hobby projects and after watching a few videos of Rick Hartley from altium and learned about signal return as transmission lines, decoupling capacitors, capacitors turning into inductors at higher frequency, the one solution for most of PCB problems come from having no ground plane and impedance mismatch
Its like a hole new world when designing PCB's
Rookie here! The bleeding over outside of the traces is interesting. Inductance? Electrons travel parallel to the trace and run into each other? Whats up? :)
Thanks, struggled for four hours then saw your video. Really helped me
Thanks
Wow, a treasure trove of experience! Thanks!
The power regulator and short wire with ground twisting solved my issue. Thank you so much.
I too have run into all those problems, ESPECIALLY the "noise" issue! Even with short wires!
But I did resolve that, mostly for my testing process.
What I did is to use a special cable that has 6 wires with double shielding! I know that this sounds "thick" but it's actually not. It is a bit stiff, however, but not enough to become a problem.
As these are pretty short, I use a drill to twist the wires inside the sheath. I could have used a shielded CAT6A cable, but I didn't have any of that on hand. So we make due with what we have. LOL
I put connectors on the end for the nRF24 module and pins on the other end to connect to the Arduino, which now, I use an special adapter for. The Nano plugs into this adapter and all the pins are now easy to connect to via screw terminals.
At each end of the cable is a snap on Ferrite Core RFI EMI noise filter suppressor.
Since doing this, my connections have been solid.
Before that, even though I used short wires and ASSUMED this would be fine, I couldn't get consistent connections.
I know that some people know how to use these radios without libraries as they use direct access calls, however, I don't.
So the other thing I discovered, is that NOT ALL LIBRARIES ARE GOOD!!!
In a project that I'm working on, I will have multiple transmitters. I was using a good library that didn't suck up a lot of memory and using a method of cycling through channel numbers. This works.
But then, I though, I'll try a library that implements "Network" methods.
All I can say is WOW, is that slow and sucks up so much memory on the arduino.
I went back to my method that works fast and less overhead.
These modules are great when they work. It's getting them to work consistently that is the challenge.
Another recommendation for spi board layout is to make sure you keep an uninterrupted ground pour on another layer, always be aware of return currents.
Thanks a lot for the video you saved me a lot of time, I can't express how grateful I'm
Very well explained in a short time, thanks.
Boy you make high quality learning content.these informations can be very useful
As I say: Electronoobs has many great tutorial. Thanks
I had the same problem but only with the separate antenna version. Set the software transmission power moderately lower, I have it on midium that works better. Make 1 central mass on a pcb. Put the battery voltage (+) as close as possible to the transmitter module with a capacitor of 0.1 uf directly from plus to minus. I work with only layers and have large ground surfaces in them. Where possible, also run thin mass tracks between the IC pins in the digital part. For RC control, the reach is more than enough.
Andrei,
I love this new video. Several years back I watched your video "Which radio module? NRF24, LoRa, CC1101, HC12, 433MHz, HC05" and thought it was a wonderful overview video of the common different radio modules to choose from. Ever since then any time someone asked about radio communications in the Arduino Facebook groups I'm a member of I recommend they come watch that video. My take-away from that video at the time had been to use an HC-12 module because of the troubles you mentioned with an NRF24 module and because I didn't think at the time that I had enough pins to use the NRF24 with my 6-axis robotic arm project. I've used the HC-12 module in several projects since then. I've generally made it work. But it is difficult because of the slower speed. I've started doing several projects using ESP32 Node MCUs using the built-in WiFi capability (no need for the internet - just using the WiFi hardware - this was before I heard about ESPNOW). Recently I came across a video "Arduino 10 Channels Wireless Transmitter Receiver | nrf24l01+| DIY" by the "hash include electronics" RUclips channel which convinced me I could give the NRF24 a try. So, I bought some. It's on my to-experiment list (haven't tried them yet). Seeing this video gives me an even better understanding of the tricks of working with this module. I am very appreciative. Thank you for releasing this video of your experiences.
what was the issue with your modules ??
Thanks for this vid. I always had problems with it.
I like these troubleshooting/tips videos
спасибо. полезная информация.
You are amazing... I wish u the success u deserve bro... Love from India ♥
Im using SMPS power for nrf24s and it works beautifully. The advantage of it is, you can use the whole range of the battery from 4.2V down to 3V and the output will be stable 3.3V. SMPS automatically switching from stepdown to buck converter mode.
I know you might think but it is a switching regulator, it just doesnt make any difference between LDO and SMPS. Just keep the inductor away from the module and everything will be fine.
I was struggling with these modules, the integrated antenna version, and their own, proper, power supply modules. I wasn't getting any connection or communication. Finally, I managed to get things working by wiring the nrf24l01 directly to the arduino and removing the power supply modules completely.
I can say this is the best video I've seen today
Thank you. It was insightful
Thank you dear i have been waiting for a long time
Very nice video, thank you very much sir
Top demais , sou muito leigo , e aprendi demais.
Wow i serio8usly needed this info super a lot thx so much
this vid came in the right time i entered youtube to find if anybody had the same probleme as mine. basically i am trying to get it to work for more than 2m but it seems i can't, whenever i get further i lose the connection. by the way i did a cool drone controler using arduino mega and an LCD 480*320 module if you want i can send you the code maybe you can take a look into it and tell me if my problem is software not hardware.
I had my prototype working with two nRF24L01 modules. As you mentioned, they were pretty picky about my power source (USB power bank with a switching regulator to 3.3V) and worked reliably only when I added 470uF cap to the power supply and also 10uF directly onto the pins of the module. Also, I'm using a custom ACK logic in my because the built-in ACK can be unreliable on nRF24L01 clones (it told it received an ACK when it actually did not).
Now I needed to miniaturize the transmitter to fit it into the small space of a third-party device. So I replaced my nRF24L01 with an SMD-sized module that I soldered directly onto Arduino Pro Mini. In general, it works but the packet retransmission rate (due to missing ACKs) is a lot higher causing bad latency. It seems the nRF24L01 does not like its antenna being so close to the Arduino's CPU. I'll have to experiment with the antenna or just ditch the idea of using the SMD.
I have been fly radio controlled planes for 45 years. In the days of 72. MHz, we twisted the wire going to the reciver 5 twists per inch to avoide noise.
Helpful video 👍
Very good. Nice info 👌
great video
I like it, it is easy to understand
Great video, thanks
Huh, here's my story. I was fixing it and fixing it, and Was unable to get it to work, not even the basic transmission, and kept trying everything, everyone's code, everyone's library, all lead to failure. I was stubborn and didn't want to give up on them. And then I finally decided to try and replace one of the modules with the 3RD one I had lying around, and wola! it worked.
-I was struggling so hard, and didn't want to test the other module because I was kinda lazy and kept thinking that there is some interference in the wires, or that my Arduino 3.3V was insufficient so I ordered 3.3V linear stabilizers and the outcome was the same, then I tried wrapping the ground wire around the Miso, still nothing, not working.. and then for the last resort I swapped one of the modules, and luckily enough I swapped the broken one on the first try and the Transmission began, So let everyone know, if you're unable to get it to work, not even any transmission,and you checked everything, then perhaps you really have a faulty module, and it isn't the bypass capacitor nor the insufficient arduino 3.3 power supply.
Brilliant, thanks
Good points!
Amazing tips !
4:58 that saved my day, thanks
Thank you
Great video!
Don’t completely agree with your top3 here but it might help some people.
So wrong about the 3.1V problem though! These work fine down to 2V - datasheet even says 1.8V but the clones need more. As long as the voltage is stable.
However the power decoupling needs more than 0.1uF near the module. For many years I’ve used a combination of a MIC5504-3.3YM5 (300mA LDO) with 1uF in/out and a 10uF ceramic 0805 near the module and never had an issue. Relatively expensive for 10uF caps though but some bulk near the module is important - an electrolytic is fine if you have the space. 10uF will also let you use it with a CR2032 coin cell.
Besides power, 9 out of 10 problems I’ve seen are misconfigurations. Always make sure both sides have identical data rate, payload length, autoack etc. on both modules and some clones have issues with DPL. Always make sure your SPI connection is ok by reading from the module.
Third problem I’ve noticed is compatibility between clones - yes the solder blobs are usually incompatible - but you might also find issues between other clones. I certainly prefer a module where the chip says SI24R1 than one where it says NRF24L01+ but the price tells you it’s not genuine. Make sure you use two of the same clone.
3:50 SPI is very fast and sensible, lol. Thanks for the video!
Fyi, the module as sensible to their supply
@@takisbakalis I guess you mean sensitive?
I've lost many hours of my life to these modules...
Bro I just spent the entire day trying to get this work
Literally as soon as I woke up to rn 8:14pm
after long time of useless videos ,this video today is useful like your old days, keep on like this....thanx
what an entitled and rude comment, it takes an incredible amount of effort to research, film, share and promote any electronics themed video, just because you don't find some topics useful for you at any given time doesn't make them useless.
@@NabilTouchie no one seeks for ur opinion, i watch this guy for long time and i wish him as he used to be because i respect him and dont want him to make undervalued videos , i dont know when u mr intruder began to watch him or even know what i am talking about, he knows how to respond and i think he doesn't need smart-ass to act like a lawer or business manager to respond instead of him !
@@adelashour3253 what you said about my opinion can be said about yours as well that's why It's important to have both.
@@NabilTouchie i gave my comment to the content creater not for another commenter, so it not the same in (value)... No need for ur reply on my comment....
@@adelashour3253 indeed my comment is unnecessary and unwanted, maybe even uncomfortable and the same can be said of yours, but it helps to increase the engagement in a video of a content creator I like, so they are all at least a bit helful
How are you following my search history....? Yersterday I searched dronebot video for this module and today you are back with NRF24 video... I also watched your video but it was comparison between different wireless modules...
Hahahaha :)
Nice informative video. However you did not mention that transmission fails if trying to send a big payload and the transmitted packets exxeeds 32 bytes. Solution is to divide the payloads on several packets.
guessed what i needed
Amazing 🤩
Watch out, with Teensy microcontrollers, you might have to change the SPI transmission speed directly in the SPI.h library
Hello I loved your project that you used NRF with stm32 ,
Thar is any update about your project
Nice work
Good twisted cables can be disassembled from LAN cables i.e. CAT4 5 6 cables, already twisted pairs.
Buenisimo el video
Not using a breadboard is the biggest difference. I finally have mine working after weeks
very interesting !!!!
Another tip for noise reduction: don't leave any sensitive wires or connections next to USB data lines or even a USB cable. For whatever reason, USB is very noisy (it can be picked up if it is very close to an AM radio), and I have had several issues where USB was the culprit for noise (although not with mrf24).
Oh, thanks for the tip!!! :)
Very nice
I had a ton of problems with this module until someone pointed out that you can drop the data rate on them. I'm using the arduino RF24 lib, and by going from the default (
#define RF24_SPI_SPEED 10000000) to half that, everything just magically started working for me.
what? but the NRF24 data rate is 250KPBS or 1MPBS or 2MBPS... how it is now 10000000? or 5000000 as you say??
@@edro1128he's talking about spi speed between the rf24 module and arduino board. The speeds you listed are the speeds for wireless transmission between rf24 modules.
Yo he dejado de usar estos módulos desde que descubrí que los esp32 tienen integrada la tecnología RF con la tecnología Espnow y los puedes conectar sencillamente. Yo ya no pierdo más tiempo con los Rf24
Thanks a lot for sharing another great tutorial and awesome information
Hi
I have a question about nrf module with Ipex connector, do we need to desolder anything and solder it to another place to activate the antenna or the Ipex antenna is active by default alongside PCB an
thanx
when I was new to arduino I bought some of those chips to have some fun, and like those comments I got no luck. I think now it's time to reuse those chips. fortunately I didn't throw them away lol
For getting long range what dat speed rate should I keep
Hi. Sorry my english... I have a NRF version with IPX antenna connector. I have tested with onboard antenna and work well. My question is: I read in one Ali vendor this about especific IPX model:
"The module uses the onboard PCB antenna by default. The chip inductor is soldered to 1, 2 as shown in the figure. If you need to use the ipx carrier to pull out the external antenna, you can put the chip inductor to 1,3 as shown." Is necessary, if use a external antenna, change the solder in base of antenna pcb ?
Thanks
Thanks! Can you made the same video about Lora EBYTE UART modules?
One tip is to use CE=10, CSN=9. This is the only way to get the integrated Nano3 boards to work. This caused me endless frustration because all the examples have them the wrong way around.
Have you tried to apply a pull-up on the MISO and MOSI lines?
I tried several times to get it working. Finally found solution:
Solder 10 micro farad capacitor across VCC and GND
Excelente vídeo, vai ajudar muito pois estou panejando fazer um rádio com esse módulo, obrigado pelo vídeo, este canal está entre os melhores que existe.
(Excelente video, me ayudara mucho porque estoy planeando hacer una radio con este modulo, gracias por el video, este canal es de los mejores que hay.)
Thanks. I have used nrf in a project but after 3 to 4 months it starts to loose its connectivity and I am forced to replace it with a new one. why this happens? Is the life span of the modules so low? or Is it me only who encountered this problem.
My number 1 fix is just noise reduction on the power line.... my NRFs work near perfect once the power lines are filtered. Even if the power line is clean, i find adding a cap reduces latency in the Tx time
When I buy new modules, the very first thing I do is to add the 2 caps.
I add a 10uF, 6V and an 8.2 pF directly to the input power on the modules.
And of course, I assure that my main power supply can handle all the power requirements of the entire project, and then some.
With a solid power input that doesn't fluctuate during higher current moments, really saves the day.
Is it useful to add those capacitors even between pins of a larger NRF24 module with that big shielding on the PCB? Thank you
Hi
Could you help?
I’m trying to create a network with 2 nodes, each with 1 Arduino Uno + nrf24l01(PA+LNA).
I found that the nrf24 only works (transmitting) when I disconnect ground pin from the Arduino
Bro can this module give unrequred operatins due to other radio wave like fm or other this types radio remotes
Please make videos with using HC-12 modules
Hi,
Sony smartwatch somehow could not communicate with Arduino IDE. If it won't be a problem for you, can you explain how you did it with a video?
How the drivers are installed, I could not do it.
Thank you.
Do you have video that teach Bi-Directional communication for NRF24?
Has anyone got a llcc68 ebyte 915MHz to transmit? I got the spi communicating, but transmit never works (verified with sdr)
Most of my problems with the NRF24 were solved by someone on the net (sorry, can't remember who) having great pages on why NEVER to POLL the STATUS during Tx/Rx. The transitions from the SPI really mess the signal quality. Instead, use the IRQ pin.
Yeah, I remember discovering something about over saturation on something.
I forget specifically what that was, but what I do remember is that for Tx or Rx, I added a small delay, I think it was 10 ms or 20 ms, to allow desaturation. This helped!
Hey, where did you get your lipo batteries (especially the blue one 7.4 volts)
Always from AliExpress
5:10 - Twisted pair cabling. This is how STP cables (commonly ethernet) does it.
I tried to make a connection between my nRF24L01 modules. When I pressed the tactile switch on the transmitter side, the LED on the receiver side instantly turned on but when I released the switch the LED did not turned off at all (it turned off sometimes but it delayed by 5 seconds after I released the switch). What can I do?
Is uart , sensibale as spi ?
I am doing firmware dumping project !
may be you will share the small PCB of the receiver which you showed one year ago ... in the STM32 Radio Controller
I am using multiplexer IC cd4052 with one I2C LCD with two microcontrollers but there is garbage data on LCD screen does this digital IC has a noise problem how to solve this problem
is it clk synchonication problem happen in Sda and scl pin
Please 🙏 replay
I trying to make combined arduino based component tester and frequency generator as i can't afford purchase new
May i know why some antenna is not working same spec only length oft spec will xaris
Awesome video, as usual. I'm amazed by the range (31Km) you were able to get out in the open field. The antenna you're using is a directional antenna. So how do you keep track of your drone when it's moving sideways ? If it gets out of the line of sight and Fresnel zone, you'll loose the signal very fast. How do you cope with that ?
For drones then directional one is not recommended!
@@ELECTRONOOBS Yes, that's what I was thinking. However... a motorised tracking antenna could do the trick... maybe an idea for a future video ?
thats why most long range or lora modules use lower frequency as it has much more penetration power, same is the case with what cellular networks upto (4g) use, as for 5g the frequency is very high and hence the range is lower and it needs multiple transmitters, maybe using multiple modules in diversity or quadversity config might solve this but implementing this is very tricky, instead using a lora or any other low frequency high power transmitter should solve this
@@ShahZahid Indeed, range and penetration are very much influenced by the frequency/power/modulation technique. I'm thinking of a direction antenna or a dish which is moterised on a stand, to track a drone which is BVLOS. Not that easy...
Did you tried ESP Now on a esp8266 board?
First of all, thanks for the Video! This would have helped me a lot when I started with the NRF and it explained some of the Errors I was getting. But there is still one Problem I never managed to figure out. I got everything running with the Module with a integrated Antenna. Everything was stable and I got about 200 Meters out of it with minimal to no failed transmitions. But when I exchanged the SMD Antenna Chip it for the Chip with an external Antenna, It would compeately fail. I tryed 5 different boards from different manufacturers and all Failed. It should have had enough Power. I tried running it from my Lab bench Power supply directly and it still would not respond. Not even to SPI. It wouldent even initialize. At the time I could not find much on this issue online, but I think it might be interesting to know why this might happen
How did you know it wouldn't initialize? Is there a way to verify spi communication with the rf24 module?
@@andyeash1730 kind of. the micriocontroler sometimes froze up while trying to initialize the NRF. I assumed it was due to the config dome over SPI during the NRF init function. Because with disabled NRF code, the mcu would function normally, even with NRF module still attached. Though, to be fair, it might have been a power glitch at the initialisation, that caused the mcu to crash. But just guessing here. Haven't touched the modules in a while
Thanks for all pro
what's up my friends❤❤❤
These modules are highly sensative to noise and power. If you desire reliable operation, you MUST provide two decoupling caps. For whatever reason this is widely ignored, people continue to use none or one, and then complain that the problem they created is the fault of the radio. It also doesn't help that people common use addresses contrary to the data sheet's recommendations. Some libraries actively encourage this nonsense.
What cap values do you use?
@@andyeash1730 10pF and minimum 47uF. This assumes the power is relatively clean. If a switching regulator is in use a scope may be required to clean the ripple.
yes, correct cap and addressing properly are biggest culprits.... a little surprised you didn't mention addressing... 2.4ghz network is used for so many household devices, its quite easy to have address conflicts, its a problem most will assume their device is toast and toss it I worth a mention, I think
Yes, thank you for mentioning that :)
Please talk about how to add a barometric sensor to an Arduino drone please 🙏🙏🙏🙏
mine even burned out my 3 nanos, the last one bricked success accepting sample radio transmission but ended up the rx led keep on and cannot be communicate with IDE anymore
Nice video , is the data transfer fast enough to carry voice communication ?
yea there is a library for it, great scott tried it
Yes, actually I will make a Walkie Talkie video with this modules soon!
So a step down power supply is not recommended to reduce to 3.3v?