MCU Interfaces

ULN2003A 7-Channel Relay & Solenoid Inductive Load Driver

Texas Instruments ULN2003A 7-channel Darlington transistor sink driver circuit for 12V relays, solenoids, and stepper coils with internal inductive flyback clamp diodes and decoupling.

Nominal Supply Voltage (VCC)
+12.0 V DC (operating range +4.5 V to +50 V DC)
Components
7
Formulas
4
Gotchas
4
Open in Web CAD
Verified source

Schematic workbench

ULN2003A 7-Channel Relay & Solenoid Inductive Load DriverExported from CircuitBase1B12B23B34B45B56B67B71C162C153C144C135C126C117C10COM9E8U1ULN2003AIN1IN2IN3IN4+12VL1RELAY 1 (12V)L2RELAY 2 (12V)L3SOLENOID 1 (12V)L4SOLENOID 2 (12V)C1100nF+C2100µFGNDGND

Circuit overview

Nominal Supply Voltage (VCC)
+12.0 V DC (operating range +4.5 V to +50 V DC)
Components
7
Formulas
4
Gotchas
4

Click any component in the schematic above to inspect its electrical ratings, function, and connections.

Circuit overview

The ULN2003A 7-channel relay and solenoid driver circuit provides a robust, multi-channel low-side sinking interface between low-power digital microcontrollers (such as 5.0 V AVR or 3.3 V ARM/ESP systems) and high-current inductive actuators (such as 12 V electromechanical relays, pneumatic solenoid valves, and unipolar stepper coils).

At the core of the circuit is the Texas Instruments ULN2003A Darlington transistor array, containing seven monolithic NPN Darlington pairs in a 16-pin package. Each Darlington pair comprises two cascaded bipolar transistors with an integrated base-emitter shunt resistor network (2.7 kΩ input series resistor and 7.2 kΩ total base-to-emitter bleeders). This dual-transistor configuration yields extremely high DC current gain (hFE typically 1000 to 5000), allowing microampere-level logic gate currents to reliably saturate collector currents up to 500 mA.

When a logic HIGH voltage (+5.0 V) is applied to any input port (P_IN1 through P_IN4), current flows through the integrated 2.7 kΩ base resistor into the input transistor of the Darlington pair. Both the driver and output power transistors turn on into hard saturation, pulling the corresponding open-collector output pin (1C through 4C) down toward ground with a typical saturation voltage of VCE(sat) ≈ 1.1 V at 200 mA (up to 1.6 V at 350 mA). This energizes the connected relay coil (L1, L2) or solenoid (L3, L4), establishing stable magnetic flux and mechanical actuation.

Crucially, electromechanical relays and solenoids store substantial magnetic energy in their inductive windings (E = 1/2 * L * I^2). When an input pin transitions to logic LOW (0 V), the Darlington pair abruptly cuts off. In accordance with Faraday-Lenz law (V = -L * dI/dt), the collapsing magnetic field generates a severe negative voltage spike at the open collector, which could instantly exceed 100 V and destroy the output transistor junction. The ULN2003A integrates an internal freewheeling clamp diode for every channel, with all cathodes tied to Pin 9 (COM). By connecting Pin 9 directly to the +12 V load supply rail, any inductive flyback transient exceeding (+12 V + VF ≈ 13.2 V) immediately forward-biases the internal clamp diode, circulating the discharge current harmlessly through the coil until its field decays.

Power supply stability is safeguarded by high-frequency ceramic capacitor C1 (100 nF) and bulk aluminum electrolytic reservoir capacitor C2 (100 µF) placed directly at the load supply rail. C1 suppresses sharp dI/dt switching noise and radio-frequency resonance, while C2 absorbs high-current inrush transients caused by simultaneous relay and solenoid armature pull-in.

Key Technical Specifications

Nominal Supply Voltage (VCC)+12.0 V DC (operating range +4.5 V to +50 V DC)
Operating Logic Level+5.0 V DC TTL/CMOS (+3.3 V compatible with de-rated sink current)
Continuous Collector Sink Current500 mA peak, 350 mA continuous per channel
Collector-Emitter Breakdown Voltage (VCE(BR))50 V DC minimum across operating temperature range
Collector-Emitter Saturation Voltage (VCE(sat))1.1 V typical at IC = 200 mA; 1.6 V max at IC = 350 mA
Clamp Diode Maximum Continuous Forward Current500 mA (matches channel collector sink rating)
Clamp Diode Reverse Breakdown Voltage50 V DC minimum
Package Power Dissipation Limit (PD)1.0 W (PDIP-16 at TA <= 25 °C, de-rate 8.0 mW/°C above 25 °C)

Theory of Operation & Working Principle

01

Circuit Analysis

The ULN2003A 7-channel inductive load driver operates across five distinct electrical and magnetic stages:

1. **Logic Input Assertion & Darlington Base Conduction:** When the host controller drives an input port (e.g., P_IN1) HIGH (+5.0 V), current enters Pin 1 through the internal 2.7 kΩ series resistor. The voltage exceeds the dual base-emitter turn-on threshold (VBE1 + VBE2 ≈ 1.4 V), supplying ~1.3 mA of base current to the input transistor. The composite Darlington pair rapidly switches into active conduction.

2. **Inductive Coil Energization & Low-Side Sinking:** The output transistor saturates, pulling Pin 16 (1C) down to VCE(sat) ≈ 1.1 V relative to ground (Pin 8). The relay coil L1 sees an effective differential voltage of VCC - VCE(sat) ≈ 12 V - 1.1 V = 10.9 V. Current builds exponentially according to i(t) = (V/R) * (1 - e^(-t / tau)), where tau = L / R, until full magnetic pull-in armature threshold is reached.

3. **Steady-State Saturation & Package Power Dissipation:** During continuous coil energization, current stabilizes at IC = (VCC - VCE(sat)) / R_coil. The Darlington pair dissipates electrical power PD = VCE(sat) * IC + VIN * IIN. With four channels energized at 150 mA each, total internal dissipation remains well within the 1.0 W thermal budget of the PDIP-16 package (junction-to-ambient thermal resistance R_thetaJA = 67 °C/W).

4. **Input Cut-Off & Inductive Field Collapse (Flyback Clamping):** When the input pin returns to logic LOW (0 V), base drive collapses. The Darlington pair switches OFF in under 0.5 µs. The sudden interruption of coil current causes an immediate inductive kickback (V_L = -L * dI/dt). The collector voltage flies above the +12 V supply rail until the internal clamp diode forward-biases at V_clamp = VCC + VF ≈ 12 V + 1.2 V = 13.2 V. The stored energy (E = 1/2 * L * I^2) circulates through the diode loop, safely converting into heat within the coil winding resistance.

5. **Supply Rail Decoupling & Ground Return Balancing:** As coils cycle on and off, switching transients generate localized dI/dt noise on the +12 V bus. Ceramic capacitor C1 (100 nF) shunts high-frequency spikes directly to ground, while electrolytic capacitor C2 (100 µF) provides local charge storage, preventing supply dips from resetting sensitive logic microcontrollers.

Design Equations & Calculations

Relay Coil Saturated Pull-In Current

IC = VCC − VCE(sat)Rcoil

Calculates the steady-state collector sinking current flowing through an energized relay or solenoid coil, taking into account the non-negligible Darlington saturation voltage drop.

SymbolParameterTypical value
ICCollector Sink Current150mA
VCCLoad Supply Rail Voltage12.0V
VCE(sat)Collector-Emitter Saturation Voltage1.1V
RcoilRelay Coil DC Winding Resistance72Ω

Stored Inductive Energy

EL = 12 L · IC2

Calculates the total magnetic energy stored inside the relay or solenoid winding that must be safely clamped and dissipated by the freewheeling diode network at turn-off.

SymbolParameterTypical value
ELStored Magnetic Energy1.69mJ
LCoil Inductance150mH
ICSteady-State Coil Current150mA

Flyback Clamp Diode Dissipation

Pclamp = EL · fswitch = 12 L · IC2 · fswitch

Determines the average thermal power dissipated inside the internal clamp diode when switching inductive loads at recurring operational frequencies.

SymbolParameterTypical value
PclampAverage Clamp Power Dissipation16.9mW
ELStored Magnetic Energy per Pulse1.69mJ
fswitchSwitching / Actuation Frequency10Hz

Total Package Power Dissipation

PD = \sumk = 1n ( VCE(sat),k · IC,k · Dk + VIN,k · IIN,k · Dk )

Computes total thermal dissipation across all active channels to ensure the internal junction temperature does not exceed the absolute maximum rating of 150 °C.

SymbolParameterTypical value
PDTotal Package Power Dissipation660mW
VCE(sat)Collector-Emitter Saturation Voltage1.1V
ICChannel Collector Current150mA
DChannel Duty Cycle1.0ratio

Bill of Materials (BOM)

Every part needed to build this circuit. Select a reference designator to inspect it on the schematic.

RefDesComponentValue / ratingPackageRole in circuitReference
7-Channel Darlington Transistor Array IC

Texas Instruments ULN2003AN; 50V / 500mA per channel, internal clamp diodes with common cathode (COM).

ULN2003APDIP-16Multi-Channel Inductive Low-Side Sink Driver7-Channel Darlington Transistor Array IC pinout & datasheet
Miniature 12V SPDT Electromechanical Relay 1

Omron Electronic Components G5V-1-DC12; 12V DC coil, 960 Ω nominal resistance (~12.5 mA pull-in current), 1A contact rating.

Omron G5V-1-DC12DIP-6Inductive Relay Load Channel 1—
Miniature 12V SPDT Electromechanical Relay 2

Omron Electronic Components G5V-1-DC12; 12V DC coil, 960 Ω nominal resistance (~12.5 mA pull-in current), 1A contact rating.

Omron G5V-1-DC12DIP-6Inductive Relay Load Channel 2—
12V DC Linear Push-Pull Solenoid Actuator 1

12V DC open-frame solenoid actuator; ~40 Ω coil resistance (~300 mA continuous holding current, 5N stroke force).

JF-0530B-12VChassis Mount / Flying LeadsInductive Solenoid Load Channel 3—
12V DC Linear Push-Pull Solenoid Actuator 2

12V DC open-frame solenoid actuator; ~40 Ω coil resistance (~300 mA continuous holding current, 5N stroke force).

JF-0530B-12VChassis Mount / Flying LeadsInductive Solenoid Load Channel 4—
Multilayer Ceramic Decoupling Capacitor

KEMET C320C104K5R5TA; 100nF 50V X7R ceramic, shunts high dI/dt switching transients directly at U1 Pin 9 (COM).

100nF0805 / RadialLoad Power Rail High-Frequency Bypass—
Aluminum Electrolytic Bulk Reservoir Capacitor

Nichicon UVR1E101MDD; 100µF 25V radial electrolytic, absorbs solenoid inrush currents and eliminates voltage droop.

100µFRadial 6.3x11mmLoad Power Rail Bulk Reservoir—

Practical Applications & Target Domains

Multi-channel 12V electromechanical relay bank control from microcontrollers (Arduino, STM32, PIC, ESP32)
Pneumatic and hydraulic 12V / 24V solenoid valve sequencing in automated fluidics
Unipolar stepper motor 4-phase coil excitation (e.g. 28BYJ-48 5V/12V stepper motors)
High-current LED matrix and multi-digit 7-segment display low-side segment sinking
DC brush motor unidirectional on/off switching and low-frequency PWM speed control

Critical Design Traps & Engineering Gotchas

Traps found in real builds, with the fix for each.

Critical

Floating COM Pin Destroys Output Transistors

Leaving Pin 9 (COM) unconnected completely isolates the internal clamp diodes from the load power rail. When any relay or solenoid turns off, inductive kickback spikes exceed 50V and instantly cause avalanche breakdown and collector-emitter short circuits.

Mitigation

Always connect Pin 9 (COM) directly to the +12V positive load power supply rail feeding the relay and solenoid coils. Keep decoupling capacitors close to minimize lead inductance.

Warning

Darlington Saturation Drop (1.1V to 1.6V) Reduces Coil Voltage

Unlike low-RDS(on) power MOSFETs, the Darlington configuration inherently drops VCE(sat) ≈ 1.1V to 1.6V across its collector-emitter terminals. A 12V relay receives only 10.4V to 10.9V across its winding, which can cause intermittent pull-in failure if the power supply droops.

Mitigation

Verify that the relay or solenoid minimum pickup voltage (typically 70% to 80% of nominal) is guaranteed at 10.5V, or compensate the external power supply to +12.5V.

Critical

Cumulative Package Ground Current Exceeds 2.5A Pin Limit

Although individual channels are rated for 500mA peak, energizing all seven channels simultaneously at 500mA demands 3.5A through Pin 8 (E), destroying the package internal bond wire and violating the 1.0W thermal envelope.

Mitigation

Limit total simultaneous ground current through Pin 8 to <= 1.5A to 2.0A. When driving heavy continuous loads, stagger activation intervals or distribute loads across multiple driver ICs.

Warning

Direct 3.3V Logic Drive Margin Reduction

The internal 2.7 kΩ base resistor is optimized for 5.0V TTL/CMOS drive. Driving inputs directly from a 3.3V microcontroller (e.g. ESP32, Raspberry Pi Pico) delivers only ~0.7mA base current, reducing maximum saturation sink capability to ~200mA per channel.

Mitigation

For coil loads exceeding 200mA driven from 3.3V logic, parallel two adjacent driver channels (both inputs and outputs tied together) or use the low-voltage ULN2003LV / active MOSFET driver.

Primary sources

Help keep this page accurate

Built, simulated or reviewed this circuit? Confirm it, or report a part, value or connection that is wrong.

Opens a public form on GitHub with this page already filled in; a free GitHub account is needed. How reports and confirmations work

HTML snippet

<iframe src="https://circuitbase.tech/embed/schematic/uln2003a-7-channel-relay-solenoid-driver?theme=paper" width="100%" height="500" frameborder="0" loading="lazy" style="border: 1px solid #e5e7eb; border-radius: 6px; max-width: 100%;" title="ULN2003A 7-Channel Relay & Solenoid Inductive Load Driver — CircuitBase Interactive Schematic"></iframe>