Architecture of the LM317 Adjustable Linear Voltage Regulator
The LM317 is a monolithic three-terminal adjustable positive linear voltage regulator designed by Robert C. Dobkin at National Semiconductor in 1976. Widely considered one of the most versatile analog integrated circuits in electronics history, it delivers over $1.5\text{ A}$ of load current across an adjustable output range spanning $1.25\text{ V}$ to $37\text{ V}$.
Unlike classic fixed-voltage linear regulators (e.g., the 7805 or 7812) that reference their control circuitry to an external chassis ground pin, the LM317 possesses no physical ground terminal. Instead, its internal error amplifier and temperature-compensated bandgap voltage reference float between the OUTPUT ($V_{\text{out}}$) terminal and the ADJUST ($\text{ADJ}$) terminal, maintaining a precision potential of:
$$V_{\text{ref}} = 1.25\text{ V} \quad (\text{Nominal: } 1.20\text{--}1.30\text{ V})$$Because the regulator floats on the output voltage, the differential voltage experienced across the silicon pass transistor is simply $(V_{\text{in}} - V_{\text{out}})$. As long as this differential limit ($40\text{ V}$ standard, $60\text{ V}$ for the LM317HV) is not breached, the LM317 can regulate high-voltage supplies safely.
Derivation of the Output Voltage Equation
The programming network consists of two external resistors: $R_1$ placed between OUT and ADJ, and $R_2$ connected between ADJ and ground.
Because the IC strictly maintains $V_{\text{ref}} = 1.25\text{ V}$ across $R_1$, a constant reference current $I_1$ flows down through $R_1$:
$$I_1 = \frac{V_{\text{ref}}}{R_1}$$At the ADJ terminal node, Kirchhoff's Current Law (KCL) dictates that the total current flowing through resistor $R_2$ to ground is the sum of reference current $I_1$ and internal bias adjustment current $I_{\text{adj}}$:
$$I_2 = I_1 + I_{\text{adj}} = \frac{V_{\text{ref}}}{R_1} + I_{\text{adj}}$$The total output voltage $V_{\text{out}}$ is the sum of the potential across $R_1$ and the potential across $R_2$:
$$V_{\text{out}} = V_{\text{ref}} + I_2 \cdot R_2 = V_{\text{ref}} + \left( \frac{V_{\text{ref}}}{R_1} + I_{\text{adj}} \right) R_2$$ $$V_{\text{out}} = V_{\text{ref}} \left( 1 + \frac{R_2}{R_1} \right) + I_{\text{adj}} \cdot R_2$$In typical components, $I_{\text{adj}}$ is held to a tightly controlled nominal value of $50\ \mu\text{A}$ ($100\ \mu\text{A}$ maximum). When $R_1$ is sized so that $I_1 \ge 5\text{ mA}$, the term $I_{\text{adj}} \cdot R_2$ represents an error smaller than $1\%$, allowing the simplified approximation:
$$V_{\text{out}} \approx 1.25 \left( 1 + \frac{R_2}{R_1} \right)$$Why is $R_1$ Standardized at $240\ \Omega$ or $120\ \Omega$?
All linear regulators require a minimum load current ($I_{L,\text{min}}$) to sustain internal biasing and prevent the output voltage from floating up to the unregulated input rail under no-load conditions. The LM317 datasheet specifies a maximum required minimum load current of $3.5\text{ mA}$ (commercial grade) to $10\text{ mA}$ (military/extreme temperature grade).
- With $R_1 = 240\ \Omega$: $I_1 = \frac{1.25\text{ V}}{240\ \Omega} = 5.21\text{ mA}$. This satisfies the $3.5\text{ mA}$ requirement for all standard operating temperatures.
- With $R_1 = 120\ \Omega$: $I_1 = \frac{1.25\text{ V}}{120\ \Omega} = 10.42\text{ mA}$. This satisfies the strictest $10\text{ mA}$ worst-case military specification.
Thermal Power Dissipation ($P_D$) and Heatsink Thermal Resistance Calculation
Linear regulators operate by dropping excess voltage across an internal series Darlington pass transistor, converting the product of voltage differential and load current directly into waste heat. Total internal power dissipation $P_D$ is:
$$P_D = (V_{\text{in}} - V_{\text{out}}) \cdot I_L + V_{\text{in}} \cdot I_{\text{adj}} \approx (V_{\text{in}} - V_{\text{out}}) \cdot I_L$$To prevent the silicon die from exceeding its maximum safe junction temperature ($T_{J,\text{max}} = 125^\circ\text{C}$ to $150^\circ\text{C}$), the thermal impedance chain from junction to ambient air must satisfy:
$$T_J = T_A + P_D \cdot \theta_{JA}$$ $$\theta_{JA} = \theta_{JC} + \theta_{CS} + \theta_{SA}$$Where:
- $T_A$: Maximum expected ambient temperature ($^\circ\text{C}$).
- $\theta_{JC}$: Junction-to-case thermal resistance (typically $4.0^\circ\text{C/W}$ for a standard TO-220 package).
- $\theta_{CS}$: Case-to-heatsink mounting interface thermal resistance (typically $0.5\text{--}1.0^\circ\text{C/W}$ with silicone thermal grease and mica insulator).
- $\theta_{SA}$: Required heatsink-to-ambient thermal resistance ($^\circ\text{C/W}$).
Solving for the maximum permissible heatsink thermal resistance:
$$\theta_{SA} \le \frac{T_{J,\text{max}} - T_A}{P_D} - (\theta_{JC} + \theta_{CS})$$| Package Type | Max Current ($I_{\text{max}}$) | $\theta_{JC}$ (Junction-to-Case) | $\theta_{JA}$ (Free Air, No Heatsink) | Max Uncooled Dissipation ($25^\circ\text{C}$) |
|---|---|---|---|---|
| TO-220 (LM317T) | $1.5\text{ A}$ | $4.0^\circ\text{C/W}$ | $50^\circ\text{C/W}$ | $1.5\text{--}2.0\text{ W}$ |
| TO-3 (LM317K Metal Can) | $1.5\text{ A}$ | $2.3^\circ\text{C/W}$ | $35^\circ\text{C/W}$ | $2.5\text{--}3.0\text{ W}$ |
| D2PAK / TO-263 (Surface Mount) | $1.5\text{ A}$ | $4.0^\circ\text{C/W}$ | $45^\circ\text{C/W}$ (On 1-inch copper pad) | $1.8\text{ W}$ |
| SOT-223 (LM317M, 500mA) | $0.5\text{ A}$ | $15^\circ\text{C/W}$ | $100^\circ\text{C/W}$ | $0.7\text{--}1.0\text{ W}$ |
Protection Diodes and Ripple Rejection Capacitor Optimization
To achieve high power supply rejection ratio (PSRR) and ensure fail-safe operation, two external design practices are essential:
- ADJ Bypass Capacitor ($C_{\text{adj}}$): Placing a $10\ \mu\text{F}$ capacitor across resistor $R_2$ bypasses the feedback divider ripple at AC, boosting ripple rejection from $65\text{ dB}$ to an exceptional $80\text{ dB}$ (a $10\times$ improvement in 100/120 Hz mains hum attenuation).
- Reverse Protection Diode $D_1$ (OUT to IN): When the input power supply is turned off, input capacitors discharge faster than large output filter capacitors ($C_{\text{out}}$). Without protection, current flows backwards from OUT into the internal collector, destroying the series pass transistor. Diode $D_1$ (1N4002 or 1N4007) clamps reverse voltage to $0.7\text{ V}$.
- Discharge Protection Diode $D_2$ (ADJ to OUT): When bypass capacitor $C_{\text{adj}}$ is utilized, an abrupt output short-circuit will dump $C_{\text{adj}}$ energy back into the ADJ pin. Diode $D_2$ discharges $C_{\text{adj}}$ safely through the load.
Step-by-Step Engineering Case Study: 9.0V Precision Benchtop Supply
Scenario: Design a regulated $V_{\text{out}} = 9.0\text{ V}$ benchtop supply delivering up to $I_L = 800\text{ mA}$ from an unregulated DC rectified rail of $V_{\text{in}} = 15.0\text{ V}$. An LM317T in a TO-220 package ($\theta_{JC} = 4.0^\circ\text{C/W}$) is used. Ambient operating temperature is $T_A = 40^\circ\text{C}$ and junction limit is set conservatively to $T_{J,\text{max}} = 110^\circ\text{C}$.
Step 1: Choose $R_1$ and Solve for $R_2$:
Select standard precision metal film resistor $R_1 = 240\ \Omega$.
$$R_2 = \frac{V_{\text{out}} - V_{\text{ref}}}{\frac{V_{\text{ref}}}{R_1} + I_{\text{adj}}} = \frac{9.0\text{ V} - 1.25\text{ V}}{\frac{1.25\text{ V}}{240\ \Omega} + 50 \times 10^{-6}\text{ A}} = \frac{7.75\text{ V}}{0.0052083 + 0.000050} = \frac{7.75}{0.0052583} = 1,473.8\ \Omega$$Select standard E96 precision value $R_2 = 1.47\ \text{k}\Omega$ ($1470\ \Omega$) or trim with a multi-turn cermet potentiometer.
Step 2: Check Input-to-Output Voltage Headroom:
$$V_{\text{diff}} = V_{\text{in}} - V_{\text{out}} = 15.0\text{ V} - 9.0\text{ V} = 6.0\text{ V}$$This comfortably exceeds the $2.0\text{ V}$ worst-case dropout voltage requirement.
Step 3: Calculate Regulator Power Dissipation ($P_D$):
$$P_D = (V_{\text{in}} - V_{\text{out}}) \cdot I_L = 6.0\text{ V} \times 0.800\text{ A} = 4.80\text{ Watts}$$Step 4: Compute Required Heatsink Thermal Resistance ($\theta_{SA}$):
Assuming silicone grease mounting thermal resistance $\theta_{CS} = 1.0^\circ\text{C/W}$:
$$\theta_{SA} \le \frac{T_{J,\text{max}} - T_A}{P_D} - (\theta_{JC} + \theta_{CS}) = \frac{110^\circ\text{C} - 40^\circ\text{C}}{4.80\text{ W}} - (4.0 + 1.0)$$ $$\theta_{SA} \le \frac{70}{4.80} - 5.0 = 14.58 - 5.0 = 9.58^\circ\text{C/W}$$Conclusion: To prevent thermal shutdown, a stamped aluminum or extruded heatsink with thermal resistance rating $\theta_{SA} \le 9.5^\circ\text{C/W}$ must be mounted to the LM317T TO-220 tab.
Frequently Asked Questions (FAQ)
How does the LM317 regulate its output voltage?
The LM317 maintains an internal temperature-compensated $1.25\text{ V}$ bandgap reference voltage ($V_{\text{ref}}$) between its OUT and ADJ terminals. By forcing this fixed $1.25\text{ V}$ across programming resistor $R_1$, a constant reference current flows into resistor $R_2$, developing an output voltage: $V_{\text{out}} = V_{\text{ref}} \left(1 + \frac{R_2}{R_1} \right) + I_{\text{adj}} R_2$.
Why is $R_1$ commonly chosen as $240\ \Omega$ or $120\ \Omega$?
The LM317 requires a minimum operating load current (typically $3.5\text{ mA}$ to $10\text{ mA}$) to maintain stable regulation under all temperature conditions. With $V_{\text{ref}} = 1.25\text{ V}$, setting $R_1 = 120\ \Omega$ guarantees a baseline current of $10.4\text{ mA}$, while $R_1 = 240\ \Omega$ guarantees $5.2\text{ mA}$, satisfying the minimum load specification without requiring an external load.
What is the dropout voltage of the LM317?
The LM317 requires an input-to-output voltage differential ($V_{\text{in}} - V_{\text{out}}$) of at least $1.5\text{ V}$ to $2.5\text{ V}$ depending on load current and junction temperature to keep its internal Darlington pass transistor in active regulation.
Why are protection diodes recommended in LM317 circuits?
If input power is abruptly grounded while large capacitors exist at the output or ADJ pin, reverse current flows into the regulator's internal transistors. Diode $D_1$ across OUT-to-IN and diode $D_2$ across ADJ-to-OUT safely divert discharge currents away from internal junctions.