Introduction
Figure 1 - LM317 Regulator
VI
Ground
CI
0.1 uF
VI
VO
ADJ
U1
LM317
R3
R4
D6
1N4002
D7
1N4002
+
CADJ
10 uF
CO
1.0 uF
VO
Ground
VREF
1.25V
IADJ
50 uA
VO = VREF × (1+ R4/R3) + (IADJ × R4)
VR3 = VREF = 1.25 Volts
IR3 = VR3 / R3
VR4 = VO - VR3
R4 = R3 × [VO/VR3 - 1]

The power supply, described in the Un-Regulated Power Supply Design web page, is intended to be a front end to this regulator. The regulator in Figure 1 can be used to obtain tighter load variations and reduce ripple voltages. However, any unregulated power supply can be used to feed this regulator as long as it meets the current and voltage requirements of the regulator.

Figure 1 is the recommended regulator circuit for the LM317. The LM317 is a floating regulator and therefore sees only the "Input-to-Output" differential voltages. This allows the LM317 to be used in power supplies of several hundred volts, as long as the maximum "Input-to-Output" differential of 40 Volts is not exceeded.

The designators R1, R2, and D1-D5 are not used in the regulator drawing to avoid confusion between this regulator and the Un-Regulated Power Supply Design. The list below is a brief description of the parts in the diagram and their intended use.

  • R3 and R4 are required to set the output voltage.
  • CADJ is recommended to improve ripple rejection
  • CI is recommended particularly if the regulator is not in close proximity to the power supply capacitors. A 0.1 uF or 1 uF ceramic or tantalum capacitor provides sufficient bypassing for most applications, especially when adjustment (CADJ) and output (CO) capacitors are used.
  • CO improves transient response, but is not needed for stability.
  • Protection diode D7 is recommended if CADJ is used. The diode provides a low-impedance discharge path to prevent the capacitor from discharging into the output of the regulator.
  • Protection diode D6 is recommended if CO is used. The diode provides a low-impedance discharge path to prevent the capacitor from discharging into the output of the regulator.
LM317 Regulator Design
Figure 2 - LM317 Regulator Calculator
VI
Ground
CI
0.1 uF
VI
VO
ADJ
U1
LM317
R3
240 Ω
R3 =
R4
2,640.00 Ω
D6
1N4002
D7
1N4002
+
CADJ
10 uF
CO
1.0 uF
Ground
VO
VREF
1.25V
5.21
mA
5.31
mA
IADJ
50 uA
R4 Tolerance:
Standard Value > R4: 2,700 Ω, VO = 15.31 V,
Exact Value = R4: 2,640.00 Ω, VO = 15.00 V,
Standard Value < R4: 2,400 Ω, VO = 13.75 V,
Headroom
VO - VI = 5.00 Volts
In Range

Figure 2 is a design calculator for the LM317 Regulator. It is the same drawing as Figure 1, but it has been widened a bit, and the equations removed, to accomodate data input, output, and calculation data has been added.

In the spaces provided, enter your Input Voltage (VI), Required Output Voltage (VO), and select the value for R3. The dropdown selector for R3 provides you with 17 - 5% resistor values between 100 Ω and 470 Ω. If you wish to use 10% tolerance values, only use the values with the yellow background. The equations behind the calculator will then calculate the exact resistance required for R4, and write it on the drawing.

At the botton of the schematic, standard value resistors, above and below the calculated value, are displayed. Next to the resistor values are the calculated output voltage. If there is a problem with any of the resistor values, like regulator dropout, it will be indicated in "RED" next to the resistor value and voltage. According to the specification for the LM317:

"The LM317 requires up to 3 Volts of headroom (VI – VO) to operate in regulation. The device may drop out and output voltage will be input voltage minus drop out voltage with less headroom."

The values are based on the tolerance range selected. If you needed greater accuracy, try the method listed below.

Create a Precision Resistor for R4
Figure 3 - Precision Resistor
Target Resistance, RT (Ω):
Tolerance:
Voltage, VX-Y:
RA = 2,700 Ω
IA = 5.1 mA
RB = 120,000 Ω
IB = 114.6 uA
X
Y
2,640.6 Ω
5.2 mA, 71.6 mW
Percentage from Target Resistance = 0.02 %

This is the same calculator that appears on my Standard/Custom Resistor web page. The calculator on the right determines the value of two standard value resistors (RA and RB) which, when connected in parallel, will result in a net resistance RT (Or in the case of the LM317 regulator, R4) that will be within very close tolerances, of almost any value you want.

The program works by first selecting a standard resistor (RA) that is close, but larger, than the specified resistance. It then determines the value of another standard resistor (RB) that can be placed in parallel with the first one (RA) to obtain the resistance required. Because we are using standard resistors, the final value will not be exact, but it will be within 2 or 3 percent, even when you are using 10 percent resistors.

Enter the Target Resistance in the area provided, and then select the tolerance of the resistors you wish to use. If you are interested in the currents that are flowing in each resistor, enter the voltage that will appear across the resistors. Then you can determine the power dissipation required.

Note: You can enter a value that is a standard resistor value. In that case the calculator will find the next highest standard resistor value, based on your Tolerance selection, for RA. It will then calculate an appropriate value for RB to meet your target requirement. It will then indicate the the entered value is a standard value.

Adjustable Output Voltage
Figure 4 - LM317 Variable Regulator Example
VI
20 Volts
Ground
CI
0.1 uF
VI
VO
ADJ
U1
LM317
R3
240 Ω
R4
2,400 Ω
RV
300Ω
D6
1N4002
D7
1N4002
+
CADJ
10 uF
CO
1.0 uF
VO
15 Volts
(13.8 - 15.3)
Ground

Simply replacing R4 with a variable resistor, and connecting the wiper arm to the regulator (ADJ), really doesn't make a good variable power supply. At one end, the adjustment would be very small. At the other end, a small resistance change will cause a huge voltage change. The regulator might also fall into the "Dropout" range and provide no regulation at all.

But, if you only want an adjustment over a small range, R4 could be replaced by a standard resistor and a low value potentiometer. Take, for example, the default settings on the regulator calculator (Figure 4). It has 20 Volts input and the required output is 15 Volts. A 240 Ohm resistor is used for R3. The calculator comes up with a 2,700 Ω or 2,400 Ω resistor for R4. But the 2,700 Ohm resistor sets the output at 15.3 Volts and the 2,400 Ω resistor sets it at 13.75 Volts. However, if you use a 2,400 Ω resistor in series with a 300 Ω potientiometer, you should be able to adjust the output to exactly 15 Volts.