Hardware Reference
In-Depth Information
The input connections are clearly labeled IN1 through IN7. However, only outputs
1C through 4C are used (outputs for IN1 through IN4). The other ULN2003A outputs
5C through 7C are unconnected. Wires could be carefully soldered to these pins, if you
needed additional drivers for lamps, relays, or a second stepper motor.
The LEDs are connected from the (+) side, in series with a 1 k W current-limiting
resistor. The voltage drop V CE(sat) in the ULN2003A ranges from about 0.9 to 1.6 V (use
the worst case of 0.9 V). Assuming that the voltage drop is 1.6 V for red LEDs 55 and the
maximum of 12 V is applied, each LED conducts about this:
I VV V
R
-
-
CC
CE sat
(
)
LED
=
LED
LED
12 09 16
1000
--
.
.
=
=
95
.
mA
The LEDs are the main reason the PCB lists a maximum voltage of 12 V. The
ULN2003A chip has an absolute maximum V CC voltage of 50 V. If, for example, you need
to drive a 24 V stepper motor from an old 8-inch floppy drive, you can remove jump JP1 to
take the LEDs out of the circuit. Then you would supply the +24 V directly to the common
wire of the stepper motor itself. If you do this, you'll also want to connect the PCB (+) to
the motor's supply. This connects the motor to the COM pin of the ULN2003A, which
provides reverse-biased diodes to drain away induced voltages.
When purchased, the PCB included a white socket for connection to the stepper
motor. I removed that and replaced it with a soldered-in ribbon cable. These wires
connect the driver outputs 1C through 4C to the stepper-motor windings.
The Raspberry Pi will drive pins IN1 through IN4 from the GPIO ports. When a given
IN x pin is driven high, the Darlington pair of transistors will sink up to 500 mA of current
from a positive (motor supply) source to ground.
Darlington Pair
It is tempting to look at the ULN2003A chip as a black box: a signal goes into it, and a
bigger one comes out. But when interfacing to voltages higher than the Raspberry Pi's
own +3.3 V system, extra caution is warranted. If any of this higher voltage leaks back into
the Pi, the GPIO pins will get “cooked” (if not the whole system).
Figure 6-4 shows input 1B being driven high by a GPIO line. This forward-biases Q 2 ,
which in turn biases Q 1 . A small amount of current flows in dashed lines from 1B, into
the base of Q 2 , and then from Q 1 to ground. This small amount of current flow allows a
much greater current to flow from the collector of Q 1 to ground. The dashed lines on the
right show the motor-winding current flowing from the motor power supply (12 V, for
example), through Q 1 to ground through the E terminal.
 
Search WWH ::




Custom Search