The nrf24l01 +pa +lna module is not working

Hi, I'm trying to do wireless communication with the nrf24l01+pa+lna module, but I'm in trouble.
This is my situation.
I'm trying to communicate 2 Arduino mega.
The two Arduino Mega's are both using the nrf24l01+pa+lna module. The nrf24l01+pa+lna module is using the nrf24l01 adapter. It is also equipped with a capacitor of 10uF.

The code on the sending side is as follows.

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

#define CE_PIN 9
#define CSN_PIN 53

RF24 radio(CE_PIN, CSN_PIN);
const byte address[6] = "10101";

void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_LOW);
  radio.setDataRate(RF24_250KBPS);
  radio.stopListening();
  printf_begin();
  radio.printDetails();
}

void loop() {
  static int counter = 0; 
  
  bool success = radio.write(&counter, sizeof(counter));
  if (success) { 
    Serial.print("Send Success: ");
    Serial.println(counter);
  } else {
    Serial.println("Send Fail");
    if (!radio.isChipConnected()) {
      Serial.println("Radio Chip not connected!");
    }
  }

  counter++;
  delay(1000); 
}

The code on the receiving end is as follows.

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

#define CE_PIN 9
#define CSN_PIN 53

RF24 radio(CE_PIN, CSN_PIN);
const byte address[6] = "10101";

int receivedData = 0;

void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.openReadingPipe(0, address);
  radio.setPALevel(RF24_PA_LOW);
  radio.setDataRate(RF24_250KBPS);
  radio.startListening();
  printf_begin();
  radio.printDetails();
}

void loop() {
  if (radio.available()) {
    radio.read(&receivedData, sizeof(receivedData));
    Serial.println(receivedData);
  }


}

The sender's results received through the radio.printDetails() function are as follows.

STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0

RX_ADDR_P0-1 = 0x3130313031 0x65646f4e32

RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6

TX_ADDR = 0x3130313031

RX_PW_P0-6 = 0x20 0x20 0x20 0x20 0x20 0x20

EN_AA = 0x3f

EN_RXADDR = 0x03

Receiver's results received through the radio.printDetails() function are as follows.

STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0

RX_ADDR_P0-1 = 0x3130313031 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

I've tried most of the methods I've found on the internet, but they've failed. What's the problem? Please help me.

Please post full details of how the NRF24 module is connected to the Mega, ie which pins are used for which purpose

1 Like

I find it a good idea to check if the Mega/NRF24 SPI connection has worked, e.g.

void setup() {
  Serial.begin(115200);
  delay(1000);
  Serial.println("Nano > NRF24L01 Receive text");
  radio.begin();
  if (radio.isChipConnected())
    Serial.println("Receiver NF24 connected to SPI");
  else {
    Serial.println("NF24 is NOT connected to SPI");
    while (1)
      ;
  }

Assuming the antennas are at least a meter apart this should help:
Power Stability Issues with RF24 Radio Modules

As described in the RF24 Common Issues Guide, radio modules, especially the PA+LNA versions, are highly reliant on a stable power source. The 3.3V output from Arduino is not stable enough for these modules in many applications. While they may work with an inadequate power supply, you may experience lost packets or reduced reception compared to modules powered by a more stable source.

Symptoms of Power Issues:

  • Radio module performance may improve when touched, indicating power stability issues.
  • These issues are often caused by the absence of a capacitor, a common cost-saving omission by some manufacturers.

Temporary Patch :

  • Add Capacitors: Place capacitors close to the VCC and GND pins of the radio module. A 10uF capacitor is usually sufficient, but the exact value can depend on your circuit layout.
  • Use Low ESR Capacitors: Capacitors with low Equivalent Series Resistance (ESR) are recommended, as they provide better power stability and performance.

Adding the appropriate capacitors can greatly improve the reliability of your RF24 module by ensuring a stable power supply, thus minimizing packet loss and enhancing overall performance. A separate power supply for the radios is the best solution.