nRF24L01 trying to make it work

Hi everyone,
I have been trying to set up communication through nRF24L01, using Arduino Uno at one end and Arduino Nano on the other. No success so far - these are things I have tried:

  • I checked all the connecting wires for continuity, checked OK
  • The supply voltage is 3.3 V at each nRF24L01 device and it is stable
  • I included 0.1 microF capacitor between ground and 3.3V supply
  • The batteries at each end are new
  • Checked connections to the nRF24 in accordance with the library instructions
  • The sketches are included below

Any other ideas what could be the issue?

Here are the codes for the "Hello World" message


//Transmitter Side

#include <SPI.h>

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

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

const byte address[6] = "00001";

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

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

Receiver Side

//Receiver Side

#include <SPI.h>

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

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

const byte address[6] = "00001";

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

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

It sounds like you are violating rule #1 A Power Supply the Arduino is NOT! Use a seperate power supply and I think it will work.

I agree with @gilshultz, an external supply of 3.3V with more current capability is usually needed. If you are using the lower power modules you can try 10uF to 100uF cap across the 3.3V as close to the module as possible may work. 0.1uF is not going to help.

For an external power source, 2 AA batteries in series (3V) will provide the current.

1 Like

I have included a 3V separate power supply to the modules and checked again everything. I even bought another set of modules and Arduino boards from a reputable reseller, still does not work. Meanwhile, one Arduino Uno board lost its serial interface...

Not sure if it may be an issue with IDE, or the RF24 library.

I am running this on Mac, 12.6 Monteray

I am starting to doubt that this system is so infested by components copies and knockoffs, programming bugs etc that it may be unusable.

Have you run the CheckConnection.ino sketch at post #30 in Robin's tutorial?

See: Simple nRF24L01+ 2.4GHz transceiver demo - #30 by Robin2

I will try it, thanks!

This sketch could not compile. I tried to upload the library V1.1.7 as mentioned in the comments - but the IDE would freeze during uploading process.

Are you talking about the CheckConnection.ino sketch? Can you post the output with the compilation errors.

By "upload", did you mean update? Can you post the output when the IDE freezes.
You may need to enable verbose output on upload, it's in File->Preferences.

Yes, I tried to install the V1.1.7 from the library and replace the current version just for this sketch, but the IDE would read "installing" and would not progress or complete the installations even after 5-10 minutes.

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