« « Roomba Hacking Without A Mini Din Connector | HMC5883L ‘class TwoWire’ has no member named ‘send’ » »

Building an Arduino Self Driving Car

Aug 23, 2012 by     No Comments    Posted under: Arduino, Self Driving Car
ardunio controlled car

The first version of my self driving car.

I’ve had an old RC car sitting around for a couple of years, and finally got around to pulling it apart. It’s pretty simple inside- a dc motor driving the back wheels, and another dc motor steering the front wheels. I was surprised that they used a regular motor for the steering instead of a stepper motor or a servo. Anyways, I attached an Arduino with a motor shield, and an ultrasonic sensor on the front of the car. Now it can drive itself! When it senses an obstacle in it’s path it slows down, then stops, backs up and turns, then continues on its new path.

Getting that much done wasn’t too hard. The biggest problem I ran into was, oddly, powering the car off batteries. I could spin the motors with at 9 volt battery, so I figured I could just hook up a 9V to the Arduino’s Vin pin and be good to go. When the car was connected to my computer’s USB port it ran fine, but as soon as I tried running it off the battery, nothing happened. The Arduino would turn on, but the motors refused to spin. It took me a while to figure out that the battery wasn’t powerful enough to run two motors and an Arduino at the same time.

I ran to Radio Shack and grabbed a 9.6V, 1600mAh RC car battery. As soon as I hooked it up the motors started spinning. In fact, they spin a little too fast so I had to power down the motor pins in my Arduino sketch. I should have grabbed the 7.2V battery instead.

Now that the basic driving functionality is there, I plan on adding a compass, bluetooth, and possibly a camera to the car to make it truly self driving. I’ll be sure to post my progress here.


Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>