Self Driving Car

The self driving car shown above was a semester long cumulative project for an electrical engineering course. It interfaced circuit design with microcontroller programming using Arduino. The body and motor of the car were purchased as a toy remote controlled car. I removed the microcontroller embedded in the system and attached the leads to an H-Bridge, a type of circuit which allows dual directional motor control. There are two DC motors in the car, one up front which can turn the wheels left and right and one on the rear wheels which provides forward and reverse acceleration.

Initially I struggled with the front motor. The power supplied was far greater than what was needed as the rack and pinion gear system would slip. To fix this I implemented pule width modulation which can be programmed into the microcontroller unit using Arduino. This limited the power supplied to the front motor while maintaining a full 12 volt, ~1amp electrical supply to the rear motor.

The sonar system mounted on top of the breadboard works by measuring the time is takes for a sound wave to reflect off of a surface directly ahead. By multiplying this time by the speed of sound and halving for the roundtrip journey, you can determine the distance of objects ahead. This car was programmed to re-orient itself when an obstacle came within one meter. The car would perform a three point turn which would angle it about 45 degrees off of its original course and recheck for obstacles. If there weren't any present it could continue, or if obstacles remained, the car would attempt to reroute again.