Introduction: Getting Started With Arduino - Nordic NRF24L01 Radios

Picture of Getting Started With Arduino - Nordic NRF24L01 Radios

In this tutorial, we will use a pair of Nordic NRF24L01 Radios to communicate between two separate Arduinos.

NRF24L01 radios are very cheap boards, ideal for short range communication between multiple devices.

We will set up one Arduino as a sender and a second as a receiver - for this you will need two Arduinos and two NRF24L01 Radios.

Step 1: Wire Up Your Arduinos

Picture of Wire Up Your Arduinos

Both sending and receiving Arduinos need to be wired up in the same manner.

You will need 7 wires plugged into each Arduino. To make it easier to keep track of all the wires, it's a good idea to use 7 different colours. We have used the following coloured wires (as shown in the photos above):

  • Grey: Connected to GND
  • Yellow: Connected to digital pin 13
  • Orange: Connected to digital pin 12
  • Green: Connected to digital pin 11
  • Blue: Connected to digital pin 8
  • Purple: Connected to digital pin 7
  • White: Connected 3.3v

Step 2: Wire Up Your Radios

Picture of Wire Up Your Radios

Both radio boards need to be connected to the two different Arduinos in the same manner.

Using the coloured wires from the previous step, connect the radios as shown in the photos above.

Step 3: Write Your Code - Sender

The next step is to write some code to transmit data using one of the radios.

Download the Sender.ino file and open it up in the Arduino IDE. You can tinker with it if you like, or just use it as it is. Once you are happy, upload it onto your Arduino.

To run this code, you will need to download and install the Arduino MIRF library

Step 4: Write Your Code - Receiver

The next step is to write some code to receive data using the other radio.

Download the Receiver.ino file and open it up in the Arduino IDE. You can tinker with it if you like, or just use it as it is. Once you are happy, upload it onto your Arduino.

To run this code, you will need to download and install the Arduino MIRF library (also provided below)

Step 5: Connect Via Serial Monitor

Once the Sender and Receiver code have been successfully uploaded onto two different Arduinos, open up the "Serial Monitor" by clicking on the magnifying glass icon on the top right of the Arduino window. You should make sure that the monitor is connected to the Receiver serial device (rather than the sender) and that "9600 baud" has been selected in the dropdown menu at the bottom of the window. You should be able to see a stream of numbers arriving in the serial monitor window - these are random values generated by the sender, transmitted via the radios and picked up by the receiver.

Step 6: Enjoy

Picture of Enjoy

If everything worked, you should be able to send randomly generated number from the Sender Arduino to the Receiver Arduino. The range of communication will be around 100ft - although it is possible to purchase amplified radios to achieve a greater distance.

If you enjoyed this instructable, check out our other tutorials

If you love this kind of stuff, check out our degree

Comments

Abrasha made it! (author)2015-12-15

Thanks a lot! Great Instructable. Next phase is to set up a home automation grid with MySensor.com, and domoticz. Each Nano + nrf cost me 3 dollar at aliexpress.

MySensors looks pretty sweet, but I haven't had the chance to try it out yet. You gonna post an instructable about how you get on with it ?

Nguyễn VănK (author)2015-12-02

The basic of communication between 2arduino. it's very simple, watch my video to find out

https://www.youtube.com/watch?v=MKz_73KaW1g

Saiyam (author)2015-10-29

Nice and informative tutorial.

About This Instructable

9,652views

75favorites

License:

Bio: Tutorials provided by BA/BSc (Hons) Digital Art and Technology at Plymouth University
More by Digital Art and Technology:Green space activity monitorPython Micro:bit Light ShowJumpstarting a Hot-glued Arduino
Add instructable to: