Linear Regulators & LDOs

Clean, simple DC supplies. Learn the regulator loop (reference, error amplifier, pass element, feedback divider), series vs shunt regulators, standard (NPN Darlington) vs LDO (PNP/PMOS pass) architectures and dropout, quiescent current, efficiency and dissipation, line and load regulation, PSRR vs frequency, output noise, stability and output-capacitor ESR requirements, fixed (78xx) and adjustable (LM317-style) regulators, current limiting, foldback and thermal shutdown — with Python checking dropout, dissipation, LM317 resistor values and ripple rejection.

A linear regulator is an op-amp feedback loop that controls a pass transistor so the output voltage stays constant as input voltage and load change. It burns the excess voltage as heat — simple, quiet and fast, but inefficient when the drop is large.

LDOs are everywhere after switching regulators too: they clean up ripple and noise for sensitive analog, RF and reference circuits.

An analogy

A linear regulator is like a person holding a door against a strong wind: they push exactly as hard as needed to keep the door at the same angle, wasting effort (heat) proportional to how strong the wind (excess voltage) is.

Why regulate

Rectified supplies ripple and sag with load; batteries decline as they discharge; switching converters leave ripple and spikes. Circuits need a steady voltage: digital logic within ±5–10%, precision analog and ADC references far tighter. Regulators give a fixed output despite input and load changes.

Architectures

Common types:

Key specifications

Dropout at your load current and temperature; quiescent current (battery life); line and load regulation; load-transient response (output capacitor and loop bandwidth); PSRR vs frequency (high at 100 Hz, falling at 100 kHz–1 MHz where switcher ripple lives); output noise (µV rms over 10 Hz–100 kHz); protection features (current limit, thermal shutdown, reverse-current blocking, enable, soft-start, power-good).

Stability and layout

An LDO's output pole (load + output capacitor) sits inside its loop. Older PNP LDOs need output capacitor ESR within a window (e.g. 0.1–5 Ω — tantalum); modern CMOS LDOs are stable with low-ESR ceramics but may specify a minimum capacitance. Ceramic capacitance falls with DC bias — derate. Place input and output capacitors close to the pins, use a Kelvin feedback connection at the load for remote sensing, and consider thermal paths (exposed pads with vias).

Formulas

Worked example: Dissipation

Given: 24 V → 5 V at 1 A

Find: P_D.

Answer: 19 W (use a switcher!)

Worked example: LM317 output

Given: R₁ 240 Ω, R₂ 2 kΩ

Find: V_out.

Answer: 11.67 V

Worked example: Headroom

Given: LDO V_DO 0.25 V, V_out 3.3 V, input ripple valley −0.2 V

Find: Minimum average V_in.

Answer: 3.75 V

Series regulator loop

  V_in ──── pass transistor (PMOS for LDO) ────┬──── V_out
                    │ gate/base                  R2
                  error amp ─── (−) ─────────────┤ feedback
                    │ (+)                         R1
                  V_REF (bandgap)                 │
                   GND ─────────────────────────── GND
  V_out = V_REF (1 + R2/R1)

The error amplifier compares a fraction of V_out with the bandgap reference and adjusts the pass device until they are equal. With a PMOS/PNP pass element the input needs only a few hundred mV of headroom (low dropout); an NPN Darlington follower needs ~2 V.

Dropout, dissipation, LM317 and PSRR

# Linear regulator: dropout, efficiency, dissipation, and output capacitor/PSRR notes
Vin_min, Vin_max, Vout, Iout, Iq = 4.5, 5.5, 3.3, 0.5, 5e-3
Vdo = 0.3
print(f"headroom at Vin_min: {Vin_min - Vout:.2f} V vs dropout {Vdo} V -> {'OK' if Vin_min - Vout > Vdo else 'FAIL'}")
Pd = (Vin_max - Vout) * Iout + Vin_max * Iq
eff = Vout * Iout / (Vin_max * (Iout + Iq))
print(f"worst dissipation {Pd:.2f} W, efficiency at 5.5 V {eff*100:.1f}%")
# 12 V -> 3.3 V at 0.5 A: why linear is a bad idea
Pd12 = (12 - 3.3) * 0.5
print(f"12 V to 3.3 V at 0.5 A: {Pd12:.2f} W wasted, efficiency {3.3/12*100:.1f}%")
# Adjustable regulator (LM317 style): Vout = 1.25 * (1 + R2/R1)
R1 = 240
R2 = (5.0 / 1.25 - 1) * R1
print(f"LM317 for 5.0 V: R1 = {R1} ohm, R2 = {R2:.0f} ohm (use 715 ohm -> {1.25*(1+715/240):.3f} V)")
# PSRR: 60 dB at 1 kHz with 100 mV ripple
print(f"100 mV input ripple with 60 dB PSRR -> {100/10**(60/20)*1000:.0f} uV at the output")
# headroom at Vin_min: 1.20 V vs dropout 0.3 V -> OK
# worst dissipation 1.13 W, efficiency at 5.5 V 59.4%
# 12 V to 3.3 V at 0.5 A: 4.35 W wasted, efficiency 27.5%
# LM317 for 5.0 V: R1 = 240 ohm, R2 = 720 ohm (use 715 ohm -> 4.974 V)
# 100 mV input ripple with 60 dB PSRR -> 100 uV at the output

5 V → 3.3 V at 0.5 A is fine for an LDO (1.1 W, 59% efficient). But 12 V → 3.3 V wastes 4.35 W — 73% of the input power becomes heat, which calls for a buck converter. The LM317 needs a 720 Ω resistor for exactly 5 V; the nearest E96 value gives 4.97 V. 60 dB of PSRR reduces 100 mV of ripple to 100 µV.

Common mistakes

Applications

Key takeaways

Going further