# Better design of PSU

#### old_beggar

Joined Jan 29, 2021
39
Hello all, I wonder if anyone can offer advice - I have 2 options, as per attachments - which (if either) is better? I've left off capacitors for clarity. Would it be possible to do it with just the 1 voltage regulator? I need to be able to set the output voltage, and to limit the current.

#### Attachments

• 75.6 KB Views: 30
• 78.1 KB Views: 29

#### old_beggar

Joined Jan 29, 2021
39
PS I want to display both V and I digitally (China special).

#### upand_at_them

Joined May 15, 2010
940
Dave Jones covered that in the first part of his power supply design video series:

#### crutschow

Joined Mar 14, 2008
32,903
which (if either) is better?
Definitely the left one.
If you put the current limit at the output, then you won't get good regulation of the output voltage.
Would it be possible to do it with just the 1
Not readily with a standard 3-terminal regulator if you need a high-side current limit resistor.

You could add a small BJT transistor (e.g. 2N3904) to do a current limit with one LM317 if you can put the current sense resistor in the ground return to the regulator.

Note that a standard 3-terminal regulator has a reference voltage of 1.25V so the current limit is 1.25V divided by the series output resistor (the 0.25Ω resistor).
Thus, for a 1A limit the resistor would need to be 1.25V / 1A = 1.25Ω.

Last edited:

#### Papabravo

Joined Feb 24, 2006
20,386
Ohm's law should remind you that a power supply CANNOT set both the voltage level and the current level simultaneously. What you can get is a controlled voltage level with a current limit, but remember the load itself will actually limit the current. In the case of a shorted load, the voltage will drop when the current limit is reached. Maybe the voltage will go all the way to zero and maybe not.

#### old_beggar

Joined Jan 29, 2021
39
As it happens (sorry I left it off my drawings) the V-regs are LM338K so I should be able to go up to 5A (heatsinking permitting) hence the 0R25 resistor. I'm aiming for a maximum current limit rather than a constant current. My supplier has assured me that the 338s are genuine ST, and I've bought from them before with no problems, so I'll take Crutschow's advice and go with 1st one. Many thanks to you all for your advice.

#### old_beggar

Joined Jan 29, 2021
39
PS that Aussie's voice grinds on my nerves so I had to stop watching it.

#### crutschow

Joined Mar 14, 2008
32,903
I should be able to go up to 5A (heatsinking permitting) hence the 0R25 resistor.
That will indeed give you 5A, but that's near the built-in current-limit of the LM338.
If you want to adjust to a lower limit, you will need a higher resistance resistor.

#### old_beggar

Joined Jan 29, 2021
39
Ah yes, but I added the pot in parallel to 0R25 so that the LM338 can effectively "read" the set voltage across it, as the ADJ pin only draws 50μA as per the datasheet. I'll try it and see what happens!

#### crutschow

Joined Mar 14, 2008
32,903
Ah yes, but I added the pot in parallel to 0R25 so that the LM338 can effectively "read" the set voltage across it
Ah yes, that's true.
But that pot can't reduce the current limit, only increase it.
The current limit occurs when the voltage from the sense terminal to the output is 1.25V.
Thus, if the pot is set at the 50% point for example, the current must be 10A through the 0.25Ω resistor to give 1.25V.

Last edited:

#### old_beggar

Joined Jan 29, 2021
39
Hmmm yes I feel the drawing board beckoning...

#### old_beggar

Joined Jan 29, 2021
39
I found this circuit (modified to limit current to 5A).

#### Attachments

• 93.1 KB Views: 11

#### crutschow

Joined Mar 14, 2008
32,903
I found this circuit (modified to limit current to 5A).
Why do you want to limit to 5A when the LM338 is internally limited to near that value?
What value of current adjustment range do you want?

#### old_beggar

Joined Jan 29, 2021
39
I want to be able to set the current limit from about 100mA to about 4A

#### crutschow

Joined Mar 14, 2008
32,903
I want to be able to set the current limit from about 100mA to about 4A
Two questions:
1. Can the current-sense shunt resistor be put in the ground return (i.e. is the voltage supply floating)?l
2. Do you need the adjustable current limit to work into a short-circuit (output voltage below 1.25V)? (It would still limit at the internal 5A limit of the LM338).

Last edited:

#### old_beggar

Joined Jan 29, 2021
39
1. Yes, the current-sense resistor could be in the ground return (might even be better for the purpose of displaying where I've set the limit), and
2. I'd rather the current limit (as far as is practicable) did not reduce the output voltage.

#### crutschow

Joined Mar 14, 2008
32,903
2. I'd rather the current limit (as far as is practicable) did not reduce the output voltage.
From Ohm's Law, that's not possible.
You can either control current or voltage but not both at the same time.
You can limit the current to some arbitrary value, but the only way to limit the current is to reduce the voltage when the current limit is reached.

My second question was related to whether you need to control the short circuit current (where the output voltage is below 1.25V).

#### crutschow

Joined Mar 14, 2008
32,903
Below is the LTspice simulation of an LM338 circuit with an LM339/393 comparator to control the current limit from near zero to about 5A.
It uses the power-on LED D1, to provide a voltage reference for the current limit control.
If the LED you use has a different on-voltage then my simulated one (1.7V) you can tweak the maximum current range by changing the value of R7 ( a larger resistance increases the max current)..

The simulation shows the current limit with the U3 pot going from 0% (96mA) to 100%(5.1A) in 25% steps.

Its main limitation is that it cannot control the current below 1.25V output, so a short-circuit can go up to the maximum output of the LM338.

Last edited: