NRF2401+ Can't get it to work

Hello I have been trying to get NRF2401+ transmitter to commiunicate with NRF2401+ receiver for a few days. I am using NANO boards for transmitter and receiver. I started using 3.3V output from Arduino to power NRF24 but learned it can't provide to amount of current required for NRF2401+. So I ordered some LM11177T-3.3 800mA output voltage regulators and now have dedicted power circuits for transmit and receive side. I also have caps on input and output of voltage regulators.

I am using the "Hello World" test program to verify communication but can't get it to work. The transmitter test program and receiver test program I am using are below:
Transmitter

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include "printf.h"

#define l1 10  // External LED (blue)
RF24 radio(5, 6, 1000000); // CE, CSN
const byte address[6] = "00001";
void setup() {
  Serial.begin(9600);
  printf_begin(); 
  radio.begin();
  radio.printDetails();
  if (!radio.begin()) {
        Serial.println(F("radio hardware not responding!"));
        //while (1) {} // hold program in infinite loop to prevent subsequent errors
       }
  if (!radio.isChipConnected()) {
        Serial.println(F("Chip not connected to SPI bus!"));
   }
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_MIN,0);
  radio.stopListening();
}
void loop() {
  const char text[] = "Hello World";
  radio.write(&text, sizeof(text));
  if (radio.write(&text, sizeof(text))) {
    digitalWrite(l1,HIGH);
  }
  else {
    digitalWrite(l1,LOW);
    //Serial.println("Payload sent but ack packet not received");
  }
  
  //Serial.println(digitalRead(l1));
  //delay(1000);
}

Receiver

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include "printf.h"

RF24 radio(5, 6, 1000000); // CE, CSN

const byte address[6] = "00001";

void setup() {
  Serial.begin(9600);
  printf_begin(); 
  radio.begin();
  radio.printDetails();
  if (!radio.begin()) {
        Serial.println(F("radio hardware not responding!"));
        //while (1) {} // hold program in infinite loop to prevent subsequent errors
       }
  if (!radio.isChipConnected()) {
        Serial.println(F("Chip not connected to SPI bus!"));
   }
  radio.openReadingPipe(0, address);
  radio.setPALevel(RF24_PA_MIN,0);
  radio.startListening();
}

void loop() {
  if (radio.available()) {
    char text[32] = "";
    radio.read(&text, sizeof(text));
    Serial.println(text);
  }
  //Serial.println(radio.available());
  //Serial.println(radio.begin());
  //delay(2000);
}

The radio.begin function always returns true but when using the radio.write function to write "Hello World" to the receiver the ack bit is never received and "Hello World" never appears on the receive side.

The NRF2401+ transmit/receive settings are below.

Transmit settings
SPI Speedz = 1 Mhz
STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0x3130303030 0xc2c2c2c2c2
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR = 0x3130303030
RX_PW_P0-6 = 0x20 0x20 0x20 0x20 0x20 0x20
EN_AA = 0x3f
EN_RXADDR = 0x03
RF_CH = 0x4c
RF_SETUP = 0x00
CONFIG = 0x0e
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1 MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_MIN
ARC = 15

Receive Settings
SPI Speedz = 1 Mhz
STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0x3130303030 0xc2c2c2c2c2
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR = 0xe7e7e7e7e7
RX_PW_P0-6 = 0x20 0x20 0x20 0x20 0x20 0x20
EN_AA = 0x3f
EN_RXADDR = 0x03
RF_CH = 0x4c
RF_SETUP = 0x00
CONFIG = 0x0e
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1 MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_MIN
ARC = 0

This is where my knowledge runs out. Does anything about these settings jump out at anyone as to the reason communication is failing?

The good news (and the bad news too, I suppose) is that there's absolutely nothing wrong with your sketches that would prevent the nRF24L01s from working.

I wired up a pair of nRF24L01s to a couple of Unos and used your sketches as is. L4931CZ33s are used for the 3.3V supplies, 0.1uF on the input and 2.2uF on the output. You can't see the serial output of "Hello world" in the photo, but you can see the LED on pin 10 of the transmitter (the Uno on the left) light up, indicating that the transmitter's packet was sent and acked. And when I look at the serial output from the receiver, the "Hello world" shows up just fine.

Edit: oh, and your printDetails() results were identical to mine.

Hello thanks for your reply. Glad to see the led circuit on D10 works for a message indication. Everytime I powered mine I would pray to see that light come on but no luck. It looks like there a 3 differences between yours and mine.

  1. The type of regulator used to power the transmitter/receiver. I compared L4931CZ33s to LM11177T-3.3 and main difference I found was L4931CZ33s is 250mA output whereas LM11177T-3.3 is 800mA output. From what I understand NRF2401+ can have max current of 115mA at transmit. Can we agree regulator I'm using is ok?

  2. The type of NRF24 used. I'm new to using these and didn't realize when I ordered that I ordered most powerful model available (NRF2401+PA+LNA). I have since ordered a pair of the ones you have pictured. Right now I have the transmitter and receiver a couple feet apart from one another so I can have them both connected to my laptop while I'm still testing. Are there any spatial requirements or any differences between the models that I would need to keep in mind while I'm trying to test?

  3. The length of my wires vs yours. This is the reason I haven't incuded a picture of mine because it is still messy. I'm using the male to female jumper wires that came with a breadboard kit I ordered that are a little more than 7" long. Could this have an impact on the communication?

Also are you using the 5V output from the UNO to power your regulator? Do you know if the NANO 5V output has same power output capabilities as the UNO? I'm also using NANO 5V output for 2x potentiometers, 2x joysticks, and 1x MPU6050

  1. I think your regulator is fine. I replaced the L4931CZ33s with some LP2950ACZ-3.3s (rated for 100mA) and they were fine. I also measured the current drawn from the power supply and it was ~45mA with or without the nRF24L01 in the circuit - and that was with the PA level turned up to max.
  2. I ended up with my boards due to a moment of inattention and didn't notice that I'd ordered the surface mount versions. An hour's work with the soldering iron, some swiss pins and wire wrap wire sorted that. Anyhow, mine worked the same when they were side by side or separated by up to 5 metres (at minimum PA).
  3. That could be an issue. Remember that the SPI lines are MHz signals. Neatness counts at higher frequencies. Running long wires hither and yon is just asking for trouble.
  4. Yes, I'm using the Uno's 5V line to supply the 3.3V regulators. As I mentioned above, the nRF24L01s I have don't seem to be current hogs (despite what I've read - and repeated before I sat down and measured it - elsewhere) but they do like to have their power well filtered. Of course, the +PA+LNA model is going to be more power hungry. I don't have any of those to test.

Thanks for all the help. I just got the model in that has the onboard antenna without sma connector. They look very similar to ones you posted. I'm going to swap them out and clean up my wiring a bit. I'll post back with results

Hello mburdet11

Welcome to the world's best Arduino forum ever.

I have been following the topic of using this type of wireless module and the associated software functions for some time now.

For wireless projects, I recommend using the HC12 module.

What are the advantages:

  1. no external functions from a library are needed.
  2. the development of a communication protocol is in your hands
  3. the necessary development steps can be programmed and tested without using the wireless module
  4. the radio module can be easily configured for the project requirements
  5. both transmitter and receiver are contained in one radio module.

hth

Have a nice day and enjoy coding in C++.

So after swapping the NRF24 modules from (NRF2401+PA+LNA) to NRF2401+ with onboard antenna it works like a charm. I'm still not sure the reason (NRF2401+PA+LNA) didn't work with setup I had but my best guess would be wires were too long for the signal (NRF2401+PA+LNA) needs as @van_der_decken suggested. I'm going to try and confirm that if I can.

These modules don't use SPI or I2C? If that's the case is an extrernal oscillator needed to time Tx/Rx packets

Is this done by a simulator program that has already been developed?

The PA+LNA modules typically require a quite stable power supply, plus shielding will help, plus sometimes the counterfeit modules just don't work at full power. You can call radio.setPALevel(RF24_PA_MIN,0); to lower the power usage in TX and RX modes to test this out.

Also see RF24/COMMON_ISSUES.md at master · nRF24/RF24 · GitHub for more info

Thanks for the reply @TMRh20 . I read the post about shielding and found it interesting. I want to make sure I understood correctly. Do we wrap electronics in a piece of foil taking care not to touch any pins or sma connector with foil? Also regarding your post below

Do you mean in order to work at all radio.setPALevel must be set to RF24_PA_MAX at all times?

Yes, its best to apply a layer of electrical tape before the foil so you are not touching any of the electronics. The foil can be connected to GND but this is not necessary typically.

You can play around with the values, different clones (the vast majority of RF24 chips if not all are clones) work differently, but RF24_PA_MIN is a good starting point because it uses the minimum amount of power. The 0 disables the LNA which is used for reception.

It could just be that you have bad modules, but usually there is some underlying hardware problem.

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