Browse over 10,000 Electronics Projects

Make A Robot Car – Part 1 and Part 2

Make A Robot Car – Part 1 and Part 2

In this article, I’ll go over the basic design of the robot RC car. You really just need three things to build the base platform for your robot RC car: programmable microcontroller, cheap RC car, 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
The 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.



Advertisement1


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. 

The 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.

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).

Visit Here for more.

 


Top