Introduction: ARDUINO Based IR Remote Control Robot

Hi everyone. This my new project IR remote control robot using arduino. This is a simple design robot you can easily build it.

Step 1: Requirements:

Project requirements:

  • Arduino uno Tsop1738 (ir receiver)
  • H bridge ic (L293D)
  • Two dc motor
  • A robot base
  • 9v Battery

Step 2: Circuit Diagram

For The circuit diagram refer the bellow 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.

  • Connect arduino pin 7- l293d INPUT 1 pin 2
  • Connect arduino pin 6- 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.

First do the circuit connection shown previous and download the ir remote library file for arduino IDE. And copy the library file in the arduino libraries folder.

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. 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). the code will vary according to the remote company. Press any 5 button in remote and note down the codes shown in the serial monitor for programming purpose.

Step 4: Project Step2: Upload IR Robot Code and Play

his is the code for IR robot:
Type your 5 button s code in if else if statement in bellow code. The shown value is my remote value.

Use 5 button to control robot forward, reverse, left right and stop

#include <IRremote.h>

int RECV_PIN = 11;

int statusled = 13;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()

{

irrecv.enableIRIn();

pinMode(statusled,OUTPUT);

pinMode(7,OUTPUT);

pinMode(6,OUTPUT);

pinMode(5,OUTPUT);

pinMode(4,OUTPUT);

digitalWrite(statusled,LOW);

}

void loop() {

if (irrecv.decode(&results)) {

digitalWrite(statusled,HIGH);

irrecv.resume();

if (results.value == 0xFF50AF){ // type your remote forward robot control button hex value in underlined area.

digitalWrite(7,HIGH);

digitalWrite(6,LOW);

digitalWrite(5,HIGH);

digitalWrite(4,LOW);

}else if(results.value == 0xFF30CF){ // type your remote left robot control button hex value in underlined area.

digitalWrite(7,HIGH);

digitalWrite(6,LOW);

digitalWrite(5,LOW);

digitalWrite(4,LOW);

}

else if(results.value == 0xFFB04F){ // type your remote right robot control button hex value in underlined area.

digitalWrite(7,LOW);

digitalWrite(6,LOW);

digitalWrite(5,HIGH);

digitalWrite(4,LOW);

} else if(results.value == 0xFFD02F){ // type your remote backward robot control button hex value in underlined area.

digitalWrite(7,LOW);

digitalWrite(6,HIGH);

digitalWrite(5,LOW);

digitalWrite(4,HIGH);

}else if(results.value == 0xFF9867){ // type your remote stop robot control button hex value in underlined area.

digitalWrite(7,LOW);

digitalWrite(6,LOW);

digitalWrite(5,LOW);

digitalWrite(4,LOW);

}

}

}

That it once you upload it you are ready to go connect the robot with battery and play. I hope that you are all like my project

Thank you all