2026-05-06
Every precision ADC, DAC, and voltage regulator needs a stable reference voltage that doesn't drift with temperature, supply voltage, or time. The bandgap reference is the elegant solution that's been quietly running inside chips since Bob Widlar invented it in 1971. Understanding how it works will change how you think about analog precision.
The Core Trick: Cancelling Temperature Drift
A silicon diode's forward voltage decreases with temperature at roughly -2 mV/°C — this is called CTAT (Complementary To Absolute Temperature). Meanwhile, the difference between two diode voltages running at different current densities (ΔVBE) increases with temperature, proportional to kT/q. This is PTAT (Proportional To Absolute Temperature), with a slope of about +0.085 mV/°C per unit of ln(N), where N is the current density ratio.
The magic: scale the PTAT voltage by a gain factor and add it to the CTAT diode voltage. The temperature slopes cancel. The sum lands at approximately 1.25 V — astonishingly close to silicon's bandgap energy of 1.12 eV (hence the name).
Quick Design Math
To cancel the -2 mV/°C of VBE, you need PTAT × gain = +2 mV/°C. With ΔVBE using N=8 current density ratio: ΔVBE ≈ 26mV × ln(8) ≈ 54 mV at room temp, with slope ~0.18 mV/°C. So gain ≈ 2/0.18 ≈ 11×. Total output: VBE(0.65V) + 11 × 54mV ≈ 1.24 V.
Real-World Example: The LM4040 Shunt Reference
This 3-pin part acts like a precision Zener — wire it through a series resistor from V+ and it clamps to 2.048 V (or 2.500 V, 4.096 V, etc.) with ±0.1% accuracy and 100 ppm/°C drift. Pick R = (Vsupply - Vref) / Ibias, where Ibias is typically 100 µA to 1 mA. For 5 V supply driving an LM4040-2.048: R = (5 - 2.048) / 0.5mA ≈ 5.9 kΩ.
Practical Gotchas
Rule of thumb: Reference accuracy must be 4× better than your converter's LSB. A 12-bit ADC over 2.048 V has 0.5 mV LSB → reference must hold ±0.125 mV (≈60 ppm) across your operating temperature range.
