Communication, Embedded systems, Internet of Things

How about Two Arduino Talk to Each Other.. Wirelessly?

In this article, we are going to control an Arduino’s built in LED on pin 13 with another Arduino using a 2.4 Ghz NRF2401 wireless transceiver

What you’ll need to carry out this project;

Hardware

  • 2 x Arduino UNO microcontroller board, buy it here
  • 2 x 2.4 Ghz NRF2401 wireless transceiver, get them here

Software

  • The latest Arduino IDE (download here)

Introducing the 2.4 Ghz NRF2401 transceiver module.

The 2.4 Ghz NRF2401  is used where wireless communication or control between systems is needed. The 2.4 Ghz NRF2401 is a transceiver meaning it can transmit and receive data. The module is very cheap and can be interfaced with any micro-controller.

Technical specifications:

  • Antenna range > 1km
  • Frequency  = 2.4 Ghz
  • Range of operating input voltage = 1.9v -3.6v

Note: Special arrangements must be made when working with 5v circuits,

esp8266 board
esp8266 board

IMPLEMENTATION

Let us proceed to interfacing the Arduino UNO with the 2.4 Ghz NRF2401 transceiver.

STEP 1: CIRCUIT CONNECTION

Make sure the two Arduino/NRF2401 are connected like this.

Arduino to NRF2401 connection
Arduino to NRF2401 connection

NOTE: OPERATING VOLTAGE RANGE IS 1.9V TO 3.6V. DO NOT EXCEED THE MAXIMUM VOLTAGE.

STEP 2: INSTALL REQUIRED LIBRARIES

The NRF2401 transceiver requires a library to be installed and used for the project to work.

  • Get the library RF24-master
  • Make sure your Arduino IDE is closed.
  • Once the zip is downloaded, extract the folders to the libraries folder of your Arduino
  • You’ve installed the RF24 library successfully.

STEP 3: CODE

Since there will be a master Arduino which will send messages to the slave Arduino. Upload this code to your selected master Arduino

Master Arduino Code

Slave Arduino Code

STEP 4: RESULTS

  • Open up the Serial monitor of master Arduino code
Arduino serial monitor result
Arduino serial monitor result
  • Using any terminal of your choice, i am using Tera Term. Download it here
    Arduino serial monitor result
    Arduino serial monitor result

I hope you enjoyed building this project

Wanna do more?

Build a wireless temperature monitoring system using the following parts

  • 1 x DHT22 Temperature/Humidity sensor, get it here
  • 2 x Arduino Uno, get them here
  • 2 x NRF2401, get them here

Leave a Reply

Your email address will not be published. Required fields are marked *