Oscillation on resistive load on selfmade linear PSU - Page 1
Forum section: electronics / projects

author: Unknown
author_rank: Unknown
timestamp: September 02, 2018, 01:13:16 am
content: HiIntro:inspired by Daves µSupply Bench PSU I did my own design (please see attached PDF).Attached you'll also find some pictures which show the current PCB which I made (well, JLCPCB did it for me) and how it is basically working quite well. I tested it with a load of 1A using my aliexpress constant current load and then I did further testing using power resistors (20 Ohm, 5W in particular). There is a little bit of noise coming from the Teensy 3.5 which is the controller of the PSU but I guess thats fine, at least for now.The PSU does 0-12V and 0-2A (I guess it'll do more than 2A easily, especially if forced airflow cools the huge heatsink).Problem:Here comes the "but"(t):Using the 20 Ohm 5W resistor I discovered that when I turn the voltage up and when I reach about 3V, oscillation of about 40mV Pk-Pk and 83,33kHz occurs on the output. If I increase the voltage, the amplitude of the oscillation rises up to about 80mV Pk-Pk at 10V output voltage. The frequency decreases a bit to like 62,5kHz. I have attached a screenshot where the oscillation is visible.Somehow it seems that the voltage control circuit is a bit unstable. Also I kind of think that it may be related to the output capacitor (C15) because if I change its value, it makes the biggest difference of everything I tried until now.This is what I did/observed until now:- If I temporarily hold an additional 10nf or 100nf cap to C4, the oscillation disappears immediately and doesn't even come back after I remove the cap.- If I afterwards change the voltage again, even by only a couple of millivolts, the oscillation comes back instantaneously.- I soldered an additional 10nF on top of C4, but that didn't change much, seems it made it even worse so I removed it again.- Above 10V the oscillation usually disappears and comes only back if I decrease the voltage to about 10V in a certain speed. Generally between 9V and 12V and whendecreasingthe voltage from 12V or 10V down to zero, itdepends on the speedin which I change the voltage, whether the oscillation starts or not. When I'mincreasingthe voltage, itstarts almost every time(at least between 3V and 9V).- Oscillation never has more than about 120mV Pk-Pk.- If the PSU goes to constant current mode, the oscillation disappears. To make it clear: if the PSU is in constant current mode, no oscillations appear. ever. If I leave constant current mode, no oscillation starts, until I fiddle around with the voltage.- I tried changing R8 (22k and 82k) but that didn't change much or anything either (I think 22k made it even worse)- The output connector is completely separated through the relais. If oscillation occurs and I turn the relais of and on immediately (or after waiting, doesn't matter), the oscillation stops until I change the voltage (again, as always).Any idea where to start or what to try or measure?I used LM358 opamps in this design before which worked at least for the LTSpice simulation and on the breadboard as far as I was able to test it there. I decided to change them to OPA2197 because they seem to have better specs in every way and I wanted this to be kind of a precision supply (just for fun).Basic description of the design for those whom it may help:- It is an analog supply which is designed for input voltage of 18-24V and output of 0-12V and 0-2A.- There is a dual darlington configuration with load sharing resistors and little output capacitance.- Voltage regulation is done by a DAC which is controlled by a Teensy 3.5. DAC sends voltage to Opamp which has a gain of 3, opamp output goes to a PNP transistor (T4) which is excess current protection and then goes to the bases of the two Darlingtons.- Current measurement and CC mode is done by a MAX4080F current measurement amplifier (gain of 5) which is in the feedback loop through D1. If current is higher than the one set by the DAC to the non inverting input of the current controlling opamp, the opamp pulls its output to ground, which in turn pulls IC2A's output to ground -> boom, CC mode active. this works in a perfectly linear way, so you can adjust output current in mA steps.- The ADC channels are reading whether the PSU is in CC mode (OVRCRNT_DET), the output voltage before and after the relais and the current measurement from the MAX4080F to make cool things with those readings in software- OVRCRNT_DET is buffered through one of the opamps because of the voltage divider which would goof up the current control circuit if connected without buffering.- There is an NTC which monitors the Darlington's heatsink temperature- There is a fan connector- There is an LED connector for relais status (goofed the pot pins there)- the TXB0104 level shifters are there because I have a 4.096V voltage reference which in turn means that the DAC and ADC supply voltages must not be below 4.096V. but then they don't understand the Teensy 3.5's logic signals which go only up to 3.3V, even if it is 5V input tolerant on all pins. So because this is SPI (for the display and the DAC and ADC), i had to choose high speed level shifters. The TXB0104's work like a charm there.- LM334 is there on various L78xx for minimum load to ensure proper regulation, as well as on the Darlingtons.- The schematic misses two sheets, but there are only the L78xx'es + the Teensy, nothing interesting so I guess you won't need them.Thanks!

author: Unknown
author_rank: Unknown
timestamp: September 02, 2018, 01:17:00 am
content: more pics

author: JS
author_rank: Frequent Contributor
timestamp: September 02, 2018, 01:48:52 am
content: Schematic?JS

author: Unknown
author_rank: Unknown
timestamp: September 02, 2018, 01:54:41 am
content: Quote from: JS on September 02, 2018, 01:48:52 amfirst post, first attachment (pdf)

author: JS
author_rank: Frequent Contributor
timestamp: September 02, 2018, 02:18:51 am
content: Quote from: nemail on September 02, 2018, 01:54:41 amSorry, where do you add the cap?JS

author: Circlotron
author_rank: Super Contributor
timestamp: September 02, 2018, 02:21:16 am
content: My first guess is the loop gain of IC2A and T4 together must be off the planet.Maybe a bit of series RC between IC2A pins 1&2 to damp things down a bit?Edit:Quote from: nemail on September 02, 2018, 01:13:16 amLM358 is probably a slower opamp. Try the RC as mentioned.

author: JS
author_rank: Frequent Contributor
timestamp: September 02, 2018, 02:27:22 am
content: Hey, I don't see any path for the BD139 bases to get current from, if it's working there's probably one or the little green dudes are doing something to keep it sort of working.Adding some compensation between a TIP3055 and IC2A pin 2 could help... maybe 1nF (and some resistance if you want to keep it fast)JS

author: Circlotron
author_rank: Super Contributor
timestamp: September 02, 2018, 02:38:45 am
content: A pulldown resistor from T4 collector to ground might help too. A modest amount of current sinking capability here may help to keep the series pass transistors and therefore the entire loop under control.

author: TimNJ
author_rank: Super Contributor
timestamp: September 02, 2018, 03:22:23 am
content: How about a cap across the R8 + C4 branch? Maybe something between 220pF and 1nF or so? I think that should give you some reduction in gain at the higher frequencies.

author: JS
author_rank: Frequent Contributor
timestamp: September 02, 2018, 04:57:51 am
content: Quote from: TimNJ on September 02, 2018, 03:22:23 amThat's pretty much the same function than the one I suggested, just two base emitter junctions after, but before the current sharing resistors where things get messier. I think that's the best place, could be as you say or at a TIP3055 base. Not a huge difference in a first approximation. IC voltage regulators take their feedback path from the emitter of the pass element but not right at the output, more at a middle point of the emitter itself, which is like having a small emitter resistor after, here we have it so we can cheat the same way they do.JS

author: David Hess
author_rank: Super Contributor
timestamp: September 02, 2018, 05:50:17 am
content: Did you really have to use DRM on the PDF to prevent copying the part numbers to look them up?So what kind of capacitor is C15? I'm going to ask you instead of wasting further time trying to look it up.T4 causes uncontrolled excess loop gain in operational amplifier IC2A.

author: TimNJ
author_rank: Super Contributor
timestamp: September 02, 2018, 05:58:37 am
content: Quote from: JS on September 02, 2018, 04:57:51 amAh I was unable to put that connection together. You seem to know better than I do anyway.Quote from: David Hess on September 02, 2018, 05:50:17 amDRM? I copied the number just fine. Anyway that's a Panasonic FR, Low-Z electrolytic.

author: Unknown
author_rank: Unknown
timestamp: September 02, 2018, 12:35:40 pm
content: Quote from: JS on September 02, 2018, 02:18:51 amsorry, what cap do you mean?QuoteWouldn't that change the gain of the opamp?QuoteThey get current from IC2A pin 1 through T4...? T4 is excess current protection...compensation: you mean within the feedback loop, between Darlington emitter and R3, 1nF to ground? Resistance in series before the cap? But as mentioned before: wouldn't resistance change the gain of the loop?Quotelike 10k? or more? Could you please explain why/what is happening there?Quote from: JS on September 02, 2018, 04:57:51 amwait - what? cap across R8+C4 shouldn't change the gain or am I missing something? What do you mean "before the current sharing resistors", I thought you meant to place the 1nF after them, before R3?or put 10nF to the TIP3055s bases?I'm confused :-DQuote from: David Hess on September 02, 2018, 05:50:17 amI did not use any DRM on purpose, just used "print to pdf" function from Eagle. Sorry for that.The cap is a EEU-FR1H101 Panasonic Low ESR.Why does T4 cause uncontrolled excess loop gain? Everythingseemsto work fine, except of the oscillation (which even disappears when I turn the relais off and on). wouldn't uncontrolled excess loop gain make things not work at all?Thanks for all your inputs, still trying to figure out what to try next :-)edit: OK i added 22pF directly between pin 1 and two of IC2A and that seems to have killed all the oscillations, at the moment the output is clean as a whistle :-) Any idea on how to test it and maybe make it oscillate again?adding the cap was fun, see the attached photo :-D the transistors collector pin is properly soldered on the bottom side, no worries. I didn't want to fiddle around on the top side as I was afraid the cap would fall off again.

author: TimNJ
author_rank: Super Contributor
timestamp: September 02, 2018, 02:03:24 pm
content: Quote from: nemail on September 02, 2018, 12:35:40 pmBriefly, remember that loop gain is not a single value; For 99% of power supply compensation networks, loop gain varies with frequency. Combinations of capacitors and resistors creates poles and zeroes on a bode plot. If we wanted to reduce the gain at higher frequencies, we can put a cap across R8+C4.

author: Twoflower
author_rank: Frequent Contributor
timestamp: September 02, 2018, 02:11:38 pm
content: Looking at the solder quality I wouldn't wonder if the problem is related to that. For example C4 looks badly soldered. Especially the upper pin in your last picture.

author: David Hess
author_rank: Super Contributor
timestamp: September 02, 2018, 02:13:07 pm
content: Quote from: TimNJ on September 02, 2018, 05:58:37 amAh, that was my mistake. Somehow I got my PDF reader into a mode where I could not copy the part numbers to the clipboard and it appeared to be protected.That capacitor should be fine. If a "zero" ESR capacitor was used like a polymer electrolytic or film capacitor, it could cause problems with frequency compensation.Transistor T4 is really screwing things up though because it adds voltage gain within the operational amplifier's feedback loop. The added voltage gain also varies with collector current which just makes things worse. With a resistive load as the output voltage is increased, the collector current rises lowering the emitter resistance increasing the transconductance raising the voltage gain until the voltage feedback loop oscillates.The best solution is to get rid of T4 or replace it with a more suitable circuit but you could also try adding resistance between the operational amplifier and emitter to lower and control the transconductance. Then the frequency compensation should be taken directly from the output of the operational amplifier instead of the collector of the transistor.

author: JS
author_rank: Frequent Contributor
timestamp: September 02, 2018, 02:25:07 pm
content: To test for stability the best way is with a injection transformer, plenty of talks about it after the omnicron teardown. You don't need such fancy transformer, there are many CM chokes that work for some applications and ranges.The other way is to set a step in the output current. Best way is to have some load (a resistor probably) and a mosfet switching (fast and clean) a second load in and out (another resistor). That way you will see the overshoot in current as you switch the mosfet on, in voltage as you switch it off and any ringing both directions that might expose an issue with stability, or at least close to one. You can get the closed loop response with that. The loop response will change with conditions (current, voltage and load impedance) so you migt want to check adding different capacitance, sometimes the intermediate values are problematic so check every decade or so, mostly bigger or close to your output cap.Inductive loads aren't so common for lab PSU but you migt have one some day, they tend to makes things more stable unless crazy happens, like huge inductance pulling energy into the PSU in some transient and for that you not only need stability but good protection.Low ESR cap at the output is usually not a good idea, adding a 0.1 to 0.47 resistor in series with it can improve stability and muffle some jiggles. Some have a small cap, about 100nF directly across the output and a bigger, few uF with a series resistor. Here again, a zero appears and it helps preventing oscillations if properly placed.JS

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 02, 2018, 03:21:34 pm
content: Schematic looks fine. It's a bit here-or-there with odd/inconsistent design choices. That implies a level of experience of, say, advanced amateur, but not seasoned professional. Which, mind, is still better than a sizable fraction of professional engineers* doing this sort of thing...*Not P.E. as such, but in the sense that they get paid for it, and "engineer" is in their job title.The only thing that stands out is that one transistor at the opamp output. What the heck is that for?By the way, a system that is stable at rest, but unstable in motion: that's a classic chaotic behavior. You have a stable limit cycle: there is a region (in the "phase space" of the system) where the system will tend towards stability (no motion), but outside of that area, an instability which tends to push it into a circular (oscillating) trajectory.A physically useful description of "phase space" might be, the voltage and current in an oscillating (LC) circuit. A more abstract case would be a single parameter and its phase shift (Hilbert transform), hence(?) "phase space".Whatever the case, anything that oscillates, always does so with at least two components. The simplest possible case is equating two derivatives together (in a differential equation), which has the solutions of sine and cosine. Derivatives, as in, the change in one causes the change in the other, and vice versa; and they are always changing, perfectly in step.You might only have access to one component -- you can measure voltage easily enough on the oscilloscope -- but you need some kind of sense circuit or probe to measure current, say. Or the complementary signal might be trapped inside an IC or something. As long as you can see one, you can infer the other, and just know that, when you see a squiggle on the 'scope, you're actually seeing a sideways view of a corkscrew path through time (the phase plot is the along-axis projection).Another distinguishing feature of chaotic systems, is having some control parameter (in this case, load resistance), which as it progresses, the size and shape of the stability regions change, and so a stable condition might become unstable and get stuck oscillating, and keep oscillating even as that parameter is dialed back down. But that oscillation can be 'quenched' by damping it, returning the system to its stable state. This bistability (or N-stable, more generally) is another classic sign of chaotic behavior.Now, in linear systems -- control theory -- there is no such thing as a stable limit cycle. A system is only ever stable, or not. And it doesn't vary with independent parameters like DC voltage or current. So even if you know nothing about chaos, you can tell that your system is nonlinear, and it was supposed to be linear. Find that source of nonlinearity, remove it, and try adjusting compensation values again.Tim

author: Kleinstein
author_rank: Super Contributor
timestamp: September 02, 2018, 07:07:46 pm
content: Except for the extra transisor T4, the voltage regulation loop looks reasonable. It is especially odd with the base to GND - so nothing should happen at all. The missing positive current source / resistor to deliver the base current is another point. Without it nothing should happen.However the comment on the low Z capacitor applies. It usually helps to have at least some capacitance with larger ESR, like a normal type electrolytic and than a small ceramic or film typ in addition.The current regulation might be prone to oscillation though: high side / collector side current sensing tends to be slow and not having a low impedance power source for the darlingtons is also not very good. A local capacitor for the power input might be a good ideal.#For the external loads, it is usually a low Z capacitive load that causes the most trouble. A resistive load should be relatively easy, though the low ESR output cap could already be bad enough.It might be a good idea to do a simulation of such a circuit with something like LTspice.

author: JS
author_rank: Frequent Contributor
timestamp: September 02, 2018, 08:18:14 pm
content: I run a ton of sims in that kind of circuits, the two suggestions I previously made makes the thing reasonable stable. For low voltages where the opamp operates on its own it's pretty straight forward, once you need a discrrete part to drive the power transistors it gets trickier, as the opamp is no longer properly internally compensated. Using an opamp with external compensation might help, as you can tweak that parameter as well.JS

author: David Hess
author_rank: Super Contributor
timestamp: September 02, 2018, 08:19:34 pm
content: I agree about the current sense amplifier. The MAX4080 is pretty slow so special attention needs to be paid to frequency compensation of the current control loop. This is especially the case when a fast operational amplifier like the OPA2197 is used although the slow TIP3055s may be helping some. The first time I designed a somewhat similar power supply, I also included a phase lead network around R3 for outstanding voltage mode performance but the added phase lag from the current sensing amplifier required so much compensation around the current control error amplifier that the current limit performance was abysmal.Since then, my high side current sense circuits when used are more like video amplifiers if they are inside the control loop. Better is to move the current control error amplifier itself to the high side so no separate current sense amplifier is required and this is what HP and Tektronix commonly did in their power supplies.There is a tricky way to compensate for a low ESR output capacitance and load. Move the current shunt to the output side of the power transistor and take AC feedback before the current shunt and DC feedback after it across the output capacitance. Now for stability purposes, the current shunt is in series with the output capacitor raising the minimum ESR.The uncontrolled and poorly defined voltage gain of T4 inside the voltage control loop is still the big problem though.

author: Unknown
author_rank: Unknown
timestamp: September 02, 2018, 10:10:37 pm
content: Quote from: TimNJ on September 02, 2018, 02:03:24 pmOh, ok - I still have a lot to learn :-)Quote from: David Hess on September 02, 2018, 02:13:07 pmSomeone who helped me getting the CC mode non-oscillating in another electronics board recommended to put that T4 transistor in. Basically all I know is that it is excess current protection (as mentioned earlier). As there weren't any issues in the simulation, I did keep it.What would be a suitable replacement circuit?Resistance between Opamp and Emitter? What Emitter? Darlington or T4 (I thought I should rather get rid of T4)?You mean better take the compensation from the output of the opamp rather than from theemitterof the transistor?Quote from: JS on September 02, 2018, 02:25:07 pmDon't know what a injection transformer or a CM choke is, will have to look that up.Quote from: JS on September 02, 2018, 02:25:07 pmThat sounds like I can do that quite easily. will have to wire up some MOSFET/load resistor action, though.Quote from: JS on September 02, 2018, 02:25:07 pmHow'd I protect the PSU from inductive loads pulling energy into it? I have a reverse diode from the darlingtons emitter to its collector but I guess if voltage rises above about 70V, the Darlington will be gonsky...So I'd rather buy a non low ESR cap for the output or would the resistor in series still be necessary? Wait - why in series, not parallel to the cap? Parallel would be a bleeder resistor which is what we want, don't we?! (confused I am, again).Quote from: T3sl4co1l on September 02, 2018, 03:21:34 pmThanks :-) If I had to describe my expertise by myself, I'd say: I know more that the common Arduino LED blinking guy, but I didn't learn ANY of this in school and also didn't finish school so veeeery much of the math skills are missing (many formulas in datasheets I can't even read correctly). So yes, amateur/advanced amateur maybe describes it best :-)Quote from: T3sl4co1l on September 02, 2018, 03:21:34 pmI'm an IT guy, I was in the field for many years and now in an internal IT department of a big company. I know what you mean, I've stumbled across many, many "professionals" where I had excessive facepalming parties afterwards.Quote from: T3sl4co1l on September 02, 2018, 03:21:34 pmaccording to the guy who told me to put it there, excess peak current protection. I'll try to translate from german:"The solution with T4 has the advantage, that even with high unlimited currents the voltage drop stays low and you can get much closer to Ub. That means a higher stabilized output voltage at max. output current. Besides, I do the peak current limitation with this. For that, one has to check R1, having a short at the output and with disconnected D1."I only kind of understand what he was trying to do, maybe you get more of an idea of it.Quote from: T3sl4co1l on September 02, 2018, 03:21:34 pmSounds reasonable and highly intelligent, way beyond my knowledge :-D SO how can I find that peace of *** which makes my system nonlinear? :-)Quote from: Kleinstein on September 02, 2018, 07:07:46 pmA little bit above I wrote about the purpose of T4 according to the guy who told me to put it there like this.. Maybe you'll understand better than me what it is doing there and how I could replace it with something more suitable...Regarding the cap I also already wrote in this comment (replace with non low esr or put a resistor in?)The current regulation seems to work very good, currently - no oscillations at all until now. :-) There are 20.000µF near the Darlingtons Collector, those caps are on another sheet...Simulation is attached, I went quite to town with LTSpice before I built this thing up...Quote from: David Hess on September 02, 2018, 08:19:34 pmAt least for now, CC seems to work fine. Didn't do excessive testing yet, though...Quote from: David Hess on September 02, 2018, 08:19:34 pmNo idea how I could accomplish this :-)Quote from: David Hess on September 02, 2018, 08:19:34 pmNo idea how to do this, either, unfortunately... Sounds interesting, though.Quote from: David Hess on September 02, 2018, 08:19:34 pmOk, ok, I believe you now :-DThank you all for all your time, effort and input, I really appreciate that!edit: LTSpice Simulation attached, however some things have been changed since the simulation... you'll need all the attached files within the same directory as the asc file. you'll need to remove .txt file ending and place a dot before lib or asy.

author: bloguetronica
author_rank: Frequent Contributor
timestamp: September 02, 2018, 10:35:51 pm
content: Hi,Had you tried holding a 100nF in parallel with the electrolytic at C15, to see how the circuit behaves? That oscillation at the output seems to be indicative of insufficient dampening. Probably the 100uF electrolytic alone won't suppress that behavior when the oscillation gets starting, because of its ESR. My guess is that the output is stable when you turn your supply on, but any change of load will make it oscillate. Once you put the 100nF it probably will kill the oscillation.I wouldn't recommend reducing the gain of the feedback network at the higher frequencies, at least just yet. That will degrade the noise rejection on both the load and the line side. That means your PSU will be less able to cope with sudden transitions of line voltage or sudden transitions on the load current. That is undesirable on a PSU.Kind regards, Samuel Lourenço

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 02, 2018, 10:54:51 pm
content: Ah... then I guess that transistor is intended to be in hFE-limited mode. A big no-no, as hFE is all over the place.The impedance of that transistor depends on signal level, which isn't something you want in your control loop.The Darlington pair also depends on bias current, for which it may be desirable to preload them (put on a bigger bleeder resistor / downprogrammer?), or to change the bias resistor values around them.Tim

author: Circlotron
author_rank: Super Contributor
timestamp: September 03, 2018, 12:15:55 am
content: Why not just ditch T4 completely and have the current limit op amp pull down on the reference input to the voltage op amp? Series resistor from the DAC to the voltage op amp then a diode from there to the current opamp.

author: David Hess
author_rank: Super Contributor
timestamp: September 03, 2018, 03:16:22 am
content: Quote from: nemail on September 02, 2018, 10:10:37 pmI am not sure why this would be needed. The operational amplifier has its own current limiting to protect itself. There are some very clever ways to add extra current limiting but other topologies like using a separate current source to drive the transistors so that either control amplifier can pull the output down avoids the current limiting issue completelyQuoteJust a resistor would work so that the current limit amplifier can override the voltage control amplifier. The old design from National Semiconductor shown below is very similar to your design and does it this way. National cheated a little though because the LM395 power transistor requires only a tiny amount of base drive.Notice though that the LED clamps the voltage across the 10K resistor so drive to the LM395 output transistors is limited but the short circuit current of the LM308 operational amplifier limits the LED current.QuoteThe resistor goes between the operational amplifier and emitter of T4. And then take the compensation directly from the output of the operational amplifier.The base of T4 would then normally be connected to a low impedance point instead of through a 1 megohm resistance. The idea here is that T4 converts the voltage output from the operational amplifier to a current output to drive the pass transistor. The maximum difference in voltage between the operational amplifier output and the emitter of T4 which is fixed by the base voltage of T4 determines the maximum output current. The relatively large resistance between the output of the operational amplifier and the emitter of T4 also swamps the variable emitter resistance of T4 so transconductance is fixed. Voltage gain from just T4 then depends on the collector load resistance.I have designed power supplies that work this way when I needed T4 to act as a high voltage level shifter allowing a low voltage operational amplifier to control a higher voltage. It is not necessarily the best way but it can work.QuoteThe reverse diode should protect it by preventing the output voltage from rising above the input voltage. If this is not enough, then an SCR crowbar circuit might be added.QuoteI think the capacitor shown is fine but perhaps excessive. A polymer electrolytic would have a much lower ESR and could be a problem.QuoteThe example power supply circuit below works this way. The LM101A is the current control amplifier but it works directly on the high side and the LM113 reference and R3 create a reference voltage referred to the high side to set the current limit. Note that the LM101A operational amplifier was selected here because its common mode input voltage range includes the positive supply making it particularly useful in high side applications.QuoteI do not think you need to worry about it with your current capacitor selection and it would be more straightforward to use a higher ESR capacitor if necessary anyway.The design below uses just a 0.22 microfarad film or ceramic capacitor in series with 10 ohms giving it much faster constant current limiting than would normally be the case. I am just pointing this out however as an example of a resistance placed in series with an output capacitor to provide stability.

author: David Hess
author_rank: Super Contributor
timestamp: September 03, 2018, 03:18:12 am
content: Quote from: Circlotron on September 03, 2018, 12:15:55 amThat works but it means adding *another* amplifier into the current control loop further complicating frequency compensation. It does have the advantage of preventing the voltage control amplifier from saturating but if necessary there are other ways to prevent that.

author: JS
author_rank: Frequent Contributor
timestamp: September 03, 2018, 03:55:23 am
content: ESR is not controlled, you can't choose the position for the zero but you could be lucky. Having the series resistor in the layout makes it easier to tweak a non low esr cap.The back diode is quite enough, you wouldn't expect more than what you delivered to it...Try the changing loads, investigate injection transformer and you will find a lot in stabilizing power supplies.JS

author: David Hess
author_rank: Super Contributor
timestamp: September 03, 2018, 05:10:46 am
content: I usually just AC couple my function generators square wave output into the reference or feedback loop and watch the transient response at different output voltages and currents. Then trim the worst case frequency compensation for good dampening.Current transformers make pretty good injection transformers if you want to go that route without spending a lot of money.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 03, 2018, 05:59:56 am
content: The transistor T4 seems to work as a kind of reduced current limit for the OP. One idea to replace T4 would be to use a resistor (e.g. 1 K) instead.A problem with T4 (or when using a resistor instead) could be that the local feedback around the voltage regulating OP could be too slow. So it might need an extra capacitor as direct feedback around the OP (out to inverting in).For just 18 V input voltage (e.g. a laptop supply ?), this is still within the range the OPs can drive directly. Its above 30 V where extra gain might be needed.

author: JS
author_rank: Frequent Contributor
timestamp: September 03, 2018, 06:16:21 am
content: Quote from: David Hess on September 03, 2018, 05:10:46 amSimulations are pretty good for evaluating stability and choosing compensation and you can even get some plots for open loop reaponse, pretty hard to get in real life. I think this project missed that, even if you need to tweak a few parameters in the real thing, the topology should allow to do so. At sims I found many of the details I've mentioned, like series resistance of the output cap, hf feedback at the transistors, a resistor and dc feedback then, etc.Anyway, I think he got it stable like 20 posts ago (post 13?) so from that on it's just theory playground.Nice things about dc supplies is that you can keep making them slower till they are stable (or look stable in humanity time scales)JS

author: Unknown
author_rank: Unknown
timestamp: September 04, 2018, 08:53:26 pm
content: Hithanks for all of your input! I'll have to chew on that for a while :-)Regarding T4 and using a resistor instead: I had that in my design and the simulation showed that there were flowing 27A (!) through the darlington until the current limiting kicked in... The 27A would only be delivered through the input cap of course, as the transformator which I'm using doesn't have that amount of power.I've added some footprints for MLCCs and for testpads to be able to test some things out in the next "revision" of this board.

author: David Hess
author_rank: Super Contributor
timestamp: September 04, 2018, 10:21:03 pm
content: Quote from: JS on September 03, 2018, 06:16:21 amThere are two reasons I tend to do the simulation second:1. Transistors usually have a wide variation and some like a power output transistor have a significant effect on the frequency compensation. So I will do the simulation second just to derive the characteristics of the output transistor once I know the other compensation values. This goes double if I use an integrated regulator for the power pass element or driver.2. It is just faster. I might not need the simulation and if I do and I do it first, then I will probably end up doing it third as well.QuoteI think this reflects experience. My early power supply designs were complex making them difficult to compensate but as I learned, I made them simpler yet with higher performance.QuoteBut with a constant current and constant voltage design, slow response also means slow recovery between modes.

author: David Hess
author_rank: Super Contributor
timestamp: September 04, 2018, 10:23:27 pm
content: Quote from: nemail on September 04, 2018, 08:53:26 pmThat is called "beta" current limiting and it is something I would never rely on with a Darlington configuration because the beta (current gain) can vary so greatly.

author: Unknown
author_rank: Unknown
timestamp: September 08, 2018, 10:55:07 pm
content: Quote from: David Hess on September 04, 2018, 10:21:03 pmThis is my first "real" PSU design, if we don't count the LM317 datasheet circuit which I built up when I was 12 or so. It was the simplest I could find if I wanted it to be µC controlled. At least it was the only design I kind of understood in terms of how the building blocks work, not in terms of detailled analog things happening inside and why they are happening exactly (transistor hFE, 'n stuff, speed of the regulation circuit, why do oscillations happen and when and what to do against it).I have read some opinions on low side current measurement being better (no idea how to do that), but I've also read opinions about high side being better.If anybody got some spare time to show me or make a circuit which is tested or at least thorougly planned which is simpler but still controllable and monitorable via a µC, I'd be very grateful :-) However, I guess that'll be kind of "consulting" and a lot of work which noone would do for free.Unfortunately theoretical things are very hard for me to learn and understand. If I have a working circuit in front of me, I start learning from that and eventually will figure everything out, why something does when, and so on.Even if it takes me hours, days, weeks or even months, I'm kind of dogged when it comes to understanding a working circuit :-)However, now something different:If you take a look at the attachment, you'll see the current monitoring trace which goes to the inverting input of the current limiting opamp and as well to the ADC Channel 0 (hence the net name "ADC_CH0").Issue is, that I get wrong readings, they are like 40% off (lower) over the whole range. The current limiting circuit works bang on, however (like, really bang on, like 1mA precision or so).Should I buffer that trace through another opamp voltage follower, is it R7, R10 or even R9 which are making trouble here?Currently, I just correct that in software (add +40%) but that's kind of dirty and not very precise...ADC is MCP3204...Thanks!

author: JS
author_rank: Frequent Contributor
timestamp: September 08, 2018, 11:48:06 pm
content: I see you are willing tontest things I wasn't, I got a great deal on an old triple lab power supply so the project went down the list quite a few steps. As it's not high power or PC controlled I still hold an interest for the one I was up to... So I might be able to send some docs on it and help with the theory in that if you are willing to build the prototypes and retrive test results.A supply like this will be greatly benefited from a pre regulator, for low noise PSMPS is out of the question but a controlled rectifier could be a nice option. Using mosfets to control the switching speeds, it won't be as efficent but much more than just burning the excess voltage.There are a few designs for this here in the forum but I'm yet to include them in ky design, anyway, not needed for initial tests.Now I'm on the phone waiting for my pizza to come out of the oven but later I migt ve able to send you some info.JS

author: JS
author_rank: Frequent Contributor
timestamp: September 09, 2018, 02:24:27 am
content: Hey, here is a design that looks promising on the simulator and very simple indeed, I swapped the power transistors I was using for yours to look if it would keep doing it's job and looks like it does. Haven't run a full simulation, like PSRR, a very wide variety in loads (up to 10000uF with 0.1Ω in series seems fine) Some resistance in series is added in the simulation, in real life that would be mostly the wiring from the PSU to the load with it's contact resistances and all, 0.1Ω seemed like a reasonable minimum value.It doesn't really need capacitance on the output but some would be nice, a small electrolytic (not low ESR) with a few µF should do the job. Also, a minimum load should be installed, from output to -5V would be preferably to get down to 0V if desired, otherwise the negative rail might not be needed.35V is abusing the LM358, in your 12V design shouldn't be anywhere close to that, that's why low voltage supplies are much easier, once you go up to 30V choosing the opamps becomes trickier or you need to do a different topology where stability could become a problem.Here you can find the pre regulator I was talking about, for 12V you are likely to get away without it, my dual 25V 1A supply has passive cooling and the aluminum chunk in the back just gets warm in reasonable usage, haven't left it for long with shorted outputs but I just got it so more extensive testing will come. If you want to scale up your supply, in voltage and current using a pre regulator like this could allow you to keep a reasonable voltage across the darlington so you don't need to burn as much power in heat, but just regulating as needed. As you will have 100ms between cap charges going to a higher voltage could have some delay so not follow the sharp edge the control system would allow but meh, it can keep cool and quiet, with low noise in any output condition, seems fine to me.https://www.eevblog.com/forum/projects/very-low-noise-preregulator-for-benchtop-power-supply/msg626382/#msg626382Also, to improve the dropout, you could run the opamps and the BD139 from a higher rail, say for your supply you use 15V for the TIP3055 and 18V for the BD139 and opamps you will be able to keep much better PSRR and the output voltage could go pretty close to the rail, 15V with 1vpp ripple (filter better but just in case) you can easily get up to 13V without much trouble. If you don't have the 18V rail you could struggle to keep at 12V with a 15V rail, specially with high currents as ripple and drive currents get higher.I have a ton of other designs as I was trying to get something for my lab, still am, but this looks the cleanest and seems to work fine in simulation. If you test it in real life and find similar results I will be building it myself.JS

author: Kleinstein
author_rank: Super Contributor
timestamp: September 09, 2018, 09:52:17 am
content: That last circuit from JE has at least 2 problems:1) the current limiting would need very accurate resistors R7/8/9/10 and still rely on the CMRR of the OP.2) the current limiting would not work all the way down to 0 V (e.g. a short). Due to R6 the voltage at the output stage would not go down much below about 1.2-1.5 V. It maybe just acceptable without R6 and using a schottky diode for D1.Current sensing on the positive output side is a little tricky, but can work in a kind of floating type. Tektroniks uses this in some of there supplies. Usually this would need a negative auxiliary supply. In the simple case just the set signal is send to the output level and the OP is still with normal supply. However this still leaves the measurement.Current sensing on the low side has some advantages, but can make µC control a little more tricky, but it is still possible. There are quite a few cheap Chinese kits based on this - they have the weak points, but could be useful at lower power. There are a few threads about fixing there weak points - after that they can be reasonable.

author: JS
author_rank: Frequent Contributor
timestamp: September 10, 2018, 08:39:24 am
content: Quote from: Kleinstein on September 09, 2018, 09:52:17 amI understand the problem of the CMRR, that's always tricky and need selecting and possibly trimming. I don't understand why it wouldn't get down to zero if the opamp is running on a negative rail.One concept I had was not using special components, as they are hard to get in some places (like where I am) and that's why I'm avoiding the high side current sensing ICs. I might try a different approach or look in the other designs I've made and look for this kind of traps. I haven't build any of this, and as now I don't really need one in a hurry I'm not going to get to it soon. The low side current sensing makes sense, the other thing that I think it makes sense for low power applications is to use separate power devices for voltage and current (as the dual LM317 example) as it's pretty easy to make them stable and fast reacting, but at higher power it starts to be expensive, as the power devices define a good part of the BOM cost.JS

author: David Hess
author_rank: Super Contributor
timestamp: September 10, 2018, 07:46:54 pm
content: Quote from: nemail on September 08, 2018, 10:55:07 pmThis is usually an application issue. High side current sensing is required for dual supplies and where common and ground must be at the same potential. Low side current sensing is more straightforward to implement because it shares common with the low side voltage reference.

author: exe
author_rank: Unknown
timestamp: September 12, 2018, 03:43:08 pm
content: Can the electronic load you use cause problems? I had such problem in the past.