How-to · Intermediate · 3 min read
nRF24L01 2.4 GHz Radio
Wiring, Power Fix and Arduino Code
By Geekobot Learning Team · Updated 24 Oct 2026
On this page
The nRF24L01 is a cheap 2.4 GHz radio that sends small packets (up to 32 bytes) between microcontrollers with automatic acknowledgements and retries. It connects over SPI plus CE and CSN pins, runs on 3.3 V only, and works with the RF24 library. Most failures are power problems: solder a 10 µF capacitor across VCC and GND at the module. Range is tens of metres, or about 1 km with PA+LNA.
Key specs at a glance
- Band
- 2.400 to 2.525 GHz, 126 channels
- Data rate
- 250 kbps, 1 Mbps or 2 Mbps
- Supply
- 1.9 to 3.6 V (3.3 V); inputs tolerate 5 V logic
- Payload
- Up to 32 bytes per packet; 6 receive pipes
- Current
- About 12 mA transmit; PA+LNA version over 100 mA
- Range
- Tens of metres indoors (PCB antenna); up to about 1 km line of sight (PA+LNA)
Pinout and wiring
| nRF24L01 pin | Arduino Uno | ESP32 | Notes |
|---|---|---|---|
| VCC | 3.3V (with 10 µF capacitor) | 3V3 | Never 5 V |
| GND | GND | GND | |
| CE | D9 | GPIO 4 | Any digital pin |
| CSN | D10 | GPIO 5 | Any digital pin |
| SCK | D13 | GPIO 18 | Hardware SPI |
| MOSI | D11 | GPIO 23 | |
| MISO | D12 | GPIO 19 | |
| IRQ | Not connected | Not connected | Optional interrupt |
- VCC
- Arduino Uno:
- 3.3V (with 10 µF capacitor)
- ESP32:
- 3V3
- Notes:
- Never 5 V
- GND
- Arduino Uno:
- GND
- ESP32:
- GND
- CE
- Arduino Uno:
- D9
- ESP32:
- GPIO 4
- Notes:
- Any digital pin
- CSN
- Arduino Uno:
- D10
- ESP32:
- GPIO 5
- Notes:
- Any digital pin
- SCK
- Arduino Uno:
- D13
- ESP32:
- GPIO 18
- Notes:
- Hardware SPI
- MOSI
- Arduino Uno:
- D11
- ESP32:
- GPIO 23
- MISO
- Arduino Uno:
- D12
- ESP32:
- GPIO 19
- IRQ
- Arduino Uno:
- Not connected
- ESP32:
- Not connected
- Notes:
- Optional interrupt
The power fix that solves most problems
The radio draws short bursts of current when it transmits. The Uno's 3.3 V pin (and long jumper wires) cannot supply them cleanly, so packets fail or the module is not detected. Fixes, in order:
- 1Solder a 10 to 100 µF electrolytic capacitor directly across VCC and GND on the module (observe polarity).
- 2Use an nRF24L01 socket adapter that takes 5 V and has its own AMS1117 3.3 V regulator.
- 3For PA+LNA modules, use a separate 3.3 V regulator able to supply 250 mA or more, and keep the antenna away from metal.
- 4Start with
radio.setPALevel(RF24_PA_LOW)on the bench; full power at close range can overload the receiver.
Send and receive with the RF24 library
Install RF24 by TMRh20 from the Library Manager. Upload the transmitter to one board and the receiver to another.
#include <SPI.h>
#include <RF24.h>
RF24 radio(9, 10); // CE, CSN
const byte address[6] = "OL001";
const bool TRANSMITTER = true; // false on the receiving board
void setup() {
Serial.begin(115200);
if (!radio.begin()) { Serial.println("Radio not found"); while (true) {} }
radio.setPALevel(RF24_PA_LOW);
radio.setDataRate(RF24_250KBPS); // longer range, better reliability
radio.setChannel(108); // above most Wi-Fi channels
if (TRANSMITTER) {
radio.openWritingPipe(address);
radio.stopListening();
} else {
radio.openReadingPipe(1, address);
radio.startListening();
}
}
void loop() {
if (TRANSMITTER) {
int value = analogRead(A0);
bool ok = radio.write(&value, sizeof(value));
Serial.println(ok ? "Sent" : "Failed");
delay(500);
} else if (radio.available()) {
int value;
radio.read(&value, sizeof(value));
Serial.println(value);
}
}Getting more range and reliability
- Use 250 kbps: lower data rates give better sensitivity.
- Pick a channel above 100 (2.500 GHz and up) to avoid busy Wi-Fi channels.
- Raise the PA level only after the link works.
- Use the PA+LNA version with an external antenna for long links, and power it properly.
- Use auto-ack (on by default):
write()returns false if the receiver did not acknowledge, so you know when to retry. - For many nodes, the RF24Network and RF24Mesh libraries build tree or mesh networks.
nRF24L01 or something else?
The nRF24L01 is great for remote controls, robot links and sensor nodes within one building. For several kilometres with tiny data, use LoRa. For phone connections, use Bluetooth (HC-05 or ESP32 BLE). Between ESP32 boards, ESP-NOW does the same job with no extra module. See choosing a wireless module.
Common mistakes to avoid
- Powering the module from 5 V.
- Skipping the capacitor and getting random failures.
- Using different data rates, channels or addresses on the two boards.
- Testing at full power with the boards 10 cm apart.
- Forgetting to call stopListening() before writing.
Frequently asked questions
Why is my nRF24L01 not working?
Usually power: add a 10 µF capacitor across VCC and GND at the module or use a regulated adapter. Then check wiring, matching addresses, channel and data rate.
Can I connect the nRF24L01 to 5 V?
Not the VCC pin; it is 3.3 V only. Its signal pins tolerate 5 V logic, so it works with a 5 V Arduino's SPI pins.
What is the range of the nRF24L01?
Tens of metres with the PCB antenna. The PA+LNA version with an external antenna can reach several hundred metres to about a kilometre in clear line of sight.
How much data can the nRF24L01 send?
Up to 32 bytes per packet, at up to 2 Mbps. Larger data must be split into packets.
Does nRF24L01 interfere with Wi-Fi?
Both use 2.4 GHz. Choose channels above 100 to stay clear of most Wi-Fi channels.
Parts for this guide
Terms in this guide
Projects that use it
Put this into practice: 3 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.



