Parts
ULN2003 vs L293D: which driver for your relay, stepper or DC motor
By Bulan Sarkar
Both chips sit in a 16-pin DIP and both have the flyback diodes built in, which is why kits throw them in together. They are different kinds of driver.
The ULN2003A has seven low-side switches. Each output can only pull its load down to ground, and is rated 500 mA peak and 50 V. Current flows one way through the load, so it switches relays, solenoids, lamps, LED strings and unipolar (5- or 6-wire) steppers. It cannot reverse a motor.
The L293D has four half-H drivers. Each output drives high or low, so two outputs make a full H-bridge and the load sees current in either direction. It reverses DC motors and drives bipolar (4-wire) steppers. TI rates it at 600 mA continuous per channel and 1.2 A for pulses up to 100 µs, from 4.5 V to 36 V.
Rule of thumb: if the load only ever turns on and off, use the ULN2003A. If anything has to run backwards, use the L293D.
The pinouts do not match. Pin 8 is ground on the ULN2003A and the motor supply on the L293D, so plugging one into the other's socket shorts the supply (see what happens if you swap them).
Pinout by package
Top view, notch up: inputs down the left (1 to 7), E (ground) on 8, COM on 9, outputs up the right (10 to 16).
Source: Texas Instruments ULN200x, ULQ200x High-Voltage, High-Current Darlington Transistor Arrays (SLRS027T), p. 3 (Pin configuration and functions: 1B-7B pins 1-7, E pin 8, COM pin 9, 7C-1C pins 10-16)
Top view, notch up: pin 1 (1,2EN) top left, VCC2 (motor supply) on 8, VCC1 (logic supply) on 16.
Source: Texas Instruments L293x Quadruple Half-H Drivers (SLRS008D), p. 3 (Section 5, NE package 16-pin PDIP top view, and the pin functions table)
Same package, no shared pinout
Hold both chips notch up and read across. Only the package matches. The ULN2003A runs its inputs down one side and its outputs up the other, with ground and the diode common on 8 and 9. The L293D splits into two halves around four ground pins in the middle, with the motor supply on 8 and the logic supply on 16.
Behind each output there is a different circuit. A ULN2003A channel is a Darlington pair with a 2.7 kΩ resistor in series with its input, and a diode from the output up to COM. An L293D output has a transistor to the supply and one to ground, so it can push current out as well as pull it in.
Side by side
| Parameter | ULN2003ANDIP-16 | L293DNEDIP-16 |
|---|---|---|
| What it is | 7 NPN Darlington low-side switches | 4 half-H (push-pull) drivers |
| Output can | pull down only (open collector) | drive high, drive low, or go high-impedance |
| Current per output | 500 mA peak (absolute maximum) | 600 mA continuous; 1.2 A for pulses up to 100 µs |
| Whole-chip current limit | 2.5 A total out of the E pin | set by heat (see example 3) |
| Load voltage | up to 50 V | 4.5 to 36 V on VCC2 |
| Logic supply pin | none | VCC1, 4.5 to 7 V (TI: 5 V ± 0.5 V) |
| Thermal resistance, PDIP RθJA | 66.7 °C/W | 36.4 °C/W (GND pins 4, 5, 12, 13 carry the heat) |
| Thermal shutdown | not listed | yes; outputs go high-impedance |
| Operating temperature TA | −40 to 70 °C (ULN2003AI: −40 to 105 °C) | 0 to 70 °C |
| Parameter | ULN2003ANDIP-16 | L293DNEDIP-16 |
|---|---|---|
| Logic input | for 3.3 V and 5 V logic; 2.4 V max needed for 200 mA | high at 2.3 V or more; tolerates up to 7 V |
| Input current | 0.93 typ / 1.35 max mA at 3.85 V | 0.2 µA typ (high), 3 µA typ (low) on the A inputs |
| Voltage lost in the driver | 0.9 typ / 1.1 max V at 100 mA; 1.2 typ / 1.6 max V at 350 mA | 1.4 V typ high side plus 1.2 V typ low side at 0.6 A (1.8 V max each) |
| Idle current | 50 µA max leakage per output at 50 V | logic 8 to 35 mA typ (60 mA max), plus 2 to 14 mA typ on VCC2 |
| Flyback diodes | built in, common cathode on COM (pin 9) | built in, to VCC2 and to ground |
| Switching delay | 0.25 µs typ, 1 µs max | 400 to 800 ns typ (L293DNE) |
| Enable pins | none | 1,2EN and 3,4EN; low turns that pair off |
The L293D loses voltage twice because the motor current passes through two of its transistors, one on the high side and one on the low side. A ULN2003A load only passes through one.
The difference that decides it: one direction or two
A ULN2003A output is a transistor between the load and ground. Connect the other end of the load to your supply, turn the input on, and current flows. Turn it off and the load stops. That is all it can do: there is no transistor to pull the output up, so it can never push current the other way.
An L293D output has a transistor to the supply and a transistor to ground. Put a motor between outputs 1Y and 2Y. Drive 1A high and 2A low and the motor turns one way; swap them and it turns the other. Set both inputs the same and TI's table calls it a fast motor stop; pull the enable low and the motor coasts to a free-running stop.
This is also the stepper rule. A unipolar stepper has a center tap on each coil. You tie the taps to the supply and pull the four coil ends to ground in sequence, which is exactly what four ULN2003A channels do. A bipolar stepper has no center tap, so the current through each coil has to reverse. That needs two H-bridges, which is one L293D.
Worked examples
1. A 12 V relay from a 3.3 V or 5 V board (ULN2003A)
TI's own test drives an OMRON G5NB relay with a 2.8 kΩ coil from a 12 V supply and a 5 V input.
TI's formula is I = (VSUP − VCE(sat)) ÷ RCOIL. VCE(sat) is at most 1.1 V at 100 mA and lower at smaller currents, so use 1.1 V as the worst case:
- I = (12 − 1.1) ÷ 2,800 = 3.9 mA
That is well inside the 500 mA rating, and all seven channels together would draw about 27 mA. Tie COM (pin 9) to the 12 V coil supply so the built-in diodes catch the kick when the relay switches off. If COM is left floating with a relay attached, there is no path for that kick.
A 3.3 V board drives the input directly. At 200 mA of load the ULN2003A needs at most 2.4 V on the input, and this relay draws far less. No base resistor is needed, because the 2.7 kΩ resistor is already inside. Each input draws about 0.93 mA at 3.85 V (1.35 mA max), which any GPIO can supply.
The L293D could switch this relay too, but it needs a separate 5 V logic supply, it can burn up to 60 mA of logic current while doing nothing, and it uses a half-H where one transistor is enough. Choosing between a relay and a solid-state relay in the first place? Relay or SSR for an Arduino or ESP32 covers it.
2. A small unipolar stepper on 5 V (ULN2003A)
Example input, not a datasheet value: a 5 V unipolar stepper whose coils measure 50 Ω each, run with two coils on at a time.
- Coil current, VCE(sat) 0.9 V typ: (5 − 0.9) ÷ 50 = 82 mA
- Coil current, VCE(sat) 1.1 V max: (5 − 1.1) ÷ 50 = 78 mA
- Heat in the chip, two coils on: 2 × 0.9 V × 0.082 A = 0.15 W typ, 0.17 W worst case
- Temperature rise in the PDIP (66.7 °C/W): about 10 °C typ, 11 °C worst case
That runs cool. The only real cost is the drop: about a volt of the 5 V supply never reaches the coil. Measure your own coil resistance and put it into the same formula.
3. Reversing a DC motor at 12 V (L293D)
Example input: a 12 V DC motor drawing 0.5 A while running, ambient 40 °C.
TI gives the L293D's drops at 0.6 A, so at 0.5 A they are an upper estimate:
- Voltage at the motor, typical: 12 − 1.4 − 1.2 = 9.4 V
- Voltage at the motor, worst case: 12 − 1.8 − 1.8 = 8.4 V
- Heat in the chip, typical: (1.4 + 1.2) × 0.5 = 1.3 W
- Temperature rise at 36.4 °C/W: 1.3 × 36.4 = 47 °C, so the junction sits near 87 °C
The motor gets 2.6 to 3.6 V less than the supply. If it needs its full 12 V, feed a higher VCC2 (up to 36 V) or choose a driver with a smaller drop.
Two such motors on one L293D double the heat to 2.6 W and the rise to about 95 °C, which puts the junction near 135 °C. That is 15 °C under the 150 °C absolute maximum, and the 36.4 °C/W figure comes from a JEDEC test board, not a breadboard. Solder the four GND pins to a large copper area or add the heat sink TI shows, or use one chip per motor. The L293D page works through stall current and the heat in more detail.
Don't put the ULN2003A here. It can run this motor in one direction (motor between +12 V and an output, COM to +12 V), but it cannot reverse it.
4. How many ULN2003A channels can carry 350 mA
The ULN2003A is rated 500 mA per channel, but not 500 mA on all seven at once. Two limits apply.
The first is the E pin. All seven channels return through it, and its absolute maximum is 2.5 A, which works out to 357 mA each with all seven on. The second is heat, and it is the tighter one:
- Each channel at 350 mA: 1.2 V typ × 0.35 A = 0.42 W
- All seven: 2.94 W, a 196 °C rise in the PDIP. Not possible.
- What the PDIP can shed at 40 °C ambient with TI's 125 °C junction limit: (125 − 40) ÷ 66.7 = 1.27 W
- 1.27 W ÷ 0.42 W = 3 channels at 350 mA, continuously
For more current on one load, TI allows paralleling outputs. Heat still caps the total, so run the same sum for your duty cycle.
Worked example in numbers
- Relay coil current
- 3.9 mA
- L293D drop at 0.6 A, typ
- 2.6 V
- L293D junction, one motor
- 87 °C
- ULN2003A channels at 350 mA
- 3
What happens if you swap them
The two chips are not pin compatible, and the mismatch is on the power pins.
A ULN2003A in an L293D socket
Pin 8 carries the motor supply on an L293D board. On the ULN2003A, pin 8 is E, the common emitter that should be at ground. Pins 4, 5, 12 and 13 are grounded on the L293D board, and on the ULN2003A those are inputs 4B and 5B and outputs 5C and 4C. With E above the outputs, the chip's internal diodes conduct from the supply straight into the grounded pins. TI says that parasitic diode "should not be used to conduct current". Expect a hot chip or a dead one, and switch off at once.
An L293D in a ULN2003A socket
Pin 8 is ground on a ULN2003A board, so the L293D's motor supply (VCC2) is grounded. Pin 9 is COM, which is tied to the coil supply, and on the L293D it is the 3,4EN input, rated 7 V at most. On a 12 V relay board that input gets 12 V. Pin 16 is a load output on the ULN board and the logic supply on the L293D. Nothing here works, and the enable input can be damaged.
If a board was laid out for one, use that one.
| Part | Pins | Verdict |
|---|---|---|
| ULN2003A in an L293D socket | different pinout | Never. Pin 8 is the motor supply on the L293D board and E (ground) on the ULN2003A; the internal diodes conduct from the supply into the grounded pins.Texas Instruments ULN200x, ULQ200x High-Voltage, High-Current Darlington Transistor Arrays (SLRS027T), p. 3; Texas Instruments ULN200x, ULQ200x High-Voltage, High-Current Darlington Transistor Arrays (SLRS027T), p. 14 |
| L293D in a ULN2003A socket | different pinout | Never. VCC2 lands on ground, the 3,4EN input (7 V max) lands on COM at the coil supply, and VCC1 lands on an output.Texas Instruments L293x Quadruple Half-H Drivers (SLRS008D), p. 3; Texas Instruments L293x Quadruple Half-H Drivers (SLRS008D), p. 4 |
| L293 for an L293D | same pinout | Same pins and more current (1 A), but no clamp diodes inside: add eight fast external diodes for a motor.Texas Instruments L293x Quadruple Half-H Drivers (SLRS008D), p. 4; Texas Instruments L293x Quadruple Half-H Drivers (SLRS008D), p. 7 |
Which to buy
- For relays, solenoids, lamps, LED strings, buzzers, unipolar steppers and any load that is only on or off, buy the ULN2003A. It has seven channels, needs no logic supply and takes 3.3 V inputs.
- For DC motors that reverse, bipolar steppers and anything that needs current both ways, buy the L293D. Budget for the 2.6 V typical drop at 0.6 A and the heat that comes with it.
- For one load in one direction at more current than either chip handles, use a logic-level MOSFET (see choosing a MOSFET for an Arduino or ESP32) or a TIP120.
Tips and checks
- On the ULN2003A, connect COM to the load supply whenever the load is a coil. Leave it open only for resistive loads such as LEDs.
- The ULN2003A's E pin and the board's logic ground must be the same ground, or the inputs have no reference.
- On the L293D, bypass VCC1 and VCC2 with 0.1 µF or more close to the pins. TI says the two supplies need no particular power-up order.
- The L293D's logic supply is 5 V ± 0.5 V. Its inputs read 3.3 V logic as high (2.3 V minimum), but pin 16 still needs 5 V.
- If an L293D cuts out when it gets hot, its thermal shutdown has turned the outputs off. Add copper on the GND pins or lower the current.
What we'd do
For anything that only switches on and off we'd fit a ULN2003A, drive it straight from the GPIO and tie COM to the coil supply. We'd keep the L293D for motors that reverse and bipolar steppers, with one chip per motor once the current passes about half an amp.
Questions people ask
Can a ULN2003 drive a bipolar stepper?
No. A bipolar coil needs current in both directions and ULN2003A outputs can only sink. Use an L293D (two H-bridges, one per coil).
Can an L293D drive a unipolar stepper?
Yes. Each output can pull a coil end to ground, which is all a unipolar motor needs. TI's own L293D examples are bipolar and two-phase motors, though, and for a unipolar motor the ULN2003A does the job with one transistor drop instead of two and no logic supply.
Does the ULN2003 need a resistor between the Arduino pin and the input?
No. Each ULN2003A input has a 2.7 kΩ resistor inside, and TI designed it for 3.3 V and 5 V logic.
Why does my motor run slower on an L293D than on a direct battery connection?
The L293D drops about 1.4 V on the high side and 1.2 V on the low side at 0.6 A (TI typical), so the motor sees about 2.6 V less than the supply.
What is the COM pin on the ULN2003 for?
It joins the cathodes of the seven flyback diodes. Connect it to the supply that feeds your relays or motor coils. Leave it unconnected only for resistive loads like LEDs.
Where to go next
The L293D page has the full pin table, stall current and heat with one and two motors. The motor driver ICs lesson explains H-bridges and PWM speed control, and the relay driving lesson covers the flyback diode from the inside. If the board also needs a regulated logic rail, powering an ESP32 or Arduino is the next read.
One email a month from the bench
New circuits, lessons, part guides and calculators, on the first Sunday of each month.
Used in these lessons
Lessons that go deeper
Datasheets this page was checked against
- Texas Instruments, ULN200x, ULQ200x High-Voltage, High-Current Darlington Transistor Arrays (SLRS027T) (SLRS027T, December 1976, revised March 2025)
- Texas Instruments, L293x Quadruple Half-H Drivers (SLRS008D) (SLRS008D, September 1986, revised January 2016)
Makers revise datasheets. If the copy you download has a newer revision and a number here disagrees with it, the datasheet wins, and we would like to hear about it.