Understanding the LM317 Voltage Regulator

The LM317 is a versatile three-pin integrated circuit that maintains a stable output voltage despite variations in input voltage or load current. Its three terminals are the input (from the unregulated power supply), output (where regulated voltage appears), and adjust pin (connected through resistors to ground).

Inside the chip sits a voltage reference of 1.25 V and an internal error amplifier that continuously adjusts an internal pass transistor to keep the adjust-to-output voltage constant at that reference value. This clever design allows external resistors to set any output voltage above 1.25 V without modifying the chip itself.

Common applications include:

  • Variable DC power supplies for bench testing
  • Backup battery charging circuits with regulated current
  • Stabilized outputs in audio amplifiers and instrumentation
  • Industrial equipment requiring programmable voltage levels

LM317 Output Voltage Formula

The output voltage depends on two external resistors and the internal 1.25 V reference. The relationship is linear and straightforward to calculate:

Vout = 1.25 × (1 + R₂ ÷ R₁)

  • V<sub>out</sub> — Output voltage from the LM317 (volts)
  • R₁ — Lower resistor from adjust pin to ground (ohms); manufacturer typically recommends 240 Ω
  • R₂ — Upper resistor from output to adjust pin (ohms); determines voltage gain

Practical Design Considerations

When choosing resistor values, start with R₁ at 240 Ω or 270 Ω (standard manufacturer recommendations reduce quiescent current from the adjust pin). Then calculate R₂ using the formula rearranged:

R₂ = R₁ × (Vout ÷ 1.25 − 1)

For stability, keep both resistor values between 100 Ω and 10 kΩ. Larger resistances increase adjust-pin leakage effects and noise; smaller values waste input current.

The minimum input-to-output voltage difference (dropout voltage) is 3 V, and the absolute maximum input voltage is 40 V. Always include bypass capacitors: 0.1 µF ceramic at the input and 1 µF electrolytic at the output to suppress high-frequency noise and stabilize the feedback loop.

Common Pitfalls and Design Tips

Avoid these mistakes when working with LM317 regulators.

  1. Ignoring the dropout voltage requirement — The input voltage must exceed the output voltage by at least 3 V. Attempting to regulate 12 V input to 11 V output will fail. For near-unity regulation, use a low-dropout (LDO) regulator instead.
  2. Omitting or undersizing output capacitor — Without a capacitor at the output, the regulator can oscillate and become unstable. A 1 µF electrolytic capacitor is the minimum; use 10 µF or more for high-current applications or when the load is far from the regulator.
  3. Selecting resistors with insufficient precision — Standard 5% tolerance resistors can shift the output voltage by ±5%. For critical applications requiring stable voltage, choose 1% metal-film resistors instead.
  4. Exceeding 1.5 A output current without a heat sink — The LM317 in a TO-220 package can dissipate roughly 20 W without a heat sink. Higher currents generate heat that may exceed safe junction temperature. Always calculate power dissipation: P = (V<sub>in</sub> − V<sub>out</sub>) × I<sub>out</sub>.

LM317 Applications in Real Circuits

The LM317 appears in thousands of commercial and DIY designs. Variable bench power supplies often use it as the main regulation stage, allowing users to dial in any voltage from 1.25 V to 30 V. In battery charger circuits, a series resistor connected to the adjust pin replaces R₂, turning the regulator into a precision current source—useful for charging lithium cells or lead-acid batteries at exactly the right current.

Network equipment like Ethernet switches and industrial controllers rely on LM317 variants to generate multiple stable voltages from a single unregulated input. Audio circuits benefit from its low output impedance and good rejection of power-supply noise, reducing hum and interference in sensitive microphone preamps.

Frequently Asked Questions

How does the LM317 maintain constant output voltage?

The LM317 contains an internal error amplifier that compares the voltage between the output and adjust terminals against a fixed 1.25 V reference. When this voltage drifts, the amplifier adjusts an internal pass transistor to restore equilibrium. This feedback loop is continuous and very fast, responding to changes in input voltage or load current within microseconds. The result is a stable output that varies only slightly despite external disturbances.

Can I use the LM317 to regulate voltages below 1.25 V?

No, the minimum output voltage is 1.25 V because that is the internal reference voltage. If you need lower voltages—such as 1.0 V or 0.5 V—you must use a different regulator family, such as an LT1083 (which offers sub-1 V outputs) or a dedicated low-voltage linear or switching regulator designed for your specific voltage range.

What happens if the input voltage equals the output voltage?

The LM317 will stop regulating. It requires a minimum 3 V difference (dropout voltage) between input and output to maintain control over the pass transistor. If the input is lower than the output plus 3 V, the internal feedback mechanism saturates, and the output voltage will sag below your calculated value or drop to near the input voltage. This is why selecting an input voltage well above your target output is crucial.

Should I use 0.1% or 1% resistors for the divider network?

For most applications, 1% metal-film resistors are sufficient and cost-effective. They limit output voltage error to roughly ±1.25%, which is acceptable for general-purpose power supplies. Use 0.1% precision resistors only if your application demands voltage stability better than ±0.2 V—such as precision instrumentation or analog-to-digital converter reference supplies. For hobby projects, standard 5% resistors are acceptable if you trim the voltage with a potentiometer in place of R₂.

What is the difference between LM317 and LM317HV?

The LM317HV (high-voltage variant) can handle input voltages up to 60 V, compared to the standard LM317's 40 V maximum. Both regulate to the same 1.25 V reference and deliver the same 1.5 A output. Choose the HV version if your unregulated supply might exceed 40 V, such as in industrial equipment or systems powered by rectified three-phase AC. The HV variant is slightly more expensive but worth the cost when reliability is critical.

Do I need a heat sink for the LM317?

It depends on power dissipation. The LM317 can dissipate approximately 20 W in free air without a heat sink. Calculate the heat: P = (V_in − V_out) × I_out. For example, dropping 15 V at 1 A generates 15 W, requiring a small aluminum heat sink. At very low currents (under 100 mA) or small voltage differences, no heat sink is necessary. Always verify your specific design by calculating worst-case power dissipation and checking the chip's thermal resistance.

More other calculators (see all)