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?

Reply to
hondgm
Loading thread data ...

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.

Reply to
hondgm

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

Reply to
Terry Given

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: c-X-vlachos@hot-X-mail.com
SPAM-TRAPPED: Please remove "-X-" before replying
Reply to
Costas Vlachos

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

Reply to
John Larkin

On a sunny day (Mon, 20 Nov 2006 08:28:49 -0800) it happened John Larkin wrote in :

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

Reply to
Jan Panteltje

Hello John,

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

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.

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

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: c-X-vlachos@hot-X-mail.com
SPAM-TRAPPED: Please remove "-X-" before replying
Reply to
Costas Vlachos

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

Reply to
Rich Grise

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.