Motor Drivers
de:volt models four driver chips that let a logic output switch a larger load: the ULN2003A and ULN2803A Darlington sink arrays, and the L293D and TB6612FNG dual H-bridges. The sink arrays are one-directional low-side switches; the H-bridges drive a load in both directions. Their internal catch/freewheel paths are electrical elements in the solver, but they protect an inductive load only when COM or VM is wired correctly.
Sink array vs. H-bridge
| Family | Topology | Direction | Use it for |
|---|---|---|---|
| ULN2003A / ULN2803A | Open-collector Darlington (low-side sink) | One way (on/off) | Relays, solenoids, unipolar steppers, LED banks |
| L293D / TB6612FNG | Full H-bridge | Forward / reverse | Bidirectional DC motors, bipolar steppers |
A sink array can only pull its output toward GND: current must flow from a supply, through the load, into OUT. An H-bridge can push current either way through the load, so it can spin a DC motor in both directions.
ULN2003A / ULN2803A: Darlington sink arrays
The ULN2003A is a 7-channel array (DIP-16); the ULN2803A is the same part with 8 channels (DIP-18). Real parts are commonly rated around 500 mA per channel and 50 V off-state, subject to package and duty-cycle limits. The simulator does not enforce those ratings as a current limiter or detailed safe-operating-area model.
Pinout (ULN2003A)
| Pin | Label | Description |
|---|---|---|
| in1–in7 | IN1–IN7 | Logic inputs (TTL/CMOS, Vih ≥ 2.5 V, Vil ≤ 1.5 V) |
| out1–out7 | OUT1–OUT7 | Open-collector outputs (sink only) |
| gnd | GND | Circuit ground |
| com | COM | Common diode cathode: tie to the load supply rail |
The ULN2803A adds in8/out8 for an eighth channel; everything else is identical per channel. Inputs sit on the left, outputs on the right in reversed order (OUT7→OUT1), with GND and COM at the bottom corners.
How it switches
There is no VCC pin. The chip is purely a bank of switches referenced to GND. A HIGH input turns its Darlington on, pulling the matching OUT pin down toward GND and sinking current from the load. A LOW input leaves OUT open (high impedance), so the load sees no path to ground and is off.
Because the output is open-collector, the load supplies the high state: wire one side of the load to your supply rail and the other side to OUT.
| IN | OUT | Load |
|---|---|---|
| HIGH | Pulled to ~GND | ON (current sinks through the channel) |
| LOW | Open / high-Z | OFF |
In the engine the on-state Vce(sat) is modelled as R_on = 5 Ω (about a 1 V drop at 200 mA), so expect a small voltage left across the channel when it conducts.
Flyback handling
Each output has an internal catch diode whose cathode goes to COM. Tie COM to the load’s positive supply rail so those diodes provide an electrical recirculation path when a relay or coil switches off. Leave COM unconnected and there is no useful clamp rail. The nonlinear OUT-to-COM diode path is stamped in the circuit; diagnostics can also flag a missing protection connection.
L293D / TB6612FNG: dual H-bridges
Both chips contain two H-bridge channels and run two separate supply rails: a logic VCC for the control side and a motor VM rail for the output stage. Keeping the rails separate means a noisy motor supply does not disturb the logic.
| Spec | L293D | TB6612FNG |
|---|---|---|
| Logic supply | VCC1 4.5–7 V | VCC 2.7–5.5 V (3.3 V nominal) |
| Motor supply | VCC2 / VM up to 36 V | VM 2.5–13.5 V |
| Catalog current rating | 0.6 A continuous / 1.2 A peak | 1.2 A continuous / 3.2 A peak |
| Enable | EN12, EN34 (per pair) | STBY (shared) + PWMA / PWMB |
L293D pinout
| Pin | Label | Description |
|---|---|---|
| en12 / en34 | EN12 / EN34 | Enable for channel pair 1+2 / 3+4 |
| in1–in4 | IN1–IN4 | Direction inputs |
| out1–out4 | OUT1–OUT4 | Half-bridge outputs (two per motor) |
| vcc1 | VCC1 | Logic supply (4.5–7 V) |
| vcc2 | VCC2 | Motor supply (up to 36 V) |
| gnd | GND | All four GND pins tie to circuit ground |
The L293D is a quadruple half-H driver: a DC motor uses one pair (OUT1/OUT2) with IN1/IN2 setting direction and EN12 gating it. The teaching model uses R_on = 2 Ω for each active output side. This deliberately visible fixed resistance is not a transistor-level fit to the full datasheet saturation curve.
TB6612FNG pinout
| Pin | Label | Description |
|---|---|---|
| ain1 / ain2 | AIN1 / AIN2 | Channel A direction inputs |
| pwma | PWMA | Channel A enable / speed |
| ao1 / ao2 | AO1 / AO2 | Channel A motor outputs |
| bin1 / bin2 | BIN1 / BIN2 | Channel B direction inputs |
| pwmb | PWMB | Channel B enable / speed |
| bo1 / bo2 | BO1 / BO2 | Channel B motor outputs |
| stby | STBY | Standby: pull HIGH to enable both channels |
| vcc | VCC | Logic supply (2.7–5.5 V) |
| vm | VM | Motor supply (2.5–13.5 V) |
| gnd | GND | All GND pins tie to circuit ground |
STBY must be HIGH or both channels stay in high-Z standby regardless of the other inputs.
Truth tables
L293D, one motor on EN12 / IN1 / IN2:
| EN12 | IN1 | IN2 | Motor |
|---|---|---|---|
| HIGH | HIGH | LOW | Forward |
| HIGH | LOW | HIGH | Reverse |
| HIGH | LOW | LOW | Brake to GND (both outputs LOW) |
| HIGH | HIGH | HIGH | Brake to VM (both outputs HIGH) |
| LOW | × | × | Coast (disabled) |
TB6612FNG, channel A (STBY = HIGH):
| PWMA | AIN1 | AIN2 | Motor |
|---|---|---|---|
| HIGH | HIGH | LOW | Forward |
| HIGH | LOW | HIGH | Reverse |
| HIGH | HIGH | HIGH | Brake (short) |
| HIGH | LOW | LOW | Coast |
| LOW | × | × | Coast |
In this model PWM is sampled as a binary enable (HIGH = active, LOW = coast). The bridge does not average duty cycle into an analogue output. A sufficiently time-resolved motor simulation may still respond to repeated on/off intervals through the motor’s own R/L/mechanical state, but the driver contains no PWM-averaging shortcut and a 50% setting is not guaranteed to mean half speed.
Flyback handling
Both H-bridges carry nonlinear recirculating/freewheel paths on every output. When VM is wired, they route inductive current into the motor rail during coast or dead time. Always wire the motor rail before expecting a useful clamp path.
Model limits
The output stages use finite source/sink resistance and released high-impedance states. The model includes logic/motor supply validity, truth-table decisions, and recirculation paths. It omits transistor-level dead time and cross-conduction, switching loss, current limiting, duty-cycle averaging, charge pumping, package heating, and detailed safe-operating-area failure. Treat catalog current values as hardware-selection information, not simulated protection thresholds.
Select a driver to see its exact model identity and Included / Not included disclosure. If a measurement is unavailable, the UI does not replace it with a fabricated zero.
Example circuit
ULN2003A driving a relay coil (one channel):
Arduino D2 ─── IN1 OUT1 ─── relay coil ─── +12V
│
GND ─── GND COM ───────┘ (clamp diode to +12V)L293D driving one DC motor bidirectionally:
Arduino D9 ─── EN12 VCC1 ─── 5V (logic)
Arduino D7 ─── IN1 VCC2 ─── +9V (motor)
Arduino D8 ─── IN2
OUT1 ─── motor ─── OUT2
GND, GND, GND, GND ─── GNDDrive EN12 with a PWM pin for speed and toggle IN1/IN2 for direction. The TB6612FNG wires the same way per channel: STBY HIGH, AIN1/AIN2 for direction, PWMA for enable, AO1/AO2 to the motor.