Problem connecting 2 NRF24L01+PA+LNA using Arduino Mini AT Mega 328 P-AU

Hello, I'm a beginner at Arduino and coding and I am building a drone with a homemade controller as a school project. Here are the schematics for the controller and receiver, , . I am powering both with 2 lipo batteries.

The problem I have is that I get no connection between the NRF24L01 modules and I have been troubleshooting trying different codes for the past 3 days.

The transmitter code looks like this.

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(5, 6); // CE, CSN
const byte address[6] = "00001";
void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.setChannel(110); //set the channel
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_MIN);
  radio.stopListening();
}
void loop() {
  const char text[] = "Hello World";
  radio.write(&text, sizeof(text));
  delay(1000);
}

The receiver code looks like this.

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(3, 2); // CE, CSN
const byte address[6] = "00001";
void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.setChannel(110); //set the channel
  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);
  }
}

I have double-checked that there is no more than 3.3v going to the NRF24L01 module so as not to burn it. So far I haven't gotten any error messages its instead just silent on the receiving end.
Any help is very appreciated. Thanks!

I failed to add in the pictures sorry! The first picture is receiver second one is controller

I tried your test code on a couple of Unos with rf24 radios and the code seems to work. Compiled with the latest version of the RF24 library.

I get this on the receiver serial monitor:

Hello World
Hello World
Hello World
Hello World
Hello World
Hello World

Carefully check your wiring and especially that CE and CSN are wired to the right pins.

The high power modules can have trouble communicating if they are too close together. Move them several meters apart and re-try the test.

It look like you have good power to the radios. Low power is probably the number one thing that goes wrong.

I found Robin2's simple rf24 tutorial very helpful. Note the warning on the library version that works with the tutorial.
He has a program on the last page of the tutorial post that can test the connection between your radio and its Arduino board (the wired connection, not wireless). See Reply #29 with a simple program to check the connection with the Arduino.

Thank you very much for your help <3 sorry for the late reply.
Its works now I just gotta get it to control more than one esc.

Can you tell us what the problem turned out to be and how you solved it? That may help someone down the road.

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