Go Down

Topic: rf2401 problem with mega 2560 (Read 23097 times) previous topic - next topic


Hi, first, thanks for sharing all your problems and solutions, it helped me fixing my problem! Thanks!

Although i am not using an mega 2560 (yet) i could not get the nrf24l01+ modules to run for quit a time. I used an Arduino UNO r1 and a homebuilt minimalDuino107 clone (slightly modified).

I tried the RF24 GetteingStarted sketch, it was possible to configure moudles, but sending did not work, had always "failed" to send, even though somtimes it received the correct values. Long story short, the problem was the 3.3V power supply. It did not work on the UNO but on the homebuilt version (i used a 33uF elko cap as 3.3Voutput cap). I looked at the voltage with a scope and found a lot of noise at the power line! (on both, but the UNO was really bad)

So what solved my problem: just solder a 100nF ceramic cap across the gnd and 3.3v pins direct on the nrf24l01+ modules!
with the cap in place, noise at the power line really went down and it worked perfect!

So thanks a lot for the thread and the solution with the cap!
btw @remko yes i also measured with a multimeter it seems stable, but have a closer look with a scope...


Where does the capacitor go exactly - between the Mega's 3.3v and gnd?

Yes. between the Mega's 3.3v and gnd?
The + connection on the capacitor to +3.3v mega's source.
The - on capacitor to ground.
The capacitor connections are best closer to the radio's power inputs in general.
The capacitor then supplements and filters the source supply (mega's 3.3V).

Hope this helps.           


This is the third time this thread subject has come up  in the past 3 month 's with nFR24XX radio's and the culprit has always been a missing cap on the mega 3V3 source C13 on the mega is a 1uF MLM ceramic capacitor connected from pin 5 (3V3 source) of the LP2954-33DBVR to ground. I would highly recommend 100 to 220 uF bypass capacitors if you are more than 3 - 4 inches away from the board.. I use 47u on the 3V3 source as it comes up on the shield that uses 3V3 and 10u at every use of the 3V3 source (radio) the only place that the Rev 3 2560 boards use the 3V3 source is as the reference voltage for the Ext/USB power switch/control comparator. The other half of the LM358 is used as the pin 13 light driver.
C13 at 1uF is just fine for the comparator bias bypass capacitor but fails miserably when any more current is drawn from the 3V3 source, I found mine by using an analog scope.. a Tektronics 2213 showed about 3/4's of a volt of noise riding on the 3V3 source. If the BOD in the radio is working you might well be resetting your radio with the noise on the power supply.
Bypass capacitors are good engineering, like magic bullets and many devices might work without them but not all will and none are truly reliable working 'well' or not. Sometimes engineers leave them off of the diagram unless they are real special. Every Engineer is aware of the consequences and symptoms of not using them assumeing  that others know the importance of them and to add them in the final design and that encourages some to say that they are un-necessary and a waste of good money.
After 50 years of doing this stuff. I still forget from time to time and the results are always similar. inexplicably erratic behavior, One day it works fine the next not at all and on another..half of the time, sometimes the front half and sometimes the rear half.

--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard


Thank you all, in my case (Mega Fundino Chinese) was enough filter capacitor 100nF between 3.3V and GND.


Greetings folks,
I've spent almost 12 hours trying to get two NRF24's "using an UNO & a MEGA-2560" talking to each other when I stumbled upon the power issue topic considering the Mega boards. Here's a screen shot showing the 3.3v power lines on the UNO "Blue trace" and the Mega "Yellow trace":


and the MEGA

Apparently these RF modules are quite sensitive to how clean your voltage line is and a stable supply waveform seems to be essential for proper functioning.
I'll mention the various methods I tried to overcome this issue and their impact in case it helps anyone:
-Tried adding decoupling capacitors starting from as low as 100nf up to 10uf---> Minimal improvement of the waveform shape but it didn't work.
-Tried powering the MEGA from an external power source---> No effect on the waveform so it didn't work either.
-Used an external bench supply to power up the RF module on the MEGA side --->Bob's your uncle, works like charm.
-Used an arduino Due 3.3v rail ---> Worked as well.

So in conclusion:
-It was the crappy Mega's 3.3v line that was problematic as you folks mentioned earlier. I have an original Mega that I bought off arduino's site.
-The Due's 3.3v line isn't that clean & seems to be border-line"I'll post the waveform when I've time".
-Overall the UNO's 3.3v waveform is the cleanest & most stable one.

This issue gave me all sorts of funny & unexpected output on the terminal while running the examples of the RF24 library.

I hope the 3.3v rail can be improved in future revisions on both the Mega & the Due as this can be a serious limiting factor for sensors & modules working off the 3.3v supply.



I know this is an old thread however it seems to be referenced quite a bit - I thought I'd share my experiences here...

I have two Nano v3.0 (chinese) plus an Uno (real one), and two nRF24L01+ modules with aerials. I am using the RF24 library. I have been testing using the 'pingpair' example.

Like many others, I spent days fiddling with these things. I got erratic behaviour, usually just one packet recieved by one unit but the reply not seen by the other etc etc. After lots of googling and much reading of the datasheet (datasheet?? it's a datanovel!), putting endless debug prints in the library, I decided that it must be the power supply, as the library worked OK for so many others.

I tried all different combinations of Arduinos, RF units, onboard power (3.3v and 5v with regulator), offboard power supplies (again 3.3v/5v), all with different value caps. The only change in the behaviour of the units was that sometimes they would not work at all.

Eventually I ran the 'scanner' example, and found that one radio unit was picking up my home wifi, while the other showed all zeros. I started again with the capacitors on the unit that was showing zeros - starting from 10nF and working up.

1.5uF was the magic capacitor, for a radio unit running off onboard 5v on a Nano, with a 3.3v regulator (cap going across the legs of the regulator) - I am looking at two serial monitors showing soothing send/recieve confirmations, and I am at peace.

The other unit is running off an Uno with an external 3.3v supply and a 0.1uF capacitor this is also working fine. Have not tested with the other Nano.

For those still fighting this - get a bigger capacitor.

I learned a lot but I'm glad it's over.




Would you have an address for the download of the driver for Arduino Mega and the rf2401, the site I go to seems not to have the zipped driver at https://github.com/maniacbug/RF24/downloads.

I have been trying to get the code for communication to work by downloading each one of the files, with no success.

thanks in advance.



Can anyone please point me to where to download the driver for nRF2424L01 driver, seems the URL https://github.com/maniacbug/RF24/downloads has no download available.

Thank you in advance, I hope someone gets this message.


The download link is on this page:

Here is the direct link:




Can not thank you enough  :) transfinite, its 04h30 in South Africa and I'm digging into my holiday project.

Thanks and chat again.



I have successfully downloaed and followed the instructions from http://maniacbug.wordpress.com/2011/11/02/getting-started-rf24/, but appear to be getting lots of compile errors, I'm guessing that the compiler Arduino 1.0.5 is NOT the correct compiler.

I have attached errors if any one can suggest what compiler I should be using, I would appreciate it as I have not found much support on the errors from Google or Arduino.

Thank you


I have absolutely no problems with the RF24 library and Arduino 1.0.5 IDE. Compiles without errors on my system. You sure that you have installed the right way? http://arduino.cc/en/Guide/Libraries


I'we tried to get the nRF24L01+ to work with Aduino Uno and a Arduino Mega 2560  :o
Iwe studied several pinouts and all reporting the same, but i got the Mega working whit this setup:

nRF24N01+           Mega 2560

GND                      GND
VCC                       3.3
MISO                     50
MOSI                     51
SCK                        52
CE                          9
CSN                        10

The differense for me was changing pin [53] to [10], the csn Line. Orginal i only got the message:
"Got payload 4294967295...Sent response."

This turnes out to be, as "el_supremo" said:
In hexadecimal 4294967295 is FFFFFFFF which means that the device is always reading ones which suggests that you haven't got it wired up correctly.
Lib RF24 returning 4294967295 for everything from nRF24L01

Second thing to mention is, when I got the boards up running, to get the sample sketch from RF24 lib "GettingStarted". i needet to set the board to Transmit by pressing "T", then set it back to PingPong by pressing "R". Then the pingpong was functional.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131