Random Nerd Tutorials
Shares

Complete Guide for nRF24L01 – 2.4GHz RF Transceiver Module With Arduino

Shares

This post aims to be a complete guide for nRF24L01 – 2.4GHz RF Transceiver module. I’ll explain what it does, show its specs and share an Arduino project example that you can take and apply to your own projects.

I have more complete guides for other popular sensors, check them below:

Description

These RF modules are very popular among the Arduino tinkerers. The nRF24L01 is used on a wide variety of applications that require wireless control. They are transceivers which this means that each module can transmit and receive data.

These modules are very cheap and you can use them with any microcontroller (MCU).

Specifications nRF24L01 – 2.4GHz RF Transceiver

  • 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
  • Price: $2

Where to buy?

You can purchase these modules from eBay for just a few dollars. Click here to see nRF24L01 module on eBay. They come in two versions with external antenna (more range) or built-in antenna (less range).

nrf where to buy

Arduino with nRF24L01

You need the following components to make this example:

  • 2x Arduino (eBay)
  • 2x nRF24L01 – 2.4GHz RF Transceiver (eBay)
  • Breadboard (eBay)

Library download

Here’s the library you need for this project:

  1. Download the RadioHead library
  2. Unzip the RadioHead library
  3. Install the RadioHead library in your Arduino IDE
  4. Restart your Arduino IDE

The RadioHead library is great and it works with almost all RF modules in the market. You can read more about this project here.

Pinout

24L01Pinout-800

Top view of NRF24L01

Client Circuit

nrf24 radiohead with ArduinoImportant: Input voltage is of 1.9V~3.6V, do not exceed this voltage, otherwise it will fry your module.

Follow the circuit above for your client. Then upload the code below which can be found in your Arduino IDE (after installing the RadioHead library).

Go to File > Examples > RadioHead > nrf24 > nrf24_client.

»» View and download code on GitHub!

Server Circuit

nrf24 radiohead with Arduino Important: Input voltage is of 1.9V~3.6V, do not exceed this voltage, otherwise it will fry your module.

Follow the circuit above for your server. Then upload the code below which can be found in your Arduino IDE (after installing the RadioHead library).

Go to File > Examples > RadioHead > nrf24 > nrf24_server.

»» View and download code on GitHub!

Demonstration

In this project the client is sending a message “Hello World!” to the server via RF and the server is sending back the following message “And hello back to you”. Those messages are being displayed in the serial monitor. Here’s what you should see in your serial terminal windows (see Figure below).

serial communication

Note: On the left window, I’m establishing a serial communication with PuTTY.org. On the right window, I’m using the Arduino IDE Serial Monitor.

Conclusion

You need to have some realistic expectations when using this module. They work very well when the receiver and transmitter are quite close to each other. If you separate them too far you’ll loose the communication.

The communication range will vary. It depends on how much noise in your environment, if there’s any obstacles and if you’re using an external antenna.

I hope you found this guide useful.

Share this post with a friend that also likes electronics!

You can contact me by leaving a comment. If you like this post probably you might like my next ones, so please support me by subscribing my blog and my Facebook Page.

Thanks for reading,

-Rui Santos

Leave a Comment:

Add Your Reply