Op amp + BJT unity gain buffer = oscillation - Page 1
Forum section: electronics / projects

author: tree
author_rank: Regular Contributor
timestamp: May 04, 2014, 04:12:17 pm
content: I remember reading somewhere that if a BJT is used as a buffer with the help of an op amp in a unity gain configuration (i.e. voltage follower) then it's very likely to sustain oscillations due the BJT. Unfortunately I can't recall the source, so if someone can explain why that occurs and/or point me to a source, I'd appreciate it.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 04, 2014, 04:32:47 pm
content: Hmm, unlikely, unless the op-amp cannot tolerate the capacitive load (roughly Ccbo.. how big a transistor are we talking?). The transistor can also oscillate (in the VHF range), typically due to capacitive load.Normal rules still apply, like total capacitive load and all. In this case, maximum capacitance goes up by about hFE times.If in doubt, never hurts to add a series resistor to the base and to -in, and C or R+C from op-amp output to -in.Note also that, although the op-amp can pull down, the transistor cannot, which can lead to B-E breakdown, excessive overshoot delay and other annoying nonlinearities. A diode from E-B, or a complementary follower (PNP), help with this (in case of the follower, use a B-E resistor so the op-amp has control at small signal levels as well).Tim

author: tree
author_rank: Regular Contributor
timestamp: May 04, 2014, 04:45:47 pm
content: It's a small signal transistor (2222, 3904, etc). I designed a 50W linear power supply and use discrete bipolar transistor's (with an op amp of course) for voltage gain and MOSFET for current gain. The problem was that it oscillated unless I put a 0.1uF cap from emitter to ground. I had already added decoupling resistors as you suggested. The missing piece was the emitter bypass capacitor you see for the 2N5210.

author: LvW
author_rank: Frequent Contributor
timestamp: May 05, 2014, 09:28:27 am
content: Hi Tree - it would be interesting to know at which frequency oscillation was observed.It is a well known fact that (a) unity gain feedback is the most critical opamp application (as far as stability is concerned) and (b) this applies to transistors in common-collector configuration as well. That means: You have two critical cases connected in a common feedback loop. Hence, it is no surprise that such a circuit tends toward instability. In addition, we have - as mentioned in an earlier reply - a capacitive loading of the opamp which worsens the situation.For closer evaluation/explanation of the effect you can check how much phase shift you can expext for the opamp as well as the BJT at the observed oscillation frequency.

author: Zero999
author_rank: Super Contributor
timestamp: May 05, 2014, 10:35:29 am
content: Yes, it's no surprise it's oscillating.The transistors in the feedback loop are not connected as unity gain buffers but as common emitter amplifiers, which have a high gain. The op-amp and transistors also introduce a phase shift and if it's 180oC at a frequency where the gain is above 1, the negative feedback will become positive and it will oscillate.A compensation network is needed to avoid oscillation by either by reducing the gain to below 1, at the frequency where a phase shift of 180oC or changing the phase shift so this can't occur.

author: tree
author_rank: Regular Contributor
timestamp: May 05, 2014, 01:51:06 pm
content: I know it's not exactly a unity gain follower, but there is some resemblance. Anyway, I cannot recall the exact frequency of oscillation, but what I can say is that when I varied the load (at with output voltages ranging from 5 to 20) from 0A to 2A the oscillation got progressively worse, with no oscillation at no load. BUT when I put that bypass cap from the emitter of the NPN, the oscillations died away. At 20V and 2A, there were no oscillations.I don't think that capacitive loading is the issue because I'm driving small signal transistors and I'm using a decoupling resistor. It might just be the very high gain of the second stage which is the voltage gain stage, as Hero suggested.

author: Andy Watson
author_rank: Super Contributor
timestamp: May 05, 2014, 02:07:26 pm
content: Quote from: tree on May 05, 2014, 01:51:06 pmThere issomeresemblance, ... especially if we ignore the voltage gain of ~1500 added by the pair of bi-polar transistors. Oh, and the extra phase shift due to the (not insignificant) capacitance of the output MOSFETs being driven from a source impedance of 15k!

author: tree
author_rank: Regular Contributor
timestamp: May 05, 2014, 02:28:08 pm
content: Quote from: Andy Watson on May 05, 2014, 02:07:26 pmI should add a buffer. Good catch! By the way, the voltage gain is only 150 (15000/100).

author: LvW
author_rank: Frequent Contributor
timestamp: May 05, 2014, 02:36:48 pm
content: Quote from: tree on May 05, 2014, 01:51:06 pmIn my reply#3 I was referring to the 1st circuit posted by you. I didn´t recognize the second (larger) drawing, sorry.

author: Zero999
author_rank: Super Contributor
timestamp: May 05, 2014, 03:40:22 pm
content: Quote from: tree on May 05, 2014, 01:51:06 pmIt's a very superficial resemblance.The main difference is you're taking the feedback from the collector, not the emitter, so the transistor has gain. Try building the circuit attached below and it will probably oscillate.

author: tree
author_rank: Regular Contributor
timestamp: May 05, 2014, 03:44:08 pm
content: Quote from: Hero999 on May 05, 2014, 03:40:22 pmNo emitter degeneration resistors = instability.

author: Zero999
author_rank: Super Contributor
timestamp: May 05, 2014, 04:59:00 pm
content: Quote from: tree on May 05, 2014, 03:44:08 pmTrue but that's not the main reason why it'll oscillate. You could add emitter resistors and it'll still be unstable due to the added gain.

author: David Hess
author_rank: Super Contributor
timestamp: May 05, 2014, 06:08:04 pm
content: The extra stages are adding phase shift and the common emitter stages are adding gain. Either of those could cause oscillation. The first example circuit with a common collector buffer is unlikely to oscillate.Emitter degeneration makes the transistor stage gain invariant with operating point and predictable making frequency compensation easier and more reliable. Adding the emitter bypass capacitor should make it worse because of increased AC gain if there was already a problem with feedback loop oscillation. It is possible that the output resistance and capacitance produce a cutoff frequency so low that the whole loop is stable (dominant pole compensation) but that is not a condition that is likely to remain at all operating points.You would be better off with a PNP emitter follower followed by a fixed level shift using a zener diode unless you lack enough compliance voltage to drive the common source MOSFET. The voltages are not marked so it is not clear if that is a problem.I would check the transient response over the operating range to find out how stable the circuit really is.

author: Galaxyrise
author_rank: Frequent Contributor
timestamp: May 05, 2014, 11:08:34 pm
content: I've had circuits where a LTC1050 oscillated but a LM358 did not. Are chopper amps generally more susceptible? (I notice it's an LTC1151 in the schematic.)

author: tree
author_rank: Regular Contributor
timestamp: May 05, 2014, 11:36:19 pm
content: Quote from: Galaxyrise on May 05, 2014, 11:08:34 pmI built a prototype on a breadboard with the LM358N and that oscillated as well.

author: dannyf
author_rank: Super Contributor
timestamp: May 06, 2014, 12:14:47 am
content: The topology is problematic: using the collector to drive a high capacitance load (two mosfets), in a global feedback loop, is asking for trouble.I would suggest that you try to turn it into a follower.If you insist on going down the path, some suggestions:1) put gate stoppers on the mosfets. You can start with 110ohm and reduce it from there;2) I would implement some local feedback on the opamp;3) use a slow opamp;4) reduce the output capacitance;5) I would also implement some negative feedback between the pnp + mosfets. For example, you can terminate the resistor through the sources of the mosfets.Generally, high speed opamps are evil; So are global feedbacks.

author: dannyf
author_rank: Super Contributor
timestamp: May 06, 2014, 12:19:15 am
content: If I were you, I would also do some ac analysis to see where the biggest bottleneck is.What you have here is the positive half of some power (audio) amps, where the OPS has gain and drives into massive capacitance. It is inherently difficult to stablize such a topology.

author: tree
author_rank: Regular Contributor
timestamp: May 06, 2014, 12:23:19 am
content: dannyf,I stabilized it under the conditions I listed previously (20V, 2A) with the simple capacitor.

author: David Hess
author_rank: Super Contributor
timestamp: May 06, 2014, 12:31:02 am
content: Quote from: Galaxyrise on May 05, 2014, 11:08:34 pmThey are insofar as they have a higher gain band width product and slew rate; for the LTC1050 that is 2.5 MHz and 4 V/us versus 1 MHz and 0.25 V/us for the LM358. Chopper stabilized amplifiers also have much lower output drive and are really only rated down to 10 kohms or so where the LM358 is good down to 2 kohms at least.

author: tree
author_rank: Regular Contributor
timestamp: May 06, 2014, 03:32:50 am
content: Quote from: Hero999 on May 05, 2014, 04:59:00 pmI did just that. I added an emitter resistor to the NPN and it was stable.

author: Zero999
author_rank: Super Contributor
timestamp: May 17, 2014, 08:53:07 pm
content: What values did you use? The only reason why emitter resistors could help to avoid oscillation is by reducing the gain.Adding 1k and 100R to Q1 and Q2 respectively didn't get rid of the oscillations in simulation.

author: tree
author_rank: Regular Contributor
timestamp: May 17, 2014, 09:07:47 pm
content: I added a parallel cap across R1 (R1 in your circuit) and it was stable.

author: Zero999
author_rank: Super Contributor
timestamp: May 17, 2014, 11:45:07 pm
content: Adding and emitter bypass capacitor will make it more prone to oscillation as it will increase the gain, indeed the simulation shows the amplitude of the oscillations increasing when 100nF is added in parallel with R1.

author: tree
author_rank: Regular Contributor
timestamp: May 18, 2014, 12:35:45 am
content: This is one of those cases that simulation is incorrect. The physical circuit does not oscillate even at heavy loads.

author: Zero999
author_rank: Super Contributor
timestamp: May 18, 2014, 05:39:34 pm
content: I agree with you about simulation.How many times have you built the circuit? If it's just a one off and it works, then good for you but if you're doing a production run you may run into problems.Heavy loading, in this case, will most likely dampen oscillations, since the lower the value of R4, the lower the gain will be.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 18, 2014, 07:10:27 pm
content: The circuit in the simulation above is guaranteed to oscillate; that much is apparent at a glance.If you can prove your real circuit does the same and is stable under the same load conditions, you may have a substantial academic prize in your future.Tim

author: tree
author_rank: Regular Contributor
timestamp: May 18, 2014, 07:15:26 pm
content: One thing missing in the simulation is the n-channel mosfet