DIY power supply stability - Page 1
Forum section: electronics / projects

author: Radiohead
author_rank: Contributor
timestamp: August 05, 2016, 02:48:52 pm
content: Hello folks,I've been trying to design a simple and low cost power supply that has the following features:Mainsfailure detection & shutdown on eventConstant load on the power transistors for stabilityLatching pushbutton to enable/disable the outputTemperature protectionCC and CV indicationPeak current limitingMy target is an output of 20V @ 1.5A, but this is not set in stone. I could add a preregulator like blackdog's, but that's for later. I don't prioritize the user interface like some do, I'd rather hava stable PSU that doesn't fry the DUT on turn-on or turn-off. I currently use potentiometers for the setpoints of the current and voltage output, which are referenced from the ground of the opamp supply. If I want to control my PSU digitally I can easily replace the potentionmeters with a DAC in the future. I still got some ICL volt meter IC's lying around so I might use them as well to keep the amount of digital in this PSU as low as possible.I've included a schematic of my design in the attachment. It's still a lot of work in progress, but I've build a prototype on perfboard to check whether everything would work as I though it would. After a lot of bug fixing and correcting wrong connections I got the PSU to work. I don't have a dynamic load so i started to search for the ones previously made by other eevblog members. I came across Jay_diddy's_B excelent tutorial on dynamic load. I tested a few designs in LTspice and wanted to use this on my current PSu design to determine the stability of my PSU design. But before that I'd like to highlight a few bit's of my design:Mainsfailure detectionAs i used as much components as possible which I already had available, I've used a NE555 timer for mainsfailure detection. The AC pulses from the transformer that supplies the opamps are used to keep the threshold of the 555 low with a npn transistor, which pulls the pin to ground. When the mains is disconnected and the pulses stop, the RC combination will charge up. When the internal threshold of the NE555 is reached, the output will go low and reset the pushbutton latch. On the reset of the 555 is an RC combination to ensure that the 555 doesn't glitch when the mains is connected. The diode accross the reset resistor makes sure that if the PSU's mains switch is quickly toggled the capacitor quickly loses it's charge on turn-off.Pushbutton latchI wanted my PSU design to always power on with the ouptput disabled, since I've had some experience with people turning on a power supply with the DUT connected. Polyfuses will die in a spectaculair way when connected to a PSU set on 30V @ 10A and a battery charger in series. Therefore I needed a pushbutton latch that would reset default to off when the mains is connected. Again a pair of NE555 did the trick, with just two resistors, a cap and a switch a latching pushbutton was created. with the NE555's reset connected to the output of the mains failure detection, the PSU is turned off in a mainsfailure event and will always be default off when the mains is switched on.Constant current source & constant current loadThe output of the pushbutton latch is connected to a transistor that turn's the constant current source and constant current load on and off. The current source provides a 3-5 mA current to bias the TIP142. The current and voltage loop will draw current to regulate the output to either voltage or current setpoints. The constant current load draws around 10mA from the TIP's emitter to ensure that the PSU has no stability or slow response when a high impedance load is connected on the output.The restI think you've probably seen more than enough supplies to know how the voltage and current error amplifiers, so I won't explain that. I just wanted to highlight the mains failure and pushbutton latch interworking, as that can be a bit difficult to visualize from the schematic how that works.AC stabilityI wouldn't have given this thread the name is has if I didn't have an AC stability problem. I've created a simplified design in LTspice to check the stability of my design and determine the compensation values for the current and voltage regulation. However, the design is fairly close to oscillation as can be as seen on the picture below.The phase margin is 6.27°, gain margin 63.4dB with the -3dB point at 22.4kHz. However as the image shows the phase will go as low as 1.1°on the lower frequencies. I assumed this is not something I want for stability, sine the phase almost is 0°, but I can't find the cause of this. I assume the used opamp and darlington stage cause the phase to behave like this.I tinkered around for a bit and found that when a 10nF capacitor is placed on the voltage divider, the phase and gain margins improve quite a bit.Phase margin goes up to 23.3°, gain margin to 42.8 dB and the -3dB point is at 79.4 kHz. Still I find the phase margin quite low. I wonder if I put the AC source on the correct place or if the gain and phase margins are acceptable as they are?LTspice simulation is in the attachment!

author: Kleinstein
author_rank: Super Contributor
timestamp: August 05, 2016, 05:25:16 pm
content: The principle setup looks good. It's the classical floating regulator.Wether the stability is sufficient, depends on the type of load / output capacitor that is used for the simulation. To check for behavior with variable load, one should look at the output impedance in the simulation.This can also help to find suitable values for the output caps. I would expect something like a few 100 nF with very low ESR (e.g. MLCC or film) and a low ESR electrolytic somewhere in the 50 -500 µF range.From the curve it looks like there is a rather long time constant somewhere in the compensation, this might give a relatively long time to finally settle. So the 10 nF at the feedback might be to much: it gives a good phase margin, but slow settling.The constant current sink is relatively temperature dependent, this could be done better. Also keep in mind that the regulator still needs to be stable without it, as low frequency ringing (hard to avoid with a large capacitive load) can absorb the bias. The constant current still helps most of the time, but it should be at least marginal stable without. So if a really fast response is needed, I would not use the darlingtion, but separate transistors of reasonable speed. If a bias is needed for the output transistors, a kind of push pull stage (variable size current instead of constant) is possible. For a accurate current measurement and regulation a separate current shunt is better, as the current circuit also measures the bias current and the base current to the output stage.I don't think the current loop is compensated right this way. There should be at least a series resistor from the shunt to the OP.The 100 K resistors at the OPs ar rather large values, this could cause trouble with parasitic capacitance.It's also a good idea to have a hard limit for the base drive voltage, to prevent excessive current spikes during transients.One should also do transient simulations, to check if there is a kine of windup at the OPs. There are more efficient options than the diodes currently shown.

author: Radiohead
author_rank: Contributor
timestamp: October 17, 2016, 07:28:48 pm
content: Thanks Kleinstein for your reply. I've since then solved my problem, but never replied.QuoteThe problems I had in my simulation were related to my choice of components, the resistance value of the sense resistor over which the output current is measured, was to high. The 1 ohm resistance in combination with any output capacitance created a low frequency pole. With a resistance of 100 miliOhm, the phase is a lot better.I also had another problem: all the wind-up protection diodes and the diodes at the input of my voltage error op-amp were forward biased. This was due to the fact that the classic floating regulator usually either used LEDs at the output of the current and voltage error opamps for CC and CV indication or they don't have the diodes at the input of the voltage op-amp. Because the forward voltage of the diodes is much lower then the LEDs and the voltage error input protection diodes where connected to the reference supply ground, they where forward-biased and limited the output range of both op-amps. The simulation showed that the regulation still worked, altough the expected output from the known reference voltage was incorrect in some of mine simulations.QuoteWhat do you suggest? Use a LED as voltage reference or something else? I choose this beta-helper configuration, since I've read in Self Douglas' audio books that this is quite commonly used and it's a good solution regarding performance vs. number of transistors used. It can also be convieniently enabled and disabled from the currents source.QuoteI am quite curious what your solution to wind-up protection is.QuoteI knew that the 100k resistor and 100nF capacitor values around the opamps where nonsense, I just coudn't figure out why their values had no obvious relation to the frequency response. It al makes sense now, now that I know the output capacity and sense resistor created a low frequency dominant pole.QuoteI went nuts and went with a Blackdog Sziklai transistor pair + TLE2072 instead of the LT072. Behold a phase margin of 79° Phase @ 108kHz :(Schematic added in the zip)The compensation values are still randomly picked, but Bandwidth and phase margin are much better and the compensation capacitor value finally makes a difference.The results were so promosing, I already began looking for a good pre-regulator and I did some simulations with multiple preregulators. For example:https://www.eevblog.com/forum/projects/very-low-noise-preregulator-for-benchtop-power-supply/Blackdog's design is quite simple, but the inrush current on the buffer elco are quite high, even on low output voltages and the transient recovery is dependant on the mains frequency. I got two Delta Elektronika PSU, which use a thyristor based version pre-regulator, a lot like Blackdog's design. They use a large transformer core, wound with thick copper wires as what I assume is a choke/filter for the high/irregular current draw from the mains. I gues this should be added to blackdog's pre-regulator aswell to reduce interference to other devices?https://www.eevblog.com/forum/projects/diy-programmable-dual-channel-bench-psu-0-50v3a/Prasimix's switch-mode pre-regulator obviously has the highest efficiency, but I want to stay away from switchers for this project.https://www.eevblog.com/forum/projects/diy-bench-power-supply-psl-3604/Liv's pre-regulator is promising as it has very good transient recovery, but I don't want to use mosfets in linear applications. I'd rather use them as switches.Linear tabswitcher:I don't know the original topic where I found this one, but it works quite the same as Liv's PSU. Again, Mosfets are operating in their linear region and dissipating most of the dissipated power. I'd rather have the Sziklai pair dissipating most of the power, since the 2SA1943 comes in a TO-264 package and because it's a PNP transistor, it doesn't suffers from heat spots. I checked IXYS, but their linear range of mosfets is way to expensive and it's difficult to obtain the better ones.Tabswitching: Designs from the german ELV magazine use voltage doublers and tabswitchers with relays as pre-regulators. While I like relays, I'm interested whether there's an more modern approach instead of a relay, that also reacts a lot faster. I've seen the Circuitsonline 2016 PSU design which uses an opto-coupler to switch tabs, but I want to switch multiple tabs, so I'll need to figure this one outhttps://www.circuitsonline.net/forum/view/130041. I hope someone who reads this post might know an design that already uses something alike, so far I haven't found it yet.I'll add the pictures after I've posted. Edit:Done!

author: Kleinstein
author_rank: Super Contributor
timestamp: October 17, 2016, 09:00:47 pm
content: The stability of the current source (sink) is not that critical if the current is before the shunt, as in the original circuit, but it should be reasonable stable acting behind the shunt (new circuit).The bigger problem might be that the current source only works down to about 0.6 V. With an LED things only get worse. For the new version, one could have the current sink for the output from the OPs positive supply to the negative output. This way one has a lot of extra voltage to spare and can work all the way to 0, (actually even slightly below 0).I would be careful with a Sziklai transistor pair - they can be unstable with certain loads. This is especially true with a high drive impedance. So at least an other emitter follower (can be PNP) just after the diodes should be there. This might be a good idea anyway. With such a fast PNP/NPN pair, the layout and parasitics (e.g. inductance of the shunt, ESR /ESL of caps (main filter cap)) can become critical.Usually 2 NPNs as a darlington configuration are easier to get stable. This is especially true with a very low shunt value. The shunt here also acts as the emitter resistor to stabilize the circuit. With more than 1 output transistor one also needs balancing resistors, that are in series to the shunt.The TLE2072 could be a problem with such a small shunt. DC precision is not that good - at least offset compensation might be needed.A simple form of anti windup can have most of the feedback capacitance from behind the diodes. So the OP might go far off into saturation but the capacitor is only just to the edge.The preregualtor circuit shown with the mosfets might not be that bad. The mosfests operate linear, but at a relatively low voltage. At low voltage (e.g. < 10-20 V) linear operation can be OP for many MOSFETs. The MOSFETs only see the difference in the transformer taps, so this might not be that much, especially if so many are used. The lowest of the MOSFETs is not needed if the PNPs can dissipate some power too.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 17, 2016, 09:18:21 pm
content: Quote from: Radiohead on October 17, 2016, 07:28:48 pmAll transistors suffer heat spots (2nd breakdown). Some just run out of V/I/power capacity before 2nd breakdown takes over!Historically, BJTs have beenmoresensitive to 2nd breakdown, due to their higher current density, and thus higher power density as well. MOSFETs have been at the same level, for the last decade or two, and IGBTs being even higher, have always been poor. (I'm not sure why, but Super Junction type MOSFETs, and even some IGBTs, boast 2nd-breakdown-free SOAs. I suspect the IGBTs are specsmanship, and would not trust one until I measured it.)In any case, we're talking quite low voltages here (few BJTs exhibit 2nd breakdown under 30V), so it's hardly a concern. Go with other motivations: stability (Sziklai not the best here, as mentioned), ease of use (hard to beat a follower), saturation voltage and current limiting (a PNP collector is good at this, but then has to be stabilized for good voltage regulation too), etc.Tim

author: David Hess
author_rank: Super Contributor
timestamp: October 18, 2016, 02:50:03 am
content: At first glance, it looks to me like the low impedance ground connections to the inverting inputs of the error amplifiers are preventing the output to inverting input feedback loop compensation networks from working; the inverting inputs are effectively shorted to ground. With slower operational amplifiers, this would not be a problem because no external frequency compensation would need to be added. Add series resistance between ground and I_Sense and the inverting inputs.I like that the current control loop does *not* include extra amplifiers which would reduce the phase margin. My first bench power supply design used an instrumentation amplifier inside the current control loop and performance massively suffered for it.I disagree with Kleinstein about the stability of the constant current bias; it is almost irrelevant. I would probably add emitter followers to the operational amplifier outputs reducing their load but that is just me wearing my precision hat. I have had better results with Sziklai transistor pairs than Darlingtons and I think it is because the drive transistor can effectively bypass the output transistor at higher frequencies.If the output range is only up to 20 volts or so, then that is within the voltage range of TL081 and similar 36 to 44 volt operational amplifiers allowing a simpler design without the floating power supply but a negative voltage supply might need to be added to allow an output down to 0 volts.Most designs like this that I have seen place the CC and CV indicator LEDs in series with the operational amplifier outputs. This has its own problems of course.MOSFET secondary breakdown is an interesting subject. The normal positive temperature coefficient which protects parallel operation of individual MOSFET cells reverses at high Vds and as the process density increases, this threshold decreases so for modern high performance MOSFETs, the point where secondary breakdown becomes a consideration is comparable to bipolar transistors. Like T3sl4co1l says though, below about 30 volts this is not a problem.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 18, 2016, 09:10:26 am
content: Quote from: David Hess on October 18, 2016, 02:50:03 amYup. To be exact:In saturation (Rds(on) resistive range), the resistance is due to silicon (which is a PTC resistor), and transconductance is negligible (i.e., current draw is hardly affected by gate voltage, as long as it's high enough to keep it saturated), so you don't have any problems with amplification and oscillation, and the tempco of Vgs(th) and Gm.In the linear range (Vds > Id * Rds(on), usually with Vgs only a little above Vgs(th), because of linear bias), there's almost no resistance behavior (Id hardly varies at all with Vds) and everything is about gate voltage. In this region, oscillation and tempco are big concerns.So, for switching applications, MOSFETs are fine to wire in parallel (up to whatever limit you encounter from switching speed and stray inductance), because they all look like resistors.For linear applications, MOSFETs (and BJTs) might not even get along with themselves, and you need devices that are rated for the volts and amps you need.Tim

author: Kleinstein
author_rank: Super Contributor
timestamp: October 18, 2016, 10:41:30 am
content: I just saw that there are two separate current sources for the transistors, going before the shunts. In this case the current sources are not critical.However the output stage still should be tested / simulated at lower currents than the current of the sources. With a capacitive load it happens that the current is used to discharge the caps - so the regulation should be still stable at lower currents.Only 100 mOhms is rather low for the "emitter" resistors to ensure load sharing. This might need good thermal coupling of the NPN transistors in the output stage. The resistors also set the (trans-conductance-) gain of the output stage. A high gain there makes the CC -CV cross-over a little more critical, but it also help a little with the current regulation without an extra amplification stage.With modern MOSFETs the voltage where 2n break-down (even if called different) becomes a problem has moved down. So it still needs looking for suitable types (relatively high voltage, maybe older types). If parallel operation is needed one could use separate chains for each of the BJT output stages. So current sharing is still done with the BJTs. Having the filter cap behind the pre-regulation could be two sided: one only need one of the big caps, but much of the current can still come from the highest transformer tap, just earlier in time. So the power factor might be rather poor and thus high load to the transformer.

author: Cerebus
author_rank: Super Contributor
timestamp: October 18, 2016, 01:01:43 pm
content: Quote from: Kleinstein on August 05, 2016, 05:25:16 pmI've found that a small RC snubber, or a small electrolytic withlotsof ESR across the output of a power supply can be very beneficial for stability. This is one of those places that low ESR may be more of a hindrance than a help.

author: David Hess
author_rank: Super Contributor
timestamp: October 18, 2016, 07:33:19 pm
content: Quote from: Cerebus on October 18, 2016, 01:01:43 pmUsing an output capacitor with super low ESR like a bare film or ceramic capacitor without a series resistor is asking for trouble in this case. I would not even bother adding a small low valued ceramic decoupling capacitor in parallel with the bulk output capacitance because external lead lengths will render it ineffective and the power supply does not require it for stability; it actually makes things worse. Notice that in the old application notes for the 7805 and 317 type of regulators, a small ceramic capacitor *might* be used at the input but never at the output. Leave the low ESR decoupling capacitors close to the load.A small RC snubber can work by itself but it is usually better to swamp the load impedance with a low value of bulk capacitance from an aluminum electrolytic or tantalum capacitor.The advantage of minimizing the output capacitance is better performance in constant current mode. Presumably you want a *high* output impedance in constant current mode and the output capacitor lowers the output impedance at AC but for low values of bulk output capacitance, this is not usually a problem in most applications. A low value of output capacitance also limits the amount of energy dumped into the load if it shorts.With a little bit of network analysis and looking at the bode plot, you can quantitatively know how the value and ESR of the output capacitance affects stability. Bulk output capacitance makes frequency compensation much easier and isolates the power supply from the load.

author: David Hess
author_rank: Super Contributor
timestamp: October 18, 2016, 07:39:12 pm
content: Quote from: T3sl4co1l on October 18, 2016, 09:10:26 amThe Siliconix MOSPOWER Applications Handbook has a great graph and description of what goes on but it has been long enough since I studied the subject that I have forgotten the details. Back when it was released, I think the threshold point where the temperature coefficient changed was above 100 volts neatly explaining why power MOSFETs were advertised as having *no* secondary breakdown.I have a couple copies of the Siliconix book in storage. I should dig them out and scan that section because this subject comes up a couple times a year.

author: David Hess
author_rank: Super Contributor
timestamp: October 18, 2016, 07:46:43 pm
content: Quote from: Kleinstein on October 18, 2016, 10:41:30 amI am always amazed when I run across commercial designs where the power transistors are placed in parallel with no emitter ballast resistance. I wonder if they match them for Vbe and/or current gain.I have had really good results matching for Vbe with the base and collector shorted at the maximum output current allowing for a minimum value of emitter ballast resistance.

author: Kleinstein
author_rank: Super Contributor
timestamp: October 18, 2016, 08:15:30 pm
content: The usual way for current sharing are emitter resistors. These resistors also help with stability as they will reduce the gain at high currents. The usual value is something like a 0.2-1 V drop at maximum permissible current. So about a .22 to .39 Ohms for many circuits with an 2N3055. One might get away with slightly smaller resistors if thermal coupling is good and VBE matching is use. Also a positive TC for the emitter resistor helps - so the could be just a longer cable or trance on the board. Things also get less critical at low voltage.One can use base resistors instead, but here the drop needs to even larger, as the current gain usually increases with temperature.The 2nd breakdown problem with MOSFETs was much smaller with old types - so the first generation had essentially no problem. From this time is the idea of MOSFETs are good for linear operation because they have no second breakdown. But with more modern types optimized for low On resistance on a small die, the problem is really severe, worse than with typical BJTs. So modern (e.g. after 2000) MOSFETs for low voltage (e.g. < 100 V) are generally not that suitable unless specially designed for linear operation. Only types for high voltage might be still acceptable for operation at low voltage. There are even quite some datasheets out there, that neglect the thermal runaway in the SOA curve and thus promising too much. So if you have a DS for modern MOSFET that does not show the onset of thermal instability / (kind of 2nd breakdown) one should have doubt in the SOA curves shown unless explicitly noted.

author: David Hess
author_rank: Super Contributor
timestamp: October 18, 2016, 08:40:50 pm
content: Quote from: Kleinstein on October 18, 2016, 08:15:30 pmMy usual rule of thumb is to have the voltage drop across the emitter ballast resistor equal the Vbe at the maximum operating current which is very conservative. Matching the Vbe voltages as I described then brings the current sharing to within a couple percent but that is not really needed with that large of a ballast resistor.In a design where the emitter ballast resistor is used as part of a Vbe based current limit protection circuit, then the voltage drop will obviously be about 0.5 volts which is still conservative.Some emitter ballast resistors like the wirewound cemented ones will fuse open in the event of overload. When my old Dynaco amplifier shorted, the emitter ballast resistors went up like fireworks or a special effect from Voyage to the Bottom of the Sea.