Designing linear power supply with regulated current and voltage

Thread Starter

kgrozdanovski

Joined Nov 22, 2020
27
The application is a general-purpose laboratory power supply and should have an output as clean as possible - within the limits of medium-complexity circuits and widely available components. Since there is no specific application / type of load to be regulated, I cannot say for sure that the ripple will be a problem however there may be times when it will.

I certainly don't mind the minimum output voltage to be 1.25V and I believe there are other modification which would allow the LM317 to drop as low as 0V, but let's discard that for now.

The circuit was tested with an 2n6804, but I still don't like having an additional component that will dissipate a lot of power and heat - it seems wasteful if it were alternatively possible to just adjust the LM317.
 

dl324

Joined Mar 30, 2015
16,843
it seems wasteful if it were alternatively possible to just adjust the LM317
I rejected that design approach as a hack. The "theory" with the current limiting schemes suggested in LM317 datasheets is that current will be low at a voltage of 1.25V, so one wouldn't need to worry about current limiting. My circuit will limit current for any supply voltage.

You might think that my approach is wasteful, but it's a true current limiting circuit. What you want to do is a hack.
The circuit was tested with an 2n6804, but I still don't like having an additional component that will dissipate a lot of power and heat
Why are you using such a beefy, and likely expensive, MOSFET? It's being used as a switch.

I used an AO3401 that costs a couple cents. With a gate voltage of 5V, on resistance will be 40-70 milliohms. At 4 amps, it would dissipate a maximum of 280mW and the device is rated for over 1W.
 

Thread Starter

kgrozdanovski

Joined Nov 22, 2020
27
Yes you are right, you are more experienced and I was merely asking for the plausibility of my idea.

Would it be more efficient if the resistance on the LM317 were digitally controlled? I know it is a big leap from the original analog design for the power supply but I wouldn't like to cancel out any options. I am sure that with digitally controlled resistance on the place of the voltage adjust pot there wouldn't be ripple introduced.

I will likely implement your approach, with modifications to the specific components used. But I would like to consider alternatives and improvements for a future iteration of this power supply. The first attempt does not need to be the final attempt :)
 

dl324

Joined Mar 30, 2015
16,843
The application is a general-purpose laboratory power supply and should have an output as clean as possible - within the limits of medium-complexity circuits and widely available components.
For many of the circuits I throw together, I use a Heathkit ET-3100 experimenter; a breadboard with dual supplies, available transformer secondary, a clock generator, and a couple pots. The power supplies are low tech and have 150mV of ripple. In all the circuits I've breadboarded on it, I've only had one that malfunctioned due to supply ripple. I've thought about improving the power supplies a number of times, but always have decided to leave it orignal.

While it's nice to have bragging rights about low ripple voltage on a power supply, in practice, it's not always required.
 

dl324

Joined Mar 30, 2015
16,843
The application is a general-purpose laboratory power supply and should have an output as clean as possible - within the limits of medium-complexity circuits and widely available components. Since there is no specific application / type of load to be regulated, I cannot say for sure that the ripple will be a problem however there may be times when it will.
I gave this some thought and I've come to the conclusion that your requirements are unreasonable. You don't buy/build one power supply that will be used for all applications. That won't be efficient. A more reasonable approach is to have multiple power supplies and to choose the one that's appropriate for any particular application.

If "laboratory" means commercial quality, I have more than half a dozen. If it means hobbyist quality, I have many dozens: homemade, wall warts, laptop supplies, hospital grade 12V adapters.

Helping another member with a project (he was using suicidal techniques to power his transformer) reminded me that I had a transformer box that I built in the 70's to make prototyping power supplies easier and safer. That got me to thinking about the dozens and dozens of transformers I've accumulated over the years.

I've been working on some tracking power supply designs with another member as an exercise to help him learn about opamps and how to design circuits from scratch. That in turn has encouraged me to build a couple variable tracking supplies from some of the transformers I have so I can use the circuits I designed.

I hadn't planned to include current limiting, but then I came across your thread and made schematics for a design I've had in my head for years and just never got around to drawing a schematic and prototyping the circuit.

I don't use a simulator for very many of my designs and these power supplies and current limiters were no exception. I enjoy designing circuits and using the simulator between my ears. I find it much more rewarding to design a circuit, make a prototype, and test it. Sometimes my designs don't work as I expected, but that's not usually the case.
 

dl324

Joined Mar 30, 2015
16,843
I did some tests with my circuit and saw up to 200mV of voltage ripple when current limit was activated. LM317 input/output: 15V/10V.

EDIT: giving a ripple current of about 2mA.

If I wanted lower ripple current, I'd set my power supply to maximum voltage and maximum current and add a current limiter on the output.
 
Last edited:

Thread Starter

kgrozdanovski

Joined Nov 22, 2020
27
For many of the circuits I throw together, I use a Heathkit ET-3100 experimenter; a breadboard with dual supplies, available transformer secondary, a clock generator, and a couple pots. The power supplies are low tech and have 150mV of ripple. In all the circuits I've breadboarded on it, I've only had one that malfunctioned due to supply ripple. I've thought about improving the power supplies a number of times, but always have decided to leave it original.

While it's nice to have bragging rights about low ripple voltage on a power supply, in practice, it's not always required.
I intend to research and prototype some ideas I've had with fellow engineers related to processing signals - some high-frequency EM waves which should be generated and when received, amplified cleanly so that slight changes would be detected. This is one foreseeable scenario which would benefit from precision and low noise, alike Hi-Fi audio gear. I cannot disclose specifics sadly.

Despite that venture, I am looking to dive deeper and learn as much as I can about power supply circuits and advance my very poor knowledge of electronics for when the need arises. Had that not been my goal, I could have saved plenty of time and simply purchased a power supply - it's not like this custom-built unit is economical anyway. Therefore, bragging rights are not on the drawing board.

Analog will be more accurate and simpler.
Analog it is then. I also gave more consideration to that topic and I figured simpler circuits would be less prone to errors and an analog circuit should have no delay when reacting to load changes when compared to a digital trigger.

I did some tests with my circuit and saw up to 200mV of voltage ripple when current limit was activated. LM317 input/output: 15V/10V.

EDIT: giving a ripple current of about 2mA.

If I wanted lower ripple current, I'd set my power supply to maximum voltage and maximum current and add a current limiter on the output.
200mV ripple seems like the voltage regulation was just thrown out the window :(
The ripple current on the other hand, seems fairly acceptable.

I still think I will likely implement your current limiting design and research improvements in the future, it's a good start. In the meantime while I am waiting for parts to arrive, I would like to continue discussing other approaches, such as these two by Swagatam:

IC317PowerSupply252CSimplest-2.png
Figure 1.

steven-1.png
Figure 2.


The first is reminiscent of my own attempts found earlier in this thread. I assume it can easily be modified to have a variable current limit by adding a potentiometer.

The second one is something I have been avoiding, but since I have plenty of input voltage headroom I may consider it if proves to be more stable.

Thoughts?
 

Hugh Riddle

Joined Jun 12, 2020
78
Filtering HF SMPS noise down to near the customary noise levels of linear lab power supplies is possible but not easy. At TTI (Huntingdon UK) we developed a fanless 0-40V 10A hybrid lab power supply product which comprised a 240VAC input SMPS feeding a linear precision supply (at about 1.5VDC above its output voltage). Reducing the HF output noise to less than 10mVp-p required very careful layout, multiple-screening of the HF transformer windings and including an LC common-mode output filter.
 

Thread Starter

kgrozdanovski

Joined Nov 22, 2020
27
Filtering HF SMPS noise down to near the customary noise levels of linear lab power supplies is possible but not easy. At TTI (Huntingdon UK) we developed a fanless 0-40V 10A hybrid lab power supply product which comprised a 240VAC input SMPS feeding a linear precision supply (at about 1.5VDC above its output voltage). Reducing the HF output noise to less than 10mVp-p required very careful layout, multiple-screening of the HF transformer windings and including an LC common-mode output filter.
Thank you for the input! It's nice to hear some practical experiences and obstacles from the industry.
Hybrid power supplies are certainly interesting and I commend your successful design. However, for this project I believe it is much simpler to have an all-linear supply since efficiency is not a consideration and the maximum current is aimed at only 5A.

Filtering HF noise on a power supply which does not aim to be a hybrid seems like solving a problem which shouldn't have been created in the first place.
 

dl324

Joined Mar 30, 2015
16,843
200mV ripple seems like the voltage regulation was just thrown out the window :(
The ripple current on the other hand, seems fairly acceptable.
You can regulate voltage or current, but you can do both at the same time.
The first is reminiscent of my own attempts found earlier in this thread. I assume it can easily be modified to have a variable current limit by adding a potentiometer.

The second one is something I have been avoiding, but since I have plenty of input voltage headroom I may consider it if proves to be more stable.

Thoughts?
The first circuit puts the current sense resistor outside of the feedback loop, so voltage regulation will suffer.

EDIT: And you can't put a pot in a high current path. The wattage rating for a pot is for the entire resistance. If you use it like a rheostat and have a small resistance for a higher current, you'll burn up the pot.

The second... Run away as fast as you can from any circuit drawn like that and don't give a second thought to paying attention to anyone who draws circuits like that.
 
Last edited:

Thread Starter

kgrozdanovski

Joined Nov 22, 2020
27
You can regulate voltage or current, but you can do both at the same time.
The first circuit puts the current sense resistor outside of the feedback loop, so voltage regulation will suffer.

EDIT: And you can't put a pot in a high current path. The wattage rating for a pot is for the entire resistance. If you use it like a rheostat and have a small resistance for a higher current, you'll burn up the pot.

The second... Run away as fast as you can from any circuit drawn like that and don't give a second thought to paying attention to anyone who draws circuits like that.
That entire website has shady schematics, I am aware of that. But I have learned to attempt to draw inspiration from even the dumbest of ideas or the seemingly untidily presented ideas. However I must admit I also had my doubts regarding that second circuit.

I suppose you may be right about the 200mV ripple during current regulation. I didn't consider that the voltage ripple will probably be smaller during voltage regulation mode (i.e. when the current limiting hasn't kicked in). Did you have a chance to test that?
 

dl324

Joined Mar 30, 2015
16,843
I didn't consider that the voltage ripple will probably be smaller during voltage regulation mode (i.e. when the current limiting hasn't kicked in). Did you have a chance to test that?
It was so low that it didn't register when I watched the output voltage as current limiting was activated, then deactivated. Whatever the LM317 spec is, that's good enough for me.

The 2mA current ripple was with around a 100mA load, so regulation was better than 2%. Not many things will want better than a 5% tolerance and 10% is common. Wanting very low ripple isn't the same as needing it.
 

Thread Starter

kgrozdanovski

Joined Nov 22, 2020
27
It was so low that it didn't register when I watched the output voltage as current limiting was activated, then deactivated. Whatever the LM317 spec is, that's good enough for me.

The 2mA current ripple was with around a 100mA load, so regulation was better than 2%. Not many things will want better than a 5% tolerance and 10% is common. Wanting very low ripple isn't the same as needing it.
I see plenty of pre-built variable power supplies on AliExpress with figures that make our results seem like a very small achievement, e.g.
1606759398266.png
Example specs from pre-built AliExpress variable power supply

This isn't to say that the schematic we are working with won't do a good job, however it does say that there is plenty of room for improvement, without significant investment of money.
These chinese power supplies with similar specs range from 50 to 80 USD - building my prototype will surely surpass that.
 

Hugh Riddle

Joined Jun 12, 2020
78
This interesting thread has encouraged me to look back on the several years I spent on power supplies and to distil out the factors I now see as standing out for the design of linear lab supplies. Would this be of interest?
 

Thread Starter

kgrozdanovski

Joined Nov 22, 2020
27
This interesting thread has encouraged me to look back on the several years I spent on power supplies and to distil out the factors I now see as standing out for the design of linear lab supplies. Would this be of interest?
Of course! I welcome all input and I look forward to reading your opinion. Anyone coming across this thread in the future will hopefully learn something of value.
 

dl324

Joined Mar 30, 2015
16,843
I see plenty of pre-built variable power supplies on AliExpress with figures that make our results seem like a very small achievement,
In post #29, I said I had designed a simple current limiter, not something to be used for a constant current supply.

If I wanted a constant current source, I'd set the supply for max voltage and max current and put a current source on the output.
 

Thread Starter

kgrozdanovski

Joined Nov 22, 2020
27
In post #29, I said I had designed a simple current limiter, not something to be used for a constant current supply.

If I wanted a constant current source, I'd set the supply for max voltage and max current and put a current source on the output.
Ah it is very possible at one point I have mixed up the terminology. Yes, for a laboratory power supply the requirement is usually variable constant-voltage and variable constant-current.

Since LM317 can be configured to function in both modes with external discrete components, my original quest was to find a combination where I can make use of both.
Another alternative is of course, to simply add another constant-current device (another LM317 perhaps) to the output.

The way we used to use these power supplies at college labs - we set voltage to max and then lower the current adjust to create a constant-current source, or vice-versa when used as constant voltage. Maybe those simply employed current limiting but I would like to have both options.
 

dl324

Joined Mar 30, 2015
16,843
Maybe those simply employed current limiting but I would like to have both options.
You should probably wait until you have a need before trying to specify requirements. I can count on my thumbs the number of times I needed a power supply that could operate in constant current mode. When I needed a constant current source or sink, I just designed one and connected it to a power supply.

I also rarely need current limiting.

The current limiting circuit I designed appears to work reasonably well as a constant current source, but that wasn't what it was designed to do.
 

Thread Starter

kgrozdanovski

Joined Nov 22, 2020
27
I usually don't do half-solutions. More time would be wasted if the need suddenly arises for a project, and then I would have to go back to working on a power supply instead of the project itself.

I would also have to spend time either modifying the enclosure or building a new one, or end up having a cable mess and full desk of devices if I cut corners around every functionality.

Back to designing - I stumbled across this power supply with variable voltage and current however I do not understand exactly what the function of the LM337 in the bottom is?

1606771547056.png
Variable power-supply schematic found here

One obvious improvement would be replacing Z2 and Z3 with a proper voltage reference IC, but I would like to know how the rest of this circuit compares to previous solutions discussed here?
 
Top