1

I have been trying to get two Arduino UNO talk to each other via NRF24L01's with TMRH20's NRF24 library. I tried many tutorials and examples and none of them worked. Most of them prints some error messages that's due to radio.write returning false.

After some troubleshooting I saw something weird. I set up the configuration (e.g. data rate) and when I call startListening it seems to be changed back.

This code:

void setup() {

    Serial.begin(9600);
    printf_begin();

    Serial.println("SimpleRx Starting");
    radio.begin();
    radio.setDataRate( RF24_250KBPS );
    radio.openReadingPipe(1, thisSlaveAddress);
    radio.printDetails();
    Serial.println();

    radio.startListening();
    radio.printDetails();
}

Outputs:

STATUS       = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1     = 0xe7e7e7e7e7 0x4141417852
RX_ADDR_P2-5     = 0xc3 0xc4 0xc5 0xc6
TX_ADDR      = 0xe7e7e7e7e7
RX_PW_P0-6   = 0x00 0x20 0x00 0x00 0x00 0x00
EN_AA        = 0x3f
EN_RXADDR    = 0x03
RF_CH        = 0x4c
RF_SETUP     = 0x27
CONFIG       = 0x0e
DYNPD/FEATURE    = 0x00 0x00
Data Rate    = 250KBPS
Model        = nRF24L01+
CRC Length   = 16 bits
PA Power     = PA_MAX

STATUS       = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1     = 0xe7e7e7e7e7 0xc2c2c2c2c2
RX_ADDR_P2-5     = 0xc3 0xc4 0xc5 0xc6
TX_ADDR      = 0xe7e7e7e7e7
RX_PW_P0-6   = 0x00 0x00 0x00 0x00 0x00 0x00
EN_AA        = 0x3f
EN_RXADDR    = 0x03
RF_CH        = 0x02
RF_SETUP     = 0x0f
CONFIG       = 0x08
DYNPD/FEATURE    = 0x00 0x00
Data Rate    = 2MBPS
Model        = nRF24L01+
CRC Length   = 8 bits
PA Power     = PA_MAX

You can see that the address was set up correctly before startListening (0x4141417852) but after it reverted back to what I assume is the default value (0xc2c2c2c2c2). Data rate has also changed.

Is this normal?

The other Arduino UNO doesn't have startListening or stopListening, but if I print the configuration after openWritingPipe I see the correct configuration.

1 Answer 1

2

The first thing that comes to my mind is that you are powering the nrf24L01 directly from the 3V3 pin of your Arduino Uno. DO NOT do this.

The 3V3 pin does not provide enough current for the nrf24L01. This renders the module completely unstable. You can:

  • Use a decent capacitor across the VCC and GND on the module. (But I do not recommend going for that solution)
  • Use a separate 3V3 power source that is capable of handling the current spikes of the nrf24L01. But don't forget to connect its ground to the Ardino Uno aswell.
  • Use a power module that powers the nrf24L01 from Arduino Unos 5V rail.
4
  • Thanks, I'll try this :)
    – Robert F.
    Commented Sep 12, 2019 at 12:52
  • 2
    The built-in regulator might indeed be too bad, some people have measured 100mV noise which would seriously degrade how well the module works. The capacitor solution would probably give you at least some level of usability though.
    – Avamander
    Commented Sep 12, 2019 at 14:28
  • This is so not true. You can absolutely power the nrf24l01 from the 3.3v out on the Arduino. I have a network of them running like this.
    – PhillyNJ
    Commented Sep 13, 2019 at 21:49
  • I ordered a power module and now they work nicely :) thanks
    – Robert F.
    Commented Sep 16, 2019 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.