Skip to main content

Design LM317 regulator 5 V to 20 V

Short answer

Set R1=240Ω between OUT and ADJ. For Vout=5V, R2=720Ω (use 680Ω); for 20V, R2=3600Ω. Use fixed 680Ω in series with a 3kΩ potentiometer. Input voltage about 24V. Output is adjustable from ~4.8V to 20.4V.

Design a 5V to 20V variable DC voltage regulator using LM317.

LM317 is a three-terminal adjustable positive regulator (1.25 V to 37 V, up to 1.5 A). Between OUT and ADJ it holds a constant reference Vref = 1.25 V, so with R1 from OUT to ADJ and R2 from ADJ to ground:

Vout = 1.25 (1 + R2/R1) + Iadj R2 (Iadj ≈ 50 µA, neglected)

Circuit

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

C1 = 0.1 µF (input bypass), C2 = 1 µF (output).

Design for 5 V to 20 V

  1. Choose R1 = 240 Ω. The current in R1 is 1.25/240 = 5.2 mA, which is above the minimum load current of the LM317 (about 3.5 to 5 mA).
  2. R2 = R1 (Vout/1.25 − 1)
  3. Minimum output 5 V: R2(min) = 240 (5/1.25 − 1) = 720 Ω
  4. Maximum output 20 V: R2(max) = 240 (20/1.25 − 1) = 3600 Ω
  5. A potentiometer alone would let the output go down to 1.25 V, so use a fixed resistor in series with the pot:
    • Fixed resistor = 720 Ω. This is not a common standard value, so use 680 Ω (the nearest lower standard value), which gives a minimum of 1.25 (1 + 680/240) = 4.8 V, so 5 V can still be set.
    • Potentiometer = 3600 − 720 = 2880 Ω; use a 3 kΩ pot or preset. With 680 Ω + 3 kΩ the maximum is 1.25 (1 + 3680/240) = 20.4 V, so the full 5 V to 20 V range is covered.
  6. Input voltage: the LM317 needs a dropout of about 3 V, so Vin ≥ 20 + 3 = 23 V. Use an unregulated supply of about 24 V dc (the maximum Vin − Vout is 40 V).

The pass transistor inside the IC dissipates (Vin − Vout) IL, so a heat sink is needed at high current.

Answer: R1 = 240 Ω, R2 = 720 Ω (680 Ω standard) fixed + 2880 Ω (3 kΩ) pot, Vin ≈ 24 V.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Electronics Devices and Circuit chapter 6 questions →