The usual schematic for the LM317 as per the datasheet is as follows.
"Basically" the output voltage (Vout) is determined by the ratio of the feedback resistors R1 and R2, using the following formula:
= 1.25 x (
The actual internal operation of the LM317 (and linear voltage regulators in general) is given in detail by an Analog Devices publication (2). Such detail/knowledge is likely of importance to assess the exact interaction of the LM317 with external circuitry. However, for the typical DIY scenario, the LM317 can be largely considered a "black box" that converts an input voltage to a regulated output voltage. Nevertheless, some knowledge of the device is required to enable appropriate incorporation into the desired circuit. The lab notes from this reference (3) provide what I consider is a good compromise, and since internet references can often be ephemeral, the following excerpts/paraphasing is reproduced.
Linear Voltage Regulator Operation [from (3)]
The LM317 internals can be simplified as comprising the following "block" components in terms of considering voltage regulation.
A 1.25V reference voltage (from the zener diode) is input into the non-inverting input of the op-amp. The action of the op-amp then produces an output, via the pass transistor, to produce a matching 1.25V voltage that is feedback to the inverting input of the op-amp (the "op-amp action" is to produce an output that makes the inputs of the op-amp equal).
The LM317 therefore internally "makes" the voltage difference between the LM317 output and adjust pins equal to 1.25V. From the diagram this 1.25V is across R1, 125 ohm in this example, and therefore from Ohm's Law 10mA of current. This 10mA current also flows through R2 (ignoring the minute current that flows from the adjust pin, 100uA from the datasheet), which in this example is 375 ohm, and therefore again from Ohm's Law R2 must drop 3.75V. Therefore, 1.25V + 3.75V = 5V across the LM317 output pin and ground. Therefore, by altering the value of R2 (or more accurately the ratio of R2/R1) the output voltage can be set.
In addition to the basic operation of the LM317 to produce a regulated voltage output, it is instructive to know the function/action/consequence of the associated external circuit components (capacitors C1, C2 for example) and the range of appropriate values for these components. This is discussed in the following sections.
Values for Resistors R1 and R2
From the LM317 datasheet, the IC requires a minimum load current to operate, which is stated to be typically 3.5mA (max 10mA). While it can be usually expected that the load (i.e. the remaining circuit the LM317 is supplying) will be greater than this minimum, R1 can also act as a dummy load to ensure operation of the LM317 (ie voltage regulation) even if the real load is not connected.
Since the LM317 will "ensure" 1.25V across R1 (see above operation section) with a 3.5mA typical minimum current, this calculates to a required value of 357ohm for R1. With a minimum current of 10mA, the value of R1 is 125ohm. The lower the value of R1 the more current is wasted, while the higher the value of R1 the more the regulator becomes sensitive to oscillation (and noise). Therefore, using 220ohm for R1 (which seems to be widely recommended) gives a current of 5.7mA, well within the minimum current requirements for the LM317 and appears to be a good compromise.
Taking a value of 220ohm for R1, and taking into account the datasheet specifies a maximum input voltage differential of 40V, this then limits the useful range for R2 (using the equation for Vout given above) to ~6800ohm (hence the usual value of 5K ohm for the potentiometer in the standard LM317 schematics). The following table gives the calculate output voltage for various combinations of values for R1 and R2, using standard E series resistor values (the highlighted column is for the recommended 220ohm value for R1).
|Calculated Vout of LM317 with R1, R2 combinations|
|R1 = 220 ohm recommended|
Values for External Capacitors
From the datasheet, "An input bypass capacitor (C1) is recommended. A 0.1μF disc or 1μF solid tantalum on the input is suitable input bypassing for almost all applications. The device is more sensitive to the absence of input bypassing when adjustment or output capacitors are used but the above values will eliminate the possibility of problems".
Again from the datasheet, the inclusion of C2 is optional, but improves transient response (i.e., protecting against sudden changes in mains or load conditions e.g., surges), with values in the range of 1uF to 1000uF of aluminium or tantalum electrolytic being commonly used (for output capacitors of 25uF or less, there is no need for a protection diode).
The following circuit shows the addition of capacitor C3. This bypass capacitor prevents ripple from being amplified as the output voltage is increased. The datasheet advises a 10uF value is sufficient generally. If values of output voltage less than 25V are used with a 10uF value for C3, no protection diode is required (otherwise, should be included).
The dropout voltage is the minimum difference between the input and output voltages that must be maintained in order for the regulator to perform the voltage regulation. Therefore, this means that the input voltage must be always greater than the output voltage. The dropout voltage varies both the load current and temperature. From the LM317 datasheet, the minimum dropout voltage is approximately 2V, and obviously this should be "de-rated" to give some margin.
Another consequence of the input voltage needing to be greater than the output voltage (and allowing for the dropout voltage) is that the greated the difference between the input and output voltage (assuming the same load current), the more power that will need to be dissipated by the LM317 and therefore the hotter it will get. See the Testing/Experimental Results section for practical examples.
Heat Sinking the LM317
From the testing done (refer to the graphs in the Testing/Experimental Results section), heat sinking of the LM317T is very important in enabling a regulated voltage at higher load current. The LM317 regulators have internal thermal shutdown to protect the device from over-heating. The datasheet advises under all possible operating conditions, the junction temperature of the LM317 must be within the range 0oC to 125oC. A thermal evaluation of a circuit, particularly when dealing with increased current, should be done to check if components will remain within thermal tolerances stated on datasheets. The thermal equivalent of an electronic circuit has an analogous relationship with Ohm's Law which are explained by these sites, which also include online calculators (4), (5). If you want further more detailed information about thermal metrics, a Texas Instruments application report is available (6).
LM317 High Current Circuits
LM317 improving regulation
Big thread http://www.diyaudio.com/forums/power-supplies/248335-lm317-tl431-really-8.html
https://www.youtube.com/watch?v=ICQXqVy3Hpc (eevblog LM317 regulator tutorial).
http://www.tnt-audio.com/clinica/regulators2_impedance1_e.html - output impedance testing of LM317, noice etc
about improving LM317 to reduce noice, ripple etc
LM317 switching regulator