IR - Remote Control Car

IR - Remote Control Car © GPL3+

It is the next generation of remote control cars where signal attenuation is completely out of the picture.

  • 1,297 views
  • 0 comments
  • 5 respects

Components and supplies

Necessary tools and machines

Apps and online services

About this project

Hey guys, my name is vishal balaji sivaraman, I am currently pursuing my bachelors degree in the field of ECE at Rajalakshmi Engineering College so anyways this is my second project and I have chosen the topic this time as Ir remote control car.

problem:

the reason I chose this topic is cause nowadays we see a lot of RF(Radio frequency) remote control toys but the main problem for those toys is listed below

1) no secure connection which means a car can be controlled by any RF remote

2)signal attenuation occurs when car is controlled by two RF remotes which means in simple terms the car gets confused and doesn't respond

3) RF receivers come in fixed frequencies and cannot be tuned and hence we cant avoid the above problem

Solution:

This where the Ir receiver comes to play so for this project I am using an Ir receiver TSOP1738 you guys can also use the 1838 version, it"s all the same in functionality, also the pin diagram for this component is shown below so that u guys dont accidentally shot the sensor also if sensor is shot guys then its is of NO USE

Also guys I am using a bread board in my project for better connectivity between the arduino and the sensor.I suggest u guys to do the same, if there is any loose contact sensor might not actually work as expected, I am using a motor shield for equally distributing power between the two DC motors also I suggest you guys use the motor shield as it comes with an inbuilt hit sink on top of the L2939D ic chip as we all know that ic chips are very sensitive to high voltages, temperature also if this ic chip gets cooked up then the motors wont function properly, by the way we get these L2939D ic chips separately.And at last but not the least I am using a 12 volt AA battery holder, a 9 volt battery holder and its connector. the reason I am using a 12 volt AA battery holder is cause to power the motors in any project we need a lot of power to power them up.One more thing guys after completing the connection and powering up the setup using the 12 volt AA battery holder you guys might think that it will be enough to power up the setup but the truth is that I would be enough but the batteries will drain at a faster rate I would say it would last for an half an hour or so and thats the reason why I am using a 9 volt battery and by connecting it to the arduino dc jack using the connector so that batteries drain at a rate slower than the one before and hence the setup might last for 2 hours or so.

Procedure:

first we download the or remote library file from the URL below and then we install the library file in arduino IDE

https://www.arduinolibraries.info/libraries/i-rremote - library file

installing library file in arduino IDE

Sketch>include library>Add.ZIP library>select file location >Open

and then we copy the below code and paste it in arduino IDE software and then we connect the Ir receiver to the 6th pin of arduino and then we upload this code and run it, then open serial monitor in the arduino IDE software and for each button you press on the remote we can see its equivalent hexadecimal code and we have repeat the same for 5 different buttons(forward, backward, left, right, stop) and then copy those different hexadecimal codes and paste it the main code for its equivalent function

NOTE:if an hexadecimal value for a particular function repeats itself again please do ignore that

setup:

output:

after following the above steps of finding out the equivalent hexadecimal values for 5 different buttons in remote and then we copy those different values and paste it in this code below for its equivalent function and then finish the connections as mentioned in the document and at last upload the main code with the hexadecimal values into the arduino and then power up your project, and thats it you have made your very own IR remote control car

NOTE: do not try to power your setup only with a 9 volt battery cause the lights in the Arduino and motor shield will lit up but the motors wont work as incoming voltage is too low to power them

screenshots:

Advantages:

1) cheap

2) simple circuit

3) secure connection

4) no signal attenuation even when using multiple remotes

conclusion:

Thus together we have created a cheap and advanced remote control car which we can control with only the remote it is bound to and also at the same time it eliminates all the disadvantages of RF remote control cars

FOR FURTHER QUERIES OR PROBLEMS FACED BY YOU GUYS, DO SEND A MESSAGE IN THE COMMENT SECTION BELOW AND I WILL RESPOND BACK TO YOU GUYS

MY OTHER PROJECTS:

https://www.hackster.io/vishalsivaraman5/trash-talker-0d87de - TRASH TALKER

www.hackster.io/vishalsivaraman5/smart-dustbin-using-iot-and-arduino-mega2560-1-0-c05e95 - SMART DUSTBIN USING IOT AND ARDUINO MEGA 2560

Code

ir reciever car main codeC/C++
before this follow the steps to finding out the equivalent hexadecimal values for 5 different buttons in remote and then we copy those different values and paste it in this code below for its equivalent function
#include <IRremote.h>   // including the IR remote library
#define forward  58359 // code received from forward  button
#define backward  5499  // code received from backward button
#define left  25979 // code received from left button
#define right  59295 // code received from right button
#define stop_button  15547 // code received from stop button
// Pins for first motor
int EN_A = 13;
int IN_1 = 12;
int IN_2 = 11;
// Pins for second motor
int EN_B = 8;
int IN_3 = 10;
int IN_4 = 9;
char command;
int receiver_pin = 4;   //Connect the output pin of IR receiver at pin 4
int vcc = 5;            //VCC for IR sensor
int gnd = 6;            //GND for IR sensor
IRrecv receiver(receiver_pin); //Arduino will take output of IR receiver from pin 2
decode_results output;
void setup()
{
  Serial.begin(9600);
  receiver.enableIRIn();  // Start to take the output from IR receiver
  //initializing all the pins as output pins
  pinMode(vcc, OUTPUT);
  pinMode(gnd, OUTPUT);
  pinMode(EN_A, OUTPUT);
  pinMode(EN_B, OUTPUT);
  pinMode(IN_1, OUTPUT);
  pinMode(IN_2, OUTPUT);
  pinMode(IN_3, OUTPUT);
  pinMode(IN_4, OUTPUT);
  
// Initializing ENA, ENB and vcc pin high
  digitalWrite(vcc, HIGH);
  digitalWrite(EN_A, HIGH);
  digitalWrite(EN_B, HIGH);
}
void loop() {
  if (receiver.decode(&output)) {
    unsigned int value = output.value;
    switch(value) {
     
  case forward:
      //Moving Forward
  digitalWrite(IN_1, HIGH);
  digitalWrite(IN_2, LOW); 
  digitalWrite(IN_3, LOW);
  digitalWrite(IN_4, HIGH);
          break;
       
case backward:
      //Moving backward
  digitalWrite(IN_1, LOW);
  digitalWrite(IN_2, HIGH); 
  digitalWrite(IN_3, HIGH);
  digitalWrite(IN_4, LOW);
         break;
       
case left:
       //Turning left
  digitalWrite(IN_3, LOW);
  digitalWrite(IN_4, HIGH);
          break;  
        
  case right:
        //Turning Right
  digitalWrite(IN_1, HIGH);
  digitalWrite(IN_2, LOW);
          break;
       
  case stop_button:
        //Stop
  digitalWrite(IN_1, LOW);
  digitalWrite(IN_2, LOW); 
  digitalWrite(IN_3, LOW);
  digitalWrite(IN_4, LOW);
          break;
}
    Serial.println(value);
    receiver.resume();
}
}
remote controls decoding codeC/C++
first we copy the below code and paste it in arduino IDE software and thenwe connect the ir reciever to the 6th pin of arduino and then we upload this code and run it ,then open serial monitor and for each button you press on the remote we can see its equivalent hexadecimal code and we have repeat the same for 5 different buttons(forward,backward ,left ,right ,stop) and then copy those different hexadecimal codes and paste it the main code for its equivalent function
#include <IRremote.h>

int RECV_PIN = 6;//pin 6 of arduino to data pin of ir receiver
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop()
{
  if (irrecv.decode(&results))
    {
     Serial.println(results.value, HEX);
     irrecv.resume(); // Receive the next value
          delay(1000);

    }
}

Schematics

block diagram of ir car
check the block diagram below for the connections
rei_NeLzGjx7lR.docx

Comments

Similar projects you might like

Servo Control with TV Remote Control

Project showcase by eldo85

  • 13,027 views
  • 6 comments
  • 35 respects

Rail Road Model IR Remote Control (REMOTINO NANO)

Project showcase by pautax

  • 1,348 views
  • 0 comments
  • 5 respects

IR Remote Control Car - Updated

Project tutorial by comptek4

  • 5,902 views
  • 6 comments
  • 4 respects

PlayStation Remote Controlled Wireless Car

Project showcase by Jasmeet Singh

  • 7,489 views
  • 5 comments
  • 15 respects

Bluetooth Control RC Car

Project tutorial by Techatronic

  • 4,564 views
  • 2 comments
  • 16 respects
Add projectSign up / Login