News:

;) This forum is the property of Proton software developers

Main Menu

Ideas for a PIC controlled HV PSU

Started by kcsl, Nov 12, 2023, 04:53 PM

Previous topic - Next topic

david

Quote from: John Lawton on Nov 16, 2023, 05:26 PMInto the inverting input (-)? Yes, I think so, but the op-amp receives negative feedback into the non-inverting input (+) and this works because the action of A1 and Q2 is an overall inversion so this should work as expected.

It's very similar to the error amplifier in a low drop-out regulator that uses a Pch FET or PNP series pass device (inverting) as opposed to something like a 7805 regulator using an NPN transistor (non-inverting).

David

ken_k

Hi all
I'm a latecomer to this discussion so may be of little help.
I noted the opamp was not specified, its specification will quite important, rail to rail inputs and a rail to rail output may be necessary.
Loop stability can be an issue. Both John and Davids circuits seem quite workable with modifications to suit the application.
I have some questions.

1/ Is the load resistive inductive or capacitive?
2/ What transient response is required?
3/ What headroom is available for the regulator?
4/ What sort of accuracy is required?
5/ Do you need to measure load current?

Linear technology have a range of over-the-top opamps I have found useful in the past. https://www.analog.com/media/en/reference-design-documentation/design-notes/dn533f.pdf
https://www.analog.com/en/products/lt6015.html#product-overview

These parts will be in the LT spice library so the entire power supply can be tested in LTspice.

Microchip have some 5V opamps with rail to rail inputs and output one could design around. If the power supply response time is on the slow side and one was to trim the output by reading the output voltage with an ADC then one could drop the opamp entirely and just use a few transistors.

When I designed my valve tester I read the voltages with the PIC ADC and adjusted multiple power supplies Vout before reading the valve characteristics, it worked fine for the specific application.




david

For sure - loop stability is a problem in regulators and is often ignored.  The mix of a fast op-amp and a slow series pass doesn't help either.
The required specification was 10-100V at up to 20mA so even a humble LM358 would cope on inputs and output.   As mentioned, R2 may have to be altered depending on the FET used.  At 20mA maximum, any FET will be very low on its curve and the swing across the FET gate may only need to be about 2V (OFF) to 5V (ON).   Ideally we want the op-amp output operating at a few volts above ground at full load.
Perhaps a SPICE simulation Ken?

David

John Lawton

All good points, especially in the need for the op-amp output maximum output to be near the rail voltage so that the Q1 can fully turn off. It would indeed work with a 5V op-amp instead of the 15V one shown but it's such a simple circuit, it might be almost as fast just to build and test it?

ken_k

Good points David and John.
David I will run something up in spice.
John regarding the op amp, the ability for the inputs to function with both inputs mV from ground is important with this application, some great opamps have a very limited common mode input range. Some opamps even go into phase reversal when input voltages are close to the supply rail or ground!
I just had a look, the LM358's common mode range extends to the neg rail so it could be a good choice. It's output goes within 20mV of ground (good for this application) the output high not a problem for this design just add a bit to it's supply voltage.
I will see if I have a spice model.  BTW John you might be correct about just build and test.

david

For what it's worth I've attached a simulation of the circuit in two different output voltages and loads.  If you refer to the DC Average readings shown you will note there is only a modest change in the op-amp output voltage because we are operating well below the usual "knee" of a FET.
I think I would trust an LT Spice simulation over what I've done as this package is very old.

David

John Lawton

Quote from: ken_k on Nov 17, 2023, 10:10 AMGood points David and John.
David I will run something up in spice.
John regarding the op amp, the ability for the inputs to function with both inputs mV from ground is important with this application, some great opamps have a very limited common mode input range. Some opamps even go into phase reversal when input voltages are close to the supply rail or ground!
I just had a look, the LM358's common mode range extends to the neg rail so it could be a good choice. It's output goes within 20mV of ground (good for this application) the output high not a problem for this design just add a bit to it's supply voltage.
I will see if I have a spice model.  BTW John you might be correct about just build and test.
Only if you must use the control voltage range 0 - 5V, otherwise offset it a bit above zero, after all the desired output is 10 - 100V, not 0 - 100V. The LM358 is as old as the Ark, with the offset voltage & temperature variation to boot. Did I also mention it is also slow?

ken_k

Hi David
 Here is a spice sim of your circuit I would be tempted to use a 5V RR i/o opamp as the output needs to approach the supply rail, microchip make some very cheap 5V RR opamps that should be suitable. I used ic's that were in the LTspice library. The lowpass filter makes the circuit slow to reach voltage, the circuit itself is slow but very functional. A sweep was performed with 1k, 2k, 3k and 4k loads, the 1k operated the current limit I fitted, the 2, 3, 4k loaded outputs were within a fraction of a mV. I have not ran a transient response test (among others).

Johns circuit is very fast and more configurable, as John stated some parts could be removed and it would still be faster than the one David suggested.

It depends on the application really, the one I used in my tube tester is very slow.

I have started a sim of Johns, it could make a good HV bench supply.
Maybe I don't need a bench supply I count 6 from here! A 500 or 600V switched mode one might be good one day.


ken_k

John
Regarding old parts, I often prefer old parts that are in current production, sell well and are proven to be reliable. I hate wonderful new components that are here today gone tomorrow. Cheap counterfeit parts are a bit of a problem!

david

Hello Ken,
Many thanks for taking time out to run the Spice simulation.
Yes the start up is quite slow - I didn't know what sort of PWM switching rate may be used but the LPF can be considerably cut back if something like 16kHz is used.   The simulated circuit shows reduced values and if a small amount of ripple is allowed they could be cut back further.  A DAC would be faster if fast start up is a requirement.  Even the 6 bit resistive DAC found in many PICs may be adequate.
There's definitely a place for 5V RR I/O op-amps but I'm not sure this is one of them.  The change in the op-amp output voltage between a 100uA load (8.44V) and a 45mA (6.96V) is pretty modest with that particular FET and many others.  At some point you may need to preload the output to effectively remove FET leakage

I'm always intrigued by supplies that have large capacitors on the output but adjustable current limit down to low milliAmp level.  Instantaneous output currents could be several Amps for a short time before current limit is effective.

David

John Lawton

Quote from: david on Nov 18, 2023, 10:48 AMI'm always intrigued by supplies that have large capacitors on the output but adjustable current limit down to low milliAmp level.  Instantaneous output currents could be several Amps for a short time before current limit is effective.
Yes, rather worthless. Better to use a series resistor to limit the current if it might be an issue when testing something.

John Lawton

Quote from: ken_k on Nov 18, 2023, 09:44 AMJohns circuit is very fast and more configurable, as John stated some parts could be removed and it would still be faster than the one David suggested.

Excellent work Ken. My circuit was designed many years ago and never simulated. It was designed as a high voltage pulse amplifier, that's why it is quite fast, but I suppose that isn't so important if it is used as a power supply.

John

ken_k

#32
I have set up a simulated short circuit on Davids design.
As predicted there is a current spike from the output capacitor.
A diode is required to protect the input of the opamp from a nasty negative going spike. See D2,select type as required.
The FET protection works well and is quite fast, the FET has an easy life.
A DC voltage is fed in as a reference and a short is placed on the output at 0.4 sec, the short is removed at 0.6 sec and re applied at 0.8 sec, off at 1 sec......
Capacitance on the output C4 included affect the feedback what is loading the power supply has significance, I have in some designs had to include a small inductance in parallel with a resistor or other networks.
As David pointed out FET leakage can be a problem and needs to be considered.

 

david

Very nice Ken!
Given the very modest loading the 22uF output capacitor is possibly too high and 2.2-4.7uF (electro) should be enough.  Still a high current spike though.

Yes, a shorted output will thump the non-inverting input - isn't that what the substrate's for?  The diode's a nice addition.

FET leakage?  Apply a small permanent load to the regulator.

Since we're talking dirt about regulator circuits, here is something I found a while back regarding low drop-out regulators.   If you hold the input voltage just below the stated regulated output voltage then the error amplifier and Pch FET are both turned on hard to try to maintain regulation.  If you then suddenly increase the input voltage both the error amp and the Pch FET are slow to return to linear mode with the result that there's a significant spike on the regulator output.
I first observed this in a battery/power application - a nominal 4.2V Lithium battery, a 5V mains power pack and a circuit that was all 3.3V.  When the battery got down near 3.3V the regulator saturated and you eventually realise the power is low so you plug the power pack in the wall and plug it in to the device.  For a short time the regulator outputs 5V until it settles down to 3.3V again.  This proved to be common to various makes with some slower than others.  So how long can you apply 5V to a 3.3V circuit?  A lucky dip I think.

Excellent work Ken.  Sadly I don't need a high voltage supply but it's always fun theorising - especially if a PIC is involved.

Cheers,
David 

John Lawton

I'm not sure there would be a negative spike on the output line which could threaten the op-amp. The current spike in R9 you are seeing is because you are shorting the output then C4 discharges into it.

If there is any danger from load induced voltage spikes then a 100nF ceramic across C4 should absorb them.

John

david

#35
Hi John,
The small capacitor added for stability (C1 in Ken's circuit) would charge to nearly output voltage.  When the output is shorted it will try to push the non-inverting input of the op-amp below ground by the same amount.

David