Autonomous Race Car
Build this autonomous driving robot car based on a old RC toy car. I removed the radio control board from the car and replaced it with a brain in the form of an Arduino UNO board (plus a motor driver board) and gave it an ultrasonic distance measuring module to see the world through.
Components
- Radio controlled toy car
- Arduino Uno
- Motor driver board (2 channel)
- Ultrasonic sensor distance measuring module
- Bread board
Brain Transplant
Remove the radio control board from the RC car cutting all wires close to the board. Connect wires to the motor driver board - rear wheel motor in one channel - front wheel steering motor in the other channel.
"Steal" power from the cars batteries.
Connect Arduino Board and the Ultrasonic Sensor
Connect the ultrasonic sensor and the motor driver to the Arduino board.
The Programming
The cars intelligence is pretty simple. It's based on different modes that controles speed & direction depending on distance to objects ahead of the car:
FULL SPEED MODE - No objects ahead - full speed
CRUISE MODE - Object is X cm away - slow down
AVOID MODE - Object is too close for comfort - slow down and turn in random direction
REVERSE MODE - Object is very close - stop and reverse for 2 seconds
The Code
Note: you need to find the "Ultrasonic.h" online. As I remember, I had to download a couple of different versions before I found one that worked.