Overview of nRF24L01+ transceiver and its configuration
The Nordic nRF24L01+ is a low-power and low-cost RF transceiver dedicated to bidirectional communication on the 2.4 GHz ISM band. It is controlled by a MCU through a SPI bus and requires
only few external components. Its main characteristics are:
- nominal power supply: 3.0 - 3.6 V
- GFSK modulation, 126 channels between 2400 and 2525 MHz
- 250 kbps, 1 MBps or 2 Mbps air data rate
- 4 configurable RF output powers: 0, -6, -12, -18 dBm
- Typical current consumption: 11.3 mA in TX mode (0 dBm), 13.5 mA in RX mode (2 Mbps), 26 µA in Standby I mode (start-up time = 130 µs), 900 nA in power down mode
(start-up time = 1.5 ms)
- Up to 32 bytes payload
- Proprietary baseband protocol Enhanced Shockburst (auto-acknowledgement and autoretransmission without MCU operation).
- Up to 6 data logic pipes to create a 6:1 star network.
More information about the nRF24L01+ can be found in the
datasheet.
Brief description of Enhanced Shockburst protocol
The nRF24L01+ supports a proprietary baseband protocol, called Enhanced Shockburst (ESB), which simplifies the management of acknowledgement packets and retransmission without requiring
any operation of the MCU.
Moreover, it simplifies the creation of a 6:1 star network, between one primary receiver (PRX) and up to 6 primary transceivers, as described by the following figure. This protocol is suitable for
a simple IoT application, with 6 connected sensors which transmits data regularly to one listening server.
In this protocol, one PTX always initiates a transaction (i.e. an exchange of packets between one PTX and the PRX). The transaction is completed if the PTX receives an acknowledgment (ACK)
packet from the PRX. The PRX can also add a payload to this ACK packet, allowing a bidirectional exchange. Once the PTX has transmitted its packet, it enters in RX mode for 250 µs
to capture the ACK packet. If the PRX receives the packet transmitted by the PTX, ESB protocol generates automatically (without intervention of the MCU) the ACK packet and transmits it to the PTX.
Several cases may happen:
- PTX receives the ACK packet in time. It returns in Stand-by I mode until a new message is loaded in its TX FIFO.
- If the PTX does not receive the ACK packet. It retransmits the packet. It will repeat this operation until it receives and ACK packet or when the retransmission tries reaches a user-defined limit (ARC).
The retransmission is done after a delay defined by the user (from 250 µS up to 4 ms).
- The PRX is able to identify two identical packets transmitted by the PTX. This situation may happen if the PRX receives the packet and if the PTX does not receive the ACK packet.
In this case, the PRX does not consider the second packet.
The PRX is able to detect if a message with a valid address is transmitted on the RF channel. Actually, ESB defines a link-layer protocol where up to 6 logical channels, called data pipes, can
be distinguished based on 6 unique addresses (defined on 3, 4 or 5 bytes). To create a 6:1 star network, the PRX has enabled and configured the RX address of the 6 data pipes. On one PTX side,
the TX address is equal to one data pipe address. As the the PTX will turn from TX to RX mode to capture the ACK packet, its RX address is equal to the TX address.
Code examples