Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Class A amplifier with op-amp input stage is refusing to work

Status
Not open for further replies.

Plecto

Full Member level 5
Joined
Jan 4, 2012
Messages
315
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
4,979
Hi. Here's a circuit I've made. The regulator is a negative one (LM337): https://www.circuitlab.com/circuit/srbwgm/class-ab-amp/

I first tried it with a NPN and a positive regulator (LM317), but the amp just kept on oscillating no matter what I did. I added caps from supply to ground, cap in the feedback path, but nothing. I even tried shorting the feedback path completely, but the output still kept on oscillating with a frequency of about 140-150khz. I then tried the design I just linked and got the exact same problem. I now have a short between the output and the non-inverting input, but it's still oscillating at 100-130khz (strange looking wave). Is the design valid and that it's only my breadboard design that causes this?
 
Last edited:

It's either very clever or really dumb - I can't make out which!

The LM317 is configured for constant current, making the first transistor a high current voltage amplifier but the feedback goes back to the non-inverting input of the op-amp which probably accounts for the instability. It doesn't appear to have an input point at all. The output of the last two transistors is grounded but neither the positive or negative rails are so perhaps the +/- power rails are supposed to be the output, sort of hanging above and below the center ground. Looks to me like it's drawn wrongly so if Plecto built it as it is, no wonder it doesn't work properly.

Brian.
 

Besides an explanation I would prefer a readable schematic posted at edaboard.

- - - Updated - - -

The LM317 is configured for constant current, making the first transistor a high current voltage amplifier but the feedback goes back to the non-inverting input of the op-amp which probably accounts for the instability.
The circuit has a negative feedback by inverting operation of the transistor. But it's unstable without additional compensation due to the additional transistor voltage gain. Please consider that universally compensated OPs (like TL082) are stable with feedback factors <=1 but not >1.

The circuit uses an active "virtual ground generator". Input voltage and load impedance are omitted, making it somewhat difficult to understand. But it still demonstrates correctly the stability issue mentioned above.
 

Sorry for being too vague. I've redone the schematic marking input and output (RL): https://www.circuitlab.com/circuit/srbwgm/class-ab-amp/

The LM337 causes a constant current through Q2 making it class A. The op-amp (on the left) is the input stage with it's feedback taken from the collector of Q2. When the input voltage (at the inverting input) rises, the op-amp will respond by decreasing it's output voltage causes the base current to decrease. When the base current decreases, Vce rises thus rising the output voltage which again will make the voltage at the non-inverting input rise (making the NE5532 happy).

The regulator is a LM337 (not LM317) working as a current source. The op-amp with the push-pull stage output on the right is for making a virtual ground. I will add some caps between GND and +V and between GND and -V reducing crossover distortion. This should make a pretty decent virtual ground shouldn't it?

but the feedback goes back to the non-inverting input of the op-amp which probably accounts for the instability

Why will this cause instability? Isn't positive feedback with an inverter on the output pretty much the same as negative feedback? How will the op-amp tell the difference?

The circuit has a negative feedback by inverting operation of the transistor. But it's unstable without additional compensation due to the additional transistor voltage gain. Please consider that universally compensated OPs (like TL082) are stable with feedback factors <=1 but not >1.

Are you saying that the transistor gain causes the instability? Shouldn't then a bigger value of R14 decrease the gain seen by the op-amp (the op-amp has to output a higher voltage) thus making it more stable?
 

Are you saying that the transistor gain causes the instability? Shouldn't then a bigger value of R14 decrease the gain seen by the op-amp (the op-amp has to output a higher voltage) thus making it more stable?

In a short, you need to adjust the circuit for sufficient phase margin at unity loop gain, the common way to achieve stability of feedback amplifier circuits, Increasing R14 doesn't seem the best idea as it also reduces the available output current. A series RC circuit between transistor base and collector gives better options to adjust the phase margin.

I didn't mention in my first post, that the LM337 current source output impedance might also affect stability.
 

I don't follow. Where in this circuit will a phase shift other than 180 degrees occur? I can see that a series RC circuit from the op-amp output to the base will give the ability to adjust the phase, but I would like to understand why the phase margin has to be adjusted :p
 

As previously said, the extra loop gain added by the transistor will already foil stability because it shifts the unity gain frequency to the right and thus decreases the phase margin. A possibly capacitive output impedance of the regulator (created by it's internal frequency compensation) might further decrease the phase margin.

Visualizing the circuit's loop gain in a simulation will reveal the problems.
 

As said before the circuit for setting the virtual "earth" is poor and will not work as expected. Your transistor having a 62 ohm load is completely at odds with its collector being fed from a constant current source, Just use a 1k resistor. Constant current sources are used for voltage amplifiers where the load following the transistor/constant current generator is very high impedance , say 100K.
With such a low value load it would be better to use the transistor as an emitter follower.
Frank
 
  • Like
Reactions: FvM

    FvM

    Points: 2
    Helpful Answer Positive Rating
I agree that the purpose of the specific circuit design isn't well understandable. It might be replaced by a state-of-the-art amplifier.
 

The original idea was to make a headphone amplifier that could drive any type of load. Having a current source instead of a ballast resistor was to be able utilize more of the voltage at low impedance loads (16-32Ohm). For my current project I could go with a ballast resistor, it isn't that big of a deal.

I tried to replace the LM337 with a 500Ohm resistor (for testing purposes) and it stopped oscillating! I'm not quite reading the voltages I desire though: Inverting input: -1.35V. Non-inverting input: -2V, op-amp output: -3.11V, class A stage output: -4.22V. I don't understand why the inverting input is 1.35V, the only thing connected to it is a 10k resistor to ground so how is it possible for that resistor to have a voltage drop?

As said before the circuit for setting the virtual "earth" is poor and will not work as expected.

Why is it poor?
 

Well look at the way the virtual ground is derived. The idea is that by biasing an op-amp, followed by a current providing stage, at mid rail voltage and using that as the ground reference, it will float the supply voltage equally above and below the reference. In the schematic there is no fixed current in the two output transistors and it relies on the second op-amp biasing one or the other transistor on to try to maintain mid-supply voltage. As the load on the rails changes, it has to move it's output enough positive to make the top transistor conduct or enough negative to make the bottom one conduct. It has to overcome the +/- 0.6V step before the transistors can conduct. The choice of NE5532 is bad one in this application because it has a maximum 0.6V differential input voltage because internally there are cross connected diodes between it's inverting and non-inverting inputs.

It would be more sensible to forget the second part of the amplifier altogether and connect the first stage bias to a pair of matched resistors between the + and - supplies. It will achieve the same effect.

The LM337 is not a good choice for a constant current source either. It's internal circuits need a decoupling capacitor across it's input to ground and obviously that will have bad consequences to your signal. There is also an issue of minimum current in these regulators. They do not work well at very low currents, that's why they normally specify low value resistors in the ADJ pin, it's to keep a small bleed current flowing through the voltage setting resistors. A constant current generator using a transistor with fixed B-E voltage would work better and be more stable.

Brian.
 

Well look at the way the virtual ground is derived. The idea is that by biasing an op-amp, followed by a current providing stage, at mid rail voltage and using that as the ground reference, it will float the supply voltage equally above and below the reference. In the schematic there is no fixed current in the two output transistors and it relies on the second op-amp biasing one or the other transistor on to try to maintain mid-supply voltage. As the load on the rails changes, it has to move it's output enough positive to make the top transistor conduct or enough negative to make the bottom one conduct. It has to overcome the +/- 0.6V step before the transistors can conduct.

I'm aware of this, that's why I'm going to add capacitors going from ground to the rails. This way the ground will be kept pretty steady while the op-amp is output is between +-6V. The ground will shift a little bit, but with some decent caps and giving the high slew rate of op-amps now and days I think the ground will be pretty stable.

It would be more sensible to forget the second part of the amplifier altogether and connect the first stage bias to a pair of matched resistors between the + and - supplies. It will achieve the same effect.

Are you talking about just using a single ended supply and rather have a DC blocking cap on the output of the amp? I have thought about this, but I was trying to avoid the distortion that would result from having an electrolytic cap in the output path.

The LM337 is not a good choice for a constant current source either. It's internal circuits need a decoupling capacitor across it's input to ground and obviously that will have bad consequences to your signal. There is also an issue of minimum current in these regulators. They do not work well at very low currents, that's why they normally specify low value resistors in the ADJ pin, it's to keep a small bleed current flowing through the voltage setting resistors. A constant current generator using a transistor with fixed B-E voltage would work better and be more stable.

I have thought about this as well, but I can't see how it could be more stable. Won't the Hfe of a BJT vary with temperature making the collector current increase as the temperature increases? Perhaps I could use a mosfet for this purpose instead?

The choice of NE5532 is bad one in this application because it has a maximum 0.6V differential input voltage because internally there are cross connected diodes between it's inverting and non-inverting inputs.

I just saw this in the schematic after I last posted. The reason I'm using NE5532 is because I have 200x SOIC packages here so I'm trying to use as many op-amps as I can in every design :p I'm having trouble understanding why these diodes are placed like that though and how it can operate properly with them. I'm thinking of a chicked or the egg issue here if my voltage issue (in my last post) is taken as an example. If the inverting input is biased at -1.35V, the amp will clip because with a gain of 2, the amp can never get it's non-inverting input to that value. The best it can do is to get the output to -V (which it does) and get -2V on it's non-inverting input (which is what I see). If then this -1.35V that I see on the inverting input is caused by those diodes between the input then how is this resolved? It's like it's chasing it's own tail.
 

I was considering a single ended supply. I wouldn't be too concerned about distortion from electrolytics, other factors would be more significant than that. I haven't done any calculations but I would be wary of using big capacitors across the supplies and virtual ground as these would effectively be a load on the output of the second op-amp stage and may in themselves cause instability. The limited current supplied by the transistors into say 1000uF load would seriously skew the feedback to the op-amp. You could consider using a small power amplifier instead, one that could deliver the 100mA or so you need directly from it's output pin.

Using a transistor as the current generator would be no less stable than an LM337. You could also consider using a small JFET which should be even more stable.

I often wondered why the two diodes are present in the NE5532 and can only guess it has something to do with deliberately limiting the input voltage range or they are accidental to the input stage construction. You could substitute almost any op-amp in this application though. The primary advantage of the 5532 is it's very low noise figure but as you are using it in a low gain configuration that shouldn't be too much of an issue.

I too have the ''problem" of component stocks which seem to go out of date as fast as I buy them. I reached the point a few years ago where I called a surplus dealer and did a swap, two microwave PLL ICs I needed in exchange for 100,000 or so EPROMs and 8051s ! I think I got a good deal, the space it freed up was worth more than money. Since then my stocks have started to grow again but I'm far more cautious now about the quantities I buy. I often wonder where those parts went, hopefully doing something more useful than filling my shelves!

Brian.
 

I have now followed the advice I've gotten and made this circuit: **broken link removed**

I made it on a breadboard and it seemed to work alright. I had some problems with oscillations at first and the design felt a little unstable, but I believe that a properly soldered design should fix that. Is there anything I've missed? I'm going go try and etch a board and see how it works, it's would be nice to get it right the first time :)

I decided to use a mosfet instead of a BJT. I don't need a base resistor and I don't need to worry about the op-amps current and voltage output capabilities, I believe this circuit could drive a big speaker if R7 is low enough :D I'm wondering about the values of R1, R2, R3 and R4 though. Are 100k resistors a bit too big? I chose a 100k resistor in the feedback path to avoid C4 from lowering the gain at lower frequencies too much. C6 and R8 will be an optional bass-boost function. I still hate C5, but I guess I can live with it :p

About the power supply. I think I'll put a regulator at its input as I don't wan't the amp to be that picky about what type of wall-wart that's connected to it.

Edit: A more complete schematic perhaps: https://i47.tinypic.com/fdvs43.png
 
Last edited:

Why do you worry about C5? It sets the -3dB point at about 0.3Hz so apart from it's DC blocking it is virtually invisible to the signal.

The worst case input bias current according to the data sheet is 500nA which will drop 50mV in the 100K bias resistors. That isn't a lot but personally I would drop them a little, maybe to 47K.

You will never get high efficiency from this kind of amplifier and dropping the load resistor will never make it more powerful, all you will do is increase the static output current and make it less efficient.

There is still a risk of instability in the design. Including the load in the feedback loop makes it prone to having the feedback characteristics modified by the load itself. Consider what happens if a very low impedance is connected as load, it will almost eliminate the AC feedback and push the gain to it's limit.

Brian.
 

My previous comment about possible instability due to >1 feedback factor still holds. The "more complete" schematic still misses resistor values and load impedance, so at present it's just a guess that can't be verified.
 

I'm going to give it a shot. If I managed to make it work on a breadboard, I'm betting it can be done when everything is soldered properly.

My previous comment about possible instability due to >1 feedback factor still holds. The "more complete" schematic still misses resistor values and load impedance, so at present it's just a guess that can't be verified.

Yeah, I forgot the component values. Just disregard the "complete design".

Are you still talking about the phase margin though? I just can not understand where this would come from. This is something cause by the transistor output stage, right? But when a voltage is applied at the gate of the mosfet, the output voltage would change imminently without any time delay. The only thing that I can think of that could cause a phase shift is the gate capacitance, but this has to be absolutely tiny, right? To me I can't understand how the op-amp would even know that it has an output stage connected to it.


One other issue I've encountered though. The charging and discharging of the output cap causes a loud pop in my headphones. I've previously countered this by adding in a relay in the output path controlled by a comparator with a RC-circuit as its reference. This is a solution that would work, but could there be a simpler way of doing it?
 

I see that you are not familiar with the basics of OP design. I didn't talk about a phase shift caused by the transistor, although it might be an additional issue, particularly considering the large FET capacitances. It's the additional gain of transistor stage that can cause instability. It shifts the unity gain frequency of the loop to higher frequencies where additional OP poles become effective. The internal OP compensation isn't prepared for this kind of circuits.
 

There's a lot here I don't understand and I think it's better if I could get some direct measures I could do in order to prevent oscillations rather than me trying to understand whats actually going on. I'm not familiar with poles and zeros (other than that they are relevant in filter designs) and I thought phase margin = phase shift, but I guess that's not the case. I'm reading your sentences, but I don't have the knowledge to understand them :(
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top