Skip to main content

Design LM317 regulator 7 V to 21 V

Short answer

Use R1 = 240 Ω, R2 as a fixed 1.1 kΩ resistor in series with a 2.7 kΩ potentiometer. Output voltage is Vout = 1.25(1 + R2/R1), giving an adjustable range from about 7 V to 21 V with an input supply near 26 V.

Design a voltage regulator to give output voltage from 7V to 21V using LM317.

LM317 is a three-terminal adjustable regulator. It keeps a constant reference voltage Vref = 1.25 V between its output and adjust terminals. With R1 from OUT to ADJ and R2 from ADJ to ground, the output voltage is

Vout = 1.25 (1 + R2/R1) + Iadj · R2

with Iadj ≈ 50 µA (small, usually neglected).

Circuit

            +--------------+
 Vin o--+---| IN       OUT |---+------+--o Vout
        |   |    LM317     |   |      |
      [C1]  |     ADJ      | [R1]   [C2]
        |   +------+-------+   |      |
       GND         +-----------+     GND
                   |
                 [R2 = fixed + pot]
                   |
                  GND

R1 = 240 Ω (the recommended value is 120 to 240 Ω, so that the minimum load current of about 5 to 10 mA flows: 1.25 V / 240 Ω = 5.2 mA). C1 = 0.1 µF (input bypass), C2 = 1 µF (output).

Design for 7 V to 21 V

  • Take R1 = 240 Ω.
  • For Vout = 7 V (minimum), R2 = R1 (Vout/1.25 − 1) = 240 × (7/1.25 − 1) = 1104 Ω
  • For Vout = 21 V (maximum), R2 = 240 × (21/1.25 − 1) = 3792 Ω

A potentiometer alone would let the output go down to 1.25 V, so a fixed resistor is connected in series with the pot to set the 7 V minimum:

  • Fixed resistor Rfixed = 1104 Ω → standard value 1.1 kΩ
  • Potentiometer = 3792 − 1104 = 2688 Ω → standard value 2.7 kΩ (or a 2.5 kΩ preset)

Check (neglecting Iadj): Vout(min) = 1.25 (1 + 1100/240) = 6.98 V; Vout(max) = 1.25 (1 + 3800/240) = 21.04 V. Including Iadj = 50 µA adds only Iadj R2 ≈ 0.06 to 0.19 V.

Input voltage

The LM317 needs a dropout of about 3 V, so Vin ≥ Vout(max) + 3 = 24 V. Use an unregulated supply of about 26 V (keeping Vin − Vout below the 40 V device limit). The regulator dissipates (Vin − Vout) × IL, so a heat sink is needed for large currents (up to 1.5 A).

Answer: R1 = 240 Ω, R2 = 1.1 kΩ fixed + 2.7 kΩ pot (or 2.5 kΩ preset) in series, Vin about 26 V.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Electronics Devices and Circuit chapter 6 questions →