Round Two ... Build!
One of the first things we have to do is
decide how we’re going to drive the motors.
In Part 1, we showed how you could use the
HB- 25 from Parallax. If you’re fairly new to
robotics, this is an ideal solution since the HB-
25 allows you to control a brushed DC motor
with the ease of a continuous rotation servo.
This is perfect for the BASIC Stamp 2,
Arduino, or other microcontrollers. However, I
have chosen to use the Parallax Propeller chip,
so the HB- 25 is not needed since the Propeller
can generate its own PWM (pulse-width
modulation) to drive the motors. All we really
need is a driver or dual H-bridge to handle the
voltage and current the motors require.
For this, we’ll use Pololu’s dual motor driver shown in
Figure 1. This board is a dual H-bridge using the Freescale
MC33926 IC. It can supply up to 3A of continuous current
per channel from 5-28 VDC and PWM frequencies up to
20 kHz, though we’ll be using 10 kHz.
We can also sense current draw via a feedback pin on
the board which provides a voltage proportional to current
draw. This means a simple ADC (analog-to-digital converter)
can be used for this purpose. This allows a measure of
safety as we can provide software stall protection, as well.
In order to connect the motors to this driver board,
we’ll need to make the motors more accessible and easier
to connect. Currently, the motor wires terminate to a six-pin
SIP socket; refer to Figure 2. In many applications, this
connector won’t be useful as is the case here, since the
motor connections (red and black) need to connect to the
motor driver board on the lower deck, while the other four
wires need to go to the upper deck to our controller —
which is a Propeller project board. There is also some heat
shrink tubing holding the wires together which prevents us
from separating the bundle.
First, we’ll very carefully remove the heat shrink tubing
using a hobby knife, and then we’ll remove all six wires
from the plastic shroud. Notice the arrow pointing to the
connector housing in Figure 3. Each connector inside is
held in place by a small tab. Lifting this tab very carefully
allows you to pull the crimped connector from the housing.
I used a surplus dental pick I have in my tool drawer. A very
small precision flathead screwdriver — like those used on
glasses — could also work. Don’t put tension on the wire
until the tab is up to make it easier.
Once the heat shrink has been removed and the wires
are free from the connector housing, you can run them to
their respective places. The blue, green, white, and yellow
wires will all run up through the hole in the upper deck as
in Figure 4.
The red and black wires will go to the driver board, but
first we need to make a small adjustment. The connectors
SERVO 07.2014 71
Post comments on this article and find any associated files and/or downloads at
Figure1. Pololu dual motor driver.
Figure 2. Six-pin SIP socket on motor harness.
Figure 3. Removing the
wires from the connector