Skip to main content

nrf24l01

nRF24L01 2.4GHz radio transceiver for short-range wireless sensor networks.

Overview

The nrf24l01 node interfaces with Nordic Semiconductor nRF24L01+ 2.4GHz radio transceivers via SPI. These low-cost modules are ideal for building wireless sensor networks with bidirectional communication, auto-acknowledgment, and multi-pipe addressing. Perfect for home automation, robotics, and sensor mesh networks.

100m
Range (with PA+LNA)
2Mbps
Max Data Rate
126
RF Channels
32B
Max Payload Size

Properties

Property Type Required Default Description
spiBus number No 0 SPI bus number
spiDevice number No 0 SPI chip select (CE0=0, CE1=1)
cePin number Yes 22 GPIO pin for Chip Enable (CE) - not same as SPI CS
channel number No 76 RF channel 0-125 (frequency = 2400 + channel MHz)
dataRate select No "1Mbps" Air data rate: "250kbps", "1Mbps", "2Mbps"
paLevel select No "max" Power amplifier level: "min" (-18dBm), "low" (-12dBm), "high" (-6dBm), "max" (0dBm)
txAddress string No "1Node" 5-byte transmit address
rxAddress string No "2Node" 5-byte receive address
autoAck boolean No true Enable auto-acknowledgment for reliable delivery
crcLength select No "16" CRC length: "disabled", "8" bit, or "16" bit

Inputs

Send String Data
{
  "payload": "temp=23.5",
  "txAddress": "1Node"
}
Send Binary Payload
{
  "payload": {
    "data": [0x01, 0x17, 0x00, 0xEA],
    "pipe": 0
  }
}

Outputs

Received Data
{
  "payload": "temp=23.5",
  "pipe": 1,
  "size": 10,
  "ackSent": true,
  "timestamp": "2025-01-15T10:30:00.000Z"
}
TX Result
{
  "payload": true,
  "ackReceived": true,
  "retries": 0,
  "topic": "nrf24/tx/done"
}

Wiring Diagram

nRF24L01+ to Raspberry Pi

  nRF24L01+ (8-pin)     Raspberry Pi
  +--------------+      +--------------+
  | GND    (Pin 1)|------| GND   (Pin 6)|
  | VCC    (Pin 2)|------| 3.3V  (Pin 1)|
  | CE     (Pin 3)|------| GPIO22(Pin 15)|
  | CSN    (Pin 4)|------| CE0   (Pin 24)|
  | SCK    (Pin 5)|------| SCLK  (Pin 23)|
  | MOSI   (Pin 6)|------| MOSI  (Pin 19)|
  | MISO   (Pin 7)|------| MISO  (Pin 21)|
  | IRQ    (Pin 8)|------| (optional)    |
  +--------------+      +--------------+

Wiring Notes

VCC must be 3.3V (NOT 5V - will damage the module)

CE is Chip Enable, separate from SPI chip select

CSN maps to SPI CS (CE0 on Pi)

IRQ optional interrupt pin for RX notification

Tip: Add a 10uF capacitor between VCC and GND close to the module to stabilize power and prevent dropouts.

Example Use Cases

Wireless Sensor Hub

Receive temperature data from multiple nRF24L01 sensor nodes and log to database.

nrf24l01 (rx) switch (by pipe) sqlite
[
  {
    "id": "nrf-rx",
    "type": "nrf24l01",
    "cePin": 22,
    "channel": 76,
    "dataRate": "1Mbps",
    "rxAddress": "HubRx"
  },
  {
    "id": "route-pipe",
    "type": "switch",
    "property": "pipe",
    "rules": [
      { "t": "eq", "v": "0" },
      { "t": "eq", "v": "1" }
    ]
  },
  {
    "id": "store-db",
    "type": "sqlite",
    "sql": "INSERT INTO readings (pipe, value, ts) VALUES (?, ?, ?)"
  }
]

Remote Control with Acknowledgment

Send commands to a remote actuator and verify delivery with auto-acknowledgment.

[
  {
    "id": "cmd-button",
    "type": "button",
    "label": "Activate Relay"
  },
  {
    "id": "nrf-tx",
    "type": "nrf24l01",
    "cePin": 22,
    "channel": 76,
    "txAddress": "1Node",
    "autoAck": true
  },
  {
    "id": "ack-check",
    "type": "switch",
    "property": "ackReceived"
  },
  {
    "id": "status-debug",
    "type": "debug",
    "name": "TX Status"
  }
]

Multi-Node Star Network

Central hub receives from up to 6 sensor nodes using different pipe addresses.

{
  "id": "hub-rx",
  "type": "nrf24l01",
  "cePin": 22,
  "channel": 100,
  "dataRate": "250kbps",
  "paLevel": "max",
  "autoAck": true,
  "crcLength": "16"
}

Common Use Cases

Home Sensor Network

Wireless temperature, humidity, and motion sensors per room

Robotics Control

Remote control and telemetry for robots and drones

Wireless Data Logging

Collect and aggregate sensor data without running wires

Security Zones

Wireless door/window sensors and alarm triggers

Related Nodes