What is NRF24L01 : Pin Configuration & Its Working

In modern communication, wireless transmission of received serial data is provided by the RF transmitter at the rate of 1Kbps to 10Kbps. While the transmitted data is received by the RF receiver. The operating frequency range of the RF transmitter and RF receiver is the same. The NRF24L01 is one of the wireless transceiver RF modules used for SPI communication with a 2Mbps transmission speed.


It is a single-chip 2.4GHz transceiver module used in data transmission. The HC12, NRF905, 433MHz RF module, Bluetooth, ESP8266, GSM, Xbee, and Lora are the alternatives to the NRF24L01 module. This article gives a brief description of pin configuration, circuit diagram, specifications, features, and applications of the NRF24L01 module.

NRF24L01 Definition:

The NRF24L01 is a wireless transceiver RF module, where each module can send and receive data. Since it operates on the 2.4 GHz ISM band, the technology is approved for engineering applications in almost all countries. This module can cover 100 meters (200 feet) when operated efficiently, making it suitable for wireless remote control projects.

The NRF24L01 module is powered by 3.3 Volts, so it can be easily used in both 3.2 Volts and 5 Volts systems. Each module has an address range of 125 to communicate with the other 6 modules and also allows several wireless units to communicate with each other in a specified location. Therefore, mesh and other types of networks use this module.

NRF24L01 RF Module
NRF24L01 RF Module

NRF24L01 is a radio transceiver module (SPI protocol) used to send and receive data at ISM operating frequency from 2.4 to 2.5 GHz. This transceiver module is composed of a frequency generator, beat controller, power amplifier, crystal oscillator modulator, and demodulator. It consumes only 11.3 mA at 0 dBm transmit power and consumes 13.5 mA in receive mode.

The high over-the-air data rate combined with sleep mode is highly preferred for ultra-low power applications. The internal voltage regulator controls the high power rejection ratio and power band. The module is compact and can be easily used in confined spaces.

Operating Modes

It operates in 3 modes, which are transmitter mode, receiver mode, and transceiver (transmitter and receiver) mode. So, these modes are discussed below.

  • In transmitting mode, when the power is 0dBm, then the NRF24L01 uses only 11.3mA current.
  • While in receiving mode, it uses only 13.5mA current.
  • In the transceiver mode, the NRF24L01 module is used for long-distance and quick transmission of data using the SPI protocol.

Pin Configuration/Pin Diagram:

The NRF24L01 is an 8-pin wireless transceiver module with special pins that enable communication in all boards and microcontrollers. This device is used for interfacing with an Arduino Or an external microcontroller through the pin functions. The NRF24L01 pin configuration/pin diagram is illustrated below.

NRF24L01 Pin Diagram
NRF24L01 Pin Diagram

Pin 1 (GROUND/Vss): It is a common ground connection for the system.

Pin 2 (VCC): It refers to the power supply pin of 3.3 Volts given to the module. The NRF24L01 module contains two power supply pins for operation.

Pin 3 (CE): Chip Enable: It is an input pin that enables the control of data transmission and reception in transmitter and receiver modes. It activates the SPI communication.

Pin 4 (CSN): Chip Select Not: It is an active-high pin, which can send the device an SPI command or can get the data from the chip on the SPI bus. It provides communication between the module and the microcontroller. When it is active low, then the SPI is disabled and the NRF24L01 starts listening to data on the SPI port for processing.

Pin 5 (SCK): Serial Clock: It refers to the clock pulse of the NRF24L01 to enable the SPI communication. It transmits the data between the microcontroller and the module according to the clock pulse.

Pin 6 (MOSI): Master Out Slave In The transmitted data via SPI by the microcontroller is received by the NRF24L01 module. Here the microcontroller acts as a master and the NRF24L01 acts as a slave. This pin refers to the MOSI pin connection on the microcontroller SPI interface. Note that the NRF24L01 module never sends the data without the first request of data by the microcontroller.

Pin 7 (MISO): Master In Slave Out: It is connected to the MISO pin of the microcontroller. Data transmitted from the NRF24L01 module via the SPI bus is received by the microcontroller. Here the NRF24L01 module acts as a master and the microcontroller acts as the slave.

Pin 8 (IRQ): Interrupt Pin: It is an active low pin. This module contains 3 interrupt pins and generates an interrupt whenever the new data is available on the SPI bus. It is also used for sending feedback to the sender.

The additional or special pins of the NRF24L01 wireless transceiver module are,

Pin 9 (XC2): It is used for crystal analogue output pin.

Pin 10 (XC1): It refers to crystal analogue input pin.

Pin 11 (VDD_PA): It is used as a power amplifier.

Pin 12 (ANT1): It is used for interfacing antennas.

Pin 14 (ANT2): It is used for interfacing antennas.

Pin 15 (VSS): It refers to the common ground connection. The module contains two common ground connections for operation with the microcontroller.

Pin 16 (IREF): It is used for reference current.

Pin 17 (DVDD): It refers to the digital positive supply for decoupling.

NRF24L01 Technical Specifications:

The NRF24L01 technical specifications and features are given below.

  • It is a transceiver RF module with 2.4GHz.
  • The operating voltage is 3.3 Volts.
  • The value of nominal current is 50mA.
  • The maximum value of the operating current is 250mA.
  • It covers a distance of 50-200 feet.
  • It uses the SPI communication protocol.
  • The range of baud rate is 250kbps to 2Mbps.
  • The channel range is 125.
  • There are 6 maximum nodes.
  • It is a wireless solution available at a low cost.
  • It is a single chip GFSK transceiver module with OSI link layer hardware.
  • It provides auto ACK, retransmits, address, and CRC computation.
  • The data rate on the air is 1Mbps Or 2Mbps.
  • The speed of the digital interface (SPI) is 0-8Mbps.
  • The range of RF channel operation is 125.
  • It provides a short switching time enabling frequency hopping.
  • It is completely RF compatible with NRF24XX.
  • The tolerance signal input is 5V.
  • The power supply range is 1.9V to 3.6V.

Circuit Diagram/How to Use:

The NRF24L01 module is widely used in mesh networks, other types of networking applications, data transmissions, toys, remote controls, computers, games, and electronic devices. Now let’s learn the circuit diagram/how to use the NRF24L01 module with the microcontroller. The components required to interface the NRF24L01 with the microcontroller are,

  • One microcontroller unit
  • One NRF24L01 module
  • Power supply.

The NRF24L01 module works with SPI communication. This module can be used with 3.3V and 5V microcontrollers, but it requires an SPI port. More information on using the module via SPI can be found in the following datasheet:

Interfacing NRF24L01 with Microcontroller
Interfacing NRF24L01 with Microcontroller

The diagram shows how the module connects to the microcontroller. Although we discussed 3.3V microcontrollers here, this also applies to 5V microcontrollers. The SPI pins (MISO (MOSI and SCK)) are connected to the microcontroller’s SPI pins, and the signal pins (CE and CSN) are connected to the microcontroller’s GPIO pins.

By connecting or interfacing the module to the Arduino, you can use ready-made libraries such as the R24 library. This library allows the NRF24L01 to easily interface with the Arduino with a few lines of code. If you are using a different microcontroller, you should read the datasheet to learn how to set up SPI communication.

The NRF24L01 RF module is difficult to use, even though there are several clone versions in the market. If there is an issue with its working, then add 0.1uF and 10uF capacitors in parallel to the ground and supply (VCC) pins. Be sure that the 3.3 Volts supply is noise-free and clean.

How to use NRF24L01 as an SPI Transmitter:

If the NRF24L01 is used as a transmitter, then allow the data transmission at the signal channel to another module. The code required for the NRF24L01 transmitter is given below.

#include <nRF24L01.h>
#include <RF24.h>
#include <SPI.h>

RF24 radio(3, 2);
void setup()
{
radio. begin();
radio.openWritingPipe(10101);
radio.stoplistening();
}
void loop()
{
const char data[] = “DATA”;
radio.write(&data, sizeof(data));
delay(2000);
}

When the NRF24L01 is used as an SPI Receiver:

The above section discusses the transmission method using SPI protocol but the SPI receiver method isn’t different from the SPI transmitter. In the SPI transmitter, only 3 instructions are changed.

The address channel, which wasn’t available in the SPI transmitter

The initialization of the module as an SPI receiver

Data receiving and checking method

The following code is required for the SPI receiver.

#include <nRF24L01.h>
#include <RF24.h>
#include <SPI.h>

RF24 radio(3, 2);

void setup()
{
radio.begin();
radio.openReadingPipe(0,00001);
radio.startListening();
}
void loop()
{
if (radio.available())
{
char data[32] = {0};
radio.read(&data, sizeof(data));
}
}

Similarly the code required when the NRF24L01 works as a RF transmitter or SPI transmitter is given below.

*/RF transmitter/*
include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(9, 10); // CE, CSN Pins
const uint64_t address = 0xF0F0F0F0E1LL;

void setup()
{
radio.begin();
radio.openWritingPipe(address);
radio.setPALevel(RF24_PA_MIN);
radio.stopListening();
}
void loop()
{
const char sendData[] = “This is a test!”;
radio.write(&sendData, sizeof(sendData));
delay(500);
}

Where to Use/Applications of NRF24L01:

A few applications of NRF24L01 are listed below.

  • Keyboard, wireless mouse, and joysticks.
  • Wireless data communication systems.
  • Security and alarm systems.
  • Keyless entry.
  • Home automation systems.
  • Automotive applications.
  • Telemetry.
  • Surveillance.
  • Intelligent sports equipment.
  • Toys.
  • Industrial sensors.
  • Mesh networks.
  • Wireless Control System Applications.
  • RF remote control units.
  • Connected devices.

Please refer to this link to know more about  NRF24L01 Datasheet

Thus, The NRF24L01 module is designed for long-distance and fast data transmission. It is designed to work with the SPI protocol. The wireless transmission speed of NRF24L01 is about 2Mbps. Here is a question for you, “What are the differences between the NRF24L01 and NRF24L01+ modules? “.