NRF24L01 receiving junk

Hello, I've had no luck so far looking at other boards and I was hoping you guys could give me a hand. I am designing a small RC quad copter using the Arduino Nano board however I cannot get the transcievers to talk to one another. I followed this tutorial:

When connecting the trancievers to the arduino nano I followed this diagram located in the tutorial:

I honestly don't know what I've done wrong and I've triple checked the wiring, I honestly would appreciate any help, thanks!

Edit: Its worth noting I've tried swapping the NRF24L01's with other NRF24L01's to check if there is a problem with a particular board and the same result occurs.

Try the examples in this Simple nRF24L01+ Tutorial. I have deliberately made them simpler that the regular TMRh20 examples - and they do work.

Have you got a 10µF capacitor across Vcc and GND for the nRF24?

I have a Mega clone that cannot power an nRF24 from its 3.3v pin. For testing the nRF24 should work fine when powered by a pair of AA alkaline cells. Just make sure to connect the GND to the Arduino GND.

...r

Robin2:
Try the examples in this Simple nRF24L01+ Tutorial. I have deliberately made them simpler that the regular TMRh20 examples - and they do work.

Have you got a 10µF capacitor across Vcc and GND for the nRF24?

I have a Mega clone that cannot power an nRF24 from its 3.3v pin. For testing the nRF24 should work fine when powered by a pair of AA alkaline cells. Just make sure to connect the GND to the Arduino GND.

...r

The Arduino ground is connected, I haven't got a 10uF capacitor across Vcc and GND. Why do I need this? This is the first I am hearing of this. I'll look into your tutorial right now, thanks :slight_smile:

The capacitor acts as a reservoir of electricity to meet very short term peak currents.

...R

I've gotten it to work, Thank you Robin! I've noticed a lot of "Tx failed" outputs though, any way to fix that to make it more consistent?

You need to give me more detail.

Please post a sample of the output from your Tx Arduino and your Rx Arduino.

Also post the code that YOU have uploaded to your two Arduinos.

...R

The same thing occurs with your default code in the tutorial you provided. The instruction changes based on 2 analogue joysticks changing the values after D and P.

Your output is very hard to read. In future don't post pictures of text. Just copy and paste the text.

Also, your output did not come from my unchanged code. It will be much easier to help if you stick with the code I am familiar with until you get it working reliably.

...R

I re uploaded your exact code to the arduino devices but as i said before there are a lot of failed data being sent or failed acknowledgements being sent when the transceivers are within 10cm. Here are the serial monitor outputs:

SimpleTx Starting
Data Sent Message 0  Acknowledge received
Data Sent Message 1  Tx failed
Data Sent Message 1  Tx failed
Data Sent Message 1  Acknowledge received
Data Sent Message 2  Acknowledge received
Data Sent Message 3  Tx failed
Data Sent Message 3  Tx failed
Data Sent Message 3  Acknowledge received
Data Sent Message 4  Tx failed
Data Sent Message 4  Tx failed
Data Sent Message 4  Acknowledge received
Data Sent Message 5  Tx failed
Data Sent Message 5  Acknowledge received
Data Sent Message 6  Acknowledge received
Data Sent Message 7  Acknowledge received
Data Sent Message 8  Tx failed
Data Sent Message 8  Acknowledge received
Data Sent Message 9  Tx failed
Data Sent Message 9  Tx failed
Data Sent Message 9  Tx failed
Data Sent Message 9  Acknowledge received
Data Sent Message 0  Acknowledge received
Data Sent Message 1  Tx failed
Data Sent Message 1  Tx failed
Data Sent Message 1  Acknowledge received
SimpleRx Starting
Data received Message 1
Data received Message 1
Data received Message 2
Data received Message 3
Data received Message 3
Data received Message 3
Data received Message 4
Data received Message 4
Data received Message 5
Data received Message 6
Data received Message 7
Data received Message 8
Data received Message 8
Data received Message 9
Data received Message 9
Data received Message 0
Data received Message 1
Data received Message 1

depre:
when the transceivers are within 10cm.

And what happens when they are (say) 1 metre away from each other?

Having them very close may be like some shouting in your ear.

...R

Now that I have free time again I've been able to look at this more. I've noticed the more code to be executed or the more delays I add the more failed transmissions I get. This may be a ballpark idea but is this behaviour occurring as while the Arduino is processing other code such as powering my motors it is not able to read the incoming messages so misses them? I'm likely completely wrong but if so is there a way I can use threading to get around this or another workaround? Sometimes commands get through instantly, sometimes it can take up to 3-4 seconds when sending data every 100ms.

depre:
Now that I have free time again I've been able to look at this more. I've noticed the more code to be executed or the more delays I add the more failed transmissions I get. This may be a ballpark idea but is this behaviour occurring as while the Arduino is processing other code such as powering my motors it is not able to read the incoming messages so misses them?

Without seeing your code I can't tell. You have not even said which of the examples in my tutorial you are following in your own program.

There should not be any delay()s in your program because they block the Arduino from doing other things. . Have a look at how millis() is used to manage timing without blocking in Several things at a time.

An Arduino can also be blocked inappropriately with WHILE and FOR loops.

How often are messages being sent - what is the minimum interval between messages? What controls the interval between messages?

...R

I'm following the "Simple one way transmission" tutorial. There are no delay lines in my code as I've removed them all now to help reduce this (which it has but is still an issue). There are no loops within my code. Messages are being sent at 100ms which is the default of your tutorial (I believe).

depre:
Messages are being sent at 100ms

That's not what your code says

unsigned long txIntervalMillis = 50;

Try increasing that interval to 500 and see what happens.

...R

Still no luck trying at 500ms, Best solution so far is to send a message every 10ms and enough of them get through to have an instantaneous response.

What happens if you comment-out the call to ReadOrientation()

I have never used the Wire library. Maybe it is not playing nicely alongside SPI.

...R