# Will this variable voltage supply with variable current limit circuit work?

I want to make a variable power supply with variable voltage and current.

Recently made a variable voltage supply using LM317 but I couldn't control the current so I want to try combining it with an LM317 current limiting circuit.

My input is a laptop power supply rated 19.5 V 3.42 A.

EDIT:

I want to use this as a lab bench power supply so I need to be able to vary the voltage and current with the potentiometers R2 and R1.

The image below is my circuit.

Will it work? • You have not specified what "works" means, so for certain definitions, yes, it orks. – PlasmaHH Nov 14 '16 at 13:44

will it work? please feel free to point out any mistakes

The current limit potentiometer just isn't going to work - let's say you want to limit current to 1 amp; this requires a resistance of 1.25 ohms and the power rating of a 150th part of your potentiometer needs to be 1.25 watts. Given that pots have a linear power rating throughout the length of travel, the pot would need to be rated at 150 x 1.25 watts i.e. nearly 190 watts. Sure it will never see 190 watts but right at the end where you might want to limit current to 1 amp, that small fraction of pot track will see 1.25 watts thus the whole pot would need to be rated at 190 watts.

I would also recommend, that from each adjust pin to ground, you put a 10 uF capacitor to reduce the output noise of the rather ancient and noisy LM317 regulators. I'm assuming that you will also need fairly big heatsinks.

If you want a better design try this site called LEARNING ELECTRONICS. On that page they have a design for a fully adjustable power supply that uses an LM317 at the heart of it: - • Oh oh, you didn't solve the problem with resistor power dissipation. – Barleyman Nov 14 '16 at 14:48
• @Barleyman what planet are you on? I've pointed out two bad mistakes in your answer (that you've subsequently corrected) and explained that a 5 watt potentiometer is a bad idea and then you leave comments like the above and say "feel free to suggest a better solution" below your answer. What are you talking about? – Andy aka Nov 14 '16 at 15:06
• Planet analog. The opamp circuit I suggested fixes the problem with the power dissipation. – Barleyman Nov 14 '16 at 15:14

Conceptually correct. You can calculate the resistor power by $P={I^2}*{R}$ and the output current of that circuit is $I=\frac{1.25}{R}$. In other words, using the 150R resistor in your example, the output current is 8.3mA and the power is neglible 10mW so there's no need for a chunky resistor.. If you're really using a potentiometer, those usually have very modest power ratings so using a series resistor to limit the max current to some value may be advisable.

See an example here: http://www.bristolwatch.com/ccs/LM317.htm

If you want a constant current source you don't need the voltage regulator provided the power supply voltage is reasonable.

Finally, if you use an opamp amplifier, you can sidestep the issue of power dissipation in your potentiometer. Put 0.1R resistor as a sense element and fix opamp gain to whatever output current you prefer, for example, 25x gain gives you 500mA output current with just 25mW power dissipation in the resistor.

Formula would be $Iout = \frac{1.25V}{0.1R*(\frac{Rf}{R2})}$

Set Rf and R2 to your max output current and put potentiometer in series to reduce the current. Putting it in parallel with the R2 would also work. You may want a logarithmic potentiometer incidentally.

http://www.electronics-tutorials.ws/opamp/opamp_2.html

Connect the - input to regulator output and + input after the sense resistor.

LM258/358/2904 will get the job done. Note that the VCC range needs to withstand the input voltage (in this case 19V).

• Not really, if you do that then you lose the relevance of the voltage regulator. – Andy aka Nov 14 '16 at 13:51
• Current regulator before is much better, it only has to be offset for the small and relatively constant bias/reference current of the voltage regulator. If you have current reg after, then the voltage regulator must be offset for the large and poorly defined voltage drop across the current regulator. – Neil_UK Nov 14 '16 at 13:54
• @Andyaka You get the voltage regulator drop-out, yes. – Barleyman Nov 14 '16 at 13:57
• You have also not thought much about when the current limiting resistor is set (say) at 1 ohm. – Andy aka Nov 14 '16 at 13:58
• @Andyaka Really? And here I thought I gave the formula to calculate current and resistor power for any resistor value? – Barleyman Nov 14 '16 at 14:00