Question: [This article](http://tuxgraphics.org/electronics/201005/bench-power-supply-v3.shtml) describes a rather nice solution for building a current- and voltage- controlled benchtop power supply using a DC supply in the range of 20-30 volts and some additional down-regulation circuitry, with current and voltage control provided by an AVR microcontroller in a feedback loop.

I like the idea, and I'd like to build my own, but I think the interface is a bit kludgy, so I'd like to improve on it. Unfortunately, although they sell a kit, they don't provide schematics. I understand about half to two thirds of the concepts they describe when it comes to power regulation - certainly not enough to build one myself - and the circuit diagrams they publish aren't complete.

Can anyone point me to some resources to get me started on building this myself? Ideally, I'd like schematics that incorporate most of the analog side so I can modify them in a fairly straightforward fashion to incorporate the microcontroller, since my knowledge of analog circuitry and power regulation isn't great.

Also, the linked project shuns existing regulators in favor of a lot of discrete components. Are there more integrated solutions that would simplify the design, without sacrificing features?

Answer: 
[Here](http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2524&param=en539261) is a more sophisticated way to do it, and more design information is available. You won't need the power-factor correction with your lower power level. You can get more information from the Microchip forums.
If you have a regulator with a fixed reference voltage, you can adjust the output voltage simply using a programmable potentiometer. For example, a MAX5387LAUD+ will let you vary the resistance between 0 and 10k in 256 steps using I2C control. I2C control is easy to output from the AVR part, especially if using the Arduino IDE with the Wire library. With a 250 Ohm resistor between output and ref, and the potentiometer between ref and ground, you'll end up with a range from 1.25 to 26.5 volts, assuming the regulator can go that far and you can cool it. Also: it's a surface mount part, so you'll have to solder it "dead bug" style, or make a PCB.

<http://datasheets.maxim-ic.com/en/ds/MAX5387.pdf>

For current measurement, you want to measure the voltage drop over a very accurate, very small resistor. Something like 0.1 Ohm, or even 0.03 Ohm (although losses in solder joints start becoming a problem there...) The drop, in Ohms, is I-times-R, so 0.1 volts for 1 ampere into 0.1 Ohms, which will dissipate 0.1 watts. Use a 5W resistor and be able to go to 7 amperes :-) (Wattage is I-squared-R.) Because the drop is small, you may want an opamp across the resistor with some multiple to make it easy to measure using an analog in on the AVR. If you find that the amperage drawn is higher than you want, you reduce voltage until it's within limit. You could do this with analog electronics, for ultra-fast response, or using a control loop in the AVR, if you run it fast enough.

A while back, I was thinking down the exact same path as you, until I specced out everyting it would take to build a solid, reliable, safe supply with the three rails and amount of voltage/current I would want in a robust enclosure -- and then I said "screw it" and bought a cheap three-rail supply from China :-)

So far that's working fine, and I can get on with the projects I *really* want to work on.