nRf24L01/nRf24 not working properly

Hello! So my nRF24L01 modules suddenly work and suddenly don't. Same code. Just by simply moving it, it stops working and suddenly it does after rewiring/reconnecting/moving and such. What is causing this issue? I have been trying to fix this for a month now.

I attached images of my setup. I tried using the Breakout board for this module and without it (changed VCC to 3.3v without board). I am supplying 5v using an Arduino Uno, tried batteries and no difference. Even changed to smaller RF24. The picture in the left is when i changed which is which Rx and Tx. What i am trying to say is there is no consistency on when it works and when it doesn't. Just but re-plugging them without moving also causes receiver to stop working.

Transmitter Code

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

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

const byte address[6] = "00001";

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

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

Receiver Code:

type or paste code here#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.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_MIN);
  radio.startListening();
}

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

Use an external power source for the radios, the Nano does not have enough excess current to power them properly.

1 Like

I have used an external source for the problem above. Same problem persists.

Posting pictures that show that would help but also posting an annotated schematic would help a lot more. It is possible having the antennas that close will cause all types of problems even to the point of damaging the receiver.

1 Like

I kept them distant before and had same issue.

After a few more tries i found the voltage was lacking due to a mistake on my part. The voltage regulator has a 1.1V drop so had to supply it directly from Arduino nano. I used breadboard to supply from a different source before but that lost voltage somewhere? Also distant caused the issue definetely.

My mistakes:

  • Lack of proper power supply
  • Distance too close (at least a meter gap to work)
  • Wiring had issues

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