Electronic – Building a digitally controlled bench power supply using an AVR

avrpower supplyvoltage-regulator

This article 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?

Best Answer

There are two possible ways to go here: linear regulator vs switcher, aka SMPS (Switch Mode Power Supply).

Linear
This is the old school solution, and for a variable power supply has 1 major drawback: power dissipation. If you have a high enough input voltage to supply 25V out (e.g. 27V) you'll have to dissipate a lot of power if your output is set to 1V and you draw 1A. Dissipation: 26V x 1A = 26W. There's nothing against integrated regulators like the LM317. This can provide 1.5A from 1.2V to over 30V. The LM317 works by setting its output voltage to 1.2V higher than its adj input. So all you have to do is take a DAC and place its output to the adj input of the LM317. Most DACs don't output high voltages like 30V, but that can be achieved by placing a simple opamp amplifier between DAC and LM317:

non-inverting amplifier

About the internal dissipation. The LM317 exists in the old TO-3 package, which, when mounted on a decent heatsink, will allow for a dissipation of few tens of Watt. But you can make it less wasteful. If you have a transformer with several taps for different voltages, you can switch with relays between input voltages depending on the required output voltage. That's something which can be done automagically, since you're using a microcontroller after all.

To control current limiting you could use high-side current measurement:

high-side current measurement

You can use an ADC to convert the measured analog value to digital, and compare it in the microcontroller with a set value; if it exceeds this value you can switch off the output. You would have to reset the power supply to activate it again, doing this automatically won't work because it would oscillate between shut-off and overload.
Alternatively you can do the current limiting outside of the microcontroller, by using a comparator to compare the measured value with a set value (output from a second DAC). The comparator can then pull the adj input of the LM317 low when there's an overload.

SMPS
A SMPS solution in general has a much higher efficiency than a linear regulator, but is always optimized for certain input and output voltage and a given output current. If you use a SMPS with a variable output the efficiency may be up to 90% for the optimal output voltage but drop to 60% or lower at very low output voltages. PCB layout is also critical, both for the efficiency and EMI (ElectroMagnetic Interference).

Especially if you can find a transformer with several outputs I would go for the linear approach.

edit
Since you've little practice with analog electronics I think it's best to start with a microcontroller board and build on that, step by step. Arduino is the word of the day, but I don't know how they are with analog in and out.
You rightly say that the user interface of the tux-dingus leaves a lot to be desired. I would use a rotary encoder to set the voltage. You could make it dynamic, i.e. fine steps when turning slowly, bigger steps when turning fast. You could use a second encoder to set the current limiter, or use the same, and switch between modes by pushing it (most rotary encoders are combined with a push-button). This way and with a DAC you can already create an analog voltage; this will ease the next step of bringing in the real power parts.