bandgap reference
A bandgap reference is a small analog circuit that produces one steady voltage — close to 1.2 V — that barely budges as the chip heats up, cools down, or sees its supply sag. Almost every chip needs a rock-solid yardstick to measure against: an ADC needs to know what "full scale" means, a voltage regulator needs to know what output to aim for, a power-on-reset needs to know when the supply is "high enough." A raw battery or supply rail drifts with temperature and load and is useless as a yardstick. The bandgap is the circuit that makes the yardstick.
The trick is to cancel temperature by adding two opposite drifts. A forward-biased diode (or a transistor's base-emitter voltage, Vbe) drops a little less voltage as it warms — it falls roughly 2 mV for every degree Celsius. That is a CTAT term: Complementary To Absolute Temperature. Separately, if you run two transistors at different current densities, the difference in their Vbe rises with temperature — a PTAT term, Proportional To Absolute Temperature, set by the thermal voltage kT/q (about 26 mV at room temperature). Add a falling CTAT to a rising PTAT, each scaled just right, and the two slopes cancel: the sum sits flat across temperature.
Why does the flat point land near 1.2 V? Because that is, near enough, the bandgap voltage of silicon extrapolated to absolute zero — the energy gap that an electron must cross to conduct. When you force the CTAT and PTAT slopes to cancel, you are really extrapolating Vbe back to 0 K, and silicon hands you its bandgap. That is the whole reason for the name: the circuit does not measure the bandgap on purpose, but the physics of the cancellation drags the answer to it. Real bandgaps hold their output to within a fraction of a percent over the full automotive temperature range, often after a small one-time trim.
.temp -40 25 125 ; sweep across the temperature corners .op ; solve the operating point at each temp ; Vref = Vbe(CTAT, ~ -2 mV/C) + K * Vt(PTAT, Vt = kT/q) ; choose K so the two slopes cancel -> Vref ~ 1.2 V, flat vs temp
An ngspice-style sketch: solve the bandgap at three temperatures and confirm Vref barely moves. Vref is a CTAT Vbe plus a PTAT term scaled by K so their temperature slopes cancel near 1.2 V.
The classic topology is the Brokaw cell or Widlar bandgap (Bob Widlar, late 1960s–early 1970s). One subtlety bites every beginner: a bandgap has a stable "zero" state where no current flows at all, so it needs a start-up circuit to kick it awake at power-on, then get out of the way. Two more cautions: the 1.2 V output cannot run from a supply below about 1.2 V, so deep-submicron chips use sub-bandgap variants that produce a lower reference; and the output is high-impedance, so it is usually buffered before driving a real load. The temperature curve is not perfectly flat but gently parabolic — the residual bow is called curvature, and high-accuracy parts add curvature correction to flatten it further.