page contents Verification: 3e521cb8638cc050

How to control Car from Tv Remote control

Hello Friends and welcome to my blog.
     In this blog, you will learn how to make a TV IR remote control Car. To fully understand this project first you need to study my previous blog “How to control LEDs from TV IR remotecontrol” . Because of this project, you need to learn.
 1: How to Use IR sensor with Arduino, Download Library of IR sensor and use them.
 2: How to take the HEX code from Remote control.
 3: How to put those Hex codes in your code.
    After learning these topics. we need to modify our code a little bit and add some circuits to our project. The components that will be needed for this project are.

Components :

   1: Arduino Uno, 2: IR Receiver Module Sensor, 3: TV remote control, 4: Old RC Car we need the wheels and motors to move forward, reverse, left and right. 52.5A Dual Channel DC Motor Driver PWM MiniModule / l298n Motors control module , 5: 9 Volts battery ,  6: 4.8 volt battery, 7: 9V battery snap power cable to DC 9V clip male line battery adapter for Arduino UNO R3,   8: Jumper wires (male to female and male to male)
How to control Car from Tv Remote control arduino projects
 
 2.5A Dual Channel DC Motor Driver PWM Mini Module:
 
 
 

Circuit diagram :

 
How to control Car from Tv Remote control arduino project
 

Sketch :

 
#include “IRremote.h”
//Declare Constants
int receiver = 11; // pin 1 of IR receiver to Arduino digital pin 11
//Declare objects
IRrecv irrecv(receiver);           // create instance of ‘irrecv’
decode_results results;             // create instance of ‘decode_results’
    //Declare Variables 
   int fspeed = 160;                            // Motor speed
    
int ML = 10;
int MRT = 9;
int MF = 6;
int MR = 5;
 
void setup()   // SETUP: RUN ONLY ONCE
{
  Serial.begin(9600);
  Serial.println(“IR Receiver Raw Data + Button Decode Test”);
  irrecv.enableIRIn();            // Start the receiver
   pinMode(ML, OUTPUT);        //Car Left
   pinMode(MRT, OUTPUT);      //Car Right
   pinMode(MF, OUTPUT);         //Car Forward
   pinMode(MR, OUTPUT);        //Car Reverse
 }         //(end setup )
void loop()   //( LOOP: RUNS CONSTANTLY )
{
  if (irrecv.decode(&results)) // have we received an IR signal?
{
    translateIR();
    irrecv.resume(); // receive the next value
  }
}      //(end main loop )
 
   //Declare User-written Functions )
void translateIR() // takes action based on IR code received
 
{
switch(results.value)
{
   case 0xEF807F:     //1
         digitalWrite(ML, HIGH);              // Turn left for 1 sec
        Serial.println(“Left”);
        digitalWrite(MRT, LOW);
       delay(1000);
       digitalWrite(ML, LOW);
       delay(500);
       break;
 
   case 0xEF40BF:    //2
          digitalWrite(ML, LOW);
          Serial.println(“STOP”);
          digitalWrite(MRT, LOW);
          delay(1000);
          break;
    
     
     case 0xEFC03F:  //3            // Turn right for 1 sec
          digitalWrite(ML, LOW);
          Serial.println(“Right”);
          digitalWrite(MRT, HIGH);
          delay(1000);
          digitalWrite(MRT, LOW);
          delay(500);
          break;
     
     case 0xEF20DF:   //4
         analogWrite(MF, fspeed);      // low speed  Forward
         Serial.println(“Forward”);
         digitalWrite(MR, LOW);
          delay(500);
          break;
     
  case 0xEFA05F:  //5
        digitalWrite(MF, LOW);
        Serial.println(“Stop”);
        digitalWrite(MR, LOW);
        delay(500);
        break;
     
  case 0xEF609F:   //6
        analogWrite(MR, fspeed);
        digitalWrite(MF, LOW);       
        Serial.println(“Reverse”);
        delay(500);
        break;
     
  case 0xEFE01F:   //7
      digitalWrite(ML, HIGH);
      Serial.println(“right Turning “);
      digitalWrite(MRT, LOW);
      delay(500);
      break;
     
  case 0xEF10EF:   //8
         digitalWrite(ML, LOW);
         Serial.println(“Left Turning”);
         digitalWrite(MRT, HIGH);
         delay(500);
         break;
     
  case 0xEF08F7:   //volume up
        digitalWrite(ML, HIGH);   //Full speed forward
        Serial.println(“Full speed forward “);
        digitalWrite(MRT, LOW);
        delay(500);
        break;
     
  case 0xEFF00F:   //volume down
        digitalWrite(ML, LOW);   //full speed reverse
        Serial.println(“Full speed reverse “);
        digitalWrite(MRT, HIGH);
        delay(500);
        break;
 
 default:
     Serial.println(” other button   “);
   }
     delay(500);
}

Project Images :

How to control Car from Tv Remote control
How to control Car from Tv Remote control arduino projects
Arduino project

 

                         Watch Video Tutorial:

Hello, Friends, My name is Mohsin Habib and I am an Electrical Engineer. I have Experience In Circuit Designing, Arduino Projects, PLC’s Projects, HMI Designing, Networking and much more. I have done lots of projects in Arduino.

2 thoughts on “How to control Car from Tv Remote control

  1. I know this if off topic but I’m looking into starting my own weblog and was curious what all is needed to get set up? I’m assuming having a blog like yours would cost a pretty penny? I’m not very web savvy so I’m not 100 certain. Any tips or advice would be greatly appreciated. Appreciate it

Leave a Reply

Your email address will not be published. Required fields are marked *