Introduction: Tracked Robot IR Remote Control by Arduino

Picture of Tracked Robot IR Remote Control by Arduino

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.

Step 1: Materials and Tools

Picture of 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

Picture of 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.

Picture of 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.

Comments

TheRandomizedvidsG (author)2017-04-01

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

It's just use 5V supply at L298N module.See circuit diagram.

nipon4666 (author)2016-06-04

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.

CarlosF78 (author)2016-06-03

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

nipon4666 (author)2016-04-01

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

nipon4666 (author)2016-04-01

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

sanjith.tt (author)2016-04-01

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

CarlosF78 (author)2016-03-09

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

nipon4666 (author)CarlosF782016-03-09

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.

CarlosF78 (author)nipon46662016-03-10

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

nipon4666 (author)CarlosF782016-03-10

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

CarlosF78 (author)nipon46662016-03-28

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

nipon4666 (author)CarlosF782016-03-30

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.

CarlosF78 (author)nipon46662016-03-30

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

darth-vader1 (author)2015-12-31

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

About This Instructable

7,422views

128favorites

License:

More by nipon4666:How to Build 8 Channel Transmitter nrf24l01 ArduinoHow to Control Tracked Robot Via 3-Channel RC Transmitter + ArduinoHow to Control Tracked Robot Via Joystick NRF24L01 Module Arduino Part2 Rx
Add instructable to: