Tracked Robot IR Remote Control by Arduino

7,602

128

16

Posted

Introduction: 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

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.

Share

Recommendations

  • Epilog Challenge 9

    Epilog Challenge 9
  • First Time Author Contest 2018

    First Time Author Contest 2018
  • Paper Contest 2018

    Paper Contest 2018
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

15 Comments

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.

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.

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

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

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

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

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

L298N_Dual_H_Bridge_DC_Stepper_Motor.jpg

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.

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