Maker Pro
Maker Pro

Analog vs Digital current limiting

I'm working on a variable bench power supply design. It has variable
voltage out and variable current limit. Right now the current limit is
implemented with an op-amp circuit. The voltage and current set point
is being supplied by two DAC (MCP4922) outputs, controlled by a dsPIC.


I starting thinking: the dsPIC is already monitoring current draw via
its A/D and an instrumentation amp, why not do current limiting in
software? Essentially I check the current draw of the load against the
set point, and vary the output voltage accordingly using a PID
algorithm. The dsPIC A/D is 100K samples/sec.

I have a gut feeling that this method will be vastly inferior to the
traditional analog limiting. Anyone have experience with this?
 
I'm working on a variable bench power supply design. It has variable
voltage out and variable current limit. Right now the current limit is
implemented with an op-amp circuit. The voltage and current set point
is being supplied by two DAC (MCP4922) outputs, controlled by a dsPIC.


I starting thinking: the dsPIC is already monitoring current draw via
its A/D and an instrumentation amp, why not do current limiting in
software? Essentially I check the current draw of the load against the
set point, and vary the output voltage accordingly using a PID
algorithm. The dsPIC A/D is 100K samples/sec.

I have a gut feeling that this method will be vastly inferior to the
traditional analog limiting. Anyone have experience with this?

I'm really going to go out on a limb here: For that matter, what about
doing voltage regulation in software, too? I know some SMPS do this,
but this would be for a bench power supply.
 
T

Terry Given

Jan 1, 1970
0
I'm really going to go out on a limb here: For that matter, what about
doing voltage regulation in software, too? I know some SMPS do this,
but this would be for a bench power supply.

it can all be done, but you have to ask yourself a few questions:

- how fast do I want to close my loop

- how fast must I respond to an over-current

- what happens if (when, more like) the software screws up
(this is a biggie)

- what about power-up and power-down

bench supplies should be good; its not uncommon to power expensive
things with them ($800 FPGAs etc).

Cheers
Terry
 
C

Costas Vlachos

Jan 1, 1970
0
I'm working on a variable bench power supply design. It has variable
voltage out and variable current limit. Right now the current limit is
implemented with an op-amp circuit. The voltage and current set point
is being supplied by two DAC (MCP4922) outputs, controlled by a dsPIC.


I starting thinking: the dsPIC is already monitoring current draw via
its A/D and an instrumentation amp, why not do current limiting in
software? Essentially I check the current draw of the load against the
set point, and vary the output voltage accordingly using a PID
algorithm. The dsPIC A/D is 100K samples/sec.

I have a gut feeling that this method will be vastly inferior to the
traditional analog limiting. Anyone have experience with this?

Your gut feeling is right. Don't use the MCU, stick with the op-amp
(it's faster and cannot crash). I've designed a similar PSU and found
that the best approach is to have the MCU provide the set points
(through DACs) to the voltage and current closed-loops (implemented
using op-amps). You can use the MCU for slow things like changing
xformer taps for minimizing power loss or monitoring temperature for
thermal shut-down, etc., but keep it outside the fast voltage/current
loops. I don't think you can beat the speed and reliability of the
analogue approach.

--
Regards,
Costas
_________________________________________________
Costas Vlachos Email: [email protected]
SPAM-TRAPPED: Please remove "-X-" before replying
 
J

John Larkin

Jan 1, 1970
0
I'm working on a variable bench power supply design. It has variable
voltage out and variable current limit. Right now the current limit is
implemented with an op-amp circuit. The voltage and current set point
is being supplied by two DAC (MCP4922) outputs, controlled by a dsPIC.


I starting thinking: the dsPIC is already monitoring current draw via
its A/D and an instrumentation amp, why not do current limiting in
software? Essentially I check the current draw of the load against the
set point, and vary the output voltage accordingly using a PID
algorithm. The dsPIC A/D is 100K samples/sec.

I have a gut feeling that this method will be vastly inferior to the
traditional analog limiting. Anyone have experience with this?


The trend lately is towards digital power supply control loops. Just
digitize everything and crunch the numbers. Most supplies have enough
output capacitance that you don't need an insanely fast loop to keep
things happy.

If you digitize everything - unreg rail, output voltage and current,
heatsink temp, control settings - you can do all sorts of cool stuff,
and get remote programmability almost for free.

John
 
J

Jan Panteltje

Jan 1, 1970
0
Most supplies have enough
output capacitance that you don't need an insanely fast loop to keep
things happy.

It all depends, 'enough' output capacitance will screw up fast current
limiting.
You do not want 100uF discharched in that 20$ laser? with current limit
set to 10mA.... when you connect it.
. 60 mA
. .
. .
. .
.. . . . . . . . . . . . . . 10mA
.. 0mA
 
J

Joerg

Jan 1, 1970
0
Hello John,
The trend lately is towards digital power supply control loops. Just
digitize everything and crunch the numbers. Most supplies have enough
output capacitance that you don't need an insanely fast loop to keep
things happy.

And even some of the analog circuitry in supposedly good and expensive
lab supplies seems to create glitches once in a while.

If you digitize everything - unreg rail, output voltage and current,
heatsink temp, control settings - you can do all sorts of cool stuff,
and get remote programmability almost for free.

A client bought the Lascar supply you had mentioned here before. Works
like a champ, didn't cause glitches (so far). I used it there and it did
not destroy my stuff like one of the big Lambdas did.
 
C

Costas Vlachos

Jan 1, 1970
0
Jan said:
It all depends, 'enough' output capacitance will screw up fast current
limiting.
You do not want 100uF discharched in that 20$ laser? with current limit
set to 10mA.... when you connect it.
. 60 mA
. .
. .
. .
. . . . . . . . . . . . . . 10mA
. 0mA

Yes, exactly. For very tight current control the fastest and easiest
approach would probably be the analogue (op-amps). And there shouldn't
be any large capacitance at all at the output anyway (by large I mean in
the uF range).

You can quickly test a PSU by doing this:

1. Set the PSU to the max. voltage output (say, 30V).
2. Set the current limiter to 20mA.
3. Connect an LED to the output.
4. Disconnect/reconnect LED a few times in succession.

If the LED is still alive after step 4, the current loop is fast. If it
dies after step 3, you have a slow current loop or large output
capacitor. Of course this is just a rough test, a scope would reveal the
exact speed.

It really depends on what kind of loads you use and how tight you want
the loop to be. For a battery charger, even a slow PIC would be fine.

--
Regards,
Costas
_________________________________________________
Costas Vlachos Email: [email protected]
SPAM-TRAPPED: Please remove "-X-" before replying
 
R

Rich Grise

Jan 1, 1970
0
I'm really going to go out on a limb here: For that matter, what about
doing voltage regulation in software, too? I know some SMPS do this,
but this would be for a bench power supply.

Yes, you can do both. It'd be almost trivial on a bench supply with
a transformer (it might work with a switcher, but I can't vouch for
that)

But you can control the firing angle of a pair of SCRs, and just
watch the voltage and current output and adjust the firing angle
accordingly. You could even watch the voltage before and after
the filter, but your ripple is always going to be 60 HZ - just
design a proper filter.

I did it once for a 24V 40A battery charger, which unfortunately,
never got to market because it was too expensive. )-;

Good Luck!
Rich
 
Top