This LM317 diagram doesn't make any sense to meSimple LM317 variable voltage supply, does it limit current too?How do you properly ground a digital pot and an op-amp?Keeping the output of a heated LM317 constantGetting 3.6V, 1.8V, and 1.1V from 12V using LM117 or LM317Can this work as an ADC Input setup and is it common?Connecting potentiometer to an ATX PSUCan I use an op-amp in voltage follower configuration as variable voltage power supply?Lab Power Supply based of LM317 (Project)Voltage reference for an OCXO

Is the MCU origin for the "Avengers” name consistent with the comics?

Are there any galaxies visible in the night sky around the Orion constellation?

Low ESR capcitors for switching pre-regulator (LM2596)

What is the difference between the Ancient Greek religion and the Ancient Roman religion?

30 fake coins out of 99 coins v2

What does it take to make metal music?

Languages which changed their writing direction

Lvl20 Samurai+true strike=9 attacks all with advantage?

Does the House Resolution about the Impeachment Inquiry change anything?

Is there a heuristic approach to the MILP problem?

What is Trump's position on the whistle blower allegations? What does he mean by "witch hunt"?

Feasibility of keeping an Electrical Bike in poor (wet) storage conditions

What are valid bugs

Did Catherine the Great really call for the abolition of serfdom?

When can "at any time" actions be performed?

I have been accused of copying two lab report’s from the previous year even though I had done everything by myself

Proving there exist three different vectors that sum to zero

Can a sauce with dairy be jarred?

What does it mean by commercial support available in Open source platform?

What is David Chalmers' Naturalistic dualism?

How to check whether the permutation is random or not

Mechanics to keep mobs and environment alive without using tons of memory?

How to deal with a 6 year old who was "caught" cheating?

Why is Carbon Dioxide a Greenhouse Gas whereas Ammonia is not?



This LM317 diagram doesn't make any sense to me


Simple LM317 variable voltage supply, does it limit current too?How do you properly ground a digital pot and an op-amp?Keeping the output of a heated LM317 constantGetting 3.6V, 1.8V, and 1.1V from 12V using LM117 or LM317Can this work as an ADC Input setup and is it common?Connecting potentiometer to an ATX PSUCan I use an op-amp in voltage follower configuration as variable voltage power supply?Lab Power Supply based of LM317 (Project)Voltage reference for an OCXO






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









20














$begingroup$


So this is the basic wiring for an LM317 as a voltage regulator, and very little of it makes sense to me. First off, if one pin is for my adjustment, why do I need $R_1$? $R_2$ will give me just about any value I need to send. Is $R_1$ really necessary?



It's always been my understanding that in a voltage divider circuit, you're using INPUT voltage to supply the potentiometer. Why are we using the positive end of the output voltage to supply our pot? Isn't $R_2$ wired wrong? If someone tells me to vary voltage to my adjustment pin, I'm going to create a voltage divider with a pot and send THAT output to the pin. But here the V+ input to the pot is the same wire as the wire going to the adjustment pin, AND the same wire coming from my V out of the 317. If I'm trying to send differing amounts of voltage to my IC, how is that supposed to work when I'm ramming a steady V out into the same location?



Lastly, forgive my ignorance of caps but if a capacitor isn't a load, isn't $C_1$ creating a short circuit?



enter image description here










share|improve this question












$endgroup$










  • 6




    $begingroup$
    I really like the way you are asking for some help with understanding the concepts related to this device. So +1 for that. A good answer would help not just you, but others as well.
    $endgroup$
    – jonk
    Jul 5 at 18:15










  • $begingroup$
    R1-R2 form a voltage divider. The output of this voltage divider is fed to Adj. If we remove R1, then R2 just conveys the ground voltage to Adj.
    $endgroup$
    – Kaz
    Jul 6 at 18:22


















20














$begingroup$


So this is the basic wiring for an LM317 as a voltage regulator, and very little of it makes sense to me. First off, if one pin is for my adjustment, why do I need $R_1$? $R_2$ will give me just about any value I need to send. Is $R_1$ really necessary?



It's always been my understanding that in a voltage divider circuit, you're using INPUT voltage to supply the potentiometer. Why are we using the positive end of the output voltage to supply our pot? Isn't $R_2$ wired wrong? If someone tells me to vary voltage to my adjustment pin, I'm going to create a voltage divider with a pot and send THAT output to the pin. But here the V+ input to the pot is the same wire as the wire going to the adjustment pin, AND the same wire coming from my V out of the 317. If I'm trying to send differing amounts of voltage to my IC, how is that supposed to work when I'm ramming a steady V out into the same location?



Lastly, forgive my ignorance of caps but if a capacitor isn't a load, isn't $C_1$ creating a short circuit?



enter image description here










share|improve this question












$endgroup$










  • 6




    $begingroup$
    I really like the way you are asking for some help with understanding the concepts related to this device. So +1 for that. A good answer would help not just you, but others as well.
    $endgroup$
    – jonk
    Jul 5 at 18:15










  • $begingroup$
    R1-R2 form a voltage divider. The output of this voltage divider is fed to Adj. If we remove R1, then R2 just conveys the ground voltage to Adj.
    $endgroup$
    – Kaz
    Jul 6 at 18:22














20












20








20


6



$begingroup$


So this is the basic wiring for an LM317 as a voltage regulator, and very little of it makes sense to me. First off, if one pin is for my adjustment, why do I need $R_1$? $R_2$ will give me just about any value I need to send. Is $R_1$ really necessary?



It's always been my understanding that in a voltage divider circuit, you're using INPUT voltage to supply the potentiometer. Why are we using the positive end of the output voltage to supply our pot? Isn't $R_2$ wired wrong? If someone tells me to vary voltage to my adjustment pin, I'm going to create a voltage divider with a pot and send THAT output to the pin. But here the V+ input to the pot is the same wire as the wire going to the adjustment pin, AND the same wire coming from my V out of the 317. If I'm trying to send differing amounts of voltage to my IC, how is that supposed to work when I'm ramming a steady V out into the same location?



Lastly, forgive my ignorance of caps but if a capacitor isn't a load, isn't $C_1$ creating a short circuit?



enter image description here










share|improve this question












$endgroup$




So this is the basic wiring for an LM317 as a voltage regulator, and very little of it makes sense to me. First off, if one pin is for my adjustment, why do I need $R_1$? $R_2$ will give me just about any value I need to send. Is $R_1$ really necessary?



It's always been my understanding that in a voltage divider circuit, you're using INPUT voltage to supply the potentiometer. Why are we using the positive end of the output voltage to supply our pot? Isn't $R_2$ wired wrong? If someone tells me to vary voltage to my adjustment pin, I'm going to create a voltage divider with a pot and send THAT output to the pin. But here the V+ input to the pot is the same wire as the wire going to the adjustment pin, AND the same wire coming from my V out of the 317. If I'm trying to send differing amounts of voltage to my IC, how is that supposed to work when I'm ramming a steady V out into the same location?



Lastly, forgive my ignorance of caps but if a capacitor isn't a load, isn't $C_1$ creating a short circuit?



enter image description here







voltage-regulator integrated-circuit potentiometer diagram lm317






share|improve this question
















share|improve this question













share|improve this question




share|improve this question








edited Jul 5 at 18:30









Null

5,25810 gold badges23 silver badges34 bronze badges




5,25810 gold badges23 silver badges34 bronze badges










asked Jul 5 at 17:40









Jared CravensJared Cravens

1101 silver badge3 bronze badges




1101 silver badge3 bronze badges










  • 6




    $begingroup$
    I really like the way you are asking for some help with understanding the concepts related to this device. So +1 for that. A good answer would help not just you, but others as well.
    $endgroup$
    – jonk
    Jul 5 at 18:15










  • $begingroup$
    R1-R2 form a voltage divider. The output of this voltage divider is fed to Adj. If we remove R1, then R2 just conveys the ground voltage to Adj.
    $endgroup$
    – Kaz
    Jul 6 at 18:22













  • 6




    $begingroup$
    I really like the way you are asking for some help with understanding the concepts related to this device. So +1 for that. A good answer would help not just you, but others as well.
    $endgroup$
    – jonk
    Jul 5 at 18:15










  • $begingroup$
    R1-R2 form a voltage divider. The output of this voltage divider is fed to Adj. If we remove R1, then R2 just conveys the ground voltage to Adj.
    $endgroup$
    – Kaz
    Jul 6 at 18:22








6




6




$begingroup$
I really like the way you are asking for some help with understanding the concepts related to this device. So +1 for that. A good answer would help not just you, but others as well.
$endgroup$
– jonk
Jul 5 at 18:15




$begingroup$
I really like the way you are asking for some help with understanding the concepts related to this device. So +1 for that. A good answer would help not just you, but others as well.
$endgroup$
– jonk
Jul 5 at 18:15












$begingroup$
R1-R2 form a voltage divider. The output of this voltage divider is fed to Adj. If we remove R1, then R2 just conveys the ground voltage to Adj.
$endgroup$
– Kaz
Jul 6 at 18:22





$begingroup$
R1-R2 form a voltage divider. The output of this voltage divider is fed to Adj. If we remove R1, then R2 just conveys the ground voltage to Adj.
$endgroup$
– Kaz
Jul 6 at 18:22











8 Answers
8






active

oldest

votes


















20
















$begingroup$

The datasheet has a pretty thorough description of the use of the ADJ pin with $R_1$ and $R_2$:



LM317 operation



Since both $R_1$ and $R_2$ appear in the equation for the output voltage



$$V_textout = 1.25text V times left(1 + fracR_2R_1right) + I_textADJR_2$$



you need both in order to realize an arbitrary output voltage. Depending on your expected load and desired output voltage you may be able to remove $R_1$. However, you must maintain a minimum load current (which the datasheet specifies as 10mA) so if your load may fall below that you must rely on the $R_1$ and $R_2$ divider to draw enough current to meet that minimum load current requirement.



With a voltage divider you normally have an input voltage that you want to divide down using a pair of resistors. You set the ratio of resistors in order to set the divided down voltage:



$$V_textdiv = left(fracR_1R_1 + R_2right)V_textinput$$



In this case, the divided down voltage $V_textdiv$ is set by the device (1.25V) so you are setting the ratio of resistors in order to set the voltage divider's "input" voltage $V_textinput$, which is the LM317's $V_textout$.




Lastly, forgive my ignorance of caps but if a capacitor isn't a load, isn't $C_1$ creating a short circuit?




A capacitor has very high (ideally, infinite) impedance at DC so there is no short circuit. This capacitor will short circuit high frequency signals (i.e. noise) on $V_textin$, which is desirable since $V_textin$ is supposed to be a DC voltage source.






share|improve this answer












$endgroup$










  • 2




    $begingroup$
    A minor change. R1 is not for the minimum load current, it is used for voltage regulation. The LM317 is going to try and maintain a 1.25 voltage drop across R1, so if R1 is missing, then your equation is R2/0 = infinity ... or basically Vout = Vin.
    $endgroup$
    – Argus Brown
    Jul 6 at 17:32










  • $begingroup$
    Lets say you want a robust feedback. Both R1 and R2 could also determine the minimum load current if it's too low.
    $endgroup$
    – Unknown123
    Jul 7 at 6:10






  • 1




    $begingroup$
    @ArgusBrown I am aware that $R_1$ helps determine the output voltage. My point is that $R_1$ (and $R_2$) may also be necessary to act as a load in order to meet the minimum load current requirement. OP is under the impression that he can choose "just about any value I need" for $R_2$ (with $R_1$ removed), but the values of $R_1$ and $R_2$ are constrained by the minimum load current requirement in addition to the required output voltage.
    $endgroup$
    – Null
    Jul 8 at 14:08



















16
















$begingroup$

Overview



I'll avoid depending upon algebra as an explanation. (Because algebra, while providing quantitative answers, doesn't often help people understand something unless they are very fluent with mathematics.) Regardless, it's still helpful to have the datasheet available. So here is TI's LM317 datasheet just to make it convenient when needed.



The best way to understand something is to try and put yourself inside the device and "think like it does." Empathize with the device, so to speak. Then a lot of mystery goes away.



In programming, for example, there's nothing that a program does that cannot be done by hand. (Whether or not it is practical to do so, is a different question.) So, just as with electronics, a good way to understand some algorithm in programming is to just sit down with paper and some items in front of you and just do things, manually, with your own hands. That almost always gets the point across, deeply inside. And then the mystery goes away.



Knowing the name of something is NOT the same as knowing something. The best way to know something is to watch and observe it. So let's look at the device.



LM317 Internal Voltage Reference



Internally, the device includes a very special type of voltage reference which is set for approximately $1.25:textV$. It's not easy to design one of these, by the way. Especially if you want the voltage reference to stay constant over a wide range of operating temperatures and variations in ICs during manufacture and over a long time period. Here's what the datasheet says about it:



enter image description hereenter image description here



You can see that for a wide range of output currents, input voltages, and temperatures (see the note), this voltage is guaranteed to stay between $1.2:textV$ and $1.3:textV$. That's quite an achievement.



To make this voltage reference work well, the designers also needed some kind of current source. The reason is that in order to make such a good voltage reference they also need to provide a relatively predictable current flowing through it. (Remember, you are providing an input voltage anywhere from $3:textV$ to $40:textV$.) So there is also a current source that provides a predictable current through the voltage reference in order to make this work out well. You can see this fact from this part of the datasheet:



enter image description here



The current source they use sources its current from the IN pin. But that current must leave by way of some other pin -- in this case, namely the ADJUST pin. So this current source's current is called the "ADJUST" terminal current. You are supposed to keep this fact in mind when using the device. You must provide a means for this current source's current to leave the device and go towards the ground reference.



Let's recap. For this voltage regulator to do its job, the designers felt they needed to include an internal (hidden) voltage reference. (They need it so they can use it to compare against and then decide how to "regulate" the voltage you want -- I'll discuss those details, soon.) In order to make a good internal voltage reference, they needed a current source. Because of that, they also needed to let you know that you must help them by sinking that current via the ADJUST pin. So they specify that, as well.



You now have to keep two things in your mind: (1) voltage reference; and, (2) adjust pin current. But the ADJUST pin current is just a consequence of providing that voltage reference. So the main thing to keep in mind, in order to understand the device, is the voltage reference (and not the ADJUST pin current, which is a necessary evil, so to speak.)



That's just one of the internal resources in the device. It also includes some special circuitry to protect against too much current and to protect against serious over-heating in operation. So you get thermal protection, built into the device, too.



Voltage Regulation Method



With the above understood, the basic idea behind the LM317 is the following:





schematic





simulate this circuit – Schematic created using CircuitLab



The opamp is continually observing both its (+) and (-) inputs and it adjusts its output so that these two inputs have the same voltage. By inspection, you can see that the (+) input will be about $1.25:textV$ above the ADJUST pin voltage. So this means that the output voltage will also be about $1.25:textV$ above the ADJUST pin voltage when everything is working right.



This is the most important thing to understand! So let me repeat it. The LM317 uses the internal voltage reference to set the (+) input about $1.25:textV$ above the ADJUST pin voltage and then uses the opamp's behavior to then force OUT to also be about $1.25:textV$ above the ADJUST pin voltage.



The is the crux in understanding how it works. Make sure you run this through your head multiple times. Drill it in.



Using the LM317



At this point, it's a good idea to realize something else now. The LM317 cannot see $R_2$. It has no idea what you are using there. All it is doing is struggling to make sure that the OUT pin is about $1.25:textV$ above the ADJUST pin by letting more or less current flow from the IN pin to the OUT pin (via the transistor [it really is a Darlington instead of a single BJT as I showed.])



Since the LM317 is continually adjusting OUT such that it is always about $1.25:textV$ above the ADJUST pin voltage, placing $R_1$ across OUT and ADJUST causes a current in $R_1$ which is $I_R_1approx frac1.25:textVR_1$.



$I_R_1$ is added now to the ADJUST pin current, which is flowing out of the ADJUST pin and will be added to the current flowing via $R_1$. (Remember, this is the current that was required in order to make a good voltage reference inside of the LM317.)



In your example, $I_R_1approx 5.2:textmA$. The ADJUST pin current adds as much as $100:mutextA$ to that (though it might also add a lot less.) All of this current must be allowed to reach the ground reference.




In general, you want to make sure that this ADJUST pin current
variation is small when compared to $I_R_1$, so that its
variation doesn't make much difference to the output voltage of your
regulator circuit. Note that in your circuit case, this is reasonably
true. So now you understand better why that particular value for
$R_1$ was selected.




In most adjustable voltage circuits, sinking this current is handled by using a variable resistor (potentiometer) with one end tied to ground and the other end to the shared node of the ADJUST pin and one end of $R_1$. The current (which we expect to be somewhere between about $5.2:textmA$ and $5.3:textmA$ here) must now pass through this potentiometer. In doing so, it creates a voltage drop across it. That voltage drop gets added to the voltage drop across $R_1$ (which is fixed by design in the LM317) and must, by definition, be the voltage at the OUT pin.



With $R_2$ allowed to be up to $5:textkOmega$, you can adjust the voltage drop across $R_2$ to be up to $26-27:textV$. Adding the remaining $approx 1.25:textV$ means that the voltage at OUT (with reference to ground) can be theoretically as high as somewhere from $27.2:textV$ to $28.3:textV$.



However, to reach those peak voltages you'd have to have an input supply that is higher. Under the recommended operating conditions you can see the following:



enter image description here



So this means that to reach the maximum that the potentiometer and the value of $R_1$ promises, you'd need to have an input supply voltage of about $32:textV$.



Other Uses



Now that you understand this much, you might want to consider one more thought about the LM317. It can also be used as a current source for, say, charging a rechargeable battery. If you replace $R_2$ with a rechargeable battery, for example, then you can select a value for $R_1$ that will generate the right current for recharging it. The LM317 will keep adjusting things so that the voltage across $R_1$ is constant and this implies a constant current in $R_1$. Since all of that current must reach ground via a path you provide, using a battery in that path means it will get a constant current for recharging it. (There are other problems, of course. You'd need to monitor the charging process and stop it when the battery is charged or no longer requires a constant current. But the point remains -- the LM317 can also be used as a constant current source instead of a constant voltage source.)






share|improve this answer












$endgroup$






















    6
















    $begingroup$

    enter image description here



    Figure 1. As suggested by the datasheet.



    • The LM317 works by adjusting its output to be 1.25 V above the voltage at the ADJ pin.

    • With R1 = 240 Ω there is a current of $ frac 1.25240 = 5.2 text mA $ running through it and R2.

    • The constant current through R2 means that the voltage drop across it changes linearly with the resistance of R2. This is super-handy if you want the voltage to change in proportion to the angular rotation of R2.

    schematic





    simulate this circuit – Schematic created using CircuitLab



    Figure 2. OP's plan.



    Now let's try doing it your way.



    • Let's say our 5k pot is rated at 1/8 W (fairly typical). Using $ P = I^2 R $ we can work out that the maximum current it can handle is $ I = sqrt frac PR = 5 text mA $.

    • This in turn means that once you reduce the pot resistance below $ frac 1.255m = 0.25 text k Omega $ (250 Ω) that the pot will tend to burn out. (The pot's rated power is for dissipation over the whole track - not just the part in use. If you reduce the track length then you reduce the maximum power dissipation proportionally.)

    Now let's look at linearity - assuming we haven't turned the wiper all the way up and burnt out the pot:



    • At 20% down from the top you have 1k & 4k. The output voltage will be $ V_out = frac 1+41(1.25) = 6.25 text V $.

    • At 40% down from the top you have 2k & 3k. The output voltage will be $ V_out = frac 2+32(1.25) = 3.125 text V $.

    • At 60% down from the top you have 3k & 2k. The output voltage will be $ V_out = frac 3+23(1.25) = 2.08 text V $.

    • At 80% down from the top you have 4k & 1k. The output voltage will be $ V_out = frac 4+14(1.25) = 1.56 text V $.

    • At 100% down from the top you have 5k & 0k. The output voltage will be $ V_out = frac 5+05(1.25) = 1.25 text V $.

    Clearly the adjustment pot will be non-linear. The output falls by half in the adjustment from 20% to 40%.




    Lastly, forgive my ignorance of caps but if a capacitor isn't a load, isn't C1 creating a short circuit?




    Capacitors, as the symbol suggests, are parallel plates separated by a non-conducting gap. DC current cannot flow through a capacitor once it is charged up.






    share|improve this answer










    $endgroup$






















      3
















      $begingroup$

      How to calculate the resistor values already received a detailed answer. Let me try clarify your confusion about voltage divider: as you said, it provides a fraction of the input voltage, according to the ratio of the resistors. The only confusion here is: it is being used to sample the output voltage of your controller, to serve as a reference for voltage control.



      Even if you understand the LM317 only as a black box, try to view it as a device that will try to keep the voltage between the Vout and Adj pins as 1.25V. If this difference is lower than 1.25V, Vout will be increased, if it is higher, Vout decreases. The ratio of the output voltage is given by the voltage divider.



      That way the LM317 tries to compensate for variations on the current demanded by the load and also for variations in the input voltage. The formulas in the datasheet allow the calculation of the resistor values to obtain 1.25V between the mentioned pins for a given output voltage.






      share|improve this answer










      $endgroup$






















        2
















        $begingroup$

        There is always a fixed 1.25V between the output and adjust pins. Therefore connecting R1 between these two pins forces a constant current to flow through R1. This current must flow through R2 (it can't go anywhere else!) causing a constant volts drop across R2. Therefore the regulator output voltage equals the dropped voltage across R2 + 1.25V.



        The above is a good approximation but is not precisely true. A very small current flows out of the adjust pin through R2 to ground slightly increasing the voltage dropped across R2 and therefore slightly increasing the output voltage.



        Vout = ((1.25/R1)*R2 + 1.25V) + (R2 * Iadj)



        Capacitors are open circuit to DC.






        share|improve this answer










        $endgroup$






















          2
















          $begingroup$

          Let's look at how LM317 works!



          Internals of LM317 (not embedded due to possible copyright reasons)



          LM317 adjusts the VOUT terminal voltage until ADJ terminal voltage is 1.25 volts below VOUT. It is using a voltage comparator (an operational amplifier), where one of the inputs is the output pin, the other of the inputs is connected to the adjustment pin, but not directly but via a circuit that effectively works like a stable 1.25 volt voltage source (constant voltage drop). Operational amplifiers are known for their high input impedance, so the ADJ current will be minimal. Then the operational amplifier output is used to adjust transistor base voltage, so that the emitter voltage at output will be the base voltage minus transistor voltage drop which in this case is a Darlington pair. (Ok, this explanation simplifies things a bit but that would be how you create the simplest possible adjustable voltage regulator.)



          So, if the VOUT - ADJ voltage difference is less than 1.25 volts, the VOUT is very quickly cranked up, to the max if needs be.



          If, on the other hand, the VOUT - ADJ voltage difference is more than 1.25 volts, the VOUT is very quickly cranked down, to the minimum if needs be.



          The idea is that the VOUT - ADJ voltage difference is some fraction of the output terminal voltage, determined by a voltage divider.



          If you have only R2, without R1, then the ADJ terminal voltage would be zero, and it would have variable resistance to ground (which doesn't have any useful effect, because the current in the ADJ terminal is minimal).



          If you have both R1 and R2, then the ADJ terminal voltage is determined by a voltage divider between VOUT and ground.



          Note R2 is a variable resistor, not a potentiometer (although you can make a potentiometer into a variable resistor by connecting the center pin to one of the extreme pins and using the two connected-together pins with the other extreme pin, or just using the center pin and one of the extreme pins).



          You could have the same effect by connecting one potentiometer extreme pin to ground, the other extreme pin to VOUT and the center pin to ADJ.



          Note this simple explanation ignored the adjustment terminal current. For a more complete explanation, see the upvoted answer.






          share|improve this answer












          $endgroup$














          • $begingroup$
            "... until ADJ terminal voltage is 1.25 volts." This should read "... until ADJ terminal voltage is 1.25 volts below $ V_OUT $". "... one of the inputs is a stable 1.25 volt voltage source, and the other of the inputs if the ADJ terminal voltage." This isn't correct. See the internal diagram. "Operational amplifiers are known for their high output impedance ..." Nope. You mean high input impedance. ".... base voltage minus 0.7 volts or so." Nope. It's a Darlington output so 2 x diode drop. A few more tidy-up edits are required.
            $endgroup$
            – Transistor
            Jul 7 at 11:55











          • $begingroup$
            Your edit has improved a few points. Add in the image from ti.com/ds_dgm/images/fbd_slvs044x.gif and refer to it as you write. You'll see that "one of the inputs is a stable 1.25 volt voltage source between the regulator output and op-amp input" isn't correct. I have found that writing a good answer forces me to learn a bit more. Keep going.
            $endgroup$
            – Transistor
            Jul 7 at 12:10










          • $begingroup$
            Ok, the first time I just described how I would create a hand-crafted linear regulator that is adjustable. The second edit I tried to be a bit more accurate to LM317 workings, but apparently the internals of LM317 differed from what I assumed them to be. Hopefully the description this time is accurate enough!
            $endgroup$
            – juhist
            Jul 7 at 12:16










          • $begingroup$
            You're actually correct about the Texas Instruments copyright: "This also means you may not, without our permission, "mirror" this information on your own server, or modify or re-use this information on another system." I can't imagine there is any real problem where you are promoting understanding of their product and provide a link to source. +1 for the fixes.
            $endgroup$
            – Transistor
            Jul 7 at 12:49


















          1
















          $begingroup$

          R1 and R2 are the adjustment. They form a variable voltage divider that generates an input voltage to the Adj pin. If you read the data sheet you will see that the output voltage is regulated to be 1.25V greater than the voltage at the Adj pin.

          The output voltage is used to supply the voltage divider because it is stable and regulated, if you used the input supply any noise, ripple or change with load would be passed on to the Adj pin and then appear at the output.

          You need to look at the circuit again, the voltage applied to Adj will vary as R2 is varied. It is a conventional way of drawing a variable resistor. Pin Adj, one end of R1 and the wiper of R2 are joined together, not the other end of R2.

          Neither C1 nor C2 are short circuits. At DC a good capacitor looks like an open circuit. Their purpose is to bypass any AC component or noise to earth thereby reducing their effect. The data sheet even says you can bypass Adj "to achieve very high ripple-rejection ratios".

          There is a lot more useful information in the data sheet with many examples of how to use the LM317 for various tasks.






          share|improve this answer












          $endgroup$














          • $begingroup$
            You say "neither C2 nor C2". As for C1 and C2 being short circuits, a quality cap may behave briefly as a near-short-circuit in some cases. Normally, that won't pose a problem, but it's good to be aware of situations where it might, most notably when a large cap is downstream of a switch.
            $endgroup$
            – supercat
            Jul 8 at 18:14


















          0
















          $begingroup$

          Just to add a detail that experienced users might not even notice any more:



          R2 a variable resistor - not a potentiometer. In practice, the same physical device can be used, but the variable resistor is a two-terminal device while the potentiometer has three terminals.



          Variable Resistor vs. Potentiometer



          If you read R2 as a potentiomenter, then it is apparently drawn with the ends of the resistor connected and the wiper not connected (floating), which clearly does not make any sense. One of the terminals of R2 is connected to the wiper.






          share|improve this answer










          $endgroup$
















            Your Answer






            StackExchange.ifUsing("editor", function ()
            return StackExchange.using("schematics", function ()
            StackExchange.schematics.init();
            );
            , "cicuitlab");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "135"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );














            draft saved

            draft discarded
















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f446982%2fthis-lm317-diagram-doesnt-make-any-sense-to-me%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown


























            8 Answers
            8






            active

            oldest

            votes








            8 Answers
            8






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            20
















            $begingroup$

            The datasheet has a pretty thorough description of the use of the ADJ pin with $R_1$ and $R_2$:



            LM317 operation



            Since both $R_1$ and $R_2$ appear in the equation for the output voltage



            $$V_textout = 1.25text V times left(1 + fracR_2R_1right) + I_textADJR_2$$



            you need both in order to realize an arbitrary output voltage. Depending on your expected load and desired output voltage you may be able to remove $R_1$. However, you must maintain a minimum load current (which the datasheet specifies as 10mA) so if your load may fall below that you must rely on the $R_1$ and $R_2$ divider to draw enough current to meet that minimum load current requirement.



            With a voltage divider you normally have an input voltage that you want to divide down using a pair of resistors. You set the ratio of resistors in order to set the divided down voltage:



            $$V_textdiv = left(fracR_1R_1 + R_2right)V_textinput$$



            In this case, the divided down voltage $V_textdiv$ is set by the device (1.25V) so you are setting the ratio of resistors in order to set the voltage divider's "input" voltage $V_textinput$, which is the LM317's $V_textout$.




            Lastly, forgive my ignorance of caps but if a capacitor isn't a load, isn't $C_1$ creating a short circuit?




            A capacitor has very high (ideally, infinite) impedance at DC so there is no short circuit. This capacitor will short circuit high frequency signals (i.e. noise) on $V_textin$, which is desirable since $V_textin$ is supposed to be a DC voltage source.






            share|improve this answer












            $endgroup$










            • 2




              $begingroup$
              A minor change. R1 is not for the minimum load current, it is used for voltage regulation. The LM317 is going to try and maintain a 1.25 voltage drop across R1, so if R1 is missing, then your equation is R2/0 = infinity ... or basically Vout = Vin.
              $endgroup$
              – Argus Brown
              Jul 6 at 17:32










            • $begingroup$
              Lets say you want a robust feedback. Both R1 and R2 could also determine the minimum load current if it's too low.
              $endgroup$
              – Unknown123
              Jul 7 at 6:10






            • 1




              $begingroup$
              @ArgusBrown I am aware that $R_1$ helps determine the output voltage. My point is that $R_1$ (and $R_2$) may also be necessary to act as a load in order to meet the minimum load current requirement. OP is under the impression that he can choose "just about any value I need" for $R_2$ (with $R_1$ removed), but the values of $R_1$ and $R_2$ are constrained by the minimum load current requirement in addition to the required output voltage.
              $endgroup$
              – Null
              Jul 8 at 14:08
















            20
















            $begingroup$

            The datasheet has a pretty thorough description of the use of the ADJ pin with $R_1$ and $R_2$:



            LM317 operation



            Since both $R_1$ and $R_2$ appear in the equation for the output voltage



            $$V_textout = 1.25text V times left(1 + fracR_2R_1right) + I_textADJR_2$$



            you need both in order to realize an arbitrary output voltage. Depending on your expected load and desired output voltage you may be able to remove $R_1$. However, you must maintain a minimum load current (which the datasheet specifies as 10mA) so if your load may fall below that you must rely on the $R_1$ and $R_2$ divider to draw enough current to meet that minimum load current requirement.



            With a voltage divider you normally have an input voltage that you want to divide down using a pair of resistors. You set the ratio of resistors in order to set the divided down voltage:



            $$V_textdiv = left(fracR_1R_1 + R_2right)V_textinput$$



            In this case, the divided down voltage $V_textdiv$ is set by the device (1.25V) so you are setting the ratio of resistors in order to set the voltage divider's "input" voltage $V_textinput$, which is the LM317's $V_textout$.




            Lastly, forgive my ignorance of caps but if a capacitor isn't a load, isn't $C_1$ creating a short circuit?




            A capacitor has very high (ideally, infinite) impedance at DC so there is no short circuit. This capacitor will short circuit high frequency signals (i.e. noise) on $V_textin$, which is desirable since $V_textin$ is supposed to be a DC voltage source.






            share|improve this answer












            $endgroup$










            • 2




              $begingroup$
              A minor change. R1 is not for the minimum load current, it is used for voltage regulation. The LM317 is going to try and maintain a 1.25 voltage drop across R1, so if R1 is missing, then your equation is R2/0 = infinity ... or basically Vout = Vin.
              $endgroup$
              – Argus Brown
              Jul 6 at 17:32










            • $begingroup$
              Lets say you want a robust feedback. Both R1 and R2 could also determine the minimum load current if it's too low.
              $endgroup$
              – Unknown123
              Jul 7 at 6:10






            • 1




              $begingroup$
              @ArgusBrown I am aware that $R_1$ helps determine the output voltage. My point is that $R_1$ (and $R_2$) may also be necessary to act as a load in order to meet the minimum load current requirement. OP is under the impression that he can choose "just about any value I need" for $R_2$ (with $R_1$ removed), but the values of $R_1$ and $R_2$ are constrained by the minimum load current requirement in addition to the required output voltage.
              $endgroup$
              – Null
              Jul 8 at 14:08














            20














            20










            20







            $begingroup$

            The datasheet has a pretty thorough description of the use of the ADJ pin with $R_1$ and $R_2$:



            LM317 operation



            Since both $R_1$ and $R_2$ appear in the equation for the output voltage



            $$V_textout = 1.25text V times left(1 + fracR_2R_1right) + I_textADJR_2$$



            you need both in order to realize an arbitrary output voltage. Depending on your expected load and desired output voltage you may be able to remove $R_1$. However, you must maintain a minimum load current (which the datasheet specifies as 10mA) so if your load may fall below that you must rely on the $R_1$ and $R_2$ divider to draw enough current to meet that minimum load current requirement.



            With a voltage divider you normally have an input voltage that you want to divide down using a pair of resistors. You set the ratio of resistors in order to set the divided down voltage:



            $$V_textdiv = left(fracR_1R_1 + R_2right)V_textinput$$



            In this case, the divided down voltage $V_textdiv$ is set by the device (1.25V) so you are setting the ratio of resistors in order to set the voltage divider's "input" voltage $V_textinput$, which is the LM317's $V_textout$.




            Lastly, forgive my ignorance of caps but if a capacitor isn't a load, isn't $C_1$ creating a short circuit?




            A capacitor has very high (ideally, infinite) impedance at DC so there is no short circuit. This capacitor will short circuit high frequency signals (i.e. noise) on $V_textin$, which is desirable since $V_textin$ is supposed to be a DC voltage source.






            share|improve this answer












            $endgroup$



            The datasheet has a pretty thorough description of the use of the ADJ pin with $R_1$ and $R_2$:



            LM317 operation



            Since both $R_1$ and $R_2$ appear in the equation for the output voltage



            $$V_textout = 1.25text V times left(1 + fracR_2R_1right) + I_textADJR_2$$



            you need both in order to realize an arbitrary output voltage. Depending on your expected load and desired output voltage you may be able to remove $R_1$. However, you must maintain a minimum load current (which the datasheet specifies as 10mA) so if your load may fall below that you must rely on the $R_1$ and $R_2$ divider to draw enough current to meet that minimum load current requirement.



            With a voltage divider you normally have an input voltage that you want to divide down using a pair of resistors. You set the ratio of resistors in order to set the divided down voltage:



            $$V_textdiv = left(fracR_1R_1 + R_2right)V_textinput$$



            In this case, the divided down voltage $V_textdiv$ is set by the device (1.25V) so you are setting the ratio of resistors in order to set the voltage divider's "input" voltage $V_textinput$, which is the LM317's $V_textout$.




            Lastly, forgive my ignorance of caps but if a capacitor isn't a load, isn't $C_1$ creating a short circuit?




            A capacitor has very high (ideally, infinite) impedance at DC so there is no short circuit. This capacitor will short circuit high frequency signals (i.e. noise) on $V_textin$, which is desirable since $V_textin$ is supposed to be a DC voltage source.







            share|improve this answer















            share|improve this answer




            share|improve this answer








            edited Jul 6 at 16:09









            TonyM

            9,6791 gold badge13 silver badges32 bronze badges




            9,6791 gold badge13 silver badges32 bronze badges










            answered Jul 5 at 18:16









            NullNull

            5,25810 gold badges23 silver badges34 bronze badges




            5,25810 gold badges23 silver badges34 bronze badges










            • 2




              $begingroup$
              A minor change. R1 is not for the minimum load current, it is used for voltage regulation. The LM317 is going to try and maintain a 1.25 voltage drop across R1, so if R1 is missing, then your equation is R2/0 = infinity ... or basically Vout = Vin.
              $endgroup$
              – Argus Brown
              Jul 6 at 17:32










            • $begingroup$
              Lets say you want a robust feedback. Both R1 and R2 could also determine the minimum load current if it's too low.
              $endgroup$
              – Unknown123
              Jul 7 at 6:10






            • 1




              $begingroup$
              @ArgusBrown I am aware that $R_1$ helps determine the output voltage. My point is that $R_1$ (and $R_2$) may also be necessary to act as a load in order to meet the minimum load current requirement. OP is under the impression that he can choose "just about any value I need" for $R_2$ (with $R_1$ removed), but the values of $R_1$ and $R_2$ are constrained by the minimum load current requirement in addition to the required output voltage.
              $endgroup$
              – Null
              Jul 8 at 14:08













            • 2




              $begingroup$
              A minor change. R1 is not for the minimum load current, it is used for voltage regulation. The LM317 is going to try and maintain a 1.25 voltage drop across R1, so if R1 is missing, then your equation is R2/0 = infinity ... or basically Vout = Vin.
              $endgroup$
              – Argus Brown
              Jul 6 at 17:32










            • $begingroup$
              Lets say you want a robust feedback. Both R1 and R2 could also determine the minimum load current if it's too low.
              $endgroup$
              – Unknown123
              Jul 7 at 6:10






            • 1




              $begingroup$
              @ArgusBrown I am aware that $R_1$ helps determine the output voltage. My point is that $R_1$ (and $R_2$) may also be necessary to act as a load in order to meet the minimum load current requirement. OP is under the impression that he can choose "just about any value I need" for $R_2$ (with $R_1$ removed), but the values of $R_1$ and $R_2$ are constrained by the minimum load current requirement in addition to the required output voltage.
              $endgroup$
              – Null
              Jul 8 at 14:08








            2




            2




            $begingroup$
            A minor change. R1 is not for the minimum load current, it is used for voltage regulation. The LM317 is going to try and maintain a 1.25 voltage drop across R1, so if R1 is missing, then your equation is R2/0 = infinity ... or basically Vout = Vin.
            $endgroup$
            – Argus Brown
            Jul 6 at 17:32




            $begingroup$
            A minor change. R1 is not for the minimum load current, it is used for voltage regulation. The LM317 is going to try and maintain a 1.25 voltage drop across R1, so if R1 is missing, then your equation is R2/0 = infinity ... or basically Vout = Vin.
            $endgroup$
            – Argus Brown
            Jul 6 at 17:32












            $begingroup$
            Lets say you want a robust feedback. Both R1 and R2 could also determine the minimum load current if it's too low.
            $endgroup$
            – Unknown123
            Jul 7 at 6:10




            $begingroup$
            Lets say you want a robust feedback. Both R1 and R2 could also determine the minimum load current if it's too low.
            $endgroup$
            – Unknown123
            Jul 7 at 6:10




            1




            1




            $begingroup$
            @ArgusBrown I am aware that $R_1$ helps determine the output voltage. My point is that $R_1$ (and $R_2$) may also be necessary to act as a load in order to meet the minimum load current requirement. OP is under the impression that he can choose "just about any value I need" for $R_2$ (with $R_1$ removed), but the values of $R_1$ and $R_2$ are constrained by the minimum load current requirement in addition to the required output voltage.
            $endgroup$
            – Null
            Jul 8 at 14:08





            $begingroup$
            @ArgusBrown I am aware that $R_1$ helps determine the output voltage. My point is that $R_1$ (and $R_2$) may also be necessary to act as a load in order to meet the minimum load current requirement. OP is under the impression that he can choose "just about any value I need" for $R_2$ (with $R_1$ removed), but the values of $R_1$ and $R_2$ are constrained by the minimum load current requirement in addition to the required output voltage.
            $endgroup$
            – Null
            Jul 8 at 14:08














            16
















            $begingroup$

            Overview



            I'll avoid depending upon algebra as an explanation. (Because algebra, while providing quantitative answers, doesn't often help people understand something unless they are very fluent with mathematics.) Regardless, it's still helpful to have the datasheet available. So here is TI's LM317 datasheet just to make it convenient when needed.



            The best way to understand something is to try and put yourself inside the device and "think like it does." Empathize with the device, so to speak. Then a lot of mystery goes away.



            In programming, for example, there's nothing that a program does that cannot be done by hand. (Whether or not it is practical to do so, is a different question.) So, just as with electronics, a good way to understand some algorithm in programming is to just sit down with paper and some items in front of you and just do things, manually, with your own hands. That almost always gets the point across, deeply inside. And then the mystery goes away.



            Knowing the name of something is NOT the same as knowing something. The best way to know something is to watch and observe it. So let's look at the device.



            LM317 Internal Voltage Reference



            Internally, the device includes a very special type of voltage reference which is set for approximately $1.25:textV$. It's not easy to design one of these, by the way. Especially if you want the voltage reference to stay constant over a wide range of operating temperatures and variations in ICs during manufacture and over a long time period. Here's what the datasheet says about it:



            enter image description hereenter image description here



            You can see that for a wide range of output currents, input voltages, and temperatures (see the note), this voltage is guaranteed to stay between $1.2:textV$ and $1.3:textV$. That's quite an achievement.



            To make this voltage reference work well, the designers also needed some kind of current source. The reason is that in order to make such a good voltage reference they also need to provide a relatively predictable current flowing through it. (Remember, you are providing an input voltage anywhere from $3:textV$ to $40:textV$.) So there is also a current source that provides a predictable current through the voltage reference in order to make this work out well. You can see this fact from this part of the datasheet:



            enter image description here



            The current source they use sources its current from the IN pin. But that current must leave by way of some other pin -- in this case, namely the ADJUST pin. So this current source's current is called the "ADJUST" terminal current. You are supposed to keep this fact in mind when using the device. You must provide a means for this current source's current to leave the device and go towards the ground reference.



            Let's recap. For this voltage regulator to do its job, the designers felt they needed to include an internal (hidden) voltage reference. (They need it so they can use it to compare against and then decide how to "regulate" the voltage you want -- I'll discuss those details, soon.) In order to make a good internal voltage reference, they needed a current source. Because of that, they also needed to let you know that you must help them by sinking that current via the ADJUST pin. So they specify that, as well.



            You now have to keep two things in your mind: (1) voltage reference; and, (2) adjust pin current. But the ADJUST pin current is just a consequence of providing that voltage reference. So the main thing to keep in mind, in order to understand the device, is the voltage reference (and not the ADJUST pin current, which is a necessary evil, so to speak.)



            That's just one of the internal resources in the device. It also includes some special circuitry to protect against too much current and to protect against serious over-heating in operation. So you get thermal protection, built into the device, too.



            Voltage Regulation Method



            With the above understood, the basic idea behind the LM317 is the following:





            schematic





            simulate this circuit – Schematic created using CircuitLab



            The opamp is continually observing both its (+) and (-) inputs and it adjusts its output so that these two inputs have the same voltage. By inspection, you can see that the (+) input will be about $1.25:textV$ above the ADJUST pin voltage. So this means that the output voltage will also be about $1.25:textV$ above the ADJUST pin voltage when everything is working right.



            This is the most important thing to understand! So let me repeat it. The LM317 uses the internal voltage reference to set the (+) input about $1.25:textV$ above the ADJUST pin voltage and then uses the opamp's behavior to then force OUT to also be about $1.25:textV$ above the ADJUST pin voltage.



            The is the crux in understanding how it works. Make sure you run this through your head multiple times. Drill it in.



            Using the LM317



            At this point, it's a good idea to realize something else now. The LM317 cannot see $R_2$. It has no idea what you are using there. All it is doing is struggling to make sure that the OUT pin is about $1.25:textV$ above the ADJUST pin by letting more or less current flow from the IN pin to the OUT pin (via the transistor [it really is a Darlington instead of a single BJT as I showed.])



            Since the LM317 is continually adjusting OUT such that it is always about $1.25:textV$ above the ADJUST pin voltage, placing $R_1$ across OUT and ADJUST causes a current in $R_1$ which is $I_R_1approx frac1.25:textVR_1$.



            $I_R_1$ is added now to the ADJUST pin current, which is flowing out of the ADJUST pin and will be added to the current flowing via $R_1$. (Remember, this is the current that was required in order to make a good voltage reference inside of the LM317.)



            In your example, $I_R_1approx 5.2:textmA$. The ADJUST pin current adds as much as $100:mutextA$ to that (though it might also add a lot less.) All of this current must be allowed to reach the ground reference.




            In general, you want to make sure that this ADJUST pin current
            variation is small when compared to $I_R_1$, so that its
            variation doesn't make much difference to the output voltage of your
            regulator circuit. Note that in your circuit case, this is reasonably
            true. So now you understand better why that particular value for
            $R_1$ was selected.




            In most adjustable voltage circuits, sinking this current is handled by using a variable resistor (potentiometer) with one end tied to ground and the other end to the shared node of the ADJUST pin and one end of $R_1$. The current (which we expect to be somewhere between about $5.2:textmA$ and $5.3:textmA$ here) must now pass through this potentiometer. In doing so, it creates a voltage drop across it. That voltage drop gets added to the voltage drop across $R_1$ (which is fixed by design in the LM317) and must, by definition, be the voltage at the OUT pin.



            With $R_2$ allowed to be up to $5:textkOmega$, you can adjust the voltage drop across $R_2$ to be up to $26-27:textV$. Adding the remaining $approx 1.25:textV$ means that the voltage at OUT (with reference to ground) can be theoretically as high as somewhere from $27.2:textV$ to $28.3:textV$.



            However, to reach those peak voltages you'd have to have an input supply that is higher. Under the recommended operating conditions you can see the following:



            enter image description here



            So this means that to reach the maximum that the potentiometer and the value of $R_1$ promises, you'd need to have an input supply voltage of about $32:textV$.



            Other Uses



            Now that you understand this much, you might want to consider one more thought about the LM317. It can also be used as a current source for, say, charging a rechargeable battery. If you replace $R_2$ with a rechargeable battery, for example, then you can select a value for $R_1$ that will generate the right current for recharging it. The LM317 will keep adjusting things so that the voltage across $R_1$ is constant and this implies a constant current in $R_1$. Since all of that current must reach ground via a path you provide, using a battery in that path means it will get a constant current for recharging it. (There are other problems, of course. You'd need to monitor the charging process and stop it when the battery is charged or no longer requires a constant current. But the point remains -- the LM317 can also be used as a constant current source instead of a constant voltage source.)






            share|improve this answer












            $endgroup$



















              16
















              $begingroup$

              Overview



              I'll avoid depending upon algebra as an explanation. (Because algebra, while providing quantitative answers, doesn't often help people understand something unless they are very fluent with mathematics.) Regardless, it's still helpful to have the datasheet available. So here is TI's LM317 datasheet just to make it convenient when needed.



              The best way to understand something is to try and put yourself inside the device and "think like it does." Empathize with the device, so to speak. Then a lot of mystery goes away.



              In programming, for example, there's nothing that a program does that cannot be done by hand. (Whether or not it is practical to do so, is a different question.) So, just as with electronics, a good way to understand some algorithm in programming is to just sit down with paper and some items in front of you and just do things, manually, with your own hands. That almost always gets the point across, deeply inside. And then the mystery goes away.



              Knowing the name of something is NOT the same as knowing something. The best way to know something is to watch and observe it. So let's look at the device.



              LM317 Internal Voltage Reference



              Internally, the device includes a very special type of voltage reference which is set for approximately $1.25:textV$. It's not easy to design one of these, by the way. Especially if you want the voltage reference to stay constant over a wide range of operating temperatures and variations in ICs during manufacture and over a long time period. Here's what the datasheet says about it:



              enter image description hereenter image description here



              You can see that for a wide range of output currents, input voltages, and temperatures (see the note), this voltage is guaranteed to stay between $1.2:textV$ and $1.3:textV$. That's quite an achievement.



              To make this voltage reference work well, the designers also needed some kind of current source. The reason is that in order to make such a good voltage reference they also need to provide a relatively predictable current flowing through it. (Remember, you are providing an input voltage anywhere from $3:textV$ to $40:textV$.) So there is also a current source that provides a predictable current through the voltage reference in order to make this work out well. You can see this fact from this part of the datasheet:



              enter image description here



              The current source they use sources its current from the IN pin. But that current must leave by way of some other pin -- in this case, namely the ADJUST pin. So this current source's current is called the "ADJUST" terminal current. You are supposed to keep this fact in mind when using the device. You must provide a means for this current source's current to leave the device and go towards the ground reference.



              Let's recap. For this voltage regulator to do its job, the designers felt they needed to include an internal (hidden) voltage reference. (They need it so they can use it to compare against and then decide how to "regulate" the voltage you want -- I'll discuss those details, soon.) In order to make a good internal voltage reference, they needed a current source. Because of that, they also needed to let you know that you must help them by sinking that current via the ADJUST pin. So they specify that, as well.



              You now have to keep two things in your mind: (1) voltage reference; and, (2) adjust pin current. But the ADJUST pin current is just a consequence of providing that voltage reference. So the main thing to keep in mind, in order to understand the device, is the voltage reference (and not the ADJUST pin current, which is a necessary evil, so to speak.)



              That's just one of the internal resources in the device. It also includes some special circuitry to protect against too much current and to protect against serious over-heating in operation. So you get thermal protection, built into the device, too.



              Voltage Regulation Method



              With the above understood, the basic idea behind the LM317 is the following:





              schematic





              simulate this circuit – Schematic created using CircuitLab



              The opamp is continually observing both its (+) and (-) inputs and it adjusts its output so that these two inputs have the same voltage. By inspection, you can see that the (+) input will be about $1.25:textV$ above the ADJUST pin voltage. So this means that the output voltage will also be about $1.25:textV$ above the ADJUST pin voltage when everything is working right.



              This is the most important thing to understand! So let me repeat it. The LM317 uses the internal voltage reference to set the (+) input about $1.25:textV$ above the ADJUST pin voltage and then uses the opamp's behavior to then force OUT to also be about $1.25:textV$ above the ADJUST pin voltage.



              The is the crux in understanding how it works. Make sure you run this through your head multiple times. Drill it in.



              Using the LM317



              At this point, it's a good idea to realize something else now. The LM317 cannot see $R_2$. It has no idea what you are using there. All it is doing is struggling to make sure that the OUT pin is about $1.25:textV$ above the ADJUST pin by letting more or less current flow from the IN pin to the OUT pin (via the transistor [it really is a Darlington instead of a single BJT as I showed.])



              Since the LM317 is continually adjusting OUT such that it is always about $1.25:textV$ above the ADJUST pin voltage, placing $R_1$ across OUT and ADJUST causes a current in $R_1$ which is $I_R_1approx frac1.25:textVR_1$.



              $I_R_1$ is added now to the ADJUST pin current, which is flowing out of the ADJUST pin and will be added to the current flowing via $R_1$. (Remember, this is the current that was required in order to make a good voltage reference inside of the LM317.)



              In your example, $I_R_1approx 5.2:textmA$. The ADJUST pin current adds as much as $100:mutextA$ to that (though it might also add a lot less.) All of this current must be allowed to reach the ground reference.




              In general, you want to make sure that this ADJUST pin current
              variation is small when compared to $I_R_1$, so that its
              variation doesn't make much difference to the output voltage of your
              regulator circuit. Note that in your circuit case, this is reasonably
              true. So now you understand better why that particular value for
              $R_1$ was selected.




              In most adjustable voltage circuits, sinking this current is handled by using a variable resistor (potentiometer) with one end tied to ground and the other end to the shared node of the ADJUST pin and one end of $R_1$. The current (which we expect to be somewhere between about $5.2:textmA$ and $5.3:textmA$ here) must now pass through this potentiometer. In doing so, it creates a voltage drop across it. That voltage drop gets added to the voltage drop across $R_1$ (which is fixed by design in the LM317) and must, by definition, be the voltage at the OUT pin.



              With $R_2$ allowed to be up to $5:textkOmega$, you can adjust the voltage drop across $R_2$ to be up to $26-27:textV$. Adding the remaining $approx 1.25:textV$ means that the voltage at OUT (with reference to ground) can be theoretically as high as somewhere from $27.2:textV$ to $28.3:textV$.



              However, to reach those peak voltages you'd have to have an input supply that is higher. Under the recommended operating conditions you can see the following:



              enter image description here



              So this means that to reach the maximum that the potentiometer and the value of $R_1$ promises, you'd need to have an input supply voltage of about $32:textV$.



              Other Uses



              Now that you understand this much, you might want to consider one more thought about the LM317. It can also be used as a current source for, say, charging a rechargeable battery. If you replace $R_2$ with a rechargeable battery, for example, then you can select a value for $R_1$ that will generate the right current for recharging it. The LM317 will keep adjusting things so that the voltage across $R_1$ is constant and this implies a constant current in $R_1$. Since all of that current must reach ground via a path you provide, using a battery in that path means it will get a constant current for recharging it. (There are other problems, of course. You'd need to monitor the charging process and stop it when the battery is charged or no longer requires a constant current. But the point remains -- the LM317 can also be used as a constant current source instead of a constant voltage source.)






              share|improve this answer












              $endgroup$

















                16














                16










                16







                $begingroup$

                Overview



                I'll avoid depending upon algebra as an explanation. (Because algebra, while providing quantitative answers, doesn't often help people understand something unless they are very fluent with mathematics.) Regardless, it's still helpful to have the datasheet available. So here is TI's LM317 datasheet just to make it convenient when needed.



                The best way to understand something is to try and put yourself inside the device and "think like it does." Empathize with the device, so to speak. Then a lot of mystery goes away.



                In programming, for example, there's nothing that a program does that cannot be done by hand. (Whether or not it is practical to do so, is a different question.) So, just as with electronics, a good way to understand some algorithm in programming is to just sit down with paper and some items in front of you and just do things, manually, with your own hands. That almost always gets the point across, deeply inside. And then the mystery goes away.



                Knowing the name of something is NOT the same as knowing something. The best way to know something is to watch and observe it. So let's look at the device.



                LM317 Internal Voltage Reference



                Internally, the device includes a very special type of voltage reference which is set for approximately $1.25:textV$. It's not easy to design one of these, by the way. Especially if you want the voltage reference to stay constant over a wide range of operating temperatures and variations in ICs during manufacture and over a long time period. Here's what the datasheet says about it:



                enter image description hereenter image description here



                You can see that for a wide range of output currents, input voltages, and temperatures (see the note), this voltage is guaranteed to stay between $1.2:textV$ and $1.3:textV$. That's quite an achievement.



                To make this voltage reference work well, the designers also needed some kind of current source. The reason is that in order to make such a good voltage reference they also need to provide a relatively predictable current flowing through it. (Remember, you are providing an input voltage anywhere from $3:textV$ to $40:textV$.) So there is also a current source that provides a predictable current through the voltage reference in order to make this work out well. You can see this fact from this part of the datasheet:



                enter image description here



                The current source they use sources its current from the IN pin. But that current must leave by way of some other pin -- in this case, namely the ADJUST pin. So this current source's current is called the "ADJUST" terminal current. You are supposed to keep this fact in mind when using the device. You must provide a means for this current source's current to leave the device and go towards the ground reference.



                Let's recap. For this voltage regulator to do its job, the designers felt they needed to include an internal (hidden) voltage reference. (They need it so they can use it to compare against and then decide how to "regulate" the voltage you want -- I'll discuss those details, soon.) In order to make a good internal voltage reference, they needed a current source. Because of that, they also needed to let you know that you must help them by sinking that current via the ADJUST pin. So they specify that, as well.



                You now have to keep two things in your mind: (1) voltage reference; and, (2) adjust pin current. But the ADJUST pin current is just a consequence of providing that voltage reference. So the main thing to keep in mind, in order to understand the device, is the voltage reference (and not the ADJUST pin current, which is a necessary evil, so to speak.)



                That's just one of the internal resources in the device. It also includes some special circuitry to protect against too much current and to protect against serious over-heating in operation. So you get thermal protection, built into the device, too.



                Voltage Regulation Method



                With the above understood, the basic idea behind the LM317 is the following:





                schematic





                simulate this circuit – Schematic created using CircuitLab



                The opamp is continually observing both its (+) and (-) inputs and it adjusts its output so that these two inputs have the same voltage. By inspection, you can see that the (+) input will be about $1.25:textV$ above the ADJUST pin voltage. So this means that the output voltage will also be about $1.25:textV$ above the ADJUST pin voltage when everything is working right.



                This is the most important thing to understand! So let me repeat it. The LM317 uses the internal voltage reference to set the (+) input about $1.25:textV$ above the ADJUST pin voltage and then uses the opamp's behavior to then force OUT to also be about $1.25:textV$ above the ADJUST pin voltage.



                The is the crux in understanding how it works. Make sure you run this through your head multiple times. Drill it in.



                Using the LM317



                At this point, it's a good idea to realize something else now. The LM317 cannot see $R_2$. It has no idea what you are using there. All it is doing is struggling to make sure that the OUT pin is about $1.25:textV$ above the ADJUST pin by letting more or less current flow from the IN pin to the OUT pin (via the transistor [it really is a Darlington instead of a single BJT as I showed.])



                Since the LM317 is continually adjusting OUT such that it is always about $1.25:textV$ above the ADJUST pin voltage, placing $R_1$ across OUT and ADJUST causes a current in $R_1$ which is $I_R_1approx frac1.25:textVR_1$.



                $I_R_1$ is added now to the ADJUST pin current, which is flowing out of the ADJUST pin and will be added to the current flowing via $R_1$. (Remember, this is the current that was required in order to make a good voltage reference inside of the LM317.)



                In your example, $I_R_1approx 5.2:textmA$. The ADJUST pin current adds as much as $100:mutextA$ to that (though it might also add a lot less.) All of this current must be allowed to reach the ground reference.




                In general, you want to make sure that this ADJUST pin current
                variation is small when compared to $I_R_1$, so that its
                variation doesn't make much difference to the output voltage of your
                regulator circuit. Note that in your circuit case, this is reasonably
                true. So now you understand better why that particular value for
                $R_1$ was selected.




                In most adjustable voltage circuits, sinking this current is handled by using a variable resistor (potentiometer) with one end tied to ground and the other end to the shared node of the ADJUST pin and one end of $R_1$. The current (which we expect to be somewhere between about $5.2:textmA$ and $5.3:textmA$ here) must now pass through this potentiometer. In doing so, it creates a voltage drop across it. That voltage drop gets added to the voltage drop across $R_1$ (which is fixed by design in the LM317) and must, by definition, be the voltage at the OUT pin.



                With $R_2$ allowed to be up to $5:textkOmega$, you can adjust the voltage drop across $R_2$ to be up to $26-27:textV$. Adding the remaining $approx 1.25:textV$ means that the voltage at OUT (with reference to ground) can be theoretically as high as somewhere from $27.2:textV$ to $28.3:textV$.



                However, to reach those peak voltages you'd have to have an input supply that is higher. Under the recommended operating conditions you can see the following:



                enter image description here



                So this means that to reach the maximum that the potentiometer and the value of $R_1$ promises, you'd need to have an input supply voltage of about $32:textV$.



                Other Uses



                Now that you understand this much, you might want to consider one more thought about the LM317. It can also be used as a current source for, say, charging a rechargeable battery. If you replace $R_2$ with a rechargeable battery, for example, then you can select a value for $R_1$ that will generate the right current for recharging it. The LM317 will keep adjusting things so that the voltage across $R_1$ is constant and this implies a constant current in $R_1$. Since all of that current must reach ground via a path you provide, using a battery in that path means it will get a constant current for recharging it. (There are other problems, of course. You'd need to monitor the charging process and stop it when the battery is charged or no longer requires a constant current. But the point remains -- the LM317 can also be used as a constant current source instead of a constant voltage source.)






                share|improve this answer












                $endgroup$



                Overview



                I'll avoid depending upon algebra as an explanation. (Because algebra, while providing quantitative answers, doesn't often help people understand something unless they are very fluent with mathematics.) Regardless, it's still helpful to have the datasheet available. So here is TI's LM317 datasheet just to make it convenient when needed.



                The best way to understand something is to try and put yourself inside the device and "think like it does." Empathize with the device, so to speak. Then a lot of mystery goes away.



                In programming, for example, there's nothing that a program does that cannot be done by hand. (Whether or not it is practical to do so, is a different question.) So, just as with electronics, a good way to understand some algorithm in programming is to just sit down with paper and some items in front of you and just do things, manually, with your own hands. That almost always gets the point across, deeply inside. And then the mystery goes away.



                Knowing the name of something is NOT the same as knowing something. The best way to know something is to watch and observe it. So let's look at the device.



                LM317 Internal Voltage Reference



                Internally, the device includes a very special type of voltage reference which is set for approximately $1.25:textV$. It's not easy to design one of these, by the way. Especially if you want the voltage reference to stay constant over a wide range of operating temperatures and variations in ICs during manufacture and over a long time period. Here's what the datasheet says about it:



                enter image description hereenter image description here



                You can see that for a wide range of output currents, input voltages, and temperatures (see the note), this voltage is guaranteed to stay between $1.2:textV$ and $1.3:textV$. That's quite an achievement.



                To make this voltage reference work well, the designers also needed some kind of current source. The reason is that in order to make such a good voltage reference they also need to provide a relatively predictable current flowing through it. (Remember, you are providing an input voltage anywhere from $3:textV$ to $40:textV$.) So there is also a current source that provides a predictable current through the voltage reference in order to make this work out well. You can see this fact from this part of the datasheet:



                enter image description here



                The current source they use sources its current from the IN pin. But that current must leave by way of some other pin -- in this case, namely the ADJUST pin. So this current source's current is called the "ADJUST" terminal current. You are supposed to keep this fact in mind when using the device. You must provide a means for this current source's current to leave the device and go towards the ground reference.



                Let's recap. For this voltage regulator to do its job, the designers felt they needed to include an internal (hidden) voltage reference. (They need it so they can use it to compare against and then decide how to "regulate" the voltage you want -- I'll discuss those details, soon.) In order to make a good internal voltage reference, they needed a current source. Because of that, they also needed to let you know that you must help them by sinking that current via the ADJUST pin. So they specify that, as well.



                You now have to keep two things in your mind: (1) voltage reference; and, (2) adjust pin current. But the ADJUST pin current is just a consequence of providing that voltage reference. So the main thing to keep in mind, in order to understand the device, is the voltage reference (and not the ADJUST pin current, which is a necessary evil, so to speak.)



                That's just one of the internal resources in the device. It also includes some special circuitry to protect against too much current and to protect against serious over-heating in operation. So you get thermal protection, built into the device, too.



                Voltage Regulation Method



                With the above understood, the basic idea behind the LM317 is the following:





                schematic





                simulate this circuit – Schematic created using CircuitLab



                The opamp is continually observing both its (+) and (-) inputs and it adjusts its output so that these two inputs have the same voltage. By inspection, you can see that the (+) input will be about $1.25:textV$ above the ADJUST pin voltage. So this means that the output voltage will also be about $1.25:textV$ above the ADJUST pin voltage when everything is working right.



                This is the most important thing to understand! So let me repeat it. The LM317 uses the internal voltage reference to set the (+) input about $1.25:textV$ above the ADJUST pin voltage and then uses the opamp's behavior to then force OUT to also be about $1.25:textV$ above the ADJUST pin voltage.



                The is the crux in understanding how it works. Make sure you run this through your head multiple times. Drill it in.



                Using the LM317



                At this point, it's a good idea to realize something else now. The LM317 cannot see $R_2$. It has no idea what you are using there. All it is doing is struggling to make sure that the OUT pin is about $1.25:textV$ above the ADJUST pin by letting more or less current flow from the IN pin to the OUT pin (via the transistor [it really is a Darlington instead of a single BJT as I showed.])



                Since the LM317 is continually adjusting OUT such that it is always about $1.25:textV$ above the ADJUST pin voltage, placing $R_1$ across OUT and ADJUST causes a current in $R_1$ which is $I_R_1approx frac1.25:textVR_1$.



                $I_R_1$ is added now to the ADJUST pin current, which is flowing out of the ADJUST pin and will be added to the current flowing via $R_1$. (Remember, this is the current that was required in order to make a good voltage reference inside of the LM317.)



                In your example, $I_R_1approx 5.2:textmA$. The ADJUST pin current adds as much as $100:mutextA$ to that (though it might also add a lot less.) All of this current must be allowed to reach the ground reference.




                In general, you want to make sure that this ADJUST pin current
                variation is small when compared to $I_R_1$, so that its
                variation doesn't make much difference to the output voltage of your
                regulator circuit. Note that in your circuit case, this is reasonably
                true. So now you understand better why that particular value for
                $R_1$ was selected.




                In most adjustable voltage circuits, sinking this current is handled by using a variable resistor (potentiometer) with one end tied to ground and the other end to the shared node of the ADJUST pin and one end of $R_1$. The current (which we expect to be somewhere between about $5.2:textmA$ and $5.3:textmA$ here) must now pass through this potentiometer. In doing so, it creates a voltage drop across it. That voltage drop gets added to the voltage drop across $R_1$ (which is fixed by design in the LM317) and must, by definition, be the voltage at the OUT pin.



                With $R_2$ allowed to be up to $5:textkOmega$, you can adjust the voltage drop across $R_2$ to be up to $26-27:textV$. Adding the remaining $approx 1.25:textV$ means that the voltage at OUT (with reference to ground) can be theoretically as high as somewhere from $27.2:textV$ to $28.3:textV$.



                However, to reach those peak voltages you'd have to have an input supply that is higher. Under the recommended operating conditions you can see the following:



                enter image description here



                So this means that to reach the maximum that the potentiometer and the value of $R_1$ promises, you'd need to have an input supply voltage of about $32:textV$.



                Other Uses



                Now that you understand this much, you might want to consider one more thought about the LM317. It can also be used as a current source for, say, charging a rechargeable battery. If you replace $R_2$ with a rechargeable battery, for example, then you can select a value for $R_1$ that will generate the right current for recharging it. The LM317 will keep adjusting things so that the voltage across $R_1$ is constant and this implies a constant current in $R_1$. Since all of that current must reach ground via a path you provide, using a battery in that path means it will get a constant current for recharging it. (There are other problems, of course. You'd need to monitor the charging process and stop it when the battery is charged or no longer requires a constant current. But the point remains -- the LM317 can also be used as a constant current source instead of a constant voltage source.)







                share|improve this answer















                share|improve this answer




                share|improve this answer








                edited Jul 6 at 4:35

























                answered Jul 5 at 19:53









                jonkjonk

                40k2 gold badges32 silver badges83 bronze badges




                40k2 gold badges32 silver badges83 bronze badges
























                    6
















                    $begingroup$

                    enter image description here



                    Figure 1. As suggested by the datasheet.



                    • The LM317 works by adjusting its output to be 1.25 V above the voltage at the ADJ pin.

                    • With R1 = 240 Ω there is a current of $ frac 1.25240 = 5.2 text mA $ running through it and R2.

                    • The constant current through R2 means that the voltage drop across it changes linearly with the resistance of R2. This is super-handy if you want the voltage to change in proportion to the angular rotation of R2.

                    schematic





                    simulate this circuit – Schematic created using CircuitLab



                    Figure 2. OP's plan.



                    Now let's try doing it your way.



                    • Let's say our 5k pot is rated at 1/8 W (fairly typical). Using $ P = I^2 R $ we can work out that the maximum current it can handle is $ I = sqrt frac PR = 5 text mA $.

                    • This in turn means that once you reduce the pot resistance below $ frac 1.255m = 0.25 text k Omega $ (250 Ω) that the pot will tend to burn out. (The pot's rated power is for dissipation over the whole track - not just the part in use. If you reduce the track length then you reduce the maximum power dissipation proportionally.)

                    Now let's look at linearity - assuming we haven't turned the wiper all the way up and burnt out the pot:



                    • At 20% down from the top you have 1k & 4k. The output voltage will be $ V_out = frac 1+41(1.25) = 6.25 text V $.

                    • At 40% down from the top you have 2k & 3k. The output voltage will be $ V_out = frac 2+32(1.25) = 3.125 text V $.

                    • At 60% down from the top you have 3k & 2k. The output voltage will be $ V_out = frac 3+23(1.25) = 2.08 text V $.

                    • At 80% down from the top you have 4k & 1k. The output voltage will be $ V_out = frac 4+14(1.25) = 1.56 text V $.

                    • At 100% down from the top you have 5k & 0k. The output voltage will be $ V_out = frac 5+05(1.25) = 1.25 text V $.

                    Clearly the adjustment pot will be non-linear. The output falls by half in the adjustment from 20% to 40%.




                    Lastly, forgive my ignorance of caps but if a capacitor isn't a load, isn't C1 creating a short circuit?




                    Capacitors, as the symbol suggests, are parallel plates separated by a non-conducting gap. DC current cannot flow through a capacitor once it is charged up.






                    share|improve this answer










                    $endgroup$



















                      6
















                      $begingroup$

                      enter image description here



                      Figure 1. As suggested by the datasheet.



                      • The LM317 works by adjusting its output to be 1.25 V above the voltage at the ADJ pin.

                      • With R1 = 240 Ω there is a current of $ frac 1.25240 = 5.2 text mA $ running through it and R2.

                      • The constant current through R2 means that the voltage drop across it changes linearly with the resistance of R2. This is super-handy if you want the voltage to change in proportion to the angular rotation of R2.

                      schematic





                      simulate this circuit – Schematic created using CircuitLab



                      Figure 2. OP's plan.



                      Now let's try doing it your way.



                      • Let's say our 5k pot is rated at 1/8 W (fairly typical). Using $ P = I^2 R $ we can work out that the maximum current it can handle is $ I = sqrt frac PR = 5 text mA $.

                      • This in turn means that once you reduce the pot resistance below $ frac 1.255m = 0.25 text k Omega $ (250 Ω) that the pot will tend to burn out. (The pot's rated power is for dissipation over the whole track - not just the part in use. If you reduce the track length then you reduce the maximum power dissipation proportionally.)

                      Now let's look at linearity - assuming we haven't turned the wiper all the way up and burnt out the pot:



                      • At 20% down from the top you have 1k & 4k. The output voltage will be $ V_out = frac 1+41(1.25) = 6.25 text V $.

                      • At 40% down from the top you have 2k & 3k. The output voltage will be $ V_out = frac 2+32(1.25) = 3.125 text V $.

                      • At 60% down from the top you have 3k & 2k. The output voltage will be $ V_out = frac 3+23(1.25) = 2.08 text V $.

                      • At 80% down from the top you have 4k & 1k. The output voltage will be $ V_out = frac 4+14(1.25) = 1.56 text V $.

                      • At 100% down from the top you have 5k & 0k. The output voltage will be $ V_out = frac 5+05(1.25) = 1.25 text V $.

                      Clearly the adjustment pot will be non-linear. The output falls by half in the adjustment from 20% to 40%.




                      Lastly, forgive my ignorance of caps but if a capacitor isn't a load, isn't C1 creating a short circuit?




                      Capacitors, as the symbol suggests, are parallel plates separated by a non-conducting gap. DC current cannot flow through a capacitor once it is charged up.






                      share|improve this answer










                      $endgroup$

















                        6














                        6










                        6







                        $begingroup$

                        enter image description here



                        Figure 1. As suggested by the datasheet.



                        • The LM317 works by adjusting its output to be 1.25 V above the voltage at the ADJ pin.

                        • With R1 = 240 Ω there is a current of $ frac 1.25240 = 5.2 text mA $ running through it and R2.

                        • The constant current through R2 means that the voltage drop across it changes linearly with the resistance of R2. This is super-handy if you want the voltage to change in proportion to the angular rotation of R2.

                        schematic





                        simulate this circuit – Schematic created using CircuitLab



                        Figure 2. OP's plan.



                        Now let's try doing it your way.



                        • Let's say our 5k pot is rated at 1/8 W (fairly typical). Using $ P = I^2 R $ we can work out that the maximum current it can handle is $ I = sqrt frac PR = 5 text mA $.

                        • This in turn means that once you reduce the pot resistance below $ frac 1.255m = 0.25 text k Omega $ (250 Ω) that the pot will tend to burn out. (The pot's rated power is for dissipation over the whole track - not just the part in use. If you reduce the track length then you reduce the maximum power dissipation proportionally.)

                        Now let's look at linearity - assuming we haven't turned the wiper all the way up and burnt out the pot:



                        • At 20% down from the top you have 1k & 4k. The output voltage will be $ V_out = frac 1+41(1.25) = 6.25 text V $.

                        • At 40% down from the top you have 2k & 3k. The output voltage will be $ V_out = frac 2+32(1.25) = 3.125 text V $.

                        • At 60% down from the top you have 3k & 2k. The output voltage will be $ V_out = frac 3+23(1.25) = 2.08 text V $.

                        • At 80% down from the top you have 4k & 1k. The output voltage will be $ V_out = frac 4+14(1.25) = 1.56 text V $.

                        • At 100% down from the top you have 5k & 0k. The output voltage will be $ V_out = frac 5+05(1.25) = 1.25 text V $.

                        Clearly the adjustment pot will be non-linear. The output falls by half in the adjustment from 20% to 40%.




                        Lastly, forgive my ignorance of caps but if a capacitor isn't a load, isn't C1 creating a short circuit?




                        Capacitors, as the symbol suggests, are parallel plates separated by a non-conducting gap. DC current cannot flow through a capacitor once it is charged up.






                        share|improve this answer










                        $endgroup$



                        enter image description here



                        Figure 1. As suggested by the datasheet.



                        • The LM317 works by adjusting its output to be 1.25 V above the voltage at the ADJ pin.

                        • With R1 = 240 Ω there is a current of $ frac 1.25240 = 5.2 text mA $ running through it and R2.

                        • The constant current through R2 means that the voltage drop across it changes linearly with the resistance of R2. This is super-handy if you want the voltage to change in proportion to the angular rotation of R2.

                        schematic





                        simulate this circuit – Schematic created using CircuitLab



                        Figure 2. OP's plan.



                        Now let's try doing it your way.



                        • Let's say our 5k pot is rated at 1/8 W (fairly typical). Using $ P = I^2 R $ we can work out that the maximum current it can handle is $ I = sqrt frac PR = 5 text mA $.

                        • This in turn means that once you reduce the pot resistance below $ frac 1.255m = 0.25 text k Omega $ (250 Ω) that the pot will tend to burn out. (The pot's rated power is for dissipation over the whole track - not just the part in use. If you reduce the track length then you reduce the maximum power dissipation proportionally.)

                        Now let's look at linearity - assuming we haven't turned the wiper all the way up and burnt out the pot:



                        • At 20% down from the top you have 1k & 4k. The output voltage will be $ V_out = frac 1+41(1.25) = 6.25 text V $.

                        • At 40% down from the top you have 2k & 3k. The output voltage will be $ V_out = frac 2+32(1.25) = 3.125 text V $.

                        • At 60% down from the top you have 3k & 2k. The output voltage will be $ V_out = frac 3+23(1.25) = 2.08 text V $.

                        • At 80% down from the top you have 4k & 1k. The output voltage will be $ V_out = frac 4+14(1.25) = 1.56 text V $.

                        • At 100% down from the top you have 5k & 0k. The output voltage will be $ V_out = frac 5+05(1.25) = 1.25 text V $.

                        Clearly the adjustment pot will be non-linear. The output falls by half in the adjustment from 20% to 40%.




                        Lastly, forgive my ignorance of caps but if a capacitor isn't a load, isn't C1 creating a short circuit?




                        Capacitors, as the symbol suggests, are parallel plates separated by a non-conducting gap. DC current cannot flow through a capacitor once it is charged up.







                        share|improve this answer













                        share|improve this answer




                        share|improve this answer










                        answered Jul 5 at 18:44









                        TransistorTransistor

                        102k9 gold badges104 silver badges226 bronze badges




                        102k9 gold badges104 silver badges226 bronze badges
























                            3
















                            $begingroup$

                            How to calculate the resistor values already received a detailed answer. Let me try clarify your confusion about voltage divider: as you said, it provides a fraction of the input voltage, according to the ratio of the resistors. The only confusion here is: it is being used to sample the output voltage of your controller, to serve as a reference for voltage control.



                            Even if you understand the LM317 only as a black box, try to view it as a device that will try to keep the voltage between the Vout and Adj pins as 1.25V. If this difference is lower than 1.25V, Vout will be increased, if it is higher, Vout decreases. The ratio of the output voltage is given by the voltage divider.



                            That way the LM317 tries to compensate for variations on the current demanded by the load and also for variations in the input voltage. The formulas in the datasheet allow the calculation of the resistor values to obtain 1.25V between the mentioned pins for a given output voltage.






                            share|improve this answer










                            $endgroup$



















                              3
















                              $begingroup$

                              How to calculate the resistor values already received a detailed answer. Let me try clarify your confusion about voltage divider: as you said, it provides a fraction of the input voltage, according to the ratio of the resistors. The only confusion here is: it is being used to sample the output voltage of your controller, to serve as a reference for voltage control.



                              Even if you understand the LM317 only as a black box, try to view it as a device that will try to keep the voltage between the Vout and Adj pins as 1.25V. If this difference is lower than 1.25V, Vout will be increased, if it is higher, Vout decreases. The ratio of the output voltage is given by the voltage divider.



                              That way the LM317 tries to compensate for variations on the current demanded by the load and also for variations in the input voltage. The formulas in the datasheet allow the calculation of the resistor values to obtain 1.25V between the mentioned pins for a given output voltage.






                              share|improve this answer










                              $endgroup$

















                                3














                                3










                                3







                                $begingroup$

                                How to calculate the resistor values already received a detailed answer. Let me try clarify your confusion about voltage divider: as you said, it provides a fraction of the input voltage, according to the ratio of the resistors. The only confusion here is: it is being used to sample the output voltage of your controller, to serve as a reference for voltage control.



                                Even if you understand the LM317 only as a black box, try to view it as a device that will try to keep the voltage between the Vout and Adj pins as 1.25V. If this difference is lower than 1.25V, Vout will be increased, if it is higher, Vout decreases. The ratio of the output voltage is given by the voltage divider.



                                That way the LM317 tries to compensate for variations on the current demanded by the load and also for variations in the input voltage. The formulas in the datasheet allow the calculation of the resistor values to obtain 1.25V between the mentioned pins for a given output voltage.






                                share|improve this answer










                                $endgroup$



                                How to calculate the resistor values already received a detailed answer. Let me try clarify your confusion about voltage divider: as you said, it provides a fraction of the input voltage, according to the ratio of the resistors. The only confusion here is: it is being used to sample the output voltage of your controller, to serve as a reference for voltage control.



                                Even if you understand the LM317 only as a black box, try to view it as a device that will try to keep the voltage between the Vout and Adj pins as 1.25V. If this difference is lower than 1.25V, Vout will be increased, if it is higher, Vout decreases. The ratio of the output voltage is given by the voltage divider.



                                That way the LM317 tries to compensate for variations on the current demanded by the load and also for variations in the input voltage. The formulas in the datasheet allow the calculation of the resistor values to obtain 1.25V between the mentioned pins for a given output voltage.







                                share|improve this answer













                                share|improve this answer




                                share|improve this answer










                                answered Jul 5 at 18:38









                                vangelovangelo

                                1,2321 gold badge2 silver badges13 bronze badges




                                1,2321 gold badge2 silver badges13 bronze badges
























                                    2
















                                    $begingroup$

                                    There is always a fixed 1.25V between the output and adjust pins. Therefore connecting R1 between these two pins forces a constant current to flow through R1. This current must flow through R2 (it can't go anywhere else!) causing a constant volts drop across R2. Therefore the regulator output voltage equals the dropped voltage across R2 + 1.25V.



                                    The above is a good approximation but is not precisely true. A very small current flows out of the adjust pin through R2 to ground slightly increasing the voltage dropped across R2 and therefore slightly increasing the output voltage.



                                    Vout = ((1.25/R1)*R2 + 1.25V) + (R2 * Iadj)



                                    Capacitors are open circuit to DC.






                                    share|improve this answer










                                    $endgroup$



















                                      2
















                                      $begingroup$

                                      There is always a fixed 1.25V between the output and adjust pins. Therefore connecting R1 between these two pins forces a constant current to flow through R1. This current must flow through R2 (it can't go anywhere else!) causing a constant volts drop across R2. Therefore the regulator output voltage equals the dropped voltage across R2 + 1.25V.



                                      The above is a good approximation but is not precisely true. A very small current flows out of the adjust pin through R2 to ground slightly increasing the voltage dropped across R2 and therefore slightly increasing the output voltage.



                                      Vout = ((1.25/R1)*R2 + 1.25V) + (R2 * Iadj)



                                      Capacitors are open circuit to DC.






                                      share|improve this answer










                                      $endgroup$

















                                        2














                                        2










                                        2







                                        $begingroup$

                                        There is always a fixed 1.25V between the output and adjust pins. Therefore connecting R1 between these two pins forces a constant current to flow through R1. This current must flow through R2 (it can't go anywhere else!) causing a constant volts drop across R2. Therefore the regulator output voltage equals the dropped voltage across R2 + 1.25V.



                                        The above is a good approximation but is not precisely true. A very small current flows out of the adjust pin through R2 to ground slightly increasing the voltage dropped across R2 and therefore slightly increasing the output voltage.



                                        Vout = ((1.25/R1)*R2 + 1.25V) + (R2 * Iadj)



                                        Capacitors are open circuit to DC.






                                        share|improve this answer










                                        $endgroup$



                                        There is always a fixed 1.25V between the output and adjust pins. Therefore connecting R1 between these two pins forces a constant current to flow through R1. This current must flow through R2 (it can't go anywhere else!) causing a constant volts drop across R2. Therefore the regulator output voltage equals the dropped voltage across R2 + 1.25V.



                                        The above is a good approximation but is not precisely true. A very small current flows out of the adjust pin through R2 to ground slightly increasing the voltage dropped across R2 and therefore slightly increasing the output voltage.



                                        Vout = ((1.25/R1)*R2 + 1.25V) + (R2 * Iadj)



                                        Capacitors are open circuit to DC.







                                        share|improve this answer













                                        share|improve this answer




                                        share|improve this answer










                                        answered Jul 6 at 9:48









                                        JamesJames

                                        6151 silver badge5 bronze badges




                                        6151 silver badge5 bronze badges
























                                            2
















                                            $begingroup$

                                            Let's look at how LM317 works!



                                            Internals of LM317 (not embedded due to possible copyright reasons)



                                            LM317 adjusts the VOUT terminal voltage until ADJ terminal voltage is 1.25 volts below VOUT. It is using a voltage comparator (an operational amplifier), where one of the inputs is the output pin, the other of the inputs is connected to the adjustment pin, but not directly but via a circuit that effectively works like a stable 1.25 volt voltage source (constant voltage drop). Operational amplifiers are known for their high input impedance, so the ADJ current will be minimal. Then the operational amplifier output is used to adjust transistor base voltage, so that the emitter voltage at output will be the base voltage minus transistor voltage drop which in this case is a Darlington pair. (Ok, this explanation simplifies things a bit but that would be how you create the simplest possible adjustable voltage regulator.)



                                            So, if the VOUT - ADJ voltage difference is less than 1.25 volts, the VOUT is very quickly cranked up, to the max if needs be.



                                            If, on the other hand, the VOUT - ADJ voltage difference is more than 1.25 volts, the VOUT is very quickly cranked down, to the minimum if needs be.



                                            The idea is that the VOUT - ADJ voltage difference is some fraction of the output terminal voltage, determined by a voltage divider.



                                            If you have only R2, without R1, then the ADJ terminal voltage would be zero, and it would have variable resistance to ground (which doesn't have any useful effect, because the current in the ADJ terminal is minimal).



                                            If you have both R1 and R2, then the ADJ terminal voltage is determined by a voltage divider between VOUT and ground.



                                            Note R2 is a variable resistor, not a potentiometer (although you can make a potentiometer into a variable resistor by connecting the center pin to one of the extreme pins and using the two connected-together pins with the other extreme pin, or just using the center pin and one of the extreme pins).



                                            You could have the same effect by connecting one potentiometer extreme pin to ground, the other extreme pin to VOUT and the center pin to ADJ.



                                            Note this simple explanation ignored the adjustment terminal current. For a more complete explanation, see the upvoted answer.






                                            share|improve this answer












                                            $endgroup$














                                            • $begingroup$
                                              "... until ADJ terminal voltage is 1.25 volts." This should read "... until ADJ terminal voltage is 1.25 volts below $ V_OUT $". "... one of the inputs is a stable 1.25 volt voltage source, and the other of the inputs if the ADJ terminal voltage." This isn't correct. See the internal diagram. "Operational amplifiers are known for their high output impedance ..." Nope. You mean high input impedance. ".... base voltage minus 0.7 volts or so." Nope. It's a Darlington output so 2 x diode drop. A few more tidy-up edits are required.
                                              $endgroup$
                                              – Transistor
                                              Jul 7 at 11:55











                                            • $begingroup$
                                              Your edit has improved a few points. Add in the image from ti.com/ds_dgm/images/fbd_slvs044x.gif and refer to it as you write. You'll see that "one of the inputs is a stable 1.25 volt voltage source between the regulator output and op-amp input" isn't correct. I have found that writing a good answer forces me to learn a bit more. Keep going.
                                              $endgroup$
                                              – Transistor
                                              Jul 7 at 12:10










                                            • $begingroup$
                                              Ok, the first time I just described how I would create a hand-crafted linear regulator that is adjustable. The second edit I tried to be a bit more accurate to LM317 workings, but apparently the internals of LM317 differed from what I assumed them to be. Hopefully the description this time is accurate enough!
                                              $endgroup$
                                              – juhist
                                              Jul 7 at 12:16










                                            • $begingroup$
                                              You're actually correct about the Texas Instruments copyright: "This also means you may not, without our permission, "mirror" this information on your own server, or modify or re-use this information on another system." I can't imagine there is any real problem where you are promoting understanding of their product and provide a link to source. +1 for the fixes.
                                              $endgroup$
                                              – Transistor
                                              Jul 7 at 12:49















                                            2
















                                            $begingroup$

                                            Let's look at how LM317 works!



                                            Internals of LM317 (not embedded due to possible copyright reasons)



                                            LM317 adjusts the VOUT terminal voltage until ADJ terminal voltage is 1.25 volts below VOUT. It is using a voltage comparator (an operational amplifier), where one of the inputs is the output pin, the other of the inputs is connected to the adjustment pin, but not directly but via a circuit that effectively works like a stable 1.25 volt voltage source (constant voltage drop). Operational amplifiers are known for their high input impedance, so the ADJ current will be minimal. Then the operational amplifier output is used to adjust transistor base voltage, so that the emitter voltage at output will be the base voltage minus transistor voltage drop which in this case is a Darlington pair. (Ok, this explanation simplifies things a bit but that would be how you create the simplest possible adjustable voltage regulator.)



                                            So, if the VOUT - ADJ voltage difference is less than 1.25 volts, the VOUT is very quickly cranked up, to the max if needs be.



                                            If, on the other hand, the VOUT - ADJ voltage difference is more than 1.25 volts, the VOUT is very quickly cranked down, to the minimum if needs be.



                                            The idea is that the VOUT - ADJ voltage difference is some fraction of the output terminal voltage, determined by a voltage divider.



                                            If you have only R2, without R1, then the ADJ terminal voltage would be zero, and it would have variable resistance to ground (which doesn't have any useful effect, because the current in the ADJ terminal is minimal).



                                            If you have both R1 and R2, then the ADJ terminal voltage is determined by a voltage divider between VOUT and ground.



                                            Note R2 is a variable resistor, not a potentiometer (although you can make a potentiometer into a variable resistor by connecting the center pin to one of the extreme pins and using the two connected-together pins with the other extreme pin, or just using the center pin and one of the extreme pins).



                                            You could have the same effect by connecting one potentiometer extreme pin to ground, the other extreme pin to VOUT and the center pin to ADJ.



                                            Note this simple explanation ignored the adjustment terminal current. For a more complete explanation, see the upvoted answer.






                                            share|improve this answer












                                            $endgroup$














                                            • $begingroup$
                                              "... until ADJ terminal voltage is 1.25 volts." This should read "... until ADJ terminal voltage is 1.25 volts below $ V_OUT $". "... one of the inputs is a stable 1.25 volt voltage source, and the other of the inputs if the ADJ terminal voltage." This isn't correct. See the internal diagram. "Operational amplifiers are known for their high output impedance ..." Nope. You mean high input impedance. ".... base voltage minus 0.7 volts or so." Nope. It's a Darlington output so 2 x diode drop. A few more tidy-up edits are required.
                                              $endgroup$
                                              – Transistor
                                              Jul 7 at 11:55











                                            • $begingroup$
                                              Your edit has improved a few points. Add in the image from ti.com/ds_dgm/images/fbd_slvs044x.gif and refer to it as you write. You'll see that "one of the inputs is a stable 1.25 volt voltage source between the regulator output and op-amp input" isn't correct. I have found that writing a good answer forces me to learn a bit more. Keep going.
                                              $endgroup$
                                              – Transistor
                                              Jul 7 at 12:10










                                            • $begingroup$
                                              Ok, the first time I just described how I would create a hand-crafted linear regulator that is adjustable. The second edit I tried to be a bit more accurate to LM317 workings, but apparently the internals of LM317 differed from what I assumed them to be. Hopefully the description this time is accurate enough!
                                              $endgroup$
                                              – juhist
                                              Jul 7 at 12:16










                                            • $begingroup$
                                              You're actually correct about the Texas Instruments copyright: "This also means you may not, without our permission, "mirror" this information on your own server, or modify or re-use this information on another system." I can't imagine there is any real problem where you are promoting understanding of their product and provide a link to source. +1 for the fixes.
                                              $endgroup$
                                              – Transistor
                                              Jul 7 at 12:49













                                            2














                                            2










                                            2







                                            $begingroup$

                                            Let's look at how LM317 works!



                                            Internals of LM317 (not embedded due to possible copyright reasons)



                                            LM317 adjusts the VOUT terminal voltage until ADJ terminal voltage is 1.25 volts below VOUT. It is using a voltage comparator (an operational amplifier), where one of the inputs is the output pin, the other of the inputs is connected to the adjustment pin, but not directly but via a circuit that effectively works like a stable 1.25 volt voltage source (constant voltage drop). Operational amplifiers are known for their high input impedance, so the ADJ current will be minimal. Then the operational amplifier output is used to adjust transistor base voltage, so that the emitter voltage at output will be the base voltage minus transistor voltage drop which in this case is a Darlington pair. (Ok, this explanation simplifies things a bit but that would be how you create the simplest possible adjustable voltage regulator.)



                                            So, if the VOUT - ADJ voltage difference is less than 1.25 volts, the VOUT is very quickly cranked up, to the max if needs be.



                                            If, on the other hand, the VOUT - ADJ voltage difference is more than 1.25 volts, the VOUT is very quickly cranked down, to the minimum if needs be.



                                            The idea is that the VOUT - ADJ voltage difference is some fraction of the output terminal voltage, determined by a voltage divider.



                                            If you have only R2, without R1, then the ADJ terminal voltage would be zero, and it would have variable resistance to ground (which doesn't have any useful effect, because the current in the ADJ terminal is minimal).



                                            If you have both R1 and R2, then the ADJ terminal voltage is determined by a voltage divider between VOUT and ground.



                                            Note R2 is a variable resistor, not a potentiometer (although you can make a potentiometer into a variable resistor by connecting the center pin to one of the extreme pins and using the two connected-together pins with the other extreme pin, or just using the center pin and one of the extreme pins).



                                            You could have the same effect by connecting one potentiometer extreme pin to ground, the other extreme pin to VOUT and the center pin to ADJ.



                                            Note this simple explanation ignored the adjustment terminal current. For a more complete explanation, see the upvoted answer.






                                            share|improve this answer












                                            $endgroup$



                                            Let's look at how LM317 works!



                                            Internals of LM317 (not embedded due to possible copyright reasons)



                                            LM317 adjusts the VOUT terminal voltage until ADJ terminal voltage is 1.25 volts below VOUT. It is using a voltage comparator (an operational amplifier), where one of the inputs is the output pin, the other of the inputs is connected to the adjustment pin, but not directly but via a circuit that effectively works like a stable 1.25 volt voltage source (constant voltage drop). Operational amplifiers are known for their high input impedance, so the ADJ current will be minimal. Then the operational amplifier output is used to adjust transistor base voltage, so that the emitter voltage at output will be the base voltage minus transistor voltage drop which in this case is a Darlington pair. (Ok, this explanation simplifies things a bit but that would be how you create the simplest possible adjustable voltage regulator.)



                                            So, if the VOUT - ADJ voltage difference is less than 1.25 volts, the VOUT is very quickly cranked up, to the max if needs be.



                                            If, on the other hand, the VOUT - ADJ voltage difference is more than 1.25 volts, the VOUT is very quickly cranked down, to the minimum if needs be.



                                            The idea is that the VOUT - ADJ voltage difference is some fraction of the output terminal voltage, determined by a voltage divider.



                                            If you have only R2, without R1, then the ADJ terminal voltage would be zero, and it would have variable resistance to ground (which doesn't have any useful effect, because the current in the ADJ terminal is minimal).



                                            If you have both R1 and R2, then the ADJ terminal voltage is determined by a voltage divider between VOUT and ground.



                                            Note R2 is a variable resistor, not a potentiometer (although you can make a potentiometer into a variable resistor by connecting the center pin to one of the extreme pins and using the two connected-together pins with the other extreme pin, or just using the center pin and one of the extreme pins).



                                            You could have the same effect by connecting one potentiometer extreme pin to ground, the other extreme pin to VOUT and the center pin to ADJ.



                                            Note this simple explanation ignored the adjustment terminal current. For a more complete explanation, see the upvoted answer.







                                            share|improve this answer















                                            share|improve this answer




                                            share|improve this answer








                                            edited Jul 7 at 12:32









                                            Transistor

                                            102k9 gold badges104 silver badges226 bronze badges




                                            102k9 gold badges104 silver badges226 bronze badges










                                            answered Jul 7 at 11:45









                                            juhistjuhist

                                            5756 silver badges11 bronze badges




                                            5756 silver badges11 bronze badges














                                            • $begingroup$
                                              "... until ADJ terminal voltage is 1.25 volts." This should read "... until ADJ terminal voltage is 1.25 volts below $ V_OUT $". "... one of the inputs is a stable 1.25 volt voltage source, and the other of the inputs if the ADJ terminal voltage." This isn't correct. See the internal diagram. "Operational amplifiers are known for their high output impedance ..." Nope. You mean high input impedance. ".... base voltage minus 0.7 volts or so." Nope. It's a Darlington output so 2 x diode drop. A few more tidy-up edits are required.
                                              $endgroup$
                                              – Transistor
                                              Jul 7 at 11:55











                                            • $begingroup$
                                              Your edit has improved a few points. Add in the image from ti.com/ds_dgm/images/fbd_slvs044x.gif and refer to it as you write. You'll see that "one of the inputs is a stable 1.25 volt voltage source between the regulator output and op-amp input" isn't correct. I have found that writing a good answer forces me to learn a bit more. Keep going.
                                              $endgroup$
                                              – Transistor
                                              Jul 7 at 12:10










                                            • $begingroup$
                                              Ok, the first time I just described how I would create a hand-crafted linear regulator that is adjustable. The second edit I tried to be a bit more accurate to LM317 workings, but apparently the internals of LM317 differed from what I assumed them to be. Hopefully the description this time is accurate enough!
                                              $endgroup$
                                              – juhist
                                              Jul 7 at 12:16










                                            • $begingroup$
                                              You're actually correct about the Texas Instruments copyright: "This also means you may not, without our permission, "mirror" this information on your own server, or modify or re-use this information on another system." I can't imagine there is any real problem where you are promoting understanding of their product and provide a link to source. +1 for the fixes.
                                              $endgroup$
                                              – Transistor
                                              Jul 7 at 12:49
















                                            • $begingroup$
                                              "... until ADJ terminal voltage is 1.25 volts." This should read "... until ADJ terminal voltage is 1.25 volts below $ V_OUT $". "... one of the inputs is a stable 1.25 volt voltage source, and the other of the inputs if the ADJ terminal voltage." This isn't correct. See the internal diagram. "Operational amplifiers are known for their high output impedance ..." Nope. You mean high input impedance. ".... base voltage minus 0.7 volts or so." Nope. It's a Darlington output so 2 x diode drop. A few more tidy-up edits are required.
                                              $endgroup$
                                              – Transistor
                                              Jul 7 at 11:55











                                            • $begingroup$
                                              Your edit has improved a few points. Add in the image from ti.com/ds_dgm/images/fbd_slvs044x.gif and refer to it as you write. You'll see that "one of the inputs is a stable 1.25 volt voltage source between the regulator output and op-amp input" isn't correct. I have found that writing a good answer forces me to learn a bit more. Keep going.
                                              $endgroup$
                                              – Transistor
                                              Jul 7 at 12:10










                                            • $begingroup$
                                              Ok, the first time I just described how I would create a hand-crafted linear regulator that is adjustable. The second edit I tried to be a bit more accurate to LM317 workings, but apparently the internals of LM317 differed from what I assumed them to be. Hopefully the description this time is accurate enough!
                                              $endgroup$
                                              – juhist
                                              Jul 7 at 12:16










                                            • $begingroup$
                                              You're actually correct about the Texas Instruments copyright: "This also means you may not, without our permission, "mirror" this information on your own server, or modify or re-use this information on another system." I can't imagine there is any real problem where you are promoting understanding of their product and provide a link to source. +1 for the fixes.
                                              $endgroup$
                                              – Transistor
                                              Jul 7 at 12:49















                                            $begingroup$
                                            "... until ADJ terminal voltage is 1.25 volts." This should read "... until ADJ terminal voltage is 1.25 volts below $ V_OUT $". "... one of the inputs is a stable 1.25 volt voltage source, and the other of the inputs if the ADJ terminal voltage." This isn't correct. See the internal diagram. "Operational amplifiers are known for their high output impedance ..." Nope. You mean high input impedance. ".... base voltage minus 0.7 volts or so." Nope. It's a Darlington output so 2 x diode drop. A few more tidy-up edits are required.
                                            $endgroup$
                                            – Transistor
                                            Jul 7 at 11:55





                                            $begingroup$
                                            "... until ADJ terminal voltage is 1.25 volts." This should read "... until ADJ terminal voltage is 1.25 volts below $ V_OUT $". "... one of the inputs is a stable 1.25 volt voltage source, and the other of the inputs if the ADJ terminal voltage." This isn't correct. See the internal diagram. "Operational amplifiers are known for their high output impedance ..." Nope. You mean high input impedance. ".... base voltage minus 0.7 volts or so." Nope. It's a Darlington output so 2 x diode drop. A few more tidy-up edits are required.
                                            $endgroup$
                                            – Transistor
                                            Jul 7 at 11:55













                                            $begingroup$
                                            Your edit has improved a few points. Add in the image from ti.com/ds_dgm/images/fbd_slvs044x.gif and refer to it as you write. You'll see that "one of the inputs is a stable 1.25 volt voltage source between the regulator output and op-amp input" isn't correct. I have found that writing a good answer forces me to learn a bit more. Keep going.
                                            $endgroup$
                                            – Transistor
                                            Jul 7 at 12:10




                                            $begingroup$
                                            Your edit has improved a few points. Add in the image from ti.com/ds_dgm/images/fbd_slvs044x.gif and refer to it as you write. You'll see that "one of the inputs is a stable 1.25 volt voltage source between the regulator output and op-amp input" isn't correct. I have found that writing a good answer forces me to learn a bit more. Keep going.
                                            $endgroup$
                                            – Transistor
                                            Jul 7 at 12:10












                                            $begingroup$
                                            Ok, the first time I just described how I would create a hand-crafted linear regulator that is adjustable. The second edit I tried to be a bit more accurate to LM317 workings, but apparently the internals of LM317 differed from what I assumed them to be. Hopefully the description this time is accurate enough!
                                            $endgroup$
                                            – juhist
                                            Jul 7 at 12:16




                                            $begingroup$
                                            Ok, the first time I just described how I would create a hand-crafted linear regulator that is adjustable. The second edit I tried to be a bit more accurate to LM317 workings, but apparently the internals of LM317 differed from what I assumed them to be. Hopefully the description this time is accurate enough!
                                            $endgroup$
                                            – juhist
                                            Jul 7 at 12:16












                                            $begingroup$
                                            You're actually correct about the Texas Instruments copyright: "This also means you may not, without our permission, "mirror" this information on your own server, or modify or re-use this information on another system." I can't imagine there is any real problem where you are promoting understanding of their product and provide a link to source. +1 for the fixes.
                                            $endgroup$
                                            – Transistor
                                            Jul 7 at 12:49




                                            $begingroup$
                                            You're actually correct about the Texas Instruments copyright: "This also means you may not, without our permission, "mirror" this information on your own server, or modify or re-use this information on another system." I can't imagine there is any real problem where you are promoting understanding of their product and provide a link to source. +1 for the fixes.
                                            $endgroup$
                                            – Transistor
                                            Jul 7 at 12:49











                                            1
















                                            $begingroup$

                                            R1 and R2 are the adjustment. They form a variable voltage divider that generates an input voltage to the Adj pin. If you read the data sheet you will see that the output voltage is regulated to be 1.25V greater than the voltage at the Adj pin.

                                            The output voltage is used to supply the voltage divider because it is stable and regulated, if you used the input supply any noise, ripple or change with load would be passed on to the Adj pin and then appear at the output.

                                            You need to look at the circuit again, the voltage applied to Adj will vary as R2 is varied. It is a conventional way of drawing a variable resistor. Pin Adj, one end of R1 and the wiper of R2 are joined together, not the other end of R2.

                                            Neither C1 nor C2 are short circuits. At DC a good capacitor looks like an open circuit. Their purpose is to bypass any AC component or noise to earth thereby reducing their effect. The data sheet even says you can bypass Adj "to achieve very high ripple-rejection ratios".

                                            There is a lot more useful information in the data sheet with many examples of how to use the LM317 for various tasks.






                                            share|improve this answer












                                            $endgroup$














                                            • $begingroup$
                                              You say "neither C2 nor C2". As for C1 and C2 being short circuits, a quality cap may behave briefly as a near-short-circuit in some cases. Normally, that won't pose a problem, but it's good to be aware of situations where it might, most notably when a large cap is downstream of a switch.
                                              $endgroup$
                                              – supercat
                                              Jul 8 at 18:14















                                            1
















                                            $begingroup$

                                            R1 and R2 are the adjustment. They form a variable voltage divider that generates an input voltage to the Adj pin. If you read the data sheet you will see that the output voltage is regulated to be 1.25V greater than the voltage at the Adj pin.

                                            The output voltage is used to supply the voltage divider because it is stable and regulated, if you used the input supply any noise, ripple or change with load would be passed on to the Adj pin and then appear at the output.

                                            You need to look at the circuit again, the voltage applied to Adj will vary as R2 is varied. It is a conventional way of drawing a variable resistor. Pin Adj, one end of R1 and the wiper of R2 are joined together, not the other end of R2.

                                            Neither C1 nor C2 are short circuits. At DC a good capacitor looks like an open circuit. Their purpose is to bypass any AC component or noise to earth thereby reducing their effect. The data sheet even says you can bypass Adj "to achieve very high ripple-rejection ratios".

                                            There is a lot more useful information in the data sheet with many examples of how to use the LM317 for various tasks.






                                            share|improve this answer












                                            $endgroup$














                                            • $begingroup$
                                              You say "neither C2 nor C2". As for C1 and C2 being short circuits, a quality cap may behave briefly as a near-short-circuit in some cases. Normally, that won't pose a problem, but it's good to be aware of situations where it might, most notably when a large cap is downstream of a switch.
                                              $endgroup$
                                              – supercat
                                              Jul 8 at 18:14













                                            1














                                            1










                                            1







                                            $begingroup$

                                            R1 and R2 are the adjustment. They form a variable voltage divider that generates an input voltage to the Adj pin. If you read the data sheet you will see that the output voltage is regulated to be 1.25V greater than the voltage at the Adj pin.

                                            The output voltage is used to supply the voltage divider because it is stable and regulated, if you used the input supply any noise, ripple or change with load would be passed on to the Adj pin and then appear at the output.

                                            You need to look at the circuit again, the voltage applied to Adj will vary as R2 is varied. It is a conventional way of drawing a variable resistor. Pin Adj, one end of R1 and the wiper of R2 are joined together, not the other end of R2.

                                            Neither C1 nor C2 are short circuits. At DC a good capacitor looks like an open circuit. Their purpose is to bypass any AC component or noise to earth thereby reducing their effect. The data sheet even says you can bypass Adj "to achieve very high ripple-rejection ratios".

                                            There is a lot more useful information in the data sheet with many examples of how to use the LM317 for various tasks.






                                            share|improve this answer












                                            $endgroup$



                                            R1 and R2 are the adjustment. They form a variable voltage divider that generates an input voltage to the Adj pin. If you read the data sheet you will see that the output voltage is regulated to be 1.25V greater than the voltage at the Adj pin.

                                            The output voltage is used to supply the voltage divider because it is stable and regulated, if you used the input supply any noise, ripple or change with load would be passed on to the Adj pin and then appear at the output.

                                            You need to look at the circuit again, the voltage applied to Adj will vary as R2 is varied. It is a conventional way of drawing a variable resistor. Pin Adj, one end of R1 and the wiper of R2 are joined together, not the other end of R2.

                                            Neither C1 nor C2 are short circuits. At DC a good capacitor looks like an open circuit. Their purpose is to bypass any AC component or noise to earth thereby reducing their effect. The data sheet even says you can bypass Adj "to achieve very high ripple-rejection ratios".

                                            There is a lot more useful information in the data sheet with many examples of how to use the LM317 for various tasks.







                                            share|improve this answer















                                            share|improve this answer




                                            share|improve this answer








                                            edited Jul 8 at 20:40

























                                            answered Jul 5 at 18:31









                                            Peter JenningsPeter Jennings

                                            6901 silver badge10 bronze badges




                                            6901 silver badge10 bronze badges














                                            • $begingroup$
                                              You say "neither C2 nor C2". As for C1 and C2 being short circuits, a quality cap may behave briefly as a near-short-circuit in some cases. Normally, that won't pose a problem, but it's good to be aware of situations where it might, most notably when a large cap is downstream of a switch.
                                              $endgroup$
                                              – supercat
                                              Jul 8 at 18:14
















                                            • $begingroup$
                                              You say "neither C2 nor C2". As for C1 and C2 being short circuits, a quality cap may behave briefly as a near-short-circuit in some cases. Normally, that won't pose a problem, but it's good to be aware of situations where it might, most notably when a large cap is downstream of a switch.
                                              $endgroup$
                                              – supercat
                                              Jul 8 at 18:14















                                            $begingroup$
                                            You say "neither C2 nor C2". As for C1 and C2 being short circuits, a quality cap may behave briefly as a near-short-circuit in some cases. Normally, that won't pose a problem, but it's good to be aware of situations where it might, most notably when a large cap is downstream of a switch.
                                            $endgroup$
                                            – supercat
                                            Jul 8 at 18:14




                                            $begingroup$
                                            You say "neither C2 nor C2". As for C1 and C2 being short circuits, a quality cap may behave briefly as a near-short-circuit in some cases. Normally, that won't pose a problem, but it's good to be aware of situations where it might, most notably when a large cap is downstream of a switch.
                                            $endgroup$
                                            – supercat
                                            Jul 8 at 18:14











                                            0
















                                            $begingroup$

                                            Just to add a detail that experienced users might not even notice any more:



                                            R2 a variable resistor - not a potentiometer. In practice, the same physical device can be used, but the variable resistor is a two-terminal device while the potentiometer has three terminals.



                                            Variable Resistor vs. Potentiometer



                                            If you read R2 as a potentiomenter, then it is apparently drawn with the ends of the resistor connected and the wiper not connected (floating), which clearly does not make any sense. One of the terminals of R2 is connected to the wiper.






                                            share|improve this answer










                                            $endgroup$



















                                              0
















                                              $begingroup$

                                              Just to add a detail that experienced users might not even notice any more:



                                              R2 a variable resistor - not a potentiometer. In practice, the same physical device can be used, but the variable resistor is a two-terminal device while the potentiometer has three terminals.



                                              Variable Resistor vs. Potentiometer



                                              If you read R2 as a potentiomenter, then it is apparently drawn with the ends of the resistor connected and the wiper not connected (floating), which clearly does not make any sense. One of the terminals of R2 is connected to the wiper.






                                              share|improve this answer










                                              $endgroup$

















                                                0














                                                0










                                                0







                                                $begingroup$

                                                Just to add a detail that experienced users might not even notice any more:



                                                R2 a variable resistor - not a potentiometer. In practice, the same physical device can be used, but the variable resistor is a two-terminal device while the potentiometer has three terminals.



                                                Variable Resistor vs. Potentiometer



                                                If you read R2 as a potentiomenter, then it is apparently drawn with the ends of the resistor connected and the wiper not connected (floating), which clearly does not make any sense. One of the terminals of R2 is connected to the wiper.






                                                share|improve this answer










                                                $endgroup$



                                                Just to add a detail that experienced users might not even notice any more:



                                                R2 a variable resistor - not a potentiometer. In practice, the same physical device can be used, but the variable resistor is a two-terminal device while the potentiometer has three terminals.



                                                Variable Resistor vs. Potentiometer



                                                If you read R2 as a potentiomenter, then it is apparently drawn with the ends of the resistor connected and the wiper not connected (floating), which clearly does not make any sense. One of the terminals of R2 is connected to the wiper.







                                                share|improve this answer













                                                share|improve this answer




                                                share|improve this answer










                                                answered Jul 7 at 8:20









                                                vwegertvwegert

                                                1468 bronze badges




                                                1468 bronze badges































                                                    draft saved

                                                    draft discarded















































                                                    Thanks for contributing an answer to Electrical Engineering Stack Exchange!


                                                    • Please be sure to answer the question. Provide details and share your research!

                                                    But avoid


                                                    • Asking for help, clarification, or responding to other answers.

                                                    • Making statements based on opinion; back them up with references or personal experience.

                                                    Use MathJax to format equations. MathJax reference.


                                                    To learn more, see our tips on writing great answers.




                                                    draft saved


                                                    draft discarded














                                                    StackExchange.ready(
                                                    function ()
                                                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f446982%2fthis-lm317-diagram-doesnt-make-any-sense-to-me%23new-answer', 'question_page');

                                                    );

                                                    Post as a guest















                                                    Required, but never shown





















































                                                    Required, but never shown














                                                    Required, but never shown












                                                    Required, but never shown







                                                    Required, but never shown

































                                                    Required, but never shown














                                                    Required, but never shown












                                                    Required, but never shown







                                                    Required, but never shown









                                                    Popular posts from this blog

                                                    Tamil (spriik) Luke uk diar | Nawigatjuun

                                                    Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                                                    Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?