LM-317 Voltage Regulator Designer
by Martin E. Meserve
Contact Me |
What's New |
Power Supplies | LM317 Voltage Regulator
Place your mouse pointer over any of the catagories above,
for an active menu of their contents.
Click to view the
This web page is intended to aid the user in developing a voltage regulator
that can be used to obtain tighter load variations and reduce ripple voltages.
The power supply, described in the
Un-Regulated Power Supply Design
web page, is intended to be a front end to this regulator. 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.
The heart of the regulator circuit is
the LM317 3-terminal adjustable regulator. 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.
There is a wide variety of configurations
for the LM317, but this web page will only deal with a couple
of them. If you want to look deeper into the LM317 you can
LM317 Specification available from National Semiconductors Inc..
The simplest configuration is shown in Figure 1.
It's very simple and consists of the regulator
and two resistors. The un-regulated power supply voltage is fed into the
terminals on the left and the regulated voltage is taken from the
terminals on the right.
The key to determining the resistor
values, for a specific regulator voltage, is the fact that the
voltage between the ADJ terminal and the OUT
terminal will always be 1.25 Volts.
Figure 1 - LM317 Regulator Basic Configuration
Based on this, the voltage across R3
will be 1.25 Volts. R3 is normally chosen to be between 100 and
470 Ohms. Then, knowing that the voltage across R4 must be the
Output voltage, minus the voltage across R3, we can use
the set of equations on the right to determine the value of
R4 for any output voltage.
Pretty simple, huh? Well, a usable circuit
will be a little more complicated than that. As shown in Figure 2,
most manufacturers recommend By-Passing the Input and Output
leads with 1 uF Tantalum Capacitors soldered directly
to the regulator leads, as close as possible to the points where the leads
project through the heat sink.
If one of your requirements is to be able
to adjust the output voltage over a range of voltages, R4 could be relpaced
with a variable resistor, as shown in Figure 3. This is not a very good
method to control the output voltage as control near the high end of the
range will be rough. And, unless you actually do want your output voltage
to go down to 1.25 Volts, it would be better to use a fixed/variable
combination to vary the output over a small range of voltages.
at the end of this web page, on determining the value of a
Variable Resistor, contains
a more indepth explanation.
Figure 2 - LM317 Regulator with 1uF By-Pass Capacitors
Figure 3 - LM317 Regulator with Variable Output Voltage
And, last but not least, is your current
requirements. If your regulator needs to manage more than 1.5 Amps,
the circuits above will not be sufficient. To extend the current carrying
capacity of the regulator circuit, a power transistor will need to
Figure 4 shows the addition
of a resistor, R3, and PNP Power transistor, that would be required to
shunt some of the current around the LM317 regulator. This web page does
not cover this kind of arrangement, but I may add a follow-on to these
Figure 4 - LM317 Regulator with Power Transistor
LM317 Regulator Design Data
On the right, enter the minimum
regulator Input Voltage. For the LM317 regulator this voltage must be
greater than, or equal to, 3.7 Volts.
Then, enter your required Output Voltage.
This voltage can be set as low a 2.5 volts as long as, (1) the voltage
is 1.25 volts lower then the Input Voltage and (2) the
voltage differential, between the input and output, does not exceed
40 volts. You will be notified if either of these conditions is not met.
If all is well with the Input/Output Voltages,
select a value for R3 and the tolerance of the resistor R4,
that will be used in the circuit. The selectable values for R3 are
5% tolerance resistor values, however, R4 can be a 5%
or 10% tolerance resistor. The range of resistors available
in 5% tolerance is greater than 10% and will give
you a output voltage that is closer to the output voltage you require.
You can pick any resistor and tolerance you want,
for initial calculations, and the change it later at any time. All calculations
are re-done any time any input data changes.
Value of R3
Tolerance of R4
resistor for R3 produces a current through R3 of
x. Assuming the
Output Voltage to be x,
and the voltage across R3 to be 1.25 Volts, the voltage across R4 should be
x with a current of
x. The calculated value for R4
would then be x.
If a x,
x% Tolerance, resistor is used
for R4, the output voltage will be x.
If a x,
x% Tolerance, resistor is used
for R4, the output voltage will be x.
These are the closest resistors values, above and below the calculated value,
for the tolerance you specified.
Create a Precision Resistor from
Two Standard Resistors for R4
If the standard resistors, calculated for R4
in the previous sections, doesn't bring the output voltage close enough
to the value you want, you can put two resistors in parallel to do the
This section calculates the values of two standard value resistors
Ra and Rb which, when connected in
parallel, will result in a net resistance R that will
be within very close tolerances to the required value of R4.
This web page only does a calculation for the resistor R4, that is
determined within this web page. For a more versatile web page
and a more detailed explanation on how this calculation works, go to the section on
Resistor Tolerances forRa & Rb
For precision resistors less than 10 Ohms, refer to the
HamCalc program Copper Wire Programs for data on copper wire resistors.
For a target resistance of
x, with a
voltage of x across
point X to Y, and using x%
tolerance resistors, a value of x
for Ra and x for
Rb have been selected. Ra will conduct
x of current and dissipate
x of power.
Rb will conduct x
of current and dissipate x
of power. Select appropriate power ratings for these resistors.
The actual resistance between points X and Y, using the
above resistors, is x
which will produce an output voltage of x.
This is within x% of
the required output voltage.
Replacing R4 with a Variable Resistor
A variable resistor in place of
R4 will allow you to make the regulator output variable over a range
or enable you to fine tune the regulator output. You have two choices
here. You can replace R4 directly with a variable resistor, or, replace
R4 with a fixed resistor and small variable resistor, in series.
Replacing R4 directly, even though it minimizes parts, is not really a
very good selection. As can be seen from the drawing,
as the potentometer is adjusted, part of R4 is placed in series
with R3, continually changing the relationship of the resistances
above and below the tap point that goes to the ADJ pin of the
Figure 5 - LM317 Regulator with Variable Output Voltage
Having the tap point vary over a wide range will cause the output
to vary widely and will, more than likely, cause the regulator to
go into the Dropout range, where it will no longer be effective.
To illustrate my point, lets assume that you need a regulator that
will have 20 Volts on the input and 15 Volts on the output. Further,
selecting a 220 Ohm resistor for R3 requires a 2420 Ohm resistor for
R4. If you choose a 2,000 Ohm variable resistor for R4, you won't be
able to bring the output to the full 15 Volts. Choosing the next highest
variable resistor avialable, 5,000 Ohms, the chart on the right could be made.
The chart assumes a linear variable resistor and shows the percentage of
rotation versus the output voltage.
In the chart, note that almost 50% of the output voltage
swing is confined to the upper 10% of the variable resistor.
Unless your dealing with a 10 turn variable resistor, this would be
a little difficult to adjust in that range. Also, at or near the 100%
setting, the differential voltage is too small for the regulator and it drops
out of regulation.
RP = Min
Replace R4 With a Fixed Value Resistor and a Small Variable Resistor
A better solution to the control problem is to replace R4 with a small fixed
value resistor in series with a variable resistor, RP. As you can
see in Figure 6, the wiper of the variable resistor is
connected so that it shorts out part of the resistance as it is rotated.
If you replace R4 with
a x potentiometer,
and a standard value resistor of x
in series, you would be able to vary the output voltage from
Use the button on the right to view the Variable Resistor
Setting v.s. Output Voltage.
Figure 6 - LM317 Regulator with a Small Variable Resistor and a Fixed Resistor