Tracked Robot IR Remote Control by Arduino

9,143

129

15

Many years ago,I had studied Dual H-bridge motor drive control by hacking cheap 4 channals toy remote control board and applied it to remote twin motors track and wheel set.Now I try to use Arduino controller with IR remote to control it again.That's also work.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Materials and Tools

1.Track and wheel set.

2.Gear box - Individual drive-two motors

3.Arduino UNO

4.Dupont wires 200mm.

5.VS1838B IR reciever.

6.Battery 5-12V.

7.IR remote (Can use also old TV remote)

8.L298N Dual H-Bridge motor drive module.

Step 2: Mechanical Assembly & Electrical Connecting

1.Assembly Track and wheel set as manual instruction.

2.Install Arduino UNO controller ,IR reciever , L298N motor drive module and battery on chassis.

3.Wiring

Arduino pins to IR reciever :

11 - IR reciever o/p signal

5V - IR reciever Vcc

GND - IR reciever ground

Arduino pins to L298N motor drive module :

10 - ENA

9 - IN1

8 - IN2

7 - IN3

6 - IN4

5 - ENB

Connect Arduino GND pin and L298N motor drive module GND.

L298N motor drive module :

Connect power o/p to Motor A and B

Connect battery to Arduino controller and L298N drive module (can use battery up to 12V.)

Step 3: Collect IR Remote Code

Use Arduino UNO IR remote button decode sketch to decode your each IR remote buttons' hexa code.You can apply any type of IR remotes TV,LCD, DVD player,etc.

(Refer to https://arduino-info.wikispaces.com/IR-RemoteContr... )

Collect each IR remote button's hexa code.We will use 7 buttons' hexa codes for main sketch.

In this instruction ,My own IR remote ,I selected :

Button 2 - forward direction - Hexa code FF18E7

Button 8 - backward direction - Hexa code FF5AA5

Button 4 - turn left direction - Hexa code FF10EF

Button 6 - turn right direction - Hexa code FF5AA5

Button 3 - rotating right direction - Hexa code FF7A85

Button 1 - rotating left direction - Hexa code FF18E7

Button 5 - stop all direction - Hexa code FF38C7

Step 4: Modify Dual H-bridge Motor Drive Control Sketch and Comply.

Download the main sketch.Before complying ,modify the 7 control buttons' hexa codes in attached sketch to be your own IR remote hexa codes.Then comply and upload it.

Test the robot is running correctly or not by pushing button as wanted direction.If :-

1.Motor turn on wrong direction - interchange power o/p of motor drive module.

2.Sleep L298N motor drive module - check GND connection between Arduino controller and motor drive module.

3.Speed of each motor can be adjusted by changing value in sub-sketch from 0-255.In the attached sketch default = 100

Thank to L298N dual H-bridge motor drive control sub-sketch from Tronixlabs.

And thank to vigneshraja for IR remote sub-sketch.

Be the First to Share

    Recommendations

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    15 Discussions

    0
    None
    TheRandomizedvidsG

    2 years ago

    Do I need to use two power sources one for Arduino board and one for the motor controller? (I am a total noob)

    1 reply
    0
    None
    nipon4666

    3 years ago

    This sketch had been run without problem.I guess you have problem with compiling error.Try to re-add IRremote library to you Arduino software from https://github.com/z3t0/Arduino-IRremote.If the errors still exist,try to delete the files that have errors.

    0
    None
    CarlosF78

    3 years ago

    I have another question, I got troubles with the IR remote control part of the sketch, could you please upload you sketch complete? please bro

    0
    None
    nipon4666

    3 years ago

    This project run with L298N no need to modify,but if you want to change pin number,it's possible.

    0
    None
    nipon4666

    3 years ago

    This project run with L298N no need to modify,but if you want to change pin number,it's possible.

    0
    None
    sanjith.tt

    3 years ago

    can i make it with l298n,if yes do i need to chang the code.

    0
    None
    CarlosF78

    3 years ago

    Great job! but does it work whit L298 Dual H-Bridge motor drive module?

    L298N_Dual_H_Bridge_DC_Stepper_Motor.jpg
    6 replies
    0
    None
    nipon4666CarlosF78

    Reply 3 years ago

    Yes,it works.It can drive step motors by leaving the small clips on enable motor A and B pins.When driving ordinary motors,take it off.And enable PWM by program.

    0
    None
    CarlosF78nipon4666

    Reply 3 years ago

    ajajja how can I be so blind? thanks a lot! but how can I enable PWM by program? I m new on the arduino world

    0
    None
    nipon4666CarlosF78

    Reply 3 years ago

    Let see the attached sketch,enA enB o/p pin 10,5.

    0
    None
    CarlosF78nipon4666

    Reply 3 years ago

    HI! well I have troubles, starting for the IR receiver stop working and I dont know why

    0
    None
    nipon4666CarlosF78

    Reply 3 years ago

    Perhap your batt out,just a joke.You can use serial monitor to see which step it stop,You can modify sketch by add serialprnt to check that it pass your point or not.For hardware you can check circuit ,there're something wrong or not.

    0
    None
    CarlosF78nipon4666

    Reply 3 years ago

    ajjaja when I read was like WTF? ok I will try, thanks for your time

    0
    None
    darth-vader1

    3 years ago

    the TV remote controlled modified car sounds amazing actually, but were do I buy the materials for the cheapest price.