FIGURE 4. In this experiment, the
ULN2803A IC reduces the part count
and makes it easier to build stepper
motor control using the VEX
microcontroller and a low cost
prototyping board.
night vision application, or it can drive up to eight relays for
your next VEX animatronic prop. You can see how useful
this IC is.
The circuit uses the ULN2803A to drive small stepper
motors; it can also be used to drive relays and solenoids. It
works with the VEX microcontroller and the Easy C
professional application to energize each coil in a specific
sequence depending on the stepper motor controller mode
being used. The four LEDs shown in the figure are optional,
but very useful to determine if the circuit is working. Each
LED corresponds to one of the stepper motor outputs and
should light up when activated. Pay particular attention to
the power and ground wires, making sure there are not
shorts and that all the jumper wires are inserted in the
correct locations on the prototype board and controller. I
used the SparkFun jumper cable kit to build the circuit
shown in Figure 4; you can use wire-wrap or point-to-point
wiring to build the same circuit and get the same results.
This latter construction method is recommended if you
intend on using the circuit for driving a robot or mechatronic
assembly.
Do not power the stepper motor circuit directly from the
microcontroller. Instead, use a separate 12 volt rechargeable
SLA battery, or even a 9. 4 volt VEX rechargeable battery or
12 volt bench power supply. Remember to connect the
ground wire between the (-) terminal of the 12 volt power
supply and the Vss pin of the ULN2803A IC. The stepper
motor driver circuit should not be powered until the stepper
motor has been connected. Stepper motors are power
hungry devices, so make sure that the batteries are fully
charged before attempting to power the circuit. Also, use a
switch or jumper cable for disconnecting the power to the
stepper motor when not in use.
This circuit is capable of driving a small to medium sized
unipolar stepper motors. Once the circuit has been
assembled and tested, it is time to connect the stepper
motor to the circuit.
Connecting the Stepper Motor
Unless you are lucky enough to find a stepper motor
with a wiring diagram, there is a bit of detective work we
need to carry out in order to determine how the stepper
motor should be wired to the stepper motor driving circuit.
The tool required for this task is a digital voltmeter, and we’ll
use it to measure the resistance between each of the wires.
Caution: Be sure to wear your safety goggles while
working with the power supply and running the stepper
motor. Never connect the stepper motor directly to the
microcontroller or you risk damaging it. Also, disconnect
power to the motor when working on the circuit to avoid
short circuits. If the wires start getting warm or hot,
disconnect the power immediately.
Without getting too technical, the differences between
unipolar and bipolar stepper motors usually refer to the
number of windings and phases required. A unipolar stepper
motor normally has anywhere from five to eight wires, and a
bipolar stepper motor has four wires. We will be using a
unipolar stepper motor for this experiment and it will require
some initial preparation using a DVM (digital voltmeter) to
decode the wires before connecting them to the stepper
motor controller. This stepper motor is easier to drive since
there is no current reversal required. This is the most
common type of stepper motor.
Another method for decoding stepper motor wires —
which works well for me but can take a little longer — is the
trial and error method. Start by using a stepper motor with
more than four wires leading from it (since four wire
steppers are usually bipolar and can’t be used for this
experiment). I found that it is convenient to connect .100
pin headers to the stepper motor wires so that the jumper
wires can be used for the motor connections to the stepper
motor circuit. This way, they can easily be swapped if
necessary when making the connections.
SERVO 10.2010 71