Projects / nRF24L01 wireless servo remote

nRF24L01 wireless servo remote

Intermediate1.5 hGuided buildReviewed

Build it step by step

0 of 5 done
  1. NANONRF24L01

    Solder the capacitors

    Fit a 10 µF capacitor right across each radio's VCC and GND pins (minus to GND). This fixes most nRF24 problems.

  2. NANONRF24L01

    Wire both radios

    VCC to 3V3 (never 5V), GND, CE D7, CSN D8, SCK D13, MOSI D11, MISO D12.

  3. NANO

    Build the remote

    Pot on A0. Upload with TRANSMITTER 1.

  4. NANO59°

    Build the receiver

    Servo on D9. Upload with TRANSMITTER 0.

  5. NANO

    Test the link

    Power both, turn the knob, then walk away with the remote until it stops.

In short

How do you build a nRF24L01 wireless servo remote?

Turn a knob on one Arduino Nano and a servo on another Nano follows wirelessly over a 2.4 GHz nRF24L01+ link, with a fail-safe if the signal is lost. You need Arduino Nano × 2, nRF24L01+ Radio Module × 2, Electrolytic capacitor 10 µF × 2, Potentiometer 10 kΩ, SG90 Micro Servo, Breadboard 400 points (half size) × 2 and Jumper wires male to female (40 pcs). It takes 5 steps and about 90 minutes.

Level
Intermediate
Time
About 90 min
Parts
7

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
nRF24 VCC / GND (both boards)Nano 3V3 / GND, 10 µF across them3.3 V only
nRF24 CE / CSNNano D7 / D8Radio control
nRF24 SCK / MOSI / MISONano D13 / D11 / D12SPI
Remote: pot outer pins / wiper5V and GND / A0Knob
Receiver: servo signal / red / brownD9 / 5V / GNDOutput

Code

Arduino IDE, board "Arduino Nano". Install "RF24" by TMRh20. Upload once with TRANSMITTER 1 to the remote and once with 0 to the receiver.

Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).

#define TRANSMITTER 1     // 1 for the remote with the knob, 0 for the receiver with the servo
#include <SPI.h>
#include <RF24.h>

RF24 radio(7, 8);         // CE, CSN
const byte ADDR[6] = "EL001";

#if TRANSMITTER
void setup() {
  Serial.begin(9600);
  if (!radio.begin()) Serial.println("Radio not responding");
  radio.setPALevel(RF24_PA_LOW);
  radio.openWritingPipe(ADDR);
  radio.stopListening();
}
void loop() {
  int v = analogRead(A0);
  bool ok = radio.write(&v, sizeof v);         // true when the receiver acknowledged
  Serial.print(v); Serial.println(ok ? " sent" : " no ack");
  delay(20);
}
#else
#include <Servo.h>
Servo arm;
unsigned long lastRx = 0;
void setup() {
  Serial.begin(9600);
  arm.attach(9);
  if (!radio.begin()) Serial.println("Radio not responding");
  radio.setPALevel(RF24_PA_LOW);
  radio.openReadingPipe(1, ADDR);
  radio.startListening();
}
void loop() {
  if (radio.available()) {
    int v; radio.read(&v, sizeof v);
    arm.write(map(v, 0, 1023, 0, 180));
    lastRx = millis();
  }
  if (millis() - lastRx > 1000) arm.write(90);  // fail-safe: centre if the link is lost
}
#endif

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
Remote serial monitorNumbers with "sent" when the receiver is on, "no ack" when it is off
Turning the knobThe servo follows within a fraction of a second
Receiver switched off and onLink recovers by itself
Remote switched offServo centres after 1 s

If it does not work

"Radio not responding"

Check the SPI wires and CE/CSN, and that VCC is 3.3 V.

Always "no ack"

Add the 10 µF capacitors, keep the boards at least 1 m apart for the first test, and check both use the same address.

Short range

RF24_PA_LOW is for the bench. Use RF24_PA_HIGH, or the PA+LNA module with an external antenna and its own 3.3 V regulator.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the nRF24L01 wireless servo remote?

Arduino Nano × 2, nRF24L01+ Radio Module × 2, Electrolytic capacitor 10 µF × 2, Potentiometer 10 kΩ, SG90 Micro Servo, Breadboard 400 points (half size) × 2 and Jumper wires male to female (40 pcs). Electrolytic capacitor 10 µF × 2: Across each radio's power pins.

How long does the nRF24L01 wireless servo remote take to build?

About 90 minutes for a intermediate maker, in 5 steps.

How do I know the nRF24L01 wireless servo remote works?

Remote serial monitor: Numbers with "sent" when the receiver is on, "no ack" when it is off. Turning the knob: The servo follows within a fraction of a second. Receiver switched off and on: Link recovers by itself.

Radio not responding: what should I check?

Check the SPI wires and CE/CSN, and that VCC is 3.3 V.

Always "no ack: what should I check?

Add the 10 µF capacitors, keep the boards at least 1 m apart for the first test, and check both use the same address.

Short range: what should I check?

RF24_PA_LOW is for the bench. Use RF24_PA_HIGH, or the PA+LNA module with an external antenna and its own 3.3 V regulator.