NRF24L01 Arduino Tutorial - Wireless Communication

preview_player
Показать описание
NRF24L01 Arduino Tutorial - Wireless Communication

in this video we will see how to use the nrf24l01 to communicate wirelessly with 2 arduino boards

first we will have an overview of the features of the nrf24l01
then we will test the module with an example code
in example 1, we will send a Hello World Message over 1 board to another

in the second example, we will control a led bulb on the uno using button on the nano,
and simultaneously control a servo motor on the nano using a joystick on the uno.

Code and Schematic Link:

the nrf24l01 is a rf transciever module, which means a single module works as both transmitter and receiver

it operates at a frequency of 2.4 ghz, which is one of the ISM band,
meaning it is open to use in most countries

the operating voltage is 1.9-3.6v, but the logic pins are 5v tolerant, so it can work with arduino

it has a baud rate or transfer rate of 250kbps to 2mbps

it has a maximum range of 100 metres, but works upto 60 metres in real conditions

it has 125 channels, meaning it can have a network of 125 transcievers at the same time

the power consumption during transmission is around 13mA

it uses SPI communication protocol

now lets see the connection

you have to connect the MOSI, MISO, SCK pins to the SPI pins of the arduino.
different arduinos have different pins for SPI. you can check the wiring diagram.

the SCN and CE pins can be connected to any digital pins of the arduino

we are using this IC socket base for the module, which has a power regulator and parallel capacitor
for safety.
you can have any input voltage in this socket base.

the last pin is an interrupt pin which is not used.

once we have connected the modules to the arduino, we can proceed to upload the code.

first we need to download the rf24 library. you can find the download link below.

we need to include the spi, nrf24l01 and rf24 libraries

we then define the ce and csn pins connected to the rf module.

and we define a 6 character address to the module, which is same of the receiver

you can find the codes in the description below.

now lets check the serial monitor to see the incoming message.

in our second example, we control a servo motor on the nano using a joystick on the uno,
and we control an led bulb on the uno with a button on the nano.

you can find the code for it in the descriotion below.

i have used my portable power supply to power the circuit as the servo consumes high current

as you can see i am able to control the servo and led.

hope you enjoyed the video. do let me know your views in the comment below.

also do check out these cool 3d Printers:

Рекомендации по теме
Комментарии
Автор

I’m in trouble. My serial monitor doesn’t show Hello World even I used this code and circuit. Could you help me pls?

hponemyat
Автор

Can i find this library on the Manage Libraries setting on the arduino IDE? If i can which one is it?

VinhPham-tdwm
Автор

This wireless module is not stable. Every few second I get transmission failure.
I use Bi-directional code to send and receive between 2 nrf24l01.

jumbo
Автор

Thanks for sharing this
Really helpful, cheers

CrazyCoupleDIY
Автор

Can you have any ideal, which change HELLO WORD to led signal in the receiver. Like Morse code

conghanhoang
Автор

i made an rc remote control tranitr&reciver using ardunio nano&nrf24l01 pa lna but not connecting TX&RX WHY?

junaidtp
Автор

Always interesting ideas to get inspiration in the Arduino community thanks for sharing.

AVAMevents
Автор

can we communicate if nrf24l01 can not get sufficient power?

TriggertechAKash
Автор

bro you ....have c4 channel transmitter and receiver code ...arduino and nrf24l01

Sunntech.
Автор

Great video superb tech, is it possible to control two arduino from one using nrf24l01 modules ?

gulshan
Автор

Good video and thanks, please could you help me out I tried to redo your tutorial but mine is not working and I don’t know
My wiring is ok
In the serial monitor I only saw : start, start, start …
I used 2xnrf 24l01 +PA
2xarduino uno powered from my desktop computer 🖥
Thanks in advance

lampfall
Автор

can anyone tell me hoe to draw the schematic diagram of the circuit and what is the platform because in thinker cad i am unable to get mega and nano and others also so can anyone help i am bagginer

jayanthpothula
welcome to shbcf.ru