Power supply design

Thread Starter

Sparky49

Joined Jul 16, 2011
833
Hi everyone! :)

After my failures on Ebay, I decided to have another project. So I thought "why not make a quality power supply?" Not a bad idea, though, seeing as I need an adjustable power supply. Why not make one and learn along the way? :)

A good oppertunity to aim for a real life application for a uC project!!! Two birds with one stone eh? ;)

However, there are a few things I'm not too sure on.

Firstly, I (think I) know how a variable voltage regulator works. By changing the voltage on the ADJ pin, you can adjust the output voltage. However, how can I do this with higher voltages? I presume a uC cannot handle 30V!

Secondly, I'd like to be able to control the current. Again, is there any way I can do this with a uC, or would it be best with discrete components?

Finally (atm!), how would I go about making it as stable as possible? I know voltage regulators are good - but just how good are they? I'm prepared to put time into this to make a very good end product, so I want to make it as easy to use, with as many features and as stable as possible.

Anything else you think I need, or would be good to have on my power supply, please say so!

Thanks for your time guys, I'm sure you can help. :)

Sparky
 

MrChips

Joined Oct 2, 2009
30,824
The same power supply can be simple or complex depending on one's perspective.

You can get a ready-made design, put the components together and voila! you have a working supply.

Or you can take the time to learn and understand the intricacies of a linear power supply.
(For the moment we will stay away from a switching power supply.)

There are many sources on the internet.

To begin, learn how to calculate the parameters in an unregulated power supply:

http://www.zen22142.zen.co.uk/Design/dcpsu.htm

Learn how to determine:

average output DC voltage
average load current
peak-to-peak and rms ripple voltage
average and peak diode current
how to select the appropriate capacitance of the reservoir capacitor

The next step is understanding what a voltage regulator does. It is a servo feedback circuit that attempts to keep the output voltage constant.
You can do this with zener diodes, transistors, op-amps or any such combinations. You can also do this with a 3-pin voltage regulator IC (the simplest solution).

Next, is how to increase the current capacity of the power supply by adding a power pass transistor. Add variable voltage control to this.

Finally, how to build a constant current supply. You cannot have both constant voltage and constant current simultaneously. You must choose one of the two. You can have both features in the same power supply but when in use you will select which takes priority.

Hope this helps.

Bill Marsden has a thread on power supply design somewhere.
 

Thread Starter

Sparky49

Joined Jul 16, 2011
833
Thanks Mr Chips. I will look at those links, and will search for Bill's post.

I would like to learn about how the power supply works, advantages/disadvantages of designs, limitations, parameters, etc, so I will like to learn.

Sparky
 

bountyhunter

Joined Sep 7, 2009
2,512
There is no advantage to trying to run a linear supply from a uC unless you need it to be programmable from a digital source.

The current and voltage control loops use error amplifiers (op amps) that have a precise reference voltage on one input to provide a stable voltage or current.
 

MrChips

Joined Oct 2, 2009
30,824
An op-amp is basically an amplifier with very high gain (>100,000).
With negative feedback applied, it becomes a voltage regulator. It takes a sample of the output voltage and feeds it back to the inverting input in order to control the output voltage.

You can convert this into a current source by monitoring the current through a load resistor (and hence the voltage) and feeding this voltage back to the inverting input.

Hence going from voltage regulation to current regulation is simply switching from a voltage sense to a current sense (which is a voltage across a known resistor).
 

takao21203

Joined Apr 28, 2012
3,702
Knowing Ohms law well, and transformers, bridge rectifier, dimensioning of capacitors is a precondition.

But not that interesting I never calculate this stuff.

Adjustable regulators work on the principle of feedback.
Not just static voltage programming.

If you want a uC to program voltage digitally, that's advanced!

I am building a TL494 power supply, 60V etc. input, and upto 10A output (permanent). Crank up current can be higher (for instance 12V bulbs needs this).

I have a thread about this by the way.

And I plan to use 1.8" TFT LCD to display voltages (input, output), as well Amps.

Yes for >30V you need a different so called AUX supply for the controller. And dividers to reduce the voltage for instance A/D input.

In my TL494 supply, I use 12V electronic transformer (for TL494 + cooling fan), and 7805 for reference voltage stabilization + LED display.

Maybe it could be helpful for you to build adjustable regulator using the LM2576- easy to obtain, easy to work with, and not expensive.

Capacitor values really = don't care, but if you grossly do it wrong, you get high ripple/instability.

Linear regulators are kind of boring as well they require messy cooling systems even only for 0.5 Amps.

There are some things on eBay that you could buy:

-12V eletronic transformer (the caged aluminium one's, not the halogen transformers).
-12v 35v boost module, less than $10, you can generate small currents from 12v, and it can be modified even for higher voltages.

-Evtl. 48V electronic transformer

-ready made LED displays, they are useful for circuit testing, when you want to monitor currents.

-Assortment of power transistors, MOSFETs, TO220 diodes, regular diodes, big capacitors - for experimentation!

-if you want to try switching technology, some different coils or toroid cores + magnet wire.
 

Thread Starter

Sparky49

Joined Jul 16, 2011
833
Thanks. I have read through Bill's post.

I have a couple of quick questions:

1. I see the simple circuit for two loads, however, if I wanted this to be extended to have two +- supplies, would the attached diagram work? Of course, this would be at the same voltage.

2. Greater capacitance smooths the supply more. In order to do this, I presume adding capacitors in parallel would work? Also, is there a point at which the affect of the extra capacitance in minimal? I presume so, otherwise you could simple add hundreds of parallel capacitors to make a super smooth supply - but I'm not sure.

3. In your link, Mr Chips, the guy talks about the equation V=10I/C. I presume that V is the ripple voltage - that is the range of the fluctuations? Also, what would be an acceptable ripple voltage for a very smooth design? By that, I mean something which is unlikely to cause me any problems with ripple in the near future.
Many thanks,

Sparky
 

Attachments

Last edited:

#12

Joined Nov 30, 2010
18,224
1) What first diagram? One of Bills? Do you want us to guess which one and go look it up?
2) the link to "zen" something in post #2 answers you second question.
 

Thread Starter

Sparky49

Joined Jul 16, 2011
833
1) the diagram attached to my post - sorry, I'll edit to make it clearer.
2) I guess it merges into the brand new, shiny Q3!

Thanks.
 

#12

Joined Nov 30, 2010
18,224
The circuit in post #8 provides positive and negative voltage from a single transformer. It is the "standard" way to do it.
Most of the ripple is eliminated by the regulator. You only use the capacitor to get the ripple down low enough that the regulator doesn't run out of voltage. My equation is:
1.414 C Er F = I
Er being peak to peak ripple voltage
If you want to run a 5 volt regulator chip and it has a drop out voltage of 1.8, you need 6.8 volts of clean voltage
If the drawing in post#8 provides 9 volts with no load, you have 2.2 volts maximum ripple allowed.
Use the formula to find the minimum capacitor size.
 

takao21203

Joined Apr 28, 2012
3,702
Actually when I developed and tested a LM358 based linear power supply, I used this:

12V from ATX -> 12v/35v stepup converter

1. I only used a 100uF/160v cap. at the coil output.
And a big reactor choke for filtering!

Much cheaper, and good result! All the ripple filtered out.
On the PCB only 1000uF/100v, these give biiiig sparks already.

I modified the converter, at 82V the MOSFET did burn out actually.
Replaced with higher voltage MOSFET and better diode.

Upto 100V!

Yes you can combine caps., but 1000 uF at 100V give big sparks.

For 50V, use 4700uF if you like, but more does not make much sense.
Better some filter chokes!

And inrush NTC before the transistors, 10 Ohm or 5 Ohm.
I have a big 500VA toroid here and any short will make the 6A diodes explode instantly. So I have the inrush NTC to keep them safe.
 

wayneh

Joined Sep 9, 2010
17,498
...what would be an acceptable ripple voltage for a very smooth design?
There's no answer, since "very smooth" is undefined. It comes down to percentage, or ppm, error. Some devices (batteries, light bulbs) can tolerate a square wave, I guess you'd call that 100% ripple. Many common ICs such as op-amps and comparators reject a lot of power supply ripple, so a bench power supply can be quite sloppy. Like a wall-wart with rectifier and some cap. Other circuits are more sensitive to voltage fluctuation and a regulator is a cost-effective way to further knock down ripple. Few applications require anything better, but I suppose there must be someone out there that needs even more.

I think temperature-related drift is maybe a bigger issue for your "stable" supply than the small amount of ripple that might remain after a regulator. Current sense resistors can be selected for high precision and low drift. Using precision voltage references would help as well, instead of the standard resistor voltage divider.
 

Thread Starter

Sparky49

Joined Jul 16, 2011
833
Thanks for your advice guys.

I have taken in your advice, and it is all very interesting, however, I still fail to see how a uC can be used in a power supply. I already have some experience with voltage regulators and the equations mentioned. However, I am not sure how one can use a uC to control voltage/current regulating circuits.

Further still, how can one measure the actual output with a uC?

After this research, I suppose I am really looking for help regarding a programmable power supply - eg, I enter 10v on a keypad, and it outputs 10v.

Apologies for being blunt, but I am on my phone atm!

Sparky
 

MrChips

Joined Oct 2, 2009
30,824
There is another requirement for the dual supply.
A not-so-perfect supply might have voltage fluctuation depending on the load.
Dual power supplies are usually used to power op-amps and various linear circuits where the signal is bipolar, i.e. goes both +ve and -ve. You want the +ve and -ve voltages to track each other, i.e. they are not independent. Hence you want a tracking dual regulator.
 
Last edited:

#12

Joined Nov 30, 2010
18,224
That is usually done by forcing the negative supply to track the positive supply. If you are building your own, you might want to include a switch to divorce the tracking feature when needed.
 

wayneh

Joined Sep 9, 2010
17,498
...I enter 10v on a keypad, and it outputs 10v.
I use a LabJack U3-HV data acquisition device for this task, looking over a simple constant current or constant voltage supply. By simple I mean the supply uses a voltage reference to decide how much current or voltage is needed. The LabJack can measure any voltage I want to watch, and then output reference voltages to control the supply. Just like turning a pot, but the LabJack does it under computer control.
 

sohag513

Joined Jun 26, 2012
5
you didn't describe your exact requirement like range of current, voltage or power. if you want to build a variable power supply then you need to use power transistor like 2n3055 or IC lm317. if you need a variable power supply of 1.5amps, here is a variable regulated power supply. if it become to you helpful then reply. BEST OF LUCK.
 

Thread Starter

Sparky49

Joined Jul 16, 2011
833
I may not have specified exact requirements, but perhaps that is well, seeing as you haven't read it properly. ;)

I am well aware of how regulated linear supplies like that work.

What I am not so sure is how to interface with a uC. :)
 

sohag513

Joined Jun 26, 2012
5
you didn't describe your exact requirement like range of current, voltage or power. if you want to build a variable power supply then you need to use power transistor like 2n3055 or IC lm317. if you need a variable power supply of 1.5amps, here is a variable regulated power supply. if it become to you helpful then reply. BEST OF LUCK.:)
 
Top