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!

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.

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).

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.

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,

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.

...what would be an acceptable ripple voltage for a very smooth design?

Click to expand...

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.

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.

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.

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.

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.

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.