Introduction: Remote Controlled Robot Using Arduino and T.V. Remote

Picture of Remote Controlled Robot Using Arduino and T.V. Remote

This remote controlled car can be moved around using practically any kind of remote such as TV,AC etc.

It makes use of the fact that the remote emits IR(infrared).

This property is made use of by using an IR receiver,which is a very cheap sensor.

In this instructable you will learn how to

  1. Interface IR receiver to Arduino.
  2. Interface 2 motors to Arduino.
  3. Combine the above 2 setups.

Note:This remote controlled car has a disadvantage of not work outside in sunlight.

Note:For those of you looking to download all the code, schematics and other pictures at one place and would prefer to use GitHub ,look at the end of this instructable.

Step 1: Materials Required

  • Arduino Uno and USB cable
  • Arduino software
  • Breadboard
  • 100rpm dc motors
  • IR receiver(SM0038 or TSOP1738)
  • L293D motor driver IC
  • Jumper wires
  • Chassis and wheels
  • 9V batteries(2 nos)
  • Battery clips

Total cost of materials:Rs 600=$ 9(excluding cost of Arduino)

Step 2: Assembly

Picture of Assembly

Fix the wheels to the chassis.

Attach the 2 motors to the back wheels and use dummies for the front.

Make holes on the chassis and fix Arduino using screws.

Fix the breadboard by using the double sided tape provided on it.

Mount the L293D on the breadboard with notch facing front.

Step 3: IR Receiver Connections

Picture of IR Receiver Connections

Facing the notch on the receiver, the connections from left to right are

  • left pin-ground.
  • middle pin-5V.
  • right pin-digital pin 6 on Arduino.

Refer to the schematic for more details.

Step 4: Saving the IR Library

Picture of Saving the IR Library

Go to the following link-

Save the files within a folder named IRremote and save the folder in the libraries directory of your Arduino IDE i.e. arduino-1.0.6>libraries folder as IRremote.

Step 5: Finding Hexadecimal Values of Remote Keys

Picture of Finding Hexadecimal Values of Remote Keys

1.Upload the given code into the Arduino

2.Open the serial monitor.

3.Press different remote keys and obtain their hexadecimal values.(Note that the values will not be obtained with 0x which represents hexadecimal also some values are obtained in middle like FFFFFFFF, ignore them).

Here I have obtained the values of the front,back,left,right and middle keys which are






These values of these buttons are mapped to move front,move back,move left,move right and brake respectively.

Step 6: L293D Connections

Picture of L293D Connections

Take 5V and ground from Arduino and connect them to the 2 bottom rails of breadboard,thus giving a 5V and ground line.

Pins 1,9,16 from L293D to 5V.

Pins 4,5,12,13 from L293D to ground.

Left motor to pins 3,6 on L293D.

Right motor to pins 11,14 on L293D.

Pins 2,7(for left motor)from L293D to pins 9,8 on Arduino.

Pins 10,15(for right motor)from L293D to 10,11 pins on Arduino.

Refer to schematics for more details.

Note that in the schematic yellow wires represent left motor and orange wires right motor.

Step 7: Interfacing Motors With L293D

After making the connections,upload the code given into the Arduino.

Note that for left motor to rotate, lm,lmr should be opposite i.e HIGH and LOW or vice versa. .

Similarly for right motor to rotate, rm,rmr should be opposite i.e HIGH and LOW or vice versa.

Determine the logic levels of lm,lmr,rm,rmr for both the wheels to go forward by trial and error.

For me it was LOW,HIGH,HIGH,LOW.

Thus the inputs required to go forward are LOW,HIGH,HIGH,LOW.

Inputs required to go backward are HIGH,LOW,LOW,HIGH.

Inputs required to go right are LOW,HIGH,HIGH,HIGH(i.e. only left motor should rotate).

Inputs required to go left are HIGH,HIGH,HIGH,LOW(i.e. only right motor should rotate).

Note that values of lm,lmr,rm,rmr obtained may be different from above.

Step 8: Integrating Everything

Picture of Integrating Everything

Now integrate everything i.e. both the ir receiver part and L293D part.

The schematic given above is just a combination of schematics of IR receiver and L293D.

Basically you can first make the IR connections, find hexadecimal value and without disturbing the IR connections, make the L293D connections and interface the motors with Arduino.

Step 9: Power Supply

9V powering the Arduino with positive of battery given to vin pin of Arduino and negative given to the second ground pin of Arduino

9V for Vss supply(pin 8) of l293d which is used for driving the motors(max value that can be given is 36V)

Step 10: Final Program

Upload the code given into the Arduino(provided both IR and L293D connections have been made).

The code just like the previous schematic is just an integration of remote and motor test codes i.e. the Arduino first now checks the remote key which you have pressed by obtaining its hexadecimal value ,checks what function has been mapped to that value and performs the required function through L293D

Check if the bot moves as required or not.

Go to this repository to download the code and schematics.Click on the "Clone or Download" button (green in color on the right side) and select "Download ZIP" to download the zip file.Now extract the contents on your computer to get the code and schematics(in the schematics folder).

Step 11: How the Bot Works

Picture of How the Bot Works

Here is a video of the bot in motion.


Prompt (author)2017-11-18

Works . I have changed the board to Nano.

Arduino12345 (author)2017-10-29

i tried it, motor was to weak. u also use adafruit motor shield.

Arduino12345 (author)2017-10-29

for it to work delete the robot ir remote library

tail11 (author)2017-08-02

avrdude: ser_open (): can't set com-state for "\\.\COM33"
An error occurred while uploading the sketch

tail11 (author)2017-08-02

I get after uploading motor test program in my arduino uno. And after uploading it will it run automatically

Mitch02 (author)2017-07-20

I am getting this error message.

Could someone help ASAP please?!!!!!!

Arduino: 1.8.3 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:5:16: error: 'TKD2' was not declared in this scope

int RECV_PIN = TKD2; // the pin the IR receiver is connected to


exit status 1

Error compiling for board Arduino/Genuino Uno.

Mitch02 (author)Mitch022017-07-20

It is for the first set of code btw

Surajrana1 (author)2017-06-18

I am getting the error while entering first code. It is showing that there is no IRrmote.h file

AkhileshT6 (author)2017-03-11

u have given that two batteries are necessary for power supply but in the image three batteries are connected please help me in power supply

Fritz23 (author)2016-12-09

how to increase dc motor speed?

Technothelon02 (author)2016-11-15

Can somebody pls guide me with the power supply

Technothelon02 (author)2016-11-15

Do I have to connect two batteries to Arduino and the third to IC can you pls upload a schematic for power supply

AnshulS25 (author)2016-11-08

I need to put both +ive and -ive into pin8 of L293D to power it

Spark 241 (author)2016-10-31

So no need to power the arduino using the dc port.

HaikalA5 (author)2016-09-23

How about the steering wheels using servo motor

AdityaJ54 (author)2016-08-30

plz send the program of this project

NiKhilG56 (author)2016-08-24

where can i get the arduino code>?>

Na CoolG (author)2016-07-27

Please help me i got this error on your code

Arduino: 1.7.10 (Windows 8.1), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

rcir.ino:33:10: error: invalid suffix "F7" on integer constant

rcir.ino:49:11: error: invalid suffix "C837" on integer constant

rcir.ino:57:11: error: invalid suffix "B7" on integer constant

rcir.ino:66:10: error: invalid suffix "AB0F7B6" on integer constant

Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

karthikL1 (author)2015-12-19

here is my first arduino project
got to buy components
Hope u will help me if i get any Error
Thank you

Subhan95 (author)karthikL12015-12-20


karthikL1 (author)Subhan952015-12-22

Dude my major problem is wheels are rotating very slowly
and i have connected four 9V battery in series and supplied it to pin 8 ,but still i dont get enough speed

Subhan95 (author)karthikL12016-01-03

Don't connect 4 batteries.It may destroy the IC.As for the slow speed what is the rpm of your motors?

karthikL1 (author)Subhan952016-01-03


KarthikA12 (author)karthikL12016-06-24

u can increase the speed of the robot by increasing the diameter of the wheels...........i hope so this would work

RiccardoZ2 (author)2016-06-09

saw that was a lot hot

AbdulS36 (author)2016-01-21

I am not able to get my hexadecimal values and when I am repluging the +5 volt wire to the IR receiver the hexadecimal values are coming on the serial monitor i have also tried to change my tv remote also. Iam using Arduino UNO on Arduino 1.6.6. PLEASE HELP ME SOON>

RiccardoZ2 (author)AbdulS362016-06-09

what do you want to mean?

gtechconsults (author)2016-04-29

The dropbox link not working. Please if u can send it directly via mail. Thanks

gtechconsults (author)2016-04-29

The dropbox link not working. Please if u can send it directly via mail. Thanks

hsjunior (author)2016-04-25

hi there,

could you plz send another dropbox link.....there is nothing on this above.....or you can send directly to may email


LakvinduN (author)2016-04-09

can i use o pin for ir sensor.because there is no pin left

PratikK27 (author)2016-03-06

can i use a 433mhz rf transmitter and receiver kit to do the same setup??

woodermn (author)2016-02-13

Hi i made everything but only I need battery location. Can you say have can i connect my battery? How many volt? How many amper?

Alok Shaw (author)2016-01-12

Hey, i am making a four wheeled bot, using Adafruit dual motor shield for controlling the four motors( controlled via TV remote), but i am confused about the the power supply for the motors. My motors specifications are: 12 V , 300 RPM. What power supply(battery)should i use to get the maximum yield for the four motors? please reply soon!

kahan123 (author)2015-11-27

i have got all the decimal values but what to do now???

Subhan95 (author)kahan1232015-12-09

Decimal or hexadecimal?

kahan123 (author)2015-11-27

kindly tell me what should be written in if condition which you write in last

eidarous (author)2015-11-16

I upgraded to a pro account for that short lesson pdf ?!

fernandopurba (author)2015-09-20

it's cool, but can you upload full chematic and source code?

About This Instructable




More by Subhan95:Beginner's guide to ESP8266 and tweeting using ESP8266Gesture controlled robot using ArduinoRemote controlled robot using Arduino and T.V. remote
Add instructable to: