# How to stabilize a control loop for an opamp-based linear regulator?

I'm trying to build a digitally controlled linear bench power supply. The idea is to have a DAC that will output a low voltage (in my case it's 0-2.5V) and then scale it (let's say 0-25V for simplicity). And of course, buffer it with a big transistor.

In the first iteration I used simply a 10x gain opamp and then just used it to drive a darlington pair. This works, except it's limited by the opamp's supply. In my case I'm just using a TL072. Absolute maximum for this this is 36V, with max differential input voltage <30V. Which effectively limits my power supply's voltage to, realistically, less than 25V (since it needs -V lower than -3V to reach zero. TL072 is not rail to rail). TL072 is easy to find and I'd like to avoid the need for "fancier" high voltage opamps

Now, for the second iteration someone suggested I simply use something like the following:

In this case, the feedback is passed through R9/R3, scaling it 1/10. When the opamp has 2.5V at its inverting input, it compensates to make the noninverting input 2.5V as well. To do this, it needs to make the output 25V. This works. Until I alter the output.

If I add any sort of capacitance at the output, the whole circuit starts oscillating.

How can I compensate this? Or in any case, is this the right topology to use?

UPDATE

I have figured out a different topology, using a PNP transistor instead of NPN to supply voltage to the output darlington. Here's the schematics:

In this case I have also added current limiting to the circuit. I'll try to explain the idea. First of all, the load is simulated by R15 in the diagram. V2 is a voltage source, in my case a DAC controlled by a microcontroller. This sets the voltage reference for U1, through the noninverting input. The output of the opamp is connected via R2 to Q4 which "modulates" the base for Q3, which finally sets the voltage for the Q2/Q1 pair. This allows me to output a larger voltage than supported by the opamp. In this case, V+/V- is +/-10V while the collector voltage is 40V. Using R9/R2 I get feedback from the output, which is scaled 1/10. C1 slows down the response to keep the whole circuit from oscillating when there's a capacitive load at the output. Now when there's a capacitance at the output my circuit doesn't oscillate anymore.

Now on to the second part: a programmable current limiter. R6 is a shunt resistor, 0.1 ohms. This is the input for U2 inverting input. The noninverting input is another voltage source. In this case, 0.1 ohms provide 100mv/A. If I want to have a fixed 2A output current, I'll set the reference input to 200mV. When the noninverting input reaches the set voltage, Q5 will "rob" current from V2 (voltage setting), thus making the output voltage drop enough to keep the current at the set value. C3 slows down the circuit to make it respond smoothly instead of clipping.

The problem is, again, a capacitance at the output. This makes my circuit oscillate again.

• Could you clarify R1, R6? Also clearly marking where the load is to be attached will help a lot. Does eg. 1000R in you diagram mean 1000Ω? What about 100r? Dec 3, 2013 at 20:20
• Your schematic shows the feedback connected to the + terminal of your opamp. Feedback must go to the inverting terminal unless you want an oscillator. Dec 3, 2013 at 21:55
• @user5108_Dan, that was my first reaction too but if you look carefully, there is negative feedback since the Q4 stage is inverting. Dec 3, 2013 at 22:27
• I have updated the question with a new topology and tried to explain what's going on. @jippie: R is ohms, yes. Lowercase r is the same. LTSPICE doesn't care in this case.
– hjf
Dec 4, 2013 at 0:26

This seems to be a problem I've seen a few times on stack exchange.

Consider an op-amp with localized negative feedback - The manufacturer designs the op-amp so that under the very worst case situations it is stable. The worst case situation is unity gain - this has the biggest chance of being unstable. Anyway, each year the boundaries get pushed a bit more and op-amps improve BUT, why should TI or AD or LT design an op-amp that would be stable with more open loop gain than what the basic device provides? That would be silly (and a marketing/sales disaster) but you (the OP) have created more open-loop gain by inserting Q4 (common emitter) into the output of the op-amp.

Q4's gain will be massive - emitter is grounded therefore the output at its collector will be possibly a hundred times more amplification than what the op-amp produces. Here's what the TL072 op-amp's gain and phase margins look like: -

The red circle is the unity gain of the op-amp and it can be seen that the phase margin (the number of degrees negative feedback is from morphing to pure positive feedback i.e. becoming an oscillator) is about 75º. This is a decent margin but, if gain were increased 30x (by introducing a transistor like Q4), the unity gain point is exactly at 180º i.e. the circuit becomes an oscillator.

Solution - get rid of Q4 and use a rail-to-rail op-amp (or power the op-amp from a slightly higher supply) and restore the feedback to the inverting input. You may ask why the output Darlington-pair doesn't create the same problem - it is an emitter follower with slightly less-than-unity gain and no internal miller effects to shift the phase this way or that.

If you choose an op-amp that can deliver 30mA into the Darlington-pair input then you should be able to get up to 20A from the power supply without the need for Q4.

• thank you, this is a very good answer. unfortunately I can't seem to find an opamp that will meet these requirements. I want my power suply to be able to deliver 0-30V, which means I'll need an opamp capable of being either 30V supply, rail to rail or at least +/-20V supply non-rail to rail (for headroom). Bonus for higu current output... But i can't seem to find one that matches all that. TLE2142, CLC2058 and MC33178 seem to be viable options though.
– hjf
Dec 4, 2013 at 12:55
• @hjf - how much current are you wanting to source from the op-amp? Given that you have a 40 volt supply, adding an emitter follower to the op-amp's output only loses you 0.7V and the darlington is only going to lose possibly two volts. If you use Q4 with collector tied to 40V and emitter feeding the base of Q2 this should work. Dec 4, 2013 at 13:10
• well, i as thinking about driving the darlington directly from the opamp. but i have no problem driving a third transistor (my darlington pair is discrete. just a BD137+MJ15003, for the simple reason that i have these in my junk box). unfortunately, the HV opamps are hard to find in my country, so it will take months for them to arrive. In the mean time I'll just use a TL072 and supply with -3V and +25V. This should give me 0-22V output for now. Supplying with 0-20V gives me 3-17V at the TL072's output.
– hjf
Dec 4, 2013 at 16:49
• It should work like that - which part of the world are you in with such slow suppliers if you don't mind me asking? Dec 4, 2013 at 17:49
• I'm in Argentina. The problem is that customs need to check each and every package coming into the country and it takes anything from 30 to 90 days (if it doesn't get stolen). There's a supplier that has the TLE2142 but they ask USD 25 for each...
– hjf
Dec 4, 2013 at 18:18

Your output voltage sensing is actually the darlington current. Connect R9 to the collector of darlington pair for output voltage sense.

• That is not true, what makes you think that? Apr 19, 2020 at 10:43