Why does non-inverting op amp with gain 100 oscillate at 7-10 kHz when input is open circuit?

ci139

Joined Jul 11, 2016
1,898
(referencing the +inp side to GND showed the least output noise - in simulation)

https://www.analog.com/media/en/training-seminars/tutorials/MT-040.pdf (differential input impedance)
https://www.soundlabsgroup.com.au/mm5/graphics/components/downloads/lm4562_datasheet.pdf (~30kΩ)

i have to think it's a poor op-amp - can't replicate it with LT1115 (~20kΩ) . . . well . . . but that's in LTSpice
(the Falstad simulation did show some low amplitude 5kHz modulated HF if the output had 16pF LOAD ??)
 

Thread Starter

Dave Lowther

Joined Sep 8, 2016
225
Hi Ci139,
Thanks for your continued interest. It's not a poor op amp. If you look in the PDF attached to my opening post you will see I tried about 5 different types of op amps and all oscillated in the 7-10 kHz range. Also if my estimate of the RC time constant is correct (also in the attached PDF) it looks like there is about 33pf between output and non-inverting input. As I said earlier I can't work on it this week but I'm not going to go cold on this. I'm waiting until I have some free time to work on it. I'll keep you all posted. I'm hoping the suggestion from early in the thread to decouple the rails to ground and put a resistor in series with the output will fix it.
Best regards
Dave
 
I'd check your power supply for noise in the 7-10KHz range. It won't take much to show up on the output of your opamp with gain 100, and every switching power supply I have generates some mV-scale spikes. (Ground loops can make the power supply noise worse.)

You don't mention what kind of bandwidth you need. Is it in the KHz range?

Out of curiosity, has your simulation shown the problem (I'm guessing that you've used something like LTSpice given your diagram)?
 

ci139

Joined Jul 11, 2016
1,898
Out of curiosity, has your simulation shown the problem (I'm guessing that you've used something like LTSpice given your diagram)?
Most OpAmp models.. (note that i'm not the thread starter - but just try to clear out this one) ..that "decide" to work in LTSpice are highly simplified ones (most with identical input stage models ?!?!?!) . . some won't even account the actual input voltage range etc. - so in spice you may have sensitive OpAmps quiet and poor ones oscillating (i have found so far the best practice is to use the most close to the target "working" substitute as the target's model may hang or behave unexpectedly)
 
Last edited:

Thread Starter

Dave Lowther

Joined Sep 8, 2016
225
I'd check your power supply for noise in the 7-10KHz range. It won't take much to show up on the output of your opamp with gain 100, and every switching power supply I have generates some mV-scale spikes. (Ground loops can make the power supply noise worse.)

You don't mention what kind of bandwidth you need. Is it in the KHz range?

Out of curiosity, has your simulation shown the problem (I'm guessing that you've used something like LTSpice given your diagram)?
Hi Curt,
Thanks for taking the time to comment on this.
TBH I haven't looked at the power supply noise. I ought to. I'm using a linear power supply that I built myself using 2 x L200 for the +/-15V output.
I've not simulated it. The diagram was drawn with Eagle. I've very little experience with any simulator. I have used LTSpice but I was never more than newbie level with it.
Regarding the bandwidth, I'd like 80kHz (moon on a stick?). I explain in the PDF [1], that I attached in the opening comment, that I'm aiming to make an oscilloscope-esque front end for a USB sound card. The sound card has 80kHz (ish) bandwidth.

[1] As this was first thread I've ever created here, I was really unsure about the level of detail to put in the opening post. I tried to keep it to a minimum that made sense and offer those who wanted the longer version the option to read the PDF I attached.

Thanks again for your comment
Best regards
Dave
 

TeeKay6

Joined Apr 20, 2019
573
Out of curiosity, what are the vertical and horizontal scales in your Fig. 25?
@Dave Lowther
I see caps (C4 & C5) connected across the 30V (+/-15V) power, but I do not find the necessary bypass caps, with short leads, that are required from IC1 pin 4 to ground and from pin 8 to ground. If you intended C4 & C5 for this purpose, you erred; the bypass must be made to ground, not across the +/-15 supplies. The appropriate ground location is at the "-" end of C2, using the shortest possible leads for all the cap connections; 0.1uF ceramic caps are commonly used for this application. Also, the ground connections to JP1:2, R1, R2, D2, C2, and JP4:2 should be placed as close to each other as possible.
 

Thread Starter

Dave Lowther

Joined Sep 8, 2016
225
@Dave Lowther
I see caps (C4 & C5) connected across the 30V (+/-15V) power, but I do not find the necessary bypass caps, with short leads, that are required from IC1 pin 4 to ground and from pin 8 to ground. If you intended C4 & C5 for this purpose, you erred; the bypass must be made to ground, not across the +/-15 supplies. The appropriate ground location is at the "-" end of C2, using the shortest possible leads for all the cap connections; 0.1uF ceramic caps are commonly used for this application. Also, the ground connections to JP1:2, R1, R2, D2, C2, and JP4:2 should be placed as close to each other as possible.
Thanks for the advice TeeKay6. You are correct that there is no decoupling to ground. This was mentioned in comment #2 and I responded in comment #3.
FWIW the reason the decoupling is between V+ and V- is that I was following the advice I found in one of the books listed in the references section at the back of the PDF I attached in my opening post. The reason given was that such decoupling could introduce ground noise. Prior to reading that advice in the book, I always decoupled V+ to ground and V- to ground. I'll change the decoupling sometime next week the next time I have chance to work on it.
Best regards
Dave
 

Thread Starter

Dave Lowther

Joined Sep 8, 2016
225
FWIW the reason the decoupling is between V+ and V- is that I was following the advice I found in one of the books listed in the references section at the back of the PDF I attached in my opening post.
This is the text from Douglas Self - Small Signal Audio Design - near fig 4.20.

"The 5532 and 5534 type opamps require adequate supply-decoupling if they are to remain stable; otherwise they appear to be subject to some sort of internal oscillation that degrades linearity without being visible on a normal oscilloscope. The essential requirement is that the + ve and − ve rails should be decoupled with a 100 nF capacitor between them, at a distance of not more than a few millimetres from the opamp; normally one such capacitor is fitted per package as close to it as possible. It is not necessary, and often not desirable to have two capacitors going to ground; every capacitor between a supply rail and ground carries the risk of injecting rail noise into the ground."

I'm not suggesting that's an argument for not changing what I've done. I'm just explaining why I did it.
 

TeeKay6

Joined Apr 20, 2019
573
This is the text from Douglas Self - Small Signal Audio Design - near fig 4.20.

"The 5532 and 5534 type opamps require adequate supply-decoupling if they are to remain stable; otherwise they appear to be subject to some sort of internal oscillation that degrades linearity without being visible on a normal oscilloscope. The essential requirement is that the + ve and − ve rails should be decoupled with a 100 nF capacitor between them, at a distance of not more than a few millimetres from the opamp; normally one such capacitor is fitted per package as close to it as possible. It is not necessary, and often not desirable to have two capacitors going to ground; every capacitor between a supply rail and ground carries the risk of injecting rail noise into the ground."

I'm not suggesting that's an argument for not changing what I've done. I'm just explaining why I did it.
@Dave Lowther
First, I did overlook that @Audioguru comment in post#2; sorry. We all have to follow what we believe to be the best advice and you have done that; certainly no need for apology. I will emphasize the need for short leads for bypassing to be effective...and the need for a layout that places the necessary ground close by. With some devices (esp wide bandwidth devices), it can be very difficult to achieve good layout and bypassing with a breadboard.
 

Thread Starter

Dave Lowther

Joined Sep 8, 2016
225
@Dave Lowther
First, I did overlook that @Audioguru comment in post#2; sorry. I will emphasize the need for short leads for bypassing to be effective...and the need for a layout that places the necessary ground close by. With some devices (esp wide bandwidth devices), it can be very difficult to achieve good layout and bypassing with a breadboard.
The following diagram hopefully clarifies the layout and wire lengths. I'm using Eagle to produce the layout.

upload_2019-8-24_8-46-30.png

The following photo is how the wiring side is now (i.e. it corresponds to the right hand side of the above figure).

upload_2019-8-24_8-50-47.png
 

ci139

Joined Jul 11, 2016
1,898
It's not a poor op amp.
i believe you :)

pre-note :: you can't trust me too much coz i'm not "audio" -- only 've built a couple of line amplifiers and some mic. 1-s

it's still the amplifier in the 1-st post that looks starnge if 10k is shorted out and Zener/clipper is on . . . then at good chance you refer your signal (with no dc bias) minor. log.-lly to GND and DC to opamp input . . . ? is there a source for such that is known to work

i'd try either 100:10k divider from C1 to C2.anode --or-- increase R5 and R4 and decrease C2

also gain 100 works if your output amplitude is low . . . ? maybe they say something in super -ß input opam d/s / AN-s -- a random such ? by Google
 
Last edited:

TeeKay6

Joined Apr 20, 2019
573
Actually my diagram above doesn't show the whole layout, only the area I'm modifying. Here is the complete layout (proposed)

View attachment 184620
@Dave Lowther
Here's a sketch of what I think you would ideally try to achieve. Of course I am aware that perfection is not possible, most especially with breadboards. It may not be possible to prevent oscillation with J1 open; there is too much "antenna" hanging on pin3 with only 1M resistors to ground. With a PCB layout you could take steps to shield all pin3 connections (e.g. with metal box).
View attachment 184686
 

TeeKay6

Joined Apr 20, 2019
573
Actually my diagram above doesn't show the whole layout, only the area I'm modifying. Here is the complete layout (proposed)

View attachment 184620
@Dave Lowther
A comment on your layout as shown in post#33:
Examine the connections of C5. One end connects via a nice short trace to IC1:8. The other end travels 3" (my estimate) before reaching the neg terminal of C2, the desired grounding point. Likewise, examine connections of C8. One end connects via a nice short trace to IC1:4. The other end travels perhaps 6-8" before reaching the desired grounding point at the neg terminal of C2. With such long paths to ground, C5 and C8 will have very little effect as bypasses; the inductance of the long paths will nullify any gain of having the bypass caps. When planning a layout, plan the must-be-short paths first, then let less critical paths work their way around as necessary.
 

to3metalcan

Joined Jul 20, 2014
260
This is the text from Douglas Self - Small Signal Audio Design - near fig 4.20.

"The 5532 and 5534 type opamps require adequate supply-decoupling if they are to remain stable; otherwise they appear to be subject to some sort of internal oscillation that degrades linearity without being visible on a normal oscilloscope. The essential requirement is that the + ve and − ve rails should be decoupled with a 100 nF capacitor between them, at a distance of not more than a few millimetres from the opamp; normally one such capacitor is fitted per package as close to it as possible. It is not necessary, and often not desirable to have two capacitors going to ground; every capacitor between a supply rail and ground carries the risk of injecting rail noise into the ground."

I'm not suggesting that's an argument for not changing what I've done. I'm just explaining why I did it.
Self's brilliant, but I also find that sometimes his advice is outdated. If I'm giving him the benefit of the doubt, I think he probably meant to add some + to - rail decoupling IN ADDITION to the usual decoupling to ground. However, I've built essentially the exact circuit you have here with a few different op amps and no decoupling at all (usually don't add it until I'm ready to have the board made unless I actually notice a problem) and didn't get any oscillation, which makes me think it's your regulators. You're really not doing anything unusual or weird, so I suspect you're going to see that oscillation on your power supply rails.
 

Thread Starter

Dave Lowther

Joined Sep 8, 2016
225
it's still the amplifier in the 1-st post that looks starnge if 10k is shorted out and Zener/clipper is on . . . then at good chance you refer your signal (with no dc bias) minor. log.-lly to GND and DC to opamp input . . . ? is there a source for such that is known to work
I'm sorry but I can't understand your question.
i'd try either 100:10k divider from C1 to C2.anode --or-- increase R5 and R4 and decrease C2
Thanks for the advice.
also gain 100 works if your output amplitude is low . . . ?
I have not seen any problems but I have only tested it with 30mV RMS input and 3V RMS output.
maybe they say something in super -ß input opam d/s / AN-s -- a random such ? by Google
I'm sorry but I can't understand your question.
 
Last edited:

Thread Starter

Dave Lowther

Joined Sep 8, 2016
225
@Dave Lowther
Here's a sketch of what I think you would ideally try to achieve. Of course I am aware that perfection is not possible, most especially with breadboards. It may not be possible to prevent oscillation with J1 open; there is too much "antenna" hanging on pin3 with only 1M resistors to ground. With a PCB layout you could take steps to shield all pin3 connections (e.g. with metal box).
View attachment 184686
Thanks for taking the trouble to draw a diagram. I am aware of star grounding and keeping leads short. I didn't know how short leads needed to be at relatively modest frequencies. I thought the important thing about 100nF chip decoupling was to get short leads from the capacitor to the chip. If I can't get it working without making a PCB I may get one made (it only costs me about 15$ including shipping from China).
Best regards
Dave
 

Thread Starter

Dave Lowther

Joined Sep 8, 2016
225
Self's brilliant, but I also find that sometimes his advice is outdated. If I'm giving him the benefit of the doubt, I think he probably meant to add some + to - rail decoupling IN ADDITION to the usual decoupling to ground. However, I've built essentially the exact circuit you have here with a few different op amps and no decoupling at all (usually don't add it until I'm ready to have the board made unless I actually notice a problem) and didn't get any oscillation, which makes me think it's your regulators. You're really not doing anything unusual or weird, so I suspect you're going to see that oscillation on your power supply rails.
Hi to3metalcan,
Thanks for commenting. It's reassuring to know that you have built something similar with no problems and that I'm not doing anything unusual. I will look at the power supply sometime in the coming week.
Best regards
Dave
 
Top