NRF24L01+PA+LNA - troubleshooting

Hi,

I am working on an Arduino project using the NRF24L01+PA+LNA to transmit ultrasonic sensor data from one chip (Nano) to another (Mega 2560) which would be displayed on a LCD screen. The setup worked with a 100 uF capacitor connected to the NRF24L01+PA+LNA chip on the Nano.

Subsequently procured a breakout power adapter as recommended by many to replace the capacitor. Due to the lack of sufficient 5V pins on the Nano, I tried using one of the digital pins (set to OUTPUT HIGH) as the 5V input for the HC-SR04 ultrasonic sensor. The setup worked successfully for a while. However, when I tried to adjust the sensor to various angles, the transmission became intermittent and eventually stopped.

Now, the transmission does not work even for a basic code (simply sending "Hi"). Tried multiple troubleshooting ways but none of them worked:

  • Removed ultrasonic sensor
  • Checked for loose connections: tried replacing wires
  • Changed to a new breakout power adaptor
  • Removed adaptor and tried using 100 uF capacitor again
  • Replaced Nano with Uno

Now, I am unsure if the NRF24L01+PA+LNA modules are dead and I do not have any spare on hand for now. Tried troubleshooting by measuring the voltage across all the pins on the NRF24L01+PA+LNA modules to their GND pin. Was wondering if values can be compared to a working set to see if the modules are faulty. The basic test code, serial monitor output and voltage data are as below:

Transmitter:

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

RF24 radio(7,8);

const byte address[6] = "00002";

void setup() {
  Serial.begin(9600);
  radio.begin();
  //radio.setAutoAck(false);
  radio.setChannel(124);
  printf_begin();
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_MIN);
  radio.setDataRate(RF24_250KBPS);
  radio.stopListening();
  radio.printDetails();
  bool check = radio.isChipConnected();
  Serial.print("Chip Connected?:");
  Serial.println(check);
}

void loop() {
  const char text[] = "hi";
  bool received = radio.write(&text, sizeof(text));
  Serial.print(received);
  delay(2000);
}

Receiver:

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

RF24 radio(7,8);


const byte address[6] = "00002";

void setup() {
  
  Serial.begin(9600);
  radio.begin();
  radio.setChannel(124);
  printf_begin();
  radio.openReadingPipe(0,address);
  radio.setPALevel(RF24_PA_MIN);
  radio.setDataRate(RF24_250KBPS);
  radio.startListening();
  radio.printDetails();
  bool check = radio.isChipConnected();
  Serial.print("Chip Connected?:");
  Serial.println(check);
  pinMode(53,OUTPUT);
}

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

printDetails output from Transmitter:

STATUS		 = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1	 = 0x3230303030 0xc2c2c2c2c2
RX_ADDR_P2-5	 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR		 = 0x3230303030
RX_PW_P0-6	 = 0x20 0x00 0x00 0x00 0x00 0x00
EN_AA		 = 0x3f
EN_RXADDR	 = 0x03
RF_CH		 = 0x7c
RF_SETUP	 = 0x21
CONFIG		 = 0x0e
DYNPD/FEATURE	 = 0x00 0x00
Data Rate	 = 250KBPS
Model		 = nRF24L01+
CRC Length	 = 16 bits
PA Power	 = PA_MIN
Chip Connected?:1
00000000000000000000000000

printDetails output from Receiver:

STATUS		 = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1	 = 0x3230303030 0xc2c2c2c2c2
RX_ADDR_P2-5	 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR		 = 0xe7e7e7e7e7
RX_PW_P0-6	 = 0x20 0x00 0x00 0x00 0x00 0x00
EN_AA		 = 0x3f
EN_RXADDR	 = 0x03
RF_CH		 = 0x7c
RF_SETUP	 = 0x21
CONFIG		 = 0x0f
DYNPD/FEATURE	 = 0x00 0x00
Data Rate	 = 250KBPS
Model		 = nRF24L01+
CRC Length	 = 16 bits
PA Power	 = PA_MIN
Chip Connected?:1

For the voltage readings, one NRF24L01+PA+LNA module was connected to a Uno running the transmitting code, another connected to a Mega running the receiving code. After measuring the voltages, the modules were then swapped and measured again. Please refer to the attached image for the measurements.

Kindly advise if there are other ways that I can troubleshoot. Also, if the NRF chips are truly dead, what are the possible reasons that might have caused this (so I won't make the same mistake again)? Thank you!!

Voltage.PNG

An Arduino I/O pin is rated for a max of 40mA so in all likelihood you have overloaded and destroyed the I/O pin you were using to power the nRF24.

Give the nRF24 a separate power source - a pair of AA alkaline cells (3v) works well and you would not need the power adapter. I have not used one of thise power adapters so I don't know what is its max input voltage.

Just make sure the GND of the separate power supply is connected to the Arduino GND.

...R
Simple nRF24L01+ Tutorial

Hi Robin,

Thank you for the reply. I only used the I/O pin to power the ultrasonic sensor, not the nRF24. The ultrasonic sensor's working current is 15mA so it should not have destroyed the I/O pin? Furthermore I tried switching from the Nano to a Uno and it still did not work. I also did test all the digital pins with a simple LED blink and they are all functioning.

Will try hooking up the nRF24 to a separate power source and see if it works.

Thank you

JL

So I tried powering the NRF24L01+PA+LNA modules with external power source (batteries) but it still did not work, returning the same serial monitor output.

Any idea how I can tell which module might be faulty based on the voltages? Does look like one of them is faulty because despite running the same receiving code, the CE voltage of Module 1 is 0.02V while the other is 4.3V; while running the same transmitting code, the CE voltage of Module 1 is 0.005V while the other is 4.5V.

Thank you

Have you tried the connection test program in my Tutorial?

If that works for both nRF24s but you still cannot communicate using my Tutorial programs then I suggest you get another pair of nRF24s for testing. The low-power versions with PCB antenna will be fine and are probably cheaper.

...R