Parasitic oscillation - where to start? - Page 1
Forum section: electronics / beginners

author: c4757p
author_rank: Super Contributor
timestamp: October 24, 2012, 03:19:29 pm
content: Interestingly, I've built a number of power amplifiers of my own design, using numerous topologies, and I've never had to deal with parasitic oscillation before. This time I tried something different and the result wasn't too good.I have a Darlington push-pull output being driven by a long-tailed pair (the negative feedback here is what I expect to be the source of the oscillation). When I start up the amplifier, the transformer draws 800mA at 120VAC with no output load (so almost 100W into the transformer, I'd guess about 70-80W being dissipated between the output transistors, as they are the only things getting warm). The output has a 12 MHz, nearly rail-to-rail oscillation, and by the time I shut it off, the transistors' temperatures are within 3°C of each other, so they are sharing this massive load just as they should.The circuit worked in simulation (yeah, yeah, I know...), and all the different subcircuits worked on a breadboard. I never built the entire device at once because it's such a big circuit that I don't have breadboard space for it.My guesses for the source of the oscillation are a problem in the negative feedback to the long-tailed pair, or power supply problems - on the breadboard, the power came from two massive, 25V 5A linear power supplies to give the ±25V rail. Here the power supply circuitry is of my own design and probably not quite as good. (Having worked with vacuum tube amplifiers, which due completely shit noise rejection are very picky about grounding, Icanvouch for the design of the circuit ground. It's not getting its feedback through that.)The question is, where do I start in trying to fix this? I know that each subcircuit works by itself, so I can't just start cutting traces and running the circuits separately - they should work fine! The problem is when they all come together. But I can't sit there probing around for long while the transistors are dissipating 70W and climbing (temperature coefficient and all that!).

author: deephaven
author_rank: Frequent Contributor
timestamp: October 24, 2012, 03:25:04 pm
content: Schematic would be useful. Do you have suitable HF decoupling on the supplies? If it's a breadboard, you could have all sorts of nasties going on. Base stoppers (lowish value resistors in the series with the base of the transistors) sometimes helps.

author: c4757p
author_rank: Super Contributor
timestamp: October 24, 2012, 03:33:24 pm
content: Schematic for the output amplifier attached. I apologize for the messiness, I had to shove some things around last-minute to add in some test points before I laid out the PCB. (It is a PCB now, not a breadboard).Q510 and Q511 are there for a bit of basic output current limiting. I checked to see if they are causing problems; they're not even anywhere near turning on.I'll admit I don't have too much HF decoupling on the supplies. I'll try adding more and getting back to you.Would a base stopper really do much good in that circuit? Seems to me a bit more resistance on the base would be swamped by the impedance of the bias ladder already connected to them.

author: c4757p
author_rank: Super Contributor
timestamp: October 24, 2012, 07:03:24 pm
content: I added a bunch of 100-330nF and 10uF decoupling capacitors and reduced the ground impedance in a few spots. All that did was remove the noise that gets the oscillator going in the first place. It starts stable now. Any signal, though - as small as me touching the input test point - and the oscillation and massive power consumption are back.I verified that the 12 MHz signal wasn't coming from previous stages by grounding the input - no difference.I tried replacing the base traces (both before and inside the Darlington pairs) with 100R resistors and with 600R SMD ferrite beads - no difference.I tried adjusting the impedance of the feedback trace, both lower (soldering a huge wire in parallel) and higher (up to 1K in series). No difference.I have no clue where to go from here. Any ideas?

author: SeanB
author_rank: Super Contributor
timestamp: October 24, 2012, 07:37:31 pm
content: RC in the feedback lead. Try 1k in series with the feedback with 100pF to input ground as initial values. this will add a pole that will improve stability.

author: AndyC_772
author_rank: Super Contributor
timestamp: October 24, 2012, 08:52:04 pm
content: I tried your circuit in LTSpice - 100pF between the collector of Q503 and the base of Q504 cures the instability

author: c4757p
author_rank: Super Contributor
timestamp: October 24, 2012, 08:54:23 pm
content: That lowered the frequency of the oscillation, but it was still there. In fact, it got stronger - the thing is now drawing 1100 mA from the 120V mains. I tried 1nF, too, which predictably lowered the frequency more, but obviously I can't lower it all the way to 0Hz! All the resistor and capacitor seem to be able to do is set the frequency of oscillation.

author: c4757p
author_rank: Super Contributor
timestamp: October 24, 2012, 08:56:01 pm
content: AndyC_772, it had an instability for you in LTSpice? I swear I ran the exact circuit in LTSpice and it was perfect! I will try your capacitor as soon as I return home. Is there any way you'd send me the LTSpice file, if you still have it? I want to see how you got it to work "right".

author: AndyC_772
author_rank: Super Contributor
timestamp: October 24, 2012, 08:58:37 pm
content: I didn't have all the same transistor models, so I (more or less randomly) chose a different model for the output transistors. If they have a different gain or response speed, that might make all the difference.PM me your email address and I'll send you the file.

author: c4757p
author_rank: Super Contributor
timestamp: October 24, 2012, 09:08:11 pm
content: I'm rather embarrassed to admit I never tried swapping the transistors in LTSpice to test for variation. I always try changing things around - raise the temperature, inject some noise into the power rails, add ground impedance, etc. But damn it, I never tried swapping the transistors.Thank you!

author: c4757p
author_rank: Super Contributor
timestamp: October 24, 2012, 09:13:01 pm
content: Ha! The unstable waveform in your LTSpice file has almost exactly the same shape as the one I measured, kink in the middle included!I think you may have found it. Thank you! I'll reply once I actually test the circuit.

author: c4757p
author_rank: Super Contributor
timestamp: October 24, 2012, 10:45:26 pm
content: Thank you! That worked (as long as I also removed SeanB's low-pass filter).Unfortunately I'm on to the next problem... Connected a load to it and something lost its magic smoke, and now the output is stuck at the negative rail... Sadly it did it with a big enough flash and bang that I didn't see what it was. I really hope it wasn't the rather expensive TO-247 transistor...Should be all right to fix it on my own now, though. Thanks for the help!

author: Kremmen
author_rank: Super Contributor
timestamp: October 25, 2012, 05:41:30 am
content: Looks like the medicine for the ailment has been found. Let me still offer a couple of cents worth:-Your VAS stage (Q505) really should have a Miller cap of a few tens of pF from base to collector. That alone could cure the instability, because lack of this is a known source of problems.-Bearing in mind, that only feedback circuits can oscillate and increasing feedback generally narrows the stability margin, i notice you have a full, unattenuated feedback from the output to Q504. I haven't analyzed the rest of the circuit, but many amplifiers are unstable at such max feedback levels. Could this be one of those?One easy improvement in the input stage would be a proper current mirror to replace R504 but maybe this is the way you want it?

author: c4757p
author_rank: Super Contributor
timestamp: October 25, 2012, 05:44:58 pm
content: Kremmen, thank you - because the medicine actually hadn't been found. Once I found the part that blew up (actually because I shorted something under the board...), I noticed that it got a bit more stable, but still not usable. Changing the capacitance didn't help.Once I get home I'll try the capacitor on the VAS - I thought that area was a bit too simple! I'll also investigate the feedback.I agree that a proper current mirror would probably be better, but I doubt that is the source of the instability. This is currently just a one-off hobby project, so I don't really want to respin the PCB and have to redo the entire circuit. I think that would be a bit complex of an add-on bodge!

author: Kremmen
author_rank: Super Contributor
timestamp: October 25, 2012, 06:21:49 pm
content: OK, the VAS cap should help. I am a little concerned about the high feedback level though. It leaves open the question, where does the (voltage) amplification come from if you feed all of the output signal back to the diff stage. But try the cap first and see what happens.

author: c4757p
author_rank: Super Contributor
timestamp: October 25, 2012, 06:28:56 pm
content: All the voltage amplification happens earlier in the circuit along with some other signal processing. This is supposed to output the signal 1:1, just amplifying current. Is that a stability problem - is this type of amplifier only usable with voltage gain > 1?

author: SeanB
author_rank: Super Contributor
timestamp: October 25, 2012, 06:40:09 pm
content: As well i am concerned about bias, you have 2 diodes to drive an output stage with 4 diode drops. Either add another diode and a bias pot to the bias chain or go for a proper bias generator using a transistor. as well the current limit will not work, the base of the transistors should be connected to the emitter of the power device to measure the current in the half, not across a dedicated resistor on the output. Perhaps a well damped inductor and a Zobel network across the output will help as well.

author: c4757p
author_rank: Super Contributor
timestamp: October 25, 2012, 06:49:24 pm
content: The current limitdoeswork. It's not perfect (probably would allow a bit too much current in a short-circuit condition), but it does work. The current through the sense resistor pulls the emitter below the base, dumping the output transistors' base signal to the load. I have in fact tested it and it works fine.As for the bias, I am aware that the transistors are biased too close together. When I was testing lower-power prototypes of the circuit, the differential stage had no trouble compensating for that with low distortion. I didn't want a bias pot, and I don't know how to do a "proper" bias generator. I was hoping to save that for my next project

author: Kremmen
author_rank: Super Contributor
timestamp: October 25, 2012, 07:44:06 pm
content: Quote from: c4757p on October 25, 2012, 06:28:56 pmLots of amplifiers are stable at unity gain. Interestingly, this is often confirmed in an op amp data sheet, say. Because lots of amps aren't.I can't offhand recall if i ever did this classic circuit in a unity gain configuration because you normally don't want to do that. Normally there would be at least around 20 dB of voltage gain - that is partly why the VAS stage is there in the first place. Of course there is the other very valid reason, that if the amplifier forward leg has effectively infinite gain, then the closed loop gain is determined by the feedback and feedback only.But you will know the truth after applying the Miller cap to the VAS stage. If the circuit layout is sound and it still oscillates then my bet is the feedback.

author: c4757p
author_rank: Super Contributor
timestamp: October 25, 2012, 08:19:24 pm
content: I just had a thought, while I'm sitting here unable to actually test anything... I wonder if the biasdoeshave to do with it. My smaller, lower-power model's differential stage had no trouble compensating for the bias offset by stretching the signal into the VAS, but perhaps this version (it is the same circuit but with bigger, higher-power parts and higher rails) overshoots on that compensation, throwing itself into a loop of overcompensating its overcompensation. Is that possible? If so, is there any way to fix it without completely redesigning the bias section? (Slowing down the slew rate of the differential stage or VAS seems to me like it would help - would the VAS capacitor do that?) Obviously I haven't tried the VAS capacitor yet, but I'd like to have more than one idea when I finally sit down tonight to work on it.Sadly the massive 40Vpp 12MHz oscillation pretty much ruins any chance of probing signals anywhere on the board to diagnose the issue... Even the low-noise input section with tons of voltage regulation and filtering manages to be infected by the signal. (God, I wonder what kind of RFI the damn thing is giving off...)

author: ptricks
author_rank: Frequent Contributor
timestamp: October 25, 2012, 09:22:08 pm
content: Have you checked the transistors to see if they are close to matching pairs. I have seen some transistors that are wildly different in the Hfe, one had 400 the other 126, guess it was a poor quality one of the lot.

author: Thor-Arne
author_rank: Unknown
timestamp: October 25, 2012, 09:41:36 pm
content: Quote from: ptricks on October 25, 2012, 09:22:08 pmGood point.I.e. the BC556A from NXP has hfe ranging from 125 to 250. (http://www.nxp.com/documents/data_sheet/BC556_557.pdf)I think the hfe could be the culprit here.

author: c4757p
author_rank: Super Contributor
timestamp: October 26, 2012, 01:56:20 am
content: Kremmen, the VAS capacitor did it! Thank you!!Actually, a "few tens of pF" was nowhere near enough... 100pF stabilized it under no load, but around 100 ohms load it threw a tantrum again. Changed it to 1nF and it's stable enough under load to drive a hard short (where the current limiter kicks in and limits it to around 2.4A pk). Even with 1nF there, it still has fine frequency response. Thank you so much!ptricks and Thor-Arne, good idea. I pulled out a bunch from the batch and tested them, and all were from 190 to 220. Didn't bother checking the TIP35C/36C since they don't fit the socket on my meter, but I'm sure they're dreadful! Datasheet specifies anywhere from 10 to 50!Obviously hFE wasn't the issue, though, but thanks for the idea.

author: c4757p
author_rank: Super Contributor
timestamp: October 26, 2012, 04:07:41 am
content: I decided I am going to redo the PCB after all. I've made a bunch of changes in the rest of the circuit as well, so I figure I'd like to eliminate some bodgeyness. I've made a few changes to the output section:Increased current in the differential section to 790uA. This reduced the noise a bit.Added a bias pot in the differential section. This helps adjust the DC offset.Increased the bias between the output transistors to the proper value, using another diode and a pot.Added Kremmen's capacitor to the VAS.Moved some voltage gain into the output stage - maybe this will add a bit of stability, and it certainly won't hurt it.Anybody have opinions on that?

author: SeanB
author_rank: Super Contributor
timestamp: October 26, 2012, 04:35:38 am
content: Much better, just remember to stick the diodes to the output devices, or at least on the heatsink. I would add an input resistor to ground as well, so that bias current is equal in both sides of the differential pair if the input is disconnected, will save the speakers. 10K with a parallel 100pF as RF roll off will probably do, will drop voltage gain slightly but not a problem as you have plenty from the previous stage spare now.

author: Kremmen
author_rank: Super Contributor
timestamp: October 26, 2012, 05:39:11 am
content: Yep, better.Hard to say why you needed such a lot of VAS capacitance but the main thing is that it works, i guess. Usually it is under 100 pF or so, but never mind. Perhaps you will want to check the high frequency roll off point if the cap is way larger.One comment regarding the feedback, which should increase the stability margin perceptibly: the impedance level can easily be lower, since you are not short of driving ability in the output stage. Lowering to 1/10th would be beneficial against thermal noise in the resistors. Otherwise it should work as it is, too.

author: GK
author_rank: Super Contributor
timestamp: October 26, 2012, 06:04:35 am
content: Quote from: Kremmen on October 26, 2012, 05:39:11 amNot at all. The Miller capacitance required is simply a function of the input stage gm (transconductance) and closed loop gain. His original circuit was wired for a closed loop gain of 1. This, combined with the gm of the input stage (as defined by the 500uA tail current) computes to a unity loop gain frequency (ULGF) of approximately 8 MHz with a 100pF Miller compensation capacitor.Even with a 1nF Miller cap, the ULGF (at ~800kHz) is still too high for the small signal bandwidth of that Darlington power output stage, and the phase margin would still be marginal.To properly compensate such an amplifier (without having to resort to using a massive Miller compensation capacitor, which kills slew rate, for one) you need to reduce the gm of the input stage. The best way to do this is to add emitter degeneration to the long tail pair.

author: Kremmen
author_rank: Super Contributor
timestamp: October 26, 2012, 06:33:43 am
content: Like i said, haven't analyzed the circuit at all, but yes it was bothering me too and i was coming to the same conclusion. The input stage looks like it needs tweaking, and the unity gain was a bit worrying. I did notice the lack of emitter degeneration as well but didn't comment since the OP said he didn't want to change his PCB (did that later). Wouldn't be a big deal to fix it, but it is the OP's design and he didn't ask for a design service, so i didn't

author: c4757p
author_rank: Super Contributor
timestamp: October 26, 2012, 02:10:36 pm
content: I replaced two of the diodes with cheap TO-126 diode-connected transistors (MJE181), to make it easy to strap them to the heat sinks. I also replaced the emitter resistor in the long-tail pair with a current mirror. All the changes I've made allowed me to reduce the VAS capacitor to 100pF (I'm not going to push it any lower, since the circuit works fine over the entire frequency range). As for an input resistor to ground in case of disconnected input, it will never be disconnected because this is just the final stage of a signal chain on a PCB.Thank you all for your help! I suppose I could keep tweaking it, but it works fine now so I think I'm going to leave it as is.

author: MartinX
author_rank: Regular Contributor
timestamp: October 26, 2012, 04:48:03 pm
content: Just after a quick look at the schematic what stand out to me is the BC545/556 driving the output transistors directly, have you looked at the base current of the TIP35/36 in the LT spice simulation?Most amplifiers have a more powerful drive transistor like BD139/140. TIP35 does not have very high Hfe and the minimum value in the data sheet is quite low as I recall it.