โ† Back to Advanced Projects

๐Ÿ“ก NRF24L01 Wireless Data Link

Create a cable-free 2-way data bridge using 2.4 GHz radio transceivers.

๐Ÿ“‹ Overview

The NRF24L01 is a 2.4 GHz ISM band transceiver capable of transmitting data at up to 2 Mbps over distances up to 100m (or 1km with the PA+LNA version). This project builds a symmetric 2-way link between two Arduino boards.

What you'll learn: SPI bus communication, NRF24L01 pipe addressing, half-duplex transmit/receive switching, packet structuring, and signal strength (RSSI) reporting.

Estimated time: 1.5โ€“2.5 hours. Difficulty: โญโญโญ Intermediate.

๐Ÿงฉ Components Needed

ComponentSpecificationQtyNotes
Arduino Uno R35V Logic2One TX, one RX (or both)
NRF24L01 Module2.4 GHz, SPI2Standard or PA+LNA version
100ยตF Capacitor10V rated2Decoupling โ€” critical!
Breadboard & WiresMale-to-Male2 setsOne per Arduino

๐Ÿ“– Step-by-Step Tutorial

1

Wiring (both Arduinos)

NRF24 CE โ†’ Pin 9, CSN โ†’ Pin 10, SCK โ†’ Pin 13, MOSI โ†’ Pin 11, MISO โ†’ Pin 12, VCC โ†’ 3.3V, GND โ†’ GND. Place a 100ยตF cap between VCC and GND close to the module.
2

Install RF24 Library

Install the RF24 library by TMRh20 from the Arduino Library Manager.
3

Upload Transmitter Code

On Arduino 1, upload the transmitter sketch. It sends a struct containing sensor readings every 250ms.
4

Upload Receiver Code

On Arduino 2, upload the receiver sketch. It listens on the same pipe address and prints received data to Serial Monitor.
5

Test 2-Way Communication

Both units can switch between TX/RX. Press a button to send a command from the receiver back to the transmitter to demonstrate bidirectional links.
๐Ÿ’ก
The NRF24L01 is the most power-supply-sensitive module in electronics. It requires a very clean 3.3V with a 100ยตF bulk capacitor. Without it, you will get random disconnects and missed packets. Never skip this capacitor.

๐Ÿ’ป Code / Configuration

nrf24_data_link.ino
INO
// NRF24L01 Wireless Link - Volt X
// Upload to BOTH Arduinos. Unit A uses pipe "00001", Unit B uses "00002"
#include <SPI.h>
#include <RF24.h>

RF24 radio(9, 10); // CE, CSN

// Pipe addresses โ€” change for each unit
const byte txAddress[6] = "00001"; // This unit sends on pipe 1
const byte rxAddress[6] = "00002"; // This unit receives on pipe 2

struct Packet {
  float temperature;
  int   buttonState;
  unsigned long timestamp;
};

Packet txData, rxData;

void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.setPALevel(RF24_PA_LOW);   // Use RF24_PA_HIGH for longer range
  radio.setDataRate(RF24_250KBPS); // Longer range, slower speed
  radio.setChannel(108);           // Channel above WiFi interference

โญReviews & Ratings

โ€”0 reviews
5โ˜…
0
4โ˜…
0
3โ˜…
0
2โ˜…
0
1โ˜…
0
...

Loading reviews...

volt-X / NRF24L01 Wireless Data Link โ€” Advanced IoT Tutorial