Wireless Remote Using 2.4 Ghz NRF24L01 : Simple Tutorial Using of NRF24L01 & Arduino
by Akshay Jha in Circuits > Wireless
454402 Views, 350 Favorites, 0 Comments
Wireless Remote Using 2.4 Ghz NRF24L01 : Simple Tutorial Using of NRF24L01 & Arduino
![nrf.jpg](/proxy/?url=https://content.instructables.com/F12/8U35/IEIUESZP/F128U35IEIUESZP.jpg&filename=nrf.jpg)
Hello Everyone this is my second instructable . After lots of surfing on GOOGLE when I wont able to find a easy and a simple tutorial for NRF24L01 transceiver then I decided to publish an instructable on this. This is a simple short and easy tutorial for NRF24L01 Radio 2.4GHz Transmitter Receiver. In this tutorial I am going to control led using a pair of NRF24L01 transceiver.
Small Introduction About NRF 24L01 Transceiver
![Wireless Remote Using 2.4 Ghz NRF24L01 : Simple Tutorial Using of NRF24L01 & Arduino](/proxy/?url=https://content.instructables.com/F01/2HKW/IEIUEUPS/F012HKWIEIUEUPS.jpg&filename=Wireless Remote Using 2.4 Ghz NRF24L01 : Simple Tutorial Using of NRF24L01 & Arduino)
The nRF24L01 is a highly integrated, ultra low power (ULP) 2Mbps RF transceiver IC for the 2.4GHz ISM (Industrial, Scientific and Medical) band. With peak RX/TX currents lower than 14mA, a sub μA power down mode, advanced power management, and a 1.9 to 3.6V supply range, the nRF24L01 provides a true ULP solution enabling months to years of battery lifetime when running on coin cells or AA/AAA batteries .
Material Require
![n RF24L01.jpg](/proxy/?url=https://content.instructables.com/FHT/X4H2/IBXM5JP6/FHTX4H2IBXM5JP6.jpg&filename=n RF24L01.jpg)
![0J6023.1200.jpg](/proxy/?url=https://content.instructables.com/FJK/RNNP/IBXM5L9E/FJKRNNPIBXM5L9E.jpg&filename=0J6023.1200.jpg)
![11021b-01.jpg](/proxy/?url=https://content.instructables.com/FKV/TBV7/IBXM5LAH/FKVTBV7IBXM5LAH.jpg&filename=11021b-01.jpg)
![im120411003_8.jpg](/proxy/?url=https://content.instructables.com/FA7/62XE/IBXM5LAK/FA762XEIBXM5LAK.jpg&filename=im120411003_8.jpg)
![91_0.jpg](/proxy/?url=https://content.instructables.com/FWJ/T0YY/IBXM5KFY/FWJT0YYIBXM5KFY.jpg&filename=91_0.jpg)
![pro-00007-bundle.jpg](/proxy/?url=https://content.instructables.com/FH3/MROZ/IBXM5KGI/FH3MROZIBXM5KGI.jpg&filename=pro-00007-bundle.jpg)
![Blue_LED.jpg](/proxy/?url=https://content.instructables.com/F5L/MGLB/IBXM5LBC/F5LMGLBIBXM5LBC.jpg&filename=Blue_LED.jpg)
![on-off-switch.jpg](/proxy/?url=https://content.instructables.com/FAS/RTTV/IBXM5LE4/FASRTTVIBXM5LE4.jpg&filename=on-off-switch.jpg)
![41RfND0SwbL._SY300_.jpg](/proxy/?url=https://content.instructables.com/F6B/RMVQ/IBXM5PC7/F6BRMVQIBXM5PC7.jpg&filename=41RfND0SwbL._SY300_.jpg)
- 2 PCS NRF24L01+2.4 GHz Wireless Transceiver module
- 2 Arduino any (I have used one arduino R3 & nano)
- Male to. femal jumpers
- LED
- Any Switch
- 10K resistor
Connections
![Interface.jpg](/proxy/?url=https://content.instructables.com/FGT/XJ63/IBXM5U8H/FGTXJ63IBXM5U8H.jpg&filename=Interface.jpg)
![nrf24l01-300x112.jpg](/proxy/?url=https://content.instructables.com/FF9/KUDX/IBXM5UA4/FF9KUDXIBXM5UA4.jpg&filename=nrf24l01-300x112.jpg)
![transmitter.jpg](/proxy/?url=https://content.instructables.com/F4Z/W4DD/IBXM5Z3Z/F4ZW4DDIBXM5Z3Z.jpg&filename=transmitter.jpg)
![NRF24L01-Receiver.jpg](/proxy/?url=https://content.instructables.com/FUT/QBNV/IBXM5XGG/FUTQBNVIBXM5XGG.jpg&filename=NRF24L01-Receiver.jpg)
![P_20150711_144825.jpg](/proxy/?url=https://content.instructables.com/FDR/HKWO/IBXMOOHN/FDRHKWOIBXMOOHN.jpg&filename=P_20150711_144825.jpg)
- Connect the following pins to your Arduino:as shown in figure
- Pin 9 - CE
- Pin 10 - CS(N)
- Pin 11 - MOSI
- Pin 12 - MISO
- Pin 13 - SCK
- 3.3v - VCC
- GND - GND
- On the Receiver Pin 3 - LED
- On the Transmitter Pin 7 - Button
- same connection for receiver and transmitter and you can use any arduino board
Coding Arduino
For coding arduino first we need some library files so follow the steps given below :
1. Download the ZIP file (library file zip folder from attachments ).
3. Unpack the ZIP file.
4. Go to arduino library folder
5. And paste both the folders named " nFR24L01" and "RF24" into it.
Now, program the Arduino receiver and transmitter
Code for Receiver
<p>#include <SPI.h><br>#include "nRF24L01.h" #include "RF24.h" int msg[1]; RF24 radio(9,10); const uint64_t pipe = 0xE8E8F0F0E1LL; int LED1 = 3;</p><p>void setup(void){ Serial.begin(9600); radio.begin(); radio.openReadingPipe(1,pipe); radio.startListening(); pinMode(LED1, OUTPUT);}</p><p>void loop(void){ if (radio.available()){ bool done = false; while (!done){ done = radio.read(msg, 1); Serial.println(msg[0]); if (msg[0] == 111){delay(10);digitalWrite(LED1, HIGH);} else {digitalWrite(LED1, LOW);} delay(10);}} else{Serial.println("No radio available");}}</p>
Code for Transmitter
<p>#include <SPI.h><br>#include "nRF24L01.h" #include "RF24.h" int msg[1]; RF24 radio(9,10); const uint64_t pipe = 0xE8E8F0F0E1LL; int SW1 = 7;</p><p>void setup(void){ Serial.begin(9600); radio.begin(); radio.openWritingPipe(pipe);}</p><p>void loop(void){ if (digitalRead(SW1) == HIGH){ msg[0] = 111; radio.write(msg, 1);}}</p>
Downloads
Testing
![Wireless Remote Using 2.4 Ghz NRF24L01 : Simple Tutorial Using of NRF24L01 &amp; Arduino](/proxy/?url=https://content.instructables.com/F83/RUH3/IBXMOPM2/F83RUH3IBXMOPM2.jpg&filename=Wireless Remote Using 2.4 Ghz NRF24L01 : Simple Tutorial Using of NRF24L01 &amp; Arduino)
This is a last step after completing the circuit and coding part we can easily test it by switching "ON" and "OFF". .
When switch is "ON" on transmitter side connected to pin 7 of arduino then led glows on receivers side connected to pin 3 of arduino .Video Shows the output of this project.