LM 317 to LM317 for power supply

Thread Starter

Sergio34

Joined Nov 10, 2018
42
Hello again, this is not about something that does not work but something that despite of what I read it works. I want to make a power supply based on two LM317. I connected the LM317 that does the voltage regulation to another LM317 that does current regulation. I read in different sources the current regulation unit should be before the voltage regulation. However my logic tells me that I should wire them the other way around and it worked. I used 12V as input to the first LM317, I did not go up to 40V. I set it to give a 8.3V regulated voltage and that fed to the second one. I experimented on the second one with resistors from 15Ω to 82Ω as I do not have such a potentiometer yet and seemed that it was working perfectly as a current limiter. As I was approaching lower values the current was increasing close to the limit and the voltage also at the output pin of the second LM317 closer to 8.3V. When I want a regulated voltage with a current limit I am thinking that I should use a DPDT switch to connect them together to have the configuration in the schematic, otherwise they will stay disconnected for voltage regulation only. So... it looks to good to be true, is it something I do not see?
 

Attachments

dl324

Joined Mar 30, 2015
9,577
What is the purpose of putting a voltage regulator in front of the LM317 you're using as a current source?

You're going to dissipate the same amount of power, but the first regulator limits the maximum voltage you can have on the load.
 

Thread Starter

Sergio34

Joined Nov 10, 2018
42
What is the purpose of putting a voltage regulator in front of the LM317 you're using as a current source?

You're going to dissipate the same amount of power, but the first regulator limits the maximum voltage you can have on the load.
Don't bench power supplies do that? They have the option to put a current limit on the selected voltage. I want to do the same.
 

Audioguru again

Joined Oct 21, 2019
674
Your current regulator affects the output voltage even when it is not limiting the current. The current limiter should come first (with enough extra voltage to feed the voltage regulator) then the voltage regulator at the output will have good voltage regulation until the current limiter limits the current by reducing the voltage.
 

ElectricSpidey

Joined Dec 2, 2017
795
Don’t confuse current regulation with current limit.

Current limitation places the current limiter before the voltage regulator.

Current regulation places the current regulator after the voltage regulator. IE: Constant current.
 

Audioguru again

Joined Oct 21, 2019
674
A power supply is supposed to have good voltage regulation until the current needs to be regulated.
If the voltage regulator comes first then the current regulator is affecting the voltage regulation All The Time.

A current regulator works by adjusting its output voltage then Ohm's Law determines the current. When the output voltage of the current regulator drops below the extra input voltage needed by the voltage regulator then the output voltage drops and the current becomes regulated.
 

Thread Starter

Sergio34

Joined Nov 10, 2018
42
It is true, I mixed up the words "regulation" and "limiting" in my text. I am aware that current regulation can be done with one LM317. What I am trying to do is limiting the current of the selected voltage, only if I need it, not always. That's why the two LM317 will not be connected permanently but only when limiting needed. And yes, if limiting is too much it affects the set voltage too. I've seen power supplies do that. They set up a voltage and a current limit and on the LCD appears that the voltage is lower than what they set because they set low current limit. As this limit is moved higher the voltage reaches the set voltage. It looked like this happened with me. However if you say it is wrong I will do more experiments/comparisons.
 

crutschow

Joined Mar 14, 2008
24,077
Below is the LTspice simulation for a LM317 set as a ≈0.5A current-limiter in front of a LM317 set for 5V constant-voltage (the preferred arrangement so the limiting circuit doesn't affect the output voltage until the current limit point is reached, as bench supplies operate).
The simulation shows the output voltage and current for the load going from 20Ω to 1mΩ.
The top (yellow) trace shows the load resistance.

Note that the output voltage is constant until the current-limit point is reached (about 10Ω load resistance).

1576624087392.png
 
Last edited:

TeeKay6

Joined Apr 20, 2019
557
Below is the LTspice simulation for a LM317 set as a ≈0.5A current-limiter in front of a LM317 set for 5V constant-voltage (the preferred arrangement so the limiting circuit doesn't affect the output voltage until the current limit point is reached, as bench supplies operate).
The simulation shows the output voltage and current for the load going from 20Ω to 1mΩ.
The top (yellow) trace shows the load resistance.

Note that the output voltage is constant until the current-limit point is reached (about 10Ω load resistance).

View attachment 194751
@Sergio34
Whether used as current or voltage regulator, the LM317 output voltage will always be a bit (1-3V) less than the input voltage; that drop is used to make the LM317 operate internally. Thus, if you want 5V out, you must have more than 5V in.
@crutschow
Perhaps it would be clearer if you added to your nice plots a plot showing the Vin to the second LM317?
 
The Vin to the second LM317 regulator does not matter because it is a voltage regulator. It stops regulating the voltage when its Vin is too low (about 1.5V to 2V above its output voltage).
 

Thread Starter

Sergio34

Joined Nov 10, 2018
42
The Vin to the second LM317 regulator does not matter because it is a voltage regulator. It stops regulating the voltage when its Vin is too low (about 1.5V to 2V above its output voltage).
@Sergio34
Whether used as current or voltage regulator, the LM317 output voltage will always be a bit (1-3V) less than the input voltage; that drop is used to make the LM317 operate internally. Thus, if you want 5V out, you must have more than 5V in.
@crutschow
Perhaps it would be clearer if you added to your nice plots a plot showing the Vin to the second LM317?
The Vin to the second LM317 regulator does not matter because it is a voltage regulator. It stops regulating the voltage when its Vin is too low (about 1.5V to 2V above its output voltage).
It is this part I need to understand, why it does not matter..
 

TeeKay6

Joined Apr 20, 2019
557
It is this part I need to understand, why it does not matter..
As you can see from @Crutshow plots, the input voltage to the second LM317 does matter in that it must be a bit higher than the output voltage; otherwise the LM317 fails to operate correctly.
 
It does not matter if the input to a voltage regulator fluctuates 2V to 20V higher than its output.
It matters if the current regulator feeds the load because its current sensing resistor is in series with the load and causes the output voltage to change with current changes, even when the current is too low for it to regulate the current.
 

crutschow

Joined Mar 14, 2008
24,077
In this case, when the current increases such that the first LM317 reduces the voltage to the second LM317 (U1) below about 6.7V, U1 drops out of regulation, reducing the output voltage and thus limiting the current.
 
Last edited:

Thread Starter

Sergio34

Joined Nov 10, 2018
42
A small parenthesis in the thread. I have just downloaded LM317 into LTspice. I wanted to do my own simulations but it seems when the load falls below 24Ω voltage drops. Wouldn't be able to supply 1A easily? I downloaded the file from somewhere in this website.
 

Attachments

Thread Starter

Sergio34

Joined Nov 10, 2018
42
A small parenthesis in the thread. I have just downloaded LM317 into LTspice. I wanted to do my own simulations but it seems when the load falls below 24Ω voltage drops. Wouldn't be able to supply 1A easily? I downloaded the file from somewhere in this website.
I may have found something, if it is an code error then there is parameter called BF in the .sub file of LM317.
.MODEL QNL NPN(EG=1.22 BF=80 RB=100 CCS=1.5PF TF=.3NS TR=6NS
This probably has to be lower than 80, I tried 50 and 30 and works better. I am not into programming, I do not know yet which one is a reliable value.
 

crutschow

Joined Mar 14, 2008
24,077
My simulation below shows the expected 20V output with a 20Ω load.
(Note that R7 should be 120Ω for the LM317 to maintain regulation with no load.)

Looks like a questionable LM317 model.
Try mine below.

1576686733083.png
 

Attachments

Top