Digital Electronics: Darlington Arrays to Drive High-Current Outputs
Two electronic transistors can be connected to form a Darlington transistor (sometimes called a Darlington pair), which can switch much more current than the collector-emitter circuit of a standard transistor can. You can use darlington transistors to switch up to 500 mA from the output of a parallel-port data pin, which is enough current to drive a mechanical relay or a small electric motor.
Rather than use individual darlington transistors, you can use an integrated circuit specially designed for driving high-current loads from TTL-level inputs. The most common ICs of this type are the ULN2003, which has 7 darlington drivers in a 16-pin DIP package, and the ULN2803, which has 8 drivers in an 18-pin DIP package.
You won’t find these ICs at your local RadioShack store, but if you have access to an electronics-parts store, it probably will have this useful chip in stock. If not, you can easily find it on the Internet by searching for “ULN2003” or “ULN2803.”
As you can see, pins 1 through 7 are the input pins, which you can connect directly to the output pins from the parallel port. Pins 10 through 16 are the output pins, which you can connect to the circuit you want to control. Pin 8 connects to ground, and pin 9 connects to a voltage source.
|1||Input 1||1||Input 1|
|2||Input 2||2||Input 2|
|3||Input 3||3||Input 3|
|4||Input 4||4||Input 4|
|5||Input 5||5||Input 5|
|6||Input 6||6||Input 6|
|7||Input 7||7||Input 7|
|8||Common ground||8||Input 8|
|11||Output 2||11||Output 1|
|12||Output 3||12||Output 2|
|13||Output 4||13||Output 3|
|14||Output 5||14||Output 4|
|15||Output 6||15||Output 5|
|16||Output 7||16||Output 6|
The output circuit for a ULN2003/2803 is a little different from what you may expect. Rather than sourcing current for the load, the darlington array sinks the current. Thus, the output pin is on the ground side of the load circuit. As you can see, the voltage source (Vss) feeds both the load circuit (in this case, a small motor) and the ULN2003.
If you’ll be using a ULN2003 or ULN2803 to drive an inductive load such as a relay or motor, you should use a Zener diode on pin 10. This diode prevents current from flowing in the wrong direction into the ULN2803 in case the relay or motor coil creates a large backward voltage spike, as coils are apt to do.