Here i'm going to instruct you on making a robot car which can be controlled by an IR remote controller. This robot car can be controlled by our usual TV remote or you can use any other IR remotes as well. Most special thing with this robot car is, it has the self obstacle avoiding function. When you drive this car using your TV remote or other IR remote, it will stop automatically whenever it met an obstacle while it moving forward. I hope to do step by step guide on making this robot in very easy way.
Jumper wires (male-to-male, male-to-female)
Mini breadboard
Ultrasonic sonar sensor mounting bracket
Screws and nuts
Screwdriver
Soldering iron
Double sided tape(optional)
Hot glue gun(optional)
NewPing library
Before build the robot, we have to obtain the hexadecimal numbers of respective TV remote keys. These keys will be used for move the robot car forward, backward, left and right. Please follow the below steps:
In my case, I got the following hexadecimal numbers. You will have different numbers from your remote
UP Arrow Key = move forward = 0xFFC03F
DOWN Arrow key = move backward = 0xFF7A85
LEFT Arrow key = move left = 0xFF02FD
RIGHT Arrow key = move right = 0xFF40BF
ENTER key = robot STOP = 0xFFFA05
Note: In the serial monitor, you only get values like FFC03F.... and you have to add 0x to the front of FFC03F and write it as 0xFFC03F when you write these values in your code later.
In some cases, you will receive value like FFFFFF in between your hexadecimal numbers in your serial monitor, just ignore them.
important: copy and save the hexadecimal numbers you have obtained to a Notepad, you will need these numbers when you are coding the robot.
Solder two wires to each DC motor. Then fix two motors to the chassis using the screws. If you need any clarification, please watch this youtube video and it will show you how to assemble the Smart 2WD Robot car chassis. Finally attach the Universal wheel (or ball caster wheel) to the back of the chassis.
L298n motor driver:
+12V → Lipo battery (+)
GND → Lipo battery (- ) important:connect the GND to lipo battery (-) and to arduino board any GND pin
+5V → arduino Vin
In1 → arduino digital pin 7
In2 → arduino digital pin 6
In3 → arduino digital pin 5
In4 → arduino digital pin 4
OUT1 → Motor 1
OUT2 → Motor 1
OUT3 → Motor 2
OUT4 → Motor 2
Breadboard:
Connect two jumper wires to arduino board 5V and GND pins, then connect both wires to breadboard. now you can use this as +5V supply.
TSOP1738:
GND (Left most pin) → breadboard GND line
Vs (middle pin) → breadboard +5V line
OUT (right most pin) → arduino digital pin 11
HC-SR04 Ultrasonic Sonar sensor:
VCC → breadboard +5V
Trig → arduino analog pin 1
Echo → arduino analog pin 2
GND → breadboard GND
Now you have your own remote control car
I would be happy to answer any questions you have
email me: [email protected]
search me on facebook and linkedin for more projects - Danusha nayantha
Thank You