PyRaspBeta

Darlington (TIP120)

A Darlington is two transistors stacked inside one package so their gains multiply: a few microamps of base current can switch a tenth of an amp, and a real TIP120's milliamp or two switches amps. It costs $0.80 and is the classic way from a GPIO to something hungrier than an LED — a lamp, a solenoid, a small motor — without a relay. The price is paid at the base: about 1.4 V to start conducting (two junctions) and about 1 V lost when saturated, so it wastes more heat than a single transistor would.

Darlington (TIP120)

Pins

PinWhat it isType
CCollectorpassive
BBasepassive
EEmitterpassive
  • Darlington() — Darlington (TIP120) — $0.80
  • Pins: 3
  • Aliases: base → B, collector → C, emitter → E

B is the base — drive it through a resistor, as with any NPN. C is the collector, with the load between it and the positive supply; E is the emitter, to ground. It switches the low side, so the load is on whenever the base is driven, and off when the base is at ground.

Wiring it in circuit.py

A GPIO switching a 5 V lamp; 10 kΩ at the base keeps what the pin gives up tiny:

circuit.py
from wiring import *

pi = Pi()
q1 = Darlington()          # TIP120: two transistors, gain in the thousands
base = Resistor(10000)     # under 200 µA of base current is plenty
lamp = Lamp()

pi.GPIO17 >> base >> q1.base
q1.emitter >> pi.GND
pi.V5 >> lamp.plus
lamp.minus >> q1.collector

For a coil or a motor the flyback diode is not optional — the load's inductance throws the same kick at the Darlington as at any other switch. With a coil instead of the lamp:

d1 = Diode("1N4148")       # across the coil: cathode to +5 V, anode to the collector
pi.V5 >> coil.plus
coil.minus >> q1.collector
d1.cathode >> coil.plus
d1.anode >> q1.collector

Driving it in main.py

main.py
from gpiozero import OutputDevice
from time import sleep

lamp = OutputDevice(17)   # high = the Darlington conducts, the lamp lights

while True:
    lamp.on()
    sleep(0.5)
    lamp.off()
    sleep(0.5)

Electrical notes

  • The gain is the product of the two transistors': over a thousand at a few amps on a real part, and higher still in this model, which leaves out the real part's internal resistors.
  • Base-emitter needs about 1.4 V. From a 3.3 V GPIO through 10 kΩ that is under 200 µA, so the pin is never asked for much — compare a bare BJT, which needs 0.7 V but hundreds of times the base current for the same load.
  • Saturated, the pair drops about 1 V. At 100 mA that is 0.1 W in the package: warm, not hot.
  • The real TIP120 carries 5 A and 65 W, and the model's output transistor is a TIP41-class card (6 A, 65 W), so the limits line up; past them the part warns, and with burn out set it fails open.

Simulator vs real hardware

  • The model is the two-transistor stack; the internal base-emitter resistors are not modelled, so its gain is higher than the datasheet's 1000 and it switches with even less base current.
  • Switching is idealised: no storage time, so it turns off the instant the base goes low. A real Darlington takes a few microseconds to come out of saturation.
  • It has no flyback diode inside. The relay module puts one across its coil for exactly this reason, and any circuit switching a coil with a Darlington needs one too.