You are on page 1of 6

Step 1: Requirements

:
Project requirements:

Arduino uno

Tsop1738 (ir receiver)

H bridge ic (L293D)

Two dc motors

A robot base

9v Battery

Step 2: Circuit Diagram

For The circuit diagram refer the above device pin description and make connection to arduino based on the program of the robot: Important: connect ir receiver out to arduino digital pin 11 only.l293d INPUT 2 pin 7  Connect arduino pin 5.l293d INPUT 3 pin 10  Connect arduino pin 4.l293d INPUT 4 pin 15 Connect two motor show like above images and configure the lm293d as in image 3 above. Step 3: Project step 1: read your IR remote button value using serial monitor. . INPUT 1 pin 2  Connect arduino pin 7.l293d  Connect arduino pin 6.

And then run the arduino ide select sketch like that given bellow File -> examples->IR remote->IR recv demo Upload the sketch to arduino and open serial monitor. The code will vary according to the remote company.First circuit do the connection shown previous and download the ir remote library file for arduino IDE. And copy the library file in the arduino libraries folder. Press the TV IR remote (any company) in front of ir receiver then you will see the decode hex code in serial monitor (example : FF30CF). . Press any 5 button in remote and note down the codes shown in the serial monitor for programming purpose.

decode(&results)) { digitalWrite(statusled.OUTPUT). pinMode(5.resume(). Use 5 button to control robot forward.LOW).enableIRIn().h> int RECV_PIN = 11. digitalWrite(statusled. int statusled = 13. irrecv.HIGH). reverse.OUTPUT). The shown value is my remote value. pinMode(statusled.Step 4: Project step2: upload IR robot code and play This is the code for IR robot: Type your 5 buttons code in if else if statement in below code. . right and stop #include <IRremote.OUTPUT). } void loop() { if (irrecv.OUTPUT). pinMode(4. IRrecv irrecv(RECV_PIN).OUTPUT). decode_results results. pinMode(7. void setup() { irrecv. left. pinMode(6.

digitalWrite(6.HIGH). digitalWrite(5. digitalWrite(6. } else if(results.LOW).LOW).LOW). digitalWrite(6.value == 0xFF50AF){ // type your remote forward robot control button hex value in underlined area. digitalWrite(5.HIGH).HIGH).LOW).LOW).value == 0xFF30CF){ // type your remote left robot control button hex value in underlined area. digitalWrite(4.LOW). digitalWrite(7. digitalWrite(5.HIGH).HIGH). } else if(results.value == 0xFFB04F){ // type your remote right robot control button hex value in underlined area. digitalWrite(4.if (results. digitalWrite(5. .LOW). } else if(results. digitalWrite(4.LOW). digitalWrite(7.value == 0xFFD02F){ // type your remote backward robot control button hex value in underlined area.LOW). digitalWrite(6. digitalWrite(7.HIGH). digitalWrite(7. digitalWrite(4.LOW).

LOW).value == 0xFF9867){ // type your remote stop robot control button hex value in underlined area. digitalWrite(5. I hope that you are all like my project.LOW). digitalWrite(6. } } } That it once you upload it you are ready to go connect the robot with battery and play. . digitalWrite(7.LOW). digitalWrite(4.LOW).}else if(results.