Skip to main content
Topic: Digitally Controlled Bench PSU (Read 47546 times) previous topic - next topic

Digitally Controlled Bench PSU

Hi all,

Many electronics people will build a bench power supply at one point in their professional or hobby career. I too have made a couple over the years. However, most of the time I used what was available in the shop(s) where I did my work. One type of PSU in particular always fascinated me: a digitally controlled PSU. No potentiometers, but a keyboard where you punch in the numbers and get exactly that.

Those digitally controlled PSUs are rather expensive toys. Of course depending on the actual accuracy, but they are not the cheapo China stuff you often see. So I started wondering what it would take to design one on a reasonable budget. 25 years ago, when I saw the first digital PSU, it would have been all too expensive for a hobbyist to come by. Most of the electronics are now affordable and it should be possible to, at least, "take a cursory design look".

Attached is a schematic that should show my thoughts so far. [attachment=0]

The design is for 0...30V and 0...3A (90W) controllable at ~1mV and ~0.1mA steps. The actual accuracy is still out for testing and I assume that noise and non-linearity will be a factor to look at when time comes. The basic design allows for 0...42V (max 45V) and (at least) 0...4A, but then all the components should be re-calculated to match such setup. Also, some components need to be voltage matched for a higher input voltage.

The design is a dual control-loop where the first stage is a switching PSU which is fed back to assure a 2.5V drop over the secondary analog control stage. The secondary stage is also responsible for the current limiter. The idea here is to reduce the power loss in the BJT (Q4) in the analog stage. A differential amplifier feeds the switching PSU feedback line to settle at Vout+2.5V. Estimated power loss is 12..15W (max) with a constant 3A output current, where the regulating BJT is responsible for 7.5W. The current limiter is a differential amplifier over a high-side sense-resistor, which controls the same regulating BJT.

The whole setup is controlled by devices on an I2C bus (and one shutdown signal) on a 6-pin header. Both the output voltage and current are set by two 16bit DACs on the I2C bus. The resulting output in both voltage and current are measured back with 15bit ADCs (16 bit differential), also on the I2C bus. Finally, another 12bit 8-channel ADC (I2C) measures auxiliary parameters such as input voltage, switcher voltage, limiter voltages and up to 4 temperatures (with NTCs).
There is no active down-regulation of the output voltage. There are only bleeders on the output capacitor(s). It may be necessary to do active control. I have not yet decided (tell me if you think it is required).

An auxiliary power supply for +12V, +5V and -12V is used to supply the various components on the board.The 5V part is powerful enough to be used to power a small CPU board with I2C and the user- and computer-interfaces.

The main PSU board, without the 2x30V/100VA power-transformer, is estimated to cost somewhere around $75 in components. No exact calculations have been done yet.

My question would be if you'd like to comment on the design. Any comment is welcome. Especially welcome are the "D'oh!" design error comments ;-) There may be some component values that are inaccurate or plain wrong, which would be nice to know.

Re: Digitally Controlled Bench PSU

Reply #1
I've updated the schematic a bit.

A drain has been added to ensure that down-regulation of the output is possible. It will influence the current measurement, but that is just a secondary concern. The drain will only be enabled for milliseconds at a time to ensure that the output capacitor is discharged to the correct level.

External voltage sensing was added. Long wires cause a voltage drop at high(er) currents and that is not what you want. An external sense circuit is used to compensate for the wiring. It can be switched on/off and uses a couple of reed-relays to switch from internal to external.

An extra I2C 4-bit output chip is added to control all digital functions (drain, ext.sense, shutdown). This allows for everything to be controlled using only one I2C interface.

The whole power control system will fit on a 10x10cm PCB. A secondary PCB is needed to do the MPU control. I am leaning towards a small ARM processor. Also I was thinking of an 2x16 LCD display with RGB backlight. Then the backlight can indicate whether the PSU is shut-down, voltage-limited or current-limited using blue, green and red resp. Not sure yet how to implement the user-interface. A simple turning knob or a keypad. Maybe both...

New schematic PDF [attachment=3]

Schematic as images: [attachment=2] [attachment=1] [attachment=0]

Re: Digitally Controlled Bench PSU

Reply #2
the input transformer is an 2x30v/2a, but the unit is meant to deliver 0-30v and 3amp?, I guess one need an stronger transformer than that?

Would have been interresting to build something like this, if it could be programmed for presets, and logging of current usage.

Re: Digitally Controlled Bench PSU

Reply #3
[quote author="neslekkim"]the input transformer is an 2x30v/2a, but the unit is meant to deliver 0-30v and 3amp?, I guess one need an stronger transformer than that?[/quote]
The power transformer is 2x(30V/2A) or 2x30V/2x2A. The two windings are parallel which gives up to 4A, but you need to account for ~20% tolerance. Both the transformer and the input can be quite a bit off. The result is stepped down, so the output current can be quite high, but is limited if you want the 30V output. I calculated the setup to have just enough wiggle-room for 30V/3A output. It could, theoretically, output a higher current at lower voltage, but then the analog regulation needs to be adapted and the power-loss the the regulating BJT will increase.

[quote author="neslekkim"]Would have been interesting to build something like this, if it could be programmed for presets, and logging of current usage.[/quote]
That was my plan too. Having presets and all kind of features. The whole trick is that once you have a digital control, you can do anything you like. I plan to put an USB/serial on it with opto-isolation. Then an external computer can do whatever the firmware is lacking.

Re: Digitally Controlled Bench PSU

Reply #4
A few recalculations showed a couple of small inconsistencies. Especially worst-case power dissipation of a few components would potentially burn them out. The analog low-side control BJTs are now of a different type to handle the worst-case scenario (I think). I need to build it before I am absolutely sure that everything holds out the way I like.

Another note is that the opamp will probably be replaced with a TS524, which has a lower offset value and a higher GBW product than the LM324. That could also mean that the bandwidth needs to be limited to prevent oscillation. A test has to show how much must be done. Stability also needs to be evaluated at the switching PSU feedback. It is a rather unusual setup, where the output is variable. This might result in a too low phase margin over the entire output range, in which case another pole needs to be added. However, I cannot get my mind around that part without actually measuring.

[attachment=0]

Re: Digitally Controlled Bench PSU

Reply #5
Btw, this is a build where you pick components suitable for this right?, not just "whatever I find in my drawer"?
The latter seems often more difficult for others to reproduce :)

Re: Digitally Controlled Bench PSU

Reply #6
[quote author="neslekkim"]Btw, this is a build where you pick components suitable for this right?, not just "whatever I find in my drawer"?
The latter seems often more difficult for others to reproduce :)[/quote]
Ehm, yes. This is a case where I go through the various manufacturers and distributors to find the suitable components (with affordable and reasonable prices).

Edit: Note that not all parts in the schematic are specified completely. F.x. the 10uF caps in the switching PSU are alu-polymer types, just to lower the ESR to acceptable level with small footprints... I'll have work on a BOM to get a better look at the costs.

It is actually quite a difficult setup because the control voltages are set with 16bit (@3.3V). That is 50uV per step. Noise is quite a concern here. I do not think that I can make it both stable enough and affordable. So I'll opt for a balance and hope to achieve 2...3mV and 0.2...0.3mA (controllable) regulation. Anything better than that is welcome. Time will tell if I made the right balance.  ;-)

Re: Digitally Controlled Bench PSU

Reply #7
Snubbers on the relays would be nice.

I haven't figured out your feedback loop on the secondary current stage (some comments on that would be nice), but the primary stage looks ok, along with your Voltage rail generation (page 2) and control lines (page 3).

For $75 its a bargin :D


Re: Digitally Controlled Bench PSU

Reply #9
[quote author="ptarcher"]Snubbers on the relays would be nice.[/quote]
Yeah, that would be a good addition. A few pF are enough, just to cover the switch-over. There is a 12M (R53) resistor that pulls-up the input VSENSE. That ensures that the regulation is downwards (to 0V) and not upwards if no relay is active.

[quote author="ptarcher"]I haven't figured out your feedback loop on the secondary current stage (some comments on that would be nice), but the primary stage looks ok, along with your Voltage rail generation (page 2) and control lines (page 3).[/quote]
The current-control is done by the differential measurement of R23, the current-sense resistor. That value is scaled to 0...3.3V representing 0...3A. The opamp (at the bottom) controlling Q6 compares the set value (ISET) with the current value and regulates Q6 to draw current from the emittor-follower Q4/Q5. If the output current is too high, then Q6 will "steal" the base-current from Q5, effectively down-regulating the output current.
The voltage regulation works similarly using Q7 to steal the Q5 base current. It uses the output voltage from external sense or internal sense (R27/R29), depending on which of the relays is active.

You have to keep in mind that the input voltage VSW is always regulated to be 2.5V higher than the output voltage. That makes the current set by R20{abc} approx. (2.5V - 2*0.65V)/3k3 when the system is in balance. When the limiters Q6/7 kick in, then they will cause the output voltage Vout to drop, which is automatically followed by VSW. The switching PSU may be rather slow in the reaction time. The analog loop will regulate the output in a speedy manner.

[quote author="ptarcher"]For $75 its a bargin :D[/quote]
Well, yes, that was the idea. Don't hang me on that number though; it is an estimate. Just remember that the power transformer is as expensive as the electronics and that number you need to add. As said, I'll work on the BOM and get a better estimate of the costs.

Re: Digitally Controlled Bench PSU

Reply #10
[quote author="neslekkim"]Did you see the project from Gerry Sweeney? http://gerrysweeney.com/fully-programma ... ly-part-9/[/quote]
Yes, I've seen it. It too is a nice piece of work.

One of the differences I wanted to implement was a lower power-loss by using a switching PSU at the input. A 0...30V/0...3A supply would otherwise dissipate >90W in the regulating transistor at high-current and low output voltage. That was just too much.

The second difference is that I wanted to separate the control from the supply. The whole PSU is one board with an I2C interface. Control needs to be done separately. That will also make it easier to combine multiple PSUs with one control board.

Then, while I was at it, I though that external sense would be a great addition too.

Re: Digitally Controlled Bench PSU

Reply #11
I gonna follow this topic! I'm also playing with the idea of building the same thing,but analogue is not my cup of tea...

In my thoughts I was feeding the adc/dac with 5v Vreg to have a broader range and a better signal to noise ratio. Also there are opto-isolators for I2C like si8605 which are perfect for this application. see http://www.ianjohnston.com/images/stori ... ematic.pdf for more ideas :D

Re: Digitally Controlled Bench PSU

Reply #12
[quote author="Sjaak"]I gonna follow this topic! I'm also playing with the idea of building the same thing,but analogue is not my cup of tea..[/quote]
Yeah, analog is not always straight forward. I can cope with "normal" analog, but I find VHF/UHF (and beyond) radio-stuff is pure magic ;-)

[quote author="Sjaak"]In my thoughts I was feeding the adc/dac with 5v Vreg to have a broader range and a better signal to noise ratio.[/quote]
I thought about that and decided against it because the power-supply rejection-ratio is slightly reduced when you have both Vcc and Vref at 5V. For the current control it would not help at all because the current-sense voltage is already very low (0.3V @ 3A with 0.1Ohm). Amplifying the current sense more would just amplify the noise. Increasing the current-sense resistor will just burn off more power.

[quote author="Sjaak"]Also there are opto-isolators for I2C like si8605 which are perfect for this application. see http://www.ianjohnston.com/images/stori ... ematic.pdf for more ideas :D[/quote]
Right, that one I had not yet seen. He uses a buck-regulator at a much lower frequency (52kHz). I found such frequency all too low and opted for 375kHz. That reduces both the required inductor and capacitance for the filter. It may cause some HF to feed forward, though, but I hope that the low ESR of the caps will prove enough to keep that down.
I certainly could not go for a secondary LC filter, as Ian did, because you create a 360 degree phase-loop, which may cause the pre-regulation to start oscillating if the loop-gain is any bit positive (even "0 < loop-gain < 1" will cause dampened oscillations with 360 degree phase).

The isolation can be done off-board. As mentioned in another post, the design is split into PSU board and control board. The control-board will include an isolated USB/serial for external control (using an Si8422 and FT230X). If you use the PSU board separately, then you can simply add the I2C isolation there, which should be easy.

Re: Digitally Controlled Bench PSU

Reply #13
Nice project!
If you could bypass the switching preregulator with a relay, the design could also be used as a low-noise linear power supply (with a limited output power, of course).

Re: Digitally Controlled Bench PSU

Reply #14
[quote author="Kalvin"]Nice project!
If you could bypass the switching preregulator with a relay, the design could also be used as a low-noise linear power supply (with a limited output power, of course).[/quote]
Bypassing the pre-regulator would limit the output current to ~200mA without changing the analog regulation and adding a lot of cooling. That kinda defeats the design intention(s). It would be easier to redesign a version without the pre-regulator.