Parts ReferenceMotor Drivers

Motor Drivers

de:volt models four driver chips that let a low-current logic output switch a high-current 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. All four carry internal clamp diodes so inductive loads (motors, relays, solenoids) need no external flyback diode in the simulator.

Sink array vs. H-bridge

FamilyTopologyDirectionUse it for
ULN2003A / ULN2803AOpen-collector Darlington (low-side sink)One way (on/off)Relays, solenoids, unipolar steppers, LED banks
L293D / TB6612FNGFull H-bridgeForward / reverseBidirectional 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). Each channel takes a logic input and sinks up to 500 mA through an open-collector NPN Darlington pair, rated to 50 V off-state.

Pinout (ULN2003A)

PinLabelDescription
in1–in7IN1–IN7Logic inputs (TTL/CMOS, Vih ≥ 2.5 V, Vil ≤ 1.5 V)
out1–out7OUT1–OUT7Open-collector outputs (sink only)
gndGNDCircuit ground
comCOMCommon 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.

INOUTLoad
HIGHPulled to ~GNDON (current sinks through the channel)
LOWOpen / high-ZOFF

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 the COM pin. Tie COM to the load’s positive supply rail and those diodes clamp the inductive kickback when a relay or motor coil switches off — no external flyback diode required. Leave COM unconnected and inductive spikes are unsuppressed. In de:volt v1 the clamp diodes are flagged diagnostically rather than stamped as engine elements, so a missing COM connection surfaces as a static-check finding.

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.

SpecL293DTB6612FNG
Logic supplyVCC1 4.5–7 VVCC 2.7–5.5 V (3.3 V nominal)
Motor supplyVCC2 / VM up to 36 VVM 2.5–13.5 V
Current per channel0.6 A continuous / 1.2 A peak1.2 A continuous / 3.2 A peak
EnableEN12, EN34 (per pair)STBY (shared) + PWMA / PWMB

L293D pinout

PinLabelDescription
en12 / en34EN12 / EN34Enable for channel pair 1+2 / 3+4
in1–in4IN1–IN4Direction inputs
out1–out4OUT1–OUT4Half-bridge outputs (two per motor)
vcc1VCC1Logic supply (4.5–7 V)
vcc2VCC2Motor supply (up to 36 V)
gndGNDAll 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 output stage is modelled at R_on = 2 Ω per side (~1.4 V total drop at 1 A).

TB6612FNG pinout

PinLabelDescription
ain1 / ain2AIN1 / AIN2Channel A direction inputs
pwmaPWMAChannel A enable / speed
ao1 / ao2AO1 / AO2Channel A motor outputs
bin1 / bin2BIN1 / BIN2Channel B direction inputs
pwmbPWMBChannel B enable / speed
bo1 / bo2BO1 / BO2Channel B motor outputs
stbySTBYStandby — pull HIGH to enable both channels
vccVCCLogic supply (2.7–5.5 V)
vmVMMotor supply (2.5–13.5 V)
gndGNDAll 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:

EN12IN1IN2Motor
HIGHHIGHLOWForward
HIGHLOWHIGHReverse
HIGHLOWLOWCoast (both low)
LOW××Coast (disabled)

TB6612FNG, channel A (STBY = HIGH):

PWMAAIN1AIN2Motor
HIGHHIGHLOWForward
HIGHLOWHIGHReverse
HIGHHIGHHIGHBrake (short)
HIGHLOWLOWCoast
LOW××Coast

Note: in this model PWM is treated as a binary enable (HIGH = active, LOW = coast). Duty-cycle speed averaging is a later motor-dynamics feature, so a 50% duty input does not yet halve the speed.

Flyback handling

Both H-bridges carry internal recirculating clamp / freewheeling diodes on every output. When VM is wired, those diodes route inductive kickback from the motor windings back into the motor rail — no external flyback diode across the motor terminals. The diodes only conduct once VM is supplied, so always wire the motor rail before expecting clamping.

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 ─── GND

Drive 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.