BlogCadre users see no ads!  Popular topics: humor, video, links, cool, wtf.  Go create an account!




Howto: Make A Robot Car - Part 1: Overview

Robot Cars
I wish I could say I had a half-million dollar budget to put towards a Stanford style Grand Challenge vehicle, but I'm afraid I've already earmarked that money for thermoptic camouflage and bionic calf implants.

Still, it seems like you just can't be a self respecting hacker these days unless you have an autonomous Humvee or two.

So, I decided it would be a worthwhile project to create a smaller scale robotic car. After a quick treasure-hunt under the sofa cusions and a trip to Radio Shack, I had everything I needed. This project looked to be as easy as taking toys from a baby.

Here's a video of the robot car in action (right click and save).  Keep reading and I'll show you how you can start making your own.




Overview

In this article, I'll go over the basic design of the robot RC car. I'm saving some of the nitty gritty details for a second post. This will give all you readers some time to come up with a better way of doing things, and it will give me time to beg our pal robogeek to assist me with some CAD drawings of the motor control circuit.

Ingredients

You really just need three things to build the base platform for your robot RC car:

  • programmable microcontroller
  • cheap RC car
  • motor control circuit

If you have one of those nice, servo controlled, proportional speed and steering cars, you can probably skip the motor control circuit and interface directly with the control servos on the car. We're going the cheap route with this howto, though, so we'll be using a very simple RC car and bypassing its circuitry, controlling its motors directly.



The Brains

I chose to use the Basic Stamp for this project because, well, that's what I had handy. You could just as easily use a PICAXE, and OOPic, or maybe even a small embedded PC with a parallel port.

The design I settled on requires 4 I/O ports to control the motors. In the future you'll need more ports to handle sensor data or perhaps a GPS device. It all depends on how elaborate and complex you intend to make your control system. The number of I/O ports available and program storage space will probably determine what you choose for your robot's noggin.



The Brawn

robot_car_2.jpgThe car I'm using has 2 motors: a smaller on that controls the steering, and a larger one that drives the rear wheels. They both are run off a 6 volt supply.

Since I stole this car from a baby, I wanted to make this mod as minimally invasive as possible. All we really care about are the 2 motors and the battery, so I ended up just soldering 6 wires: two to each of the motors and two to the battery connectors. The electronics are completely bypassed and it can still function as a normal RC car when the rest of our setup is disconnected.



The Messy Details

Unfortunately, the Basic Stamp can't source enough power to drive the car's motors directly. Instead, I needed to power the motors directly from the car's battery and use the microcontroller to switch the power to the motors.

Initially this had me thinking about using relays. A little current on the microcontroller side of the relay opens and closes the higher power circuit on the motor side of the relay.

One thing I wanted to be able to do, however, was control the speed of the motor. An easy way to do this is using Pulse Width Modulation, turning the I/O pin off and on quickly to limit the power delivered to the motor over time.

steering_control_circuit.jpgThe problem is that I don't think the response time on a relay is fast enough to do this reliably. We need to move away from electro-mechanical switches.


I ended up going with a modified h-bridge circuit, similar to Steve Bolt's design. With this transistor based circuit, you can use 2 I/O pins to control the motor.



H-Bridge Modifications

When you supply enough current to the base of a transistor, it becomes saturated and the resistance on the collector drops to almost nothing. In this way, you can use a relatively small amount of current on the base to enable a lot more current to flow through the collector pin.

I found that the Basic Stamp wasn't able to provide enough juice to saturate the transistors in the h-bridge. No-saturation equals increased resistance, which also equals poor motor performance and hot smoking transistors.

drive_control_circuit.jpg
So, where 1 transistor is good, 2 are better. I was able to solve the problem by replacing each transistor in the circuit with a Darlington pair. Basically, each transistor gets a buddy that amplifys the input current to its base pin.

The other alteration I made was to add protection diodes. When the motor is spinning and unpowered, it can generate electricity spikes that can force current the wrong way through the transistors and damage the circuit. The protection diodes allow a path for this electricity to bypass the transistors (and the rest of the circuit).



Preliminary Results

I wrote a quick program to drive the robot around and it seems to work really well.

I'm looking forward to hearing your comments and suggestions. I'll post a part 2 soon with updates, a circuit diagram, and a starter program that you can run on your own vehicle.


Update
Part 2 is up!

Trackback URL for this post:

http://www.blogcadre.com/trackback/620
from MAKE: Blog on October 27, 2005 - 12:00pm

Robot Car 2.ThumbnailMake pal jason Striegel writes "I wish I could say I had a half-million dollar budget

RC car robot

I can't get the video to work - I'd love to see it.

Try this

Jason Striegel's picture

Make sure you have the latest version of Quicktime. You can download it here. In IE, it seems like it works better if you just download the file to your desktop instead of playing it in the browser, but that just may be my machine.

Let me know if this works for you.

"I'm making it even better."

Stella's picture

It's nice to see this RC car working again. Now the question is are you going to let Zachary have his car back?

wow

How do you people think of stuff like this? I just read part 2, this is amazing stuff. Next thing you know we'll have RC cars doing the thinking for us, driving us to work and doing our laundry. Great work, you're a very smart guy!

robot car insurance

great post - if you require specialist car insurance try Car insurance and Classic Car insurance

a small help

Hello Mr. Jason
Really amazing piece of work. I came across this blog and ur posts jst today. Am an engineering student.. I would like to do this as a mini project if u permits.... Pls accept my request

sure thing

Jason Striegel's picture

make sure to post your project here and let us know how it goes.

umar

I love this document..

if i have your premission may i post this document on other websites?
of course giving credet to you and posting limks to here...

Hello Jason

I am new to the whole robotics field and had a few questions. I would like to know if the PBASIC language of the basic stamp was identical to BASIC code language. I have made a lot of calculator programs (ti-83+) and was hoping to buy a kit that i could finish a simple project, such as the one you outlined here, in a week. Also i am interested in making other robotic devices so i would be looking into a larger microprocessor (i'm assuming). My dad and I would like to make semi autonomous skeet thrower. We own a welding shop so the only problem will be the electronic end of it. Thank you in advance for any answers, i hope to be talking to you soon.

Please Help Connect Motors to 2 H Bridges

Could you please show me how to connect the wires of the steering motor and driving motor to each of the H bridge. The wires that are attached to the RC car motor are white and blue. Could you post another picture of the breadboard that shows the wire of motor? I'm not good at reading the schematic.

help

i have read your blogs and i found it amazing!!!!!
i need help im going to this competititon called skill usa VICA. my competetion is relative to physics and math .
to win this competition
somebody sujested that i do a robotic car that drives itself and shoot a little ball at the same time , their remark was that i would have to find out how the speed would affect the projectile motion and the force,speed velocity and distance of the ball. Now i have no i dea how to get started my question is would you know how to help me get started and is there a better project that you could suggest for me. please respond asap. thank you

reply

From what I got to see of it, it is truly awesome! The amount of work this guy has put into this project is just amazing. Makes me realize even more how much I want to get into the field of robotics.
inchirieri auto bucuresti