Nrf24L01 Wireless RF Module

NRF24L01

Transmitter & Receiver

 

NRF24L01 Transceiver Module

The NRF24L01 transceiver module. It uses the 2.4 GHz band and it can operate with baud rates from 250 kbps up to 2 Mbps. If used in open space and with lower baud rate its range can reach up to 100 meters.

The module can use 125 different channels which gives a possibility to have a network of 125 independently working modems in one place. Each channel can have up to 6 addresses, or each unit can communicate with up to 6 other units at the same time.

The power consumption of this module is just around 12mA during transmission, which is even lower than a single LED. The operating voltage of the module is from 1.9 to 3.6V, but the good thing is that the other pins tolerate 5V logic, so we can easily connect it to an Arduino without using any logic level converters

Three of these pins are for the SPI communication and they need to be connected to the SPI pins of the Arduino, but note that each Arduino board have different SPI pins. The pins CSN and CE can be connected to any digital pin of the Arduino board and they are used for setting the module in standby or active mode, as well as for switching between transmit or command mode. The last pin is an interrupt pin which doesn’t have to be used.

So once we connect the NRF24L01 modules to the Arduino boards we are ready to make the codes for both the transmitter and the receiver.

 

Specifications:

 

 

  • Low cost single-chip 2.4GHz GFSK RF transceiver IC
  • Range with Antenna: 250Kb rate (Open area) >1000 meter
  • Power: Ultra low power consumption
  • Input Voltage: 3.3V
  • Pins: 5V tolerant

NRF24L01 Features

  • 4GHz RF transceiver Module
  • Operating Voltage: 3.3V
  • Nominal current: 50mA
  • Range : 50 – 200 feet
  • Operating current: 250mA (maximum)
  • Communication Protocol: SPI
  • Baud Rate: 250 kbps – 2 Mbps.
  • Channel Range: 125
  • Maximum Pipelines/node : 6
  • Low cost wireless solution

 

 

Interfacing with Arduino:

Arduino NRF24L01

Codes:

Transmitter Code

/*

* Arduino Wireless Communication Tutorial

* Example 1 – Transmitter Code

*

* by Dejan Nedelkovski, www.HowToMechatronics.com

*

* Library: TMRh20/RF24, https://github.com/tmrh20/RF24/

*/

 

#include <SPI.h>

#include <nRF24L01.h>

#include <RF24.h>

 

RF24 radio(7, 8); // CE, CSN

 

const byte address[6] = “00001”;

 

void setup() {

radio.begin();

radio.openWritingPipe(address);

radio.setPALevel(RF24_PA_MIN);

radio.stopListening();

}

 

void loop() {

const char text[] = “Hello World”;

radio.write(&text, sizeof(text));

delay(1000);

}

 

 

Receiver Code:

/*

* Arduino Wireless Communication Tutorial

* Example 1 – Receiver Code

*

* by Dejan Nedelkovski, www.HowToMechatronics.com

*

* Library: TMRh20/RF24, https://github.com/tmrh20/RF24/

*/

 

#include <SPI.h>

#include <nRF24L01.h>

#include <RF24.h>

 

RF24 radio(7, 8); // CE, CSN

 

const byte address[6] = “00001”;

 

void setup() {

Serial.begin(9600);

radio.begin();

radio.openReadingPipe(0, address);

radio.setPALevel(RF24_PA_MIN);

radio.startListening();

}

 

void loop() {

if (radio.available()) {

char text[32] = “”;

radio.read(&text, sizeof(text));

Serial.println(text);

}

}

Application:

  • Wireless Control application
  • Mesh Networks
  • RF Remote Controllers
  • Connected devices

 

 

Reference:

https://components101.com/wireless/nrf24l01-pinout-features-datasheet

https://www.electronicshub.org/nrf24l01-transceiver-module/

https://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/

https://lastminuteengineers.com/nrf24l01-arduino-wireless-communication/