Introduction: RF Control System for R/C Vehicle Based on Arduino and NRF24L01

Picture of RF Control System for R/C Vehicle Based on Arduino and NRF24L01

The aim of this project is to build a transmitter and a receiver by using a cheap and easy to use component such as Arduino UNO, Arduino Nano, and nRF24L01 transceiver. This project is a simple and easy to implement and can be a good start point for beginners.

Step 1: ​What You Will Need:

Step 2: Connect the NRF24L01 Module

Picture of Connect the NRF24L01 Module

these connections are applied for both, The transmitter and the receiver

Step 3: Connect the Joystick and the LED to the Transmitter

Picture of Connect the Joystick and the LED to the Transmitter

And connect the LED as following:

  • LED+ --> Arduino Nano D2 pin
  • LED- --> Arduino Nano GND
  • 2k2 Resistor --> LED+

Step 4: Connect the ESC and the Servo to the Receiver Board

Picture of Connect the ESC and the Servo to the Receiver Board

IMORTANT NOTE: if you have a similar ESC Never connect the ESC’s red wire to the Arduinoboard because it may damage it

Step 5: Power Source

Picture of Power Source

  • I've attached this header to the battery -as shown in picture- in order to deliver a power to the Arduino on the receiver side, or you can use a separated battery for the Arduino board.
  • for the transmitter you can use any power source as you wish

Step 6: Programming the Arduinos

  1. Download the RF24 Library from here
  2. The sketch is available at github and it is full commented, or you can download it from the attachments.

Step 7: Video and Pictures

Enjoy It!

And please vote for me ?

Comments

md arif uddin (author)2016-12-11

Ygy

mujahed1987 (author)2016-12-10

Hi All,

I am sorry for not answering your questions, I am very busy nowadays. I am planning in the future to relaunch this project in version two and do it using a communication protocol to make it more stable, also I have to update the code so it works with new nrf24l01 library updates. Thanks for your understanding my situation. I'll come back soon

remaa (author)2016-08-24

hi sir, i have to control the robot car project. Where the rear wheels in the form of a dc motor is controlled with flex sensors and front wheels in the form of a servo motor controlled by the accelerometer sensor. Robot controller with a car connected with nrf24l01. if one of the sensors to control I can. but if it combines both to control I can not. Both sensors transmit data simultaneously . dc motors and servo motors confused receive data so that its movement is chaotic. How should I fix this? can you help me.? Can I send my program to you and you see.? Please. My email: rema_adhe@yahoo.com

rpangga (author)remaa2016-12-09

ntap

panto52 (author)2016-11-29

Hello Mujahed, nice work!

I'm starting out with Arduino, but always passionate rc model.

I wanted to ask if you can edit your listings for running two joystick and four servants.

Thank you

LeonS66 (author)2016-11-25

Hey mujahed, nice work!

I have a little question, the code for te receiver does not compile in my case?

In the while loop on the botoom is the failure:

" done = radio.read( received_data, num_received_data );

exit status 1

void value not ignored as it ought to be"

What does the function radio.read give back? Does it get a boolean type?

Thanks for your help,

Leon

LeonS66 (author)LeonS662016-11-25

Okay found the problem.

You have to definetly use the library linked in part 6.

The Library from the repo in ArduinoIDE will not work!

moiseslimacosta1 (author)2016-09-21

yes i vote in YOU,

mujahed1987

4

President

Nice work. ;-)

JamesW342 (author)2016-06-20

The Code for the ESC will work with Unbranded brushless ESC's

mujahed1987 (author)JamesW3422016-06-21

thank you for your not
but as in my part list
the ESC that I was working with is this one
http://www.ebay.com/sch/i.html?_kw=03018+ESC+SPEED+CONTROLLER+HSP
and I can not confirm that if it could work with others

JamesW342 (author)mujahed19872016-09-11

What i meant was I got it working with Modification Using this brushless ESC

http://www.ebay.com/itm/3650-4370KV-4P-Sensorless-Motor-with-45A-Brushless-ESC-for-1-10-RC-Car-US-W4K8-/361703223694?hash=item543731318e:g:GMIAAOSweWVXdzRN

JurisP1 (author)2016-09-08

Hello! Nice project You have here! I think I am gonna to try it, I love to modify RC stuff and experiment. I wonder, would it be hard to add several buttons on remote? To control lights on car, and other possible uses? Thanks!

AhmetY5 (author)2016-03-09

Hi.project for thanks.

What should I do rc car to go more slowly.

JodyK5 (author)2015-12-08

void value not ignored as it ought to be

"done = radio.read( received_data, num_received_data );"

// Fetch the payload, and see if this was the last one.
done = radio.read( received_data, num_received_data );
ESC_value=received_data[0]*10; //Multiplication by 10 because the ESC operates for vlues around 1500 and the nRF24L01 can transmit maximum of 255 per packet
esc.writeMicroseconds(ESC_value);
// Serial.println(ESC_value);
mujahed1987 (author)JodyK52015-12-08

you maybe not installed and included the nRF24 library
you can download it from here https://codeload.github.com/maniacbug/RF24/zip/master

please confirm if you did, or paste the full code if you wrote your own and if you used my code please describe the steps you did

zwiky (author)mujahed19872016-02-09

Hi,

I have the same problem than Jodyk5 and abhilesh. I had installed the nrf24 library.

Have you a solution for this problem ?

thanks

MR MJ (author)2016-01-07

What type of servo is needed, digital or analog?

EleCtROniX GeNiuS (author)2015-12-12

Your project is awesome but I have a small doubt:Will the 2 nrf24l01 modules will connect to each other when powered using an arduino or we have to setup it using a computer every time we power it ??

ofcourse if you declare the same address
watch my video for more!

JodyK5 (author)2015-12-09

thank you is already working.

so..... whether working with ps2 controller...?

abhilesh (author)2015-10-23

i keep coming across this error in void function"void loop",void value not ignored as it ought to be...??pls let me know if u can...

mujahed1987 (author)abhilesh2015-10-24

Can you add a screen shot so it help me to understand the error more precisely

GUitartexan (author)2015-09-27

hello.

You are very helpful to this community.

I am using Arduino nano boards with nrf24l01 and a potentiometer to control a servo. I am not using an ESC. Do I just delete the ESC lines and substitute "potentiometer" for "joystick"?

mujahed1987 (author)GUitartexan2015-09-29

Hello,
Yes you are right and you are very welcome for your comment

KubilayY (author)2015-08-26

Hello, I'm collecting the materials. the ESC that you use 320A. If I buy Gartt20A that would be okay?

mujahed1987 (author)KubilayY2015-08-26

Hi,

The Gartt20A ESC is for the brushless motor so:
1- it is not compatible with the brushed motor as the one in my project. You have to buy a brushless motor or look for a brushed-motor-ESC
2- I can't tell if the code will work with this model, you have to search and try by your self

Please keep us with updates.

Regards,
Mujahed

KubilayY (author)mujahed19872015-08-29

Thanks another question. Is 7.4 V 1500 mAh would be problem?

mujahed1987 (author)KubilayY2015-08-29

No problem but the battery capacity is slightly less what makes it executed a little faster

KubilayY (author)mujahed19872015-09-10

Hi again, when I was collecting the materials, I've opened a topic in one of the electronic forums. They said you can't use ESC with servo motors you should use servo motor control circuit what made me really confused now.

matstermind (author)2015-09-07

Thanks for the instructable. I just built it and it works, however the transmission is "pulsed". If I tell it to steer slowly the servo updates its position every second(ish) instead of a constant turning. Is there a way to speed up the data transfer, or is there something else going on?

Thanks!

mujahed1987 (author)matstermind2015-09-07

Hi,

You are welcome.

In the code I wrote the data are transmitted continuously without any delay. You have to check your code if you made any changes.

matstermind (author)mujahed19872015-09-07

Found the problem, transmitter batteries were almost dead :P

matstermind (author)mujahed19872015-09-07

Thanks for the reply, but I did not make any changes

saifooon made it! (author)2015-07-23

I made it but have an issue
I'm just connecting 1servo with no esc
but the servo moved until I changed its direction fast for about 3 to 6 times then its stop responding
I must push resets button to make it wark again .
can u help me ?

mujahed1987 (author)saifooon2015-07-26

Have you made any changes on the code? If yes, let me see your code please

alys5 (author)2015-06-09

hello nice instructable (would there be a place in the reciver for 4 small dc motor that I can control them with pwm and direction and place for the nrf24l01 but this project I don't need the servo and the esc )((btw my reciver is a arduino uno r3 )) thanks for advance

mujahed1987 (author)alys52015-06-09

Hello
Thank you for compliment.
The arduino UNO has 6 PWM output pins
The nRF24 module uses 2 of them (pin 10 and pin 11)
The remaining is 4 PWM output pins which can be used to connect your 4 motors.
I have to remind that you must use a suitable way to control the motors (for example a H-bridge motor controller ) so you the arduino will not be damaged

alys5 (author)mujahed19872015-06-11

thanks you so much for your help but I have only one last question what do you think Is better in range and data sending and reciving quality nrf24 or rf 315 module (thanks for help your a great man)

joln (author)2015-05-20

Hello ! Nice project, thanks for sharing

would it be possible to do this with 2 nano ?

by the way, I have read somewhere that the nano wasn't able to provide the 3.3 v when powered externally, is that true ?

Thanks

mujahed1987 (author)joln2015-05-20

Hello,

would it be possible to do this with 2 nano ?

Sure you can.

by the way, I have read somewhere that the nano wasn't able to provide the 3.3 v when powered externally, is that true ?

No, that is Not true, it will provide the 3.3v see the attached images with this comment. I did this experiment right now

joln (author)mujahed19872015-05-21

ok thanks for your response,

maybe the 3.3v bug is only present on chinese clone that work with CH340G chip

is your nano an official or chinese ?

joln (author)joln2015-05-23

edit: I have received my chinese nano today, and the 3.3v output workeven on external source

link of my nano :

http://www.banggood.com/ATmega328P-Arduino-Compatible-Nano-V3-Improved-Version-With-USB-Cable-p-933647.html

aditya jindal (author)2015-05-16

i want to connect two joystics on the transmitter side and 4 servos and esc on the receiver side. how can i do it?

this addition need a lot of work. send me a private message if you are really interested

Where do i send u a private message. Thanks

88festivasam (author)2015-04-17

hi, how hard would it be to modify this project to use 2 drive motors and just reverse polarity for turning? also i would like to use 2 joysticks one for each motor. kind of like tank controls or a zero turn mower

mujahed1987 (author)88festivasam2015-04-18

hi, I can not say it is hard or easy because it depends on the person knowledge for me it is easy for another it may be much harder.

Technically to use two drive motors you have to remove the part which is responsible about the steering-servo, then to duplicate that part of moving the car forward/backward.

MOSAB NIROUKH (author)2015-04-16

hugh.armstrong.104 (author)2015-02-17

Thank you for the instructions, I will let you know how it turns out, Please keep up providing this kind of instruction and information'

About This Instructable

68,675views

138favorites

License:

More by mujahed1987:RF Control System For R/C Vehicle Based On Arduino And nRF24L01
Add instructable to: