NRF24 wont recieve data

Hello everyone,

this is my first post here, so dont flame me, please.

I have an arduino uno as a reciever and an arduino nano as a sender. I have double-checked the connections and they seem to be good. Both NRF24's are detected, but the recieving arduino doesnt get any data.
I have both NRF24 circuits connected to a 3,3V regulator, one supplied with 5V (reciever) and one supplied with 9V (sender). On both devices I added a 100nF Capacitor between the Vcc and GND at the regulators.
Pls help....

Sender:

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

RF24 radio(7, 8);
const byte address[6] = "00021";
int x = 0;

void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_MIN);
  radio.stopListening();
  pinMode(3, INPUT);
  pinMode(4, INPUT);
  pinMode(5, INPUT);
  pinMode(6, INPUT);
  pinMode(2, INPUT);
  bool result = radio.isChipConnected();
  Serial.println(result);
}
void loop() {
  
  if (digitalRead(3) == HIGH)
  {
  const char text[] = "LEFT";
  radio.write(&text, sizeof(text));
  Serial.println(text);
  delay(3);
  }
  else if (digitalRead(4) == HIGH)
  {
  const char text[] = "RIGHT";
  radio.write(&text, sizeof(text));
  Serial.println(text);
  delay(3);  
  }
  else if (digitalRead(2) == HIGH)
  {
  const char text[] = "UP";
  radio.write(&text, sizeof(text));
  Serial.println(text);
  delay(3);
  }
  else if (digitalRead(5) == HIGH)
  {
  const char text[] = "DOWN";
  radio.write(&text, sizeof(text));
  Serial.println(text);
  delay(3);
  }
  else if (digitalRead(6) == HIGH)
  {
  const char text[] = "START";
  radio.write(&text, sizeof(text));
  Serial.println(text);
  delay(3);
  }
}

Reciever:

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7, 8); // CE, CSN
const byte address[6] = "00021";
void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.openReadingPipe(0, address);
  radio.setPALevel(RF24_PA_MIN);
  radio.startListening();
  bool result = radio.isChipConnected();
  Serial.println(result);
}
void loop() {  
  if (radio.available()) {
    char text[32] = "";
    radio.read(&text, sizeof(text));
    Serial.println(text);
  }
}

Thank you! :slight_smile:

What is supplying the 9V ?

A 9V battery :slight_smile:

Not a PP3 by any chance ?

If so then they can rarely supply current for very long, particularly to both an Arduino and an NRF module

I furthery checked the battery and its an "E-Block 9V 6LR61 6AM6 MN1604"

A PP3 as I suspected

Can you measure the battery voltage when connected to the Arduino and transmitting ?

By the way, that 100nF capacitor is probably doing no good. A 100 microfarad capacitor might help, but I doubt it

7.61 V while sending data, seems like the voltage droppps alot. Even without sending data its voltage is 8.12 V (arduino still on). Unloaded its 8.40V. I will check if I have a new one, seems like its empty.

Better still, don't use a PP3

I will try suppling my circuit from an external 9V power source. I will post the result here soon.

edit: grammar

It doesnt seem like the battery was causing the problem, even while powering the circuit with an external PSU set to 9V, there is still no signal appearing at the reciever

edit: grammar

I have found my problem:
Apperantly my NRF24 Step-Down Module isnt working above 7V, despite the datasheet telling that it can handle up to 12V.
This seems kinda sad, tbh.
Thank you, anyways. :slight_smile:

In both sketches, you don't use pin 10.
To ensure SPI master mode, pin 10 should be made OUTPUT.
The simplest way not to forget this, is to use pin 10 as CE or CSN of the NRF.

I now added pinMode(10, OUTPUT); to both sketches.
I also added 5 diodes to drop the 9v to about 6v, so my nrf module works.

But now, another problem appeared:
I can only press the START button, all the other ones wont get sent. After I try to use any other button (LEFT, RIGHT, etc.) I cant even use the start button again, so I have to restart my controller.

edit: Info added

UPDATE:
It seems like my arduno (reciever) had a broken spi bus. I changed it, and its works now.
Thank you!