nRF24L01+ not even getting printDetails();

Hello,

So I've been trying to diagnose a problem I'm having with these modules.
I have followed Robin2's tutorial, but unfortunately it's a no-go.

The SimpleRx & SimpleTx have been loaded in a Nano and an GSM MKR 1400.

The Tx is spamming

17:20:10.112 -> Data Sent Message 0  Tx failed
17:20:11.149 -> Data Sent Message 0  Tx failed
17:20:12.152 -> Data Sent Message 0  Tx failed
17:20:13.165 -> Data Sent Message 0  Tx failed
17:20:14.171 -> Data Sent Message 0  Tx failed
17:20:15.178 -> Data Sent Message 0  Tx failed
17:20:16.218 -> Data Sent Message 0  Tx failed
17:20:17.227 -> Data Sent Message 0  Tx failed
17:20:18.235 -> Data Sent Message 0  Tx failed
17:20:19.240 -> Data Sent Message 0  Tx failed

and the RX is rapidly spamming "Data received" eventhough there is obviously not data coming through.

In Robin2's topic there is a CheckConnection.ino.

But unfortunately even this one is not returning anything useful.

It hangs at

17:19:56.485 -> CheckConnection Starting
17:20:03.418 -> 
17:20:03.418 -> FIRST WITH THE DEFAULT ADDRESSES after power on
17:20:03.418 ->   Note that RF24 does NOT reset when Arduino resets - only when power is removed
17:20:03.418 ->   If the numbers are mostly 0x00 or 0xff it means that the Arduino is not
17:20:03.418 ->      communicating with the nRF24
17:20:03.418 -> 
17:20:03.418 -> 
17:20:03.418 -> 
17:20:03.418 -> AND NOW WITH ADDRESS AAAxR  0x41 41 41 78 52   ON P1
17:20:03.418 ->  and 250KBPS data rate
17:20:03.418 -> 
17:20:03.418 -> 
17:20:03.418 -> 

And that's all I'm getting.

My guess is there is something wrong with the cabling, but I double, triple, quadruple checked everything. Even the CE/CSN pins, everthing is cabled as it should.
Could it be the board is defective? I don't know.
I'm out of ideas.

Did you run the CheckConnection.ino program from post #30 of the tutorial. It will test the physical connection between the rf24 module and the processor (not wireless)?

Some other things to look at:
Make sure the rf24 power supply can provide enough current. This is especially true for the high power (external antenna) modules. I use homemade adapters like these. They are powered by 5V and have a 3.3V regulator on the board. Robin2 also has suggested trying with a 2 AA cell battery pack.

If using the high powered radios make sure to separate them by a few meters. They may not work too close together. Try the lower power settings.

Reset the radios by cycling power to them after uploading new code. I have found that to help. They do not reset with the Arduino.

Switch to 1MB data rate to catch the not so cloned clones.
'radio.setDataRate( RF24_1MBPS );'

Also for some clones, change TMRh20's RF24.cpp line 44
_SPI.setClockDivider(SPI_CLOCK_DIV2);
Into
_SPI.setClockDivider(SPI_CLOCK_DIV4);

Yes, I ran the CheckConnection.ino.
But as I said it hangs...I'm not getting the 'details' through.
I am not using the high powered one. I use the one with the built in antenna.
For power I have a lab power supply and connected both to it and gave them 3.4v.
I also put a 10uF capacitor between GND and VCC.
Also, they are at a 2 meter distance.
I have power cycled them aswell.
None of the above worked.

I will try the power adapter.

Just tried the power adapter, still nothing.

If I follow the recommendations in Robin2's tutorial I get my radios to work, every time.

There have been bad units reported here, from where did yours come?

Post a schematic showing how your project should be wired.
Post some photos showing how the project is wired.

You are using both an 8bit Nano and a Arm 32bit device. You have to be careful about your use of data types which don't nicely translate between the platforms.
You have shown an "empty" connection check. Have you attempted this on both platforms with the same result ?

Oh sorry I forgot to say, on the Nano, the connection check is OK. When I swap modules from the MKR to the Nano, it also works fine and connection check is saying everything is fine.

I bought mine from a local electronics shop.




I don't know the MKR GSM 1400 but I've just looked at a pinout diagram here: https://docs.arduino.cc/hardware/mkr-gsm-1400 . The SPI pins, which are required for the NRF24L01, do not appear to match the same pinout as found on say the Nano. For example, the SPI clock SCK appears to be on pin D9 whereas on the Nano it is pin D13.
Try to find some information about using SPI with that MKR board.

Edit
This Introduction to Arduino MKR GSM 1400 - The Engineering Projects mentions SPI (mosi, miso, sck) for that board and may help.

Yes, as you can see on the 2nd photo, the pins on the MKR are written on the pin headers.
Everything is connected as it should.

Now I connected a 2nd Nano as receiver instead of the MKR. And with Robin2's sketch, it's working perfectly....

So I can only assume that the MKR board is broken in some way.

Ok. It looks like you using adaptor plates for the nrf24L01 units. What voltage are you driving these at from the MKR board?

Edit

SPI bus speed has already been mentioned. This error report for another Arm Cortex M0 board shows another possibility for reducing the speed: Nano 33 family not working properly · Issue #189 · nRF24/RF24Network · GitHub

Yes!
That one worked!
I had to slow it down to 2Mhz to be able to receive all data.
It has been running for 1hr now non-stop without failed TX.

Looks like I was searching in the wrong direction.

Thanks again!

Oh and I was running 5v from the MKR & Nano.

Incase anyone is reading this with the same problem.

Change

RF24 radio(CE_PIN, CSN_PIN);

to

RF24 radio(CE_PIN, CSN_PIN, 2000000);

Good that it is working.
Also for future reference, this from the maintainers of the NRF24L01 library is useful and indeed mentions this exact issue: RF24/COMMON_ISSUES.md at master · nRF24/RF24 · GitHub

Some tags for searches: arduino mkr samd21 NRF24L01 problem

@groundFungus This may be a less intrusive way of solving the SPI bus speed problem if it applies to all platforms.

This is a new one to me. I have added that page to my list of "usual suspects". Thanks.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.