nRF24L01 not communicating

I'm trying to get two nRF24L01+PA+LNA's communicating and radio.available() is coming back false. I've scoured the internet and found Robin2's demo post. The nRF's are connected to adapter boards with on nRF and a Mega powered via 12V battery and the other nRF and a Nano powered by a 12V wall adapter. The transmit side (Nano) has a 10 µF capacitor across the 3.3V-G. Both sides are reading around 3.3V across those pins.

Pinouts are as follows: Mega: CE 7, CSN 8, SCK 52, MO 51, MI 50. Robin2's ConnectionCheck.ino looks good (no 0x00 or 0xff). Nano: CE 7, CSN 8, SCK 11, MO 12, MI 13. ConnectionCheck also looks good there. I had one nRF that didn't have a good ConnectionCheck that has been trashed.

Here's my transmit code:

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

RF24 radio(7, 8); // CE, CSN

const byte address[5] = {'R','x','A','A','A'};

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

void loop() {
  const char text[] = "Hello World";
  radio.write(&text, sizeof(text));
  Serial.println("Transmitted");
  delay(1000);
}

And my receive code:

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

RF24 radio(7, 8); // CE, CSN

const byte address[5] = {'R','x','A','A','A'};

void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.setPALevel(RF24_PA_MIN);
  radio.setDataRate( RF24_250KBPS );
  radio.openReadingPipe(1, address);
  radio.startListening();
}

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

The transmit side steadily prints transmitted and the receiver side prints not available. Any thoughts? Thanks!

try this

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

RF24 radio(7, 8); // CE, CSN

const byte address[5] = {'R','x','A','A','A'};

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

void loop() {
  const char text[32] = "Hello World";
  if(radio.write(&text, sizeof(text)))  Serial.println("Transmitted");
  delay(1000);
}

Sorry I do not read word schematics, please post an annotated schematic showing how you have wired it including power sources and all connections. Remember rule #1 A Power Supply the Arduino is NOT! The 3V3 regulator normally cannot reliably handle the transmission current of the radio. caps may help but are not a solution. Use an external power supply for the transmitter and receivers.

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