Introduction: Remote Controlled Arduino Car

Picture of Remote Controlled Arduino Car
I always liked to go to camps, etc where there are a lot of my friends, I always liked having a lot of friends, and one day as I was looking up youtube for remote control cars, and how they were made, I figured out that I could make one for myself from the components I had,

Please vote for this in the Micro-controller Contest --->>>(Thanks in advance)

All I needed for this make was :

  • Arduino(20$)
  • Breadboard(3$)
  • Some Capacitors(3$)
  • Resistors 1K,10K(2$)
  • 2 Motors(10$)
  • 1 Servo(3$)
  • 1 Distance sensor (Optional)(10$)
  • 1 Sound sensor (Optional)(5$)
  • 1 Line tracking sensor (Optional)(6$)
  • LEDs(1$)
  • Jumper Cables(2$)
  • Voltage Regulators (1 for the servo)(2$)
  • Transistors((NPN)For the Motors)(2$)
  • 4 pcs 9 V batteries(8$)
  • Blue-tooth Transceiver(13$)

So the total cost for the beginners version is : 69$ with the arduino
And the total cost for the pro version is(Like the one I made with all the optional stuff) : 90$ with the arduino

Here is a video of the whole project, this is the video of the 1st mode of the project, it shows the robot communicating with the computer via USB cable and wirelessly and it shows how the shooter works.

In the code that I will provide there will be only the basic code, which is without the optional parts, if you want the code for any of the other parts, request me in the comments section and Iwill give you the code for that particular part,
In my final version, where the code is quite long, there are 4 modes

1st mode

The robot connects to the computer wirelessly via blue-tooth, and it listens to all the commands, including
(Turn Left, Turn Right, Forward, Target turn Left, Target turn Right, Shoot and more...)
The target stuff is basically, that there is a servo with an LED mounted on it, which acts as a turret as you can see in my other instructable (Star-Wars X-Wing 2)

2nd mode

This is the mode where I use a distance sensor
The distance sensor constantly give in values of how far the things in front are, and if something is close by, then the robot will stop and turn away, or go reverse.
You might like to mount the distance sensor on top of a servo, because that would give you a much wider range.

3rd mode

This is where the sound sensor takes action, When any sound above a certain level is detected as specified in the code, or if a stored tune is herd, then the robot will move accordingly to get away from the sound as much as possible, Its really easy to reverse this so that the robot comes towards you.

4th mode

This one is the line tracking mode, where the robot follows lines, I used a pre-made sensor, but you can find instructions on how to make your own, if you look up Google. In this mode there are another 2 mini modes, one is to follow a line, and the other is to stay inside a line.
One good tip is to make sure that the sensor is placed as close to the ground as possible.

You must be wondering how I switched the modes, well you could do that by using the computer, but I used a 5 way switch for the four modes and one is for off, and for the fourth mode, to switch between the mini modes, I just used a normal switch.
But after all this I realized it was very messy and would be a lot easier and better, if you changed mode from the computer, so I did that later.

There was a huge use of power as I used 4 nine volt batteries, as I had to use two for the two motors, one for the servo and one for the arduino, the servo needed a lot more current than the arduino can provide, so I had to use another power device and add a voltage regulator to it, as the servo could only handle 5V and I thought that adding a lot of 1.5V batteries increases the weight a lot, so I just used my trusty 9 V battery and the voltage regulator.
The motors had to be powered by a separate power supply because, if I connected the motors to the arduino then, there would not be enough power to connect the 3 sensors and the blue-tooth transceiver, and the motors would not go fast if I connected them to the arduino, so I used a transistor for each motor and connected it to the arduino.

And then the last step for me was to make a base for this to make it look cool, so I made a dome sort of thing to cover the entire robot and it looks really cool, you can make any kind of dome you like.

Here is the main code for this robot, but if you want the code for the optional parts then just ask in the comments section :

#include Servo.h

int LedPin1 = 12;
int LedPin = 13;
int MotorPin1 = 9;
int MotorPin2 = 10;
int servoPin = 6;

Servo VishalServo;

void setup()
digitalWrite(LedPin, HIGH);
Serial.println(Robotic tank);
pinMode(LedPin, OUTPUT);
pinMode(LedPin1, OUTPUT);
pinMode(MotorPin1, OUTPUT);
pinMode(MotorPin2, OUTPUT);
Serial.println(Wait for 1 second);
Serial.println(You can now give commands);

void loop()
while (Serial.available() == 0);
int val = - '0';

int i =;

if (val == 2)
Serial.println(Robot is On);
digitalWrite(MotorPin1, HIGH);
digitalWrite(MotorPin2, HIGH);
delay (500);
digitalWrite(MotorPin1, LOW);
digitalWrite(MotorPin2, LOW);

if (val == 1)
Serial.println(Robot is turning left);
digitalWrite(MotorPin2, HIGH);
digitalWrite(MotorPin2, LOW);

if (val == 3)
Serial.println(Robot is turning right);
digitalWrite(MotorPin1, HIGH);
digitalWrite(MotorPin1, LOW);

if (val == 9)
Serial.println(Turning right);

if (val == 7)
Serial.println(Turning left);

if (i = 165)

if(i = 165)

if (val == 5)
digitalWrite(LedPin1, HIGH);
digitalWrite(LedPin1, LOW);

if (val == 8)



This is the code for only the first method as I consider this as the basic / main part of this robot.
If you want the led to stay longer just change the delay between LED pin1 HIGH and LED pin 1 LOW.(Or you might just ask me to do that if you think its too hard or if you are a beginner.

And make sure that the servo is connected to a PWM enabled pin, I used pin 6(PWM means Pulse Width Modulation)

Here is the code you need to use in processing(Its a program that programs the computer)(You can download it for free from the internet, just type in processing and the first link is the one)This code is used to post updates to twitter saying what your robot is doing when you give it commands :

* based on:

import processing.serial.*;

Serial myPort; // The serial port
PFont myFont; // The display font
String inString; // Input string from serial port
int lf = 10; // ASCII linefeed

Twitter twitter; // Twitter

//Going to get oAuth working instead of this, but this will do for now
String username = "YOUR-TWITTER-USERNAME"; // you Twitter Username Here
String password = "YOUR-TWITTER-PASSWORD"; // your Twitter Password Here

void setup() {
twitter = new Twitter(username,password);
myFont = loadFont("AppleGothic-48.vlw");
textFont(myFont, 18);
myPort = new Serial(this, Serial.list()[0], 9600);
myPort.bufferUntil(lf); //wiat for line feed to specify end of serial buffer

void draw() {
text("color selected: " + inString, 10,50);

void serialEvent(Serial p) {
inString = p.readString();//read serial string
//For some reason this only wanted to work in a try catch
Status status1 = twitter.updateStatus("Arduino's favorite color is "+inString);//update twitter status
catch( TwitterException e) {

Change username and password with your twitter username and password, I tried it and it works perfectly.
If you want to post updates to an application on twitter go and have a look at my other instructable :

This is the code for using the ultrasonic range finder instead of a distance sensor, like I did  : )

int blinkLed=13; // Where the led will blink
int sensorPin=0; // Analog Pin In
int sum=0; // Variable to calculate SUM
int avgrange=50; // Quantity of values to average
int sensorValue; // Value for te average
int i,media,d; // Variables
float cm,inch; // Converted to cm

void setup()
Serial.begin(9600); // To check what is being read on the Serial Port

void loop() {

d=analogRead(sensorPin); // Read the analog value
digitalWrite(blinkLed,HIGH); // Turn on LED
delay(d); // Delay changes with the analogread
digitalWrite(13,LOW); // Turn off LED
delay(d); // Another delay

cm = (d / 2) * 2.4; // Convert the value to centimeters
inch = d/2; // Value in inches

Serial.println(cm); //Print average of all measured values

// This is the code if you want to make an average of the read values


for(i = 0; i < avgrange ; i++) {

media = sum/avgrange;
Serial.println(media); //Print average of all measured values




If you want the schematic for this project, or if you want specific code for different things or if you need help related to this project, then just leave a comment in the comments section, or if you want more details on how to connect any of the below, please ask.

And if you want this to run with commands from remote, all you need to do is use this infrared remote and you can control the whole robot wirelessly with a remote, or if you want it to be more like a remote control car, then you can add an actual remote control car controller or any game-pad for pc, links below...

Infrared Remote :

RC remote :

Steering Wheel :

I made my own dome for this project which fits on top of all the mess and makes the RC Car look like an RC car, but I didn't add any pictures of the dome as I would like you people to make your own personalized domes, and not just copy me...

And of course you can expand upon this project, and if you make something cool share a picture of it by adding a picture while posting a comment, as I would like to see how this instructable has inspired you people to come up with something great.

Links :

Arduino :

LEDs :

Motors :

Servo :

Where to download the Arduino IDE :
Where to download Processing :

I really didn't like the interface of the Arduino as you had to click enter after entering each and every command, so I used putty

Where to download Putty :

Sorry about some blurry pictures... :(


JonathanR246 (author)2017-11-21

Hey, vishalapr. Could you send me the circuit diagram and the code for the computer controlled mode, the ultrasonic sensor, and the sound sensor? My email is

Owen2 (author)2017-11-05

Hi. Impressive stuff!! I really need your help to make the arduino car move in the pattern of an 8. Please help me out with the code for that. you can contact me by email: chanda.o.kasongo@gmail.ocm

ARBS1 (author)2017-04-15

Bro give me the circuit diagram plz

SaedS (author)2017-03-03

Hey everyone,

If you are looking for a fully assembled Arduino car (you don't have to assemble it at all), which includes all of the code for it to move and instructions on how to use it, program it, and develop it -

go to:

muaaz1 (author)2017-01-30

Can you send the schematics and code for driving with the ultra sonic sensor?

thank you in advance

maxxluvnlf (author)2017-01-27

This is very interesting. Can you send the schematics for driving with the ultra sonic sensor?

KarthikP32 (author)2017-01-26

I like this project and have developed an interest in doing it. Can you please help me out by sending me the circuit diagram of the project?
My email is-

GauriB5 (author)2017-01-19

Hello sir I m beginner we r making a robot which has wheels . I need a code for car robot which can move forward, reverse, left and right

AaviD (author)2017-01-18

Can u send me the schematics. Thanks.

JuanG228 (author)2017-01-04

Hey man! Could you send me the schematic for this at ?

Jbbtect22614 (author)2016-12-04

Hey can you please send me the circuit diagram of your project? Thanks in advance.

moh123fm (author)2016-11-21


i like your project. Can you send me the code and circuit at please?

milly131 (author)2016-11-21

hey, I know this is a few years later but could you send me the circuit diagram? I'd like to try this, really looks cool! at

thanks a lot in advance!

SunnyK45 (author)2016-10-03

can you send me circuit for

Willemsp (author)2016-09-24

Can you please send an email with the circuit diagram? Nice work!!

Willemsp (author)Willemsp2016-09-24

my email adress is

LeongL3 (author)2016-09-03

Nice work, but it will be better to have a circuit diagram, can u please mail it to Appreciate that

VamsiK51 (author)2016-07-04

hai i need a circuit diagram about this project..please mail me the below email address please,

Marcelo H (author)2016-06-03

plz send me the 1 module, the diagram of the circuiting?

contact me by this email

matthew rhude (author)2016-04-24

Hey! I'm making something similar to this for class, could you send a diagram of the circuiting to please? I would like to know more about what I need for the project and also how they work.


NujV (author)2016-04-20

Hey! Can I ask for a circuit diagram for this? Just email me via

Great work btw!

NujV (author)NujV2016-04-20

I meant, a schematic diagram? :D

yohann1 (author)2016-02-19

can you put how you build it please?

martc17 (author)2016-02-12

Hello, can you please send me the circuit diagram and the code for it with the distance detector. Thank you.


ethansp123 (author)2016-02-09

sketch_feb09a.ino: In function 'void setup()':
sketch_feb09a:16: error: expected ')' before 'tank'
sketch_feb09a:23: error: 'Wait' was not declared in this scope
sketch_feb09a:25: error: 'You' was not declared in this scope
sketch_feb09a.ino: In function 'void loop()':
sketch_feb09a:37: error: 'Robot' was not declared in this scope
sketch_feb09a:48: error: 'Robot' was not declared in this scope
sketch_feb09a:57: error: 'Robot' was not declared in this scope
sketch_feb09a:66: error: 'Turning' was not declared in this scope
sketch_feb09a:73: error: 'Turning' was not declared in this scope
sketch_feb09a:89: error: 'Shoot' was not declared in this scope
sketch_feb09a:98: error: 'Centering' was not declared in this scope
expected ')' before 'tank'

IsraF (author)2016-01-11

Hi.. It is awesome... I need the circuit diagram for connecting .. Plz help me with this

IsraF (author)2016-01-11

Hi.. It is awesome... I need the circuit diagram for connecting .. Plz help me with this

DanielleL14 (author)2015-11-19

hi! I want to make something similar like this for my engineering class project. the only thing is I don't know where to begin. Do you happen to have the schematics or the steps to creating this? I don't know where to connect any wires or anything like that. Please help!

WILL_STEF (author)2015-02-15


i know this is three years later but im hoping you can still anser my qustions. i am making a small buggy with a servo to steer instead of two motors. i got to the point where i uploaded yyour code and the servo would turn, but not stop, and the motor would turn, but not stop. i wasent sure what type of transister and resistor i was suposto use. i decided to re upload your program, but an error came up, so i re coped and pasted it. no about 20 errors come up when i try to verify it

car.ino:2:10: error: #include expects "FILENAME" or <FILENAME>

car.ino:10:1: error: 'Servo' does not name a type

car.ino: In function 'void setup()':

car.ino:16:16: error: 'Robotic' was not declared in this scope

car.ino:21:1: error: 'VishalServo' was not declared in this scope

car.ino:23:16: error: 'Wait' was not declared in this scope

car.ino:25:16: error: 'You' was not declared in this scope

car.ino: In function 'void loop()':

car.ino:33:9: error: 'VishalServo' was not declared in this scope

car.ino:37:16: error: 'Robot' was not declared in this scope

car.ino:48:16: error: 'Robot' was not declared in this scope

car.ino:57:16: error: 'Robot' was not declared in this scope

car.ino:66:16: error: 'Turning' was not declared in this scope

car.ino:73:16: error: 'Turning' was not declared in this scope

car.ino:89:16: error: 'Shoot' was not declared in this scope

car.ino:98:16: error: 'Centering' was not declared in this scope

Error compiling.

please help

Jacob_Ganzon (author)WILL_STEF2015-11-09

Hello WILL_STEF this is the solution to your problem.

add <> for example:
#include <Servo.h>

for all the errors in the Serial.print or Serial.println

enclose it with this "" for example:

Seria.println ("Robotic Tank") or Serial.println ("Centering")

for the VishalServo error - make sure it is set as a variable in the start. It has to be an int, const, or const int.

if you are using Servos and it would not stop spinning add an update program for your Servos at the very bottom of your code. This will reset your Servos before it repeats the void loop.

sir, i also wanted to know if you can send me your code. I have been working on mine for almost a month and i am not done YET. That is why i need your help.

hope you see this

Sandeep sanzs (author)2015-10-02

Respected sir, i need a arduino program which i can used to control a car through my laptop keyboard. I hope u see this message

If u see this message
Plz sent the code to my email
Thank you sir

JayyM1 (author)2015-05-17

Respected sir, I loved your project. Just needed the schematic diagram. So please help me with that.

Tahan2 (author)2015-04-06

Hi, I would like to do this project for a class, could you please send me the instructions for building the car? Thank you!

thecerealkillers (author)2015-01-29

Can you send me the instructions to build the rc car please? Thank you

jascoleman (author)2015-01-06

Can you please send me the schematic for this project? I can really see the wiring configuration from the pictures.


kiran.ahmad.98 (author)2015-01-06

Hi, I would like to do this project with a class, could you please send me the instructions for building the car? Thanks!

surbina diaz (author)2014-07-23

Hey vishalapr, I liked your project and would like to build it myself. Could you please send me the instructions for the project so i can get started.

balaji_rk (author)2014-04-19

Awesome project friend!! Mindblown!! :)

lalittell (author)2013-10-28

hello my 12 year old wants to make this for a students involved with technology conference. he is interested in doing all of the modes. could you post all the code? thanks!

arduinoguy (author)2013-01-01

Added to comment I made below: Also do you have a schematic I could see? Thanks

arduinoguy (author)2013-01-01

I am going to be building something very similar to this one you made. So am I correct that the first code you listed is the one for the computer controlled version of it? I am not planning to use the optional things like the distance sensor. Also for my arduino, what Bluetooth transceiver should I use? Do you have an updated link to where I could find one? I am using the arduino uno R3. Thanks a lot!

mddulek (author)2012-03-10

I am in the middle of building this for a school project, and am STUCK! We're using all the correct materials listed except for:
1) we haven't put in Voltage Regulators yet as we don't know what kind to get

2) what kinds of capacitors to use

3)But the main issue is that our servo is actually built into our motor, so that's the only position where our model is different thus far. We're trying to test the motor out (we're as far as plugging in the resistors and transistors) and we used the EXACT code shown here on the site (for MODE #1)...but since our servo is built into the motor, is there something we should change in the code?

Also, for the LED, are we supposed to have code to make it the LED flash on and off? And if so, could you be just a bit more specific with how it would through the use of the code?

Please help as this is a project due by MARCH 13/14 2012 and we could really use some guidance, we've hit a wall and would love to continue to what you have for your result.
Thank you

vishalapr (author)mddulek2012-03-10

You can get variable voltage regulators, so that the middle pin can be attached to the voltage required, in this case hook it up to the 5V line on the arduino as you want to regulate the 9V battery to a 5V suitable for the project.

The capacitors depend on what kinds of motors you are using, so if you give me the datasheet of your motor or where you bought it, then I can guide you with the capacitors, but remember, the diodes and capacitors are only needed to remove the noise and spikes from the motors...

I don't understand what you mean the servo is built into the motor, do you mean the same motor works as both a servo and a normal motor, or is it just a normal motor with a servo attached on top it with glue?

If you are talking about the LED that is on the servo, then yes you should have it flash but if you want it to be more of a pulsar bean kind of weapon, then you can flash it and then fade it off, but its a little more complex and you need to use a PWM pin for it.
This part of the code is for the LED on top of the servo:
if (val == 5)
{Serial.println(Shoot); It pritns shoot onto the screen
digitalWrite(LedPin1, HIGH); I turns the LED on
delay(50); for 50 milliseconds
digitalWrite(LedPin1, LOW); turns the LED off
delay(5);} delays 5 milliseconds, it is always a good idea to use this type of delays so that everything is smooth and does not interfere with other commands..

bebo82 (author)2012-02-18

Really nice project
I update your code (I added to new outputs pin-11, pin-8 and a new input key-4)to use a RC tank; I remove all the factory circuit and Installed an H-bridge to move forward and backwards.
I’m new writing code or using arduinos, so I need some advise how to send the data to the tank without having to press enter all the time. I’m using the arduino serial port, for example if I press the 2 to move forward, 3 to turn to the right and 5 to shoot the LED then I have to press enter.

vishalapr (author)bebo822012-02-18

Nice! This was just suposed to be a prototype...but then I decided not to make a tank but to make a mini robot I am working on it now :)

Download "putty.exe"
from online, and then you can open it, select serial port and then you can just type in commands without enter :) Its like the arduino serial screen but without pressing enter

kai_311 (author)2011-09-24

That is so awesome... Would you mind sharing your schematic and the codes for making it work wireless. Thanks! 5 stars.

vishalapr (author)kai_3112011-09-24

The bluetooth transceiver is just like a replacement to the USB wire, since it has a TX, RX, 5V and a Gnd so once you connect them, its basically like a wireless USB cord!

You do not have to change the code at all!
You just need to set putty to the "COM PORT" that the bluetooth transceiver is connected to!

vishalapr (author)kai_3112011-09-24

It hasa been a long time since I made the wireless bluetooth transceiver, but now I don't quite remember what the schematics are, but you caan buy a premade one at this website for 12$ or something like that...

I made mine for less than 5$ but I really don't remember the schematic, I will try to remember it and as soon as I remember I will post a schematic!
But the above is 99% similar to the one I soldered together will work just fine!

kylekosan23 (author)2011-07-26

thats soo kool u should add like a cockpit to put like a lego dude in there

vishalapr (author)kylekosan232011-07-26

Thats actually quite a good idea!

About This Instructable




Bio: A programming enthusiast. I tinker around with everything I see and love to game.
More by vishalapr:Diffused Glue Stick LampATtiny85 POV DisplayArtoo [R2] (ATtiny2313 Wall Avoiding Robot)
Add instructable to: