## LM317 basics. | |

This is the basic calculations and some application hints for LM317 and similar 3-pin voltage regulators where the reference voltage is referred to the output voltage pin.

Much of this info applies to both positive and negative regulators. The pin-out for different regulators are different - see the datasheet.

These calculations being basic, some "finer" points like line- and load-regulation, temperature drift, etc. are ignored ( these calculations are essential for some applications though ).

Fig.1: Basic LM317 schematic.

C1 is an input decoupling capacitor. This is required for stability. A 100 nF ceramic located within some mm of the regulator normally works.

The rectifier electrolytic may be sufficient for stability with some circuits/PCB lay-outs, but you can buy a lot of 100 nF ceramics for the time it takes to test this over the relevant line- and load-range.

R1 and R2 set the output voltage:

To find R1 or R2:

Including Iadj in the calculations ( this is irrelevant for many applications ):

LM317 have a minimum load current to maintain regulation. If the load current is less than this, the output voltage will rise.

The minimum load current is typically around 10 mA at maximum Vin-Vout at high temperature.

Most application manuals suggest to design for half this value, and it normally works well.

Designing for a minimum load current of 0 on Vout, the minimum load current for the regulator must flow in R1, setting a maximum value for R1:

A value of 240 Ω is suitable for most applications.

In general, R1 must be connected as close as possible to the LM317 output pin for good regulation.

The resistor Rw in fig. 1 is the wire resistance in the circuit and it can be seen that the voltage Io*Rw is added to the voltage across R1, causing the output voltage to drop as the load current is increased.

If you need to increase the regulator output resistance, use a "real" resistor for Rw.

C3 and C4 is the output decoupling capacitor. This is optional and can improve the regulator response for transient loads and/or reduce the regulator output noise.

I normally use a 100 nF ceramic for C3. This will reduce the regulator's sensitivity to HF pick-up from the output wiring without upsetting the regulators feedback loop.

C4 is a larger value capacitor ( 10 µF to 1000 µF ) to improve transient response and/or reduce output noise.

This capacitor MUST have a minimum series resistance to maintain regulator stability. In most cases, the ESR ( Resr in fig.1 ) of a general purpose electrolytic is sufficient.

If you - for any reason - decide to use a low-impedance electrolytic for C4, do make room for some additional series resistance in R3 or Resr locations.

The circuit with R3 will have better transient load response, but DC load regulation will be worse.

Typical values for R3/Resr is 0.5 Ω to 2 Ω, depending on the output voltage and current.

You may have to go to extremes ( like reading the datasheet and application manuals ) to get this right.

C2 improves the ripple rejection of the regulator by referring the regulator AC reference to GND rather than Vout.

A typical value is 10 µF which will improve the ripple rejection by 10 dB to 20 db depending on the output voltage and current.

In addition to increased ripple rejection, C2 ( together with a suitable C4 ) can reduce the regulator's output noise.

Increasing C2 beyond 10 µF does very little for ripple rejection or output noise, but can be used to reduce the regulators low-frequency output impedance.

D2 is required if C2 is used. It prevents C2 from discharging through the regulator's ADJ pin.

D1 must be included if there is any possibility that Vout can go above Vin.

D3 must be included if there is any possibility that Vout can be pulled below GND.

D1..D3 can be almost any general purpose 1 A rectifier diode. 1N4001 is generally a sensible choice.

This type of voltage regulator does not have a maximum input voltage specification as it has no ground connection.

The maximum voltage between the VI and VO pins is specified. As the output capacitance normally is discharged at power-on, the maximum input voltage is the maximum VI-VO voltage.

In some applications where Vin has a reasonable limited current, it may be possible to operate the regulators at higher voltages by replacing D1 with a zener-diode with a sufficient power dissipation capability.

Do calculate how much heatsink you require for a given application. Small clip-on heatsinks are insufficient in many cases.

The thermal characteristics between manufacturers / types can vary widely. A TO-220 cased LM317 comes with a junction-to-case thermal resistance between 1 °C/W and 5 °C/W.

Spread-sheet LM317 calculations.

Calculates component values, output voltage including component tolerances, output noise, and basic thermal parameters.

This may - or may not - be true. It depends on the application.

Comparing datasheet values is difficult ( to put it mildly ) as the specifications are given under different operation conditions.

Noise and ripple rejection can be specified at different load currents - both are load current dependent.

Noise can be specified at different bandwidths - requiring a little math to compare them ( assuming it is pure thermal noise of course ).

The only way to find the best regulator for a given application is to measure the performance in that application.

Despite this, modern 3-terminal regulators are excellent value for money and overall they are difficult to match with a discrete design. Don't bother with one ( discrete design, that is ) unless you have very special requirements.

The table below is an attempt to compare datasheet values for LM3x7 and LM7xxx regulators. Measurements do not exactly agree.

When measured like here, LM3x7 regulators have a 4 dB..11 dB better noise performance than LM7xxx regulators. However, I have seen applications where the opposite is true.

The data used for following calculation are from the datasheets listed in "References".

The LM317 output noise is specified as 0.003% * Vout in a 10 Hz to 10 kHz bandwidth.

To find the output voltage noise, simply multiply 0.003% with the output voltage.

With C2 in circuit, the LM317 AC voltage gain is one, so the output voltage noise is 0.003% * 1.25 V.

The LM78xx output voltage noise is specified as V in a 10 Hz to 100 kHz bandwidth.

Measurements are from a real rectifier/regulator circuit, C2=10 µF, C4=100 µF. Ripple voltage is in all cases below wide-band noise.

Regulator | Output voltage | Output voltage noise 10 Hz to 10 kHz (1) | Output voltage noise 10 Hz to 100 kHz (1) | Output voltage noise density | Output voltage noise 20 kHz BW | Measured output voltage noise 22 Hz to 22 kHz at 50 mA load (2) | Measured output voltage noise 22 Hz to 22 kHz at 100 mA load (2) |

LM317, no C2 | 5 V | 150 µV | 1.5 µV/√Hz | 210 µV | |||

LM317, C2=10 µF | 5 V | 38 µV | 380 nV/√Hz | 53 µV | |||

LM7805 | 5 V | 40 µV | 130 nV/√Hz | 18 µV | |||

LM337, no C2 | -5 V | 150 µV | 1.5 µV/√Hz | 210 µV | |||

LM337, C2=10 µF | -5 V | 38 µV | 380 nV/√Hz | 53 µV | |||

LM7905 | -5 V | 125 µV | 400 nV/√Hz | 56 µV | |||

LM317, no C2 | 12 V | 360 µV | 3.6 µV/√Hz | 510 µV | |||

LM317, C2=10 µF | 12 V | 38 µV | 380 nV/√Hz | 53 µV | |||

LM7812 | 12 V | 300 µV | 240 nV/√Hz | 34 µV | |||

LM337, no C2 | -12 V | 360 µV | 3.6 µV/√Hz | 510 µV | |||

LM337, C2=10 µF | -12 V | 38 µV | 380 nV/√Hz | 53 µV | |||

LM7912 | -12 V | 75 µV | 950 nV/√Hz | 130 µV | |||

LM317, no C2 | 15 V | 450 µV | 4.5 µV/√Hz | 640 µV | |||

LM317, C2=10 µF | 15 V | 38 µV | 380 nV/√Hz | 53 µV | 33 µV | 33 µV | |

LM7815 | 15 V | 90 µV | 280 nV/√Hz | 40 µV | 52 µV | 57 µV | |

LM337, no C2 | -15 V | 450 µV | 4.5 µV/√Hz | 640 µV | |||

LM337, C2=10 µF | -15 V | 38 µV | 380 nV/√Hz | 53 µV | 35 µV | 36 µV | |

LM7915 | -15 V | 380 µV | 1.2 µV/√Hz | 170 µV | 120 µV | 130 µV |

(1) | Datasheet value. |

(2) | Noise measurement filter with 20 kHz noise-bandwidth. |

[5] are some actual noise measurements on LM3x7 regulators.

Copyright Notice.

This web-page, including but not limited to all text, drawings and photos, is the intellectual property of Poul Petersen, and is Copyright ©.

Reproduction or re-publication by any means whatsoever is strictly prohibited under International Copyright laws.

The author grants the reader the right to use this information for personal use only.

Any commercial use is prohibited without express written authorization from Poul Petersen.

The information is provided on an "as-is" basis and is believed to be correct, however any use of the information is your own responsibility.

This web-site may contain links to web-sites outside Poul Petersen domain ( www.poulpetersen.dk ).

Poul Petersen has no control over and assumes no responsibility for the content of any web-site outside Poul Petersen own domain.

Poul Petersen does not use cookies to "enhance your experience" on this website.

Poul Petersen, C/Faya 14, 35120 Arguineguín, Las Palmas, Spain.

E-mail: pp@poulpetersen.dk

Copyright © Poul Petersen 2020. Last update: 20200430. | Valid HTML! |