[HELP] nRF24L01 not working

Hello!
I am a student working on a project at school. My goal is to build a foam-board airplane using an Arduino with an nRF24L01 module. However, I am facing some difficulties. (I am supplying power through a BEC, with 2A at 5V.)

My goal is to connect four servo motors to a receiver, controlling them with values received from a joystick. I am using an Arduino Nano on a breadboard with an RF24 module and a 10uF capacitor between the power lines. I also twisted the power wires in pairs to reduce noise as much as possible. However, the serial monitor shows that the transmission failed.

Could you show me how to connect the wiring? Please explain how I should set up the connections.

(transmitter)
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

RF24 radio(9, 10); // CE, CSN 핀
const byte address[6] = "00001";

void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_HIGH);
  radio.setDataRate(RF24_250KBPS);
  radio.setRetries(15, 15);
  radio.stopListening();
}

void loop() {
  const char text[] = "Hello";
  bool result = radio.write(&text, sizeof(text));
  if (result) {
    Serial.println("Message sent successfully");
  } else {
    Serial.println("Message sending failed");
  }
  delay(1000);
}
(receiver)
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

RF24 radio(9, 10);
const byte address[6] = "00001";

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

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

The code above is for checking if transmission and reception work and for moving one servo motor based on the joystick value.
please, help me.

This works the other way around. You show how you have it wired up and then the rest of us comment. There are plenty of websites that detail how the RF24 modules can be connected to an Arduino. The main thing is to use suitable pins and to use the correct pin numbers in your sketch, corresponding with your hardware connections.

So start by showing a schematic of your project as it is now. Also include a clear photo of all connections. For both the sender and the receiver, please.

Also note that there are many, many threads about getting RF24's to work. They usually involve a step where a library is used to query the parameters of the RF24 to verify it's connected correctly. I'd give that a try. Do a little search and post back when you've tried this route.


Sorry for the delay due to personal matters.

I'm using the nRF24L01 PA + LNA version and an adapter board to ensure stable 5V power supply. My Arduino is at school, so I’ll be able to provide more detailed photos tomorrow. While my circuit is slightly different, including the addition of a capacitor, it’s roughly the same. Thank you.

Posting a correct, annotated schematic will go a long way in helping you get an accurate answer. Be sure to show all connections, power, ground, power sources, and note any leads longer than 10 inches (25 cm).

If you haven’t fried your Arduino yet, consider yourself lucky!

Gil's Crispy Critter Rules for Processor Hardware:

  1. Rule #1: An Arduino is NOT a Power Supply!
  2. Rule #2: Never connect anything inductive (motors, speakers) directly to an Arduino!
  3. Rule #3: Avoid connecting or disconnecting wires while the power is on.
  4. Rule #4: Do not apply power to any pin unless you are certain of what you're doing.
  5. Rule #5: Do not exceed the maximum voltage ratings.
  6. Rule #6: Many Arduinos cannot power transmitters directly.
  7. Rule #7: Before powering your project, take a break and double-check the wiring.

LaryD’s Corollaries:

  1. Coro #1: When starting out, add a 220Ω resistor in series with both input and output pins to protect against shorts.
  2. Coro #2: Invest in a Digital Multi-Meter (DMM) to measure voltages, currents, and resistance.

Note: Violating these rules can turn your Arduinos into crispy critters. For optimal performance, keep your wires under 25 cm (10 inches).

Additional Tips:

Hello kovar1523

Welcome to the world's best Arduino forum ever.

I have been following the topic of using this type of wireless module and the associated software functions for some time now.

For wireless projects, I recommend using the HC12 module.

What are the advantages:

  1. no external functions from a library are needed.
  2. the development of a communication protocol is in your hands
  3. the necessary development steps can be programmed and tested without using the wireless module
  4. the radio module can be easily configured for the project requirements
  5. both transmitter and receiver are contained in one radio module.

hth

Thank you so much for your help. I'll make sure to succeed!