Why is this LM158 oscillating?

I have a simple noninverting amp around a LM158.

I am using a 158, not a 358, for the extended temp range.

The feedback resistors are 2k2 and 2k0 (the 2k0 goes to GND).

So a voltage gain of just under +2.

Supplies are +/-15V, well decoupled with 10uF ceramics.

I am finding that if I feed in a 100Hz sinewave of about 1V pk, the output shows a superimposed ~1MHz sinewave during the bottom 30% of the bottom half-cycle.

I can kill this oscillation by sticking say a 1uF ceramic from output to GND...

Looking at the schematic e.g. here

formatting link
one sees a straight push-pull output stage, with a 50uA sink (a current mirror presumably) to the -ve rail, to allow the output to go all the way down.

But I am not going anywhere near the -ve rail. I am going to -2V only.

Now look at page 18 of that PDF. It shows 6.2k resistors from the o/p to the -ve rail. Why?

And sure enough, putting a 10k from the o/p to the -ve rail removes the oscillation.

I am going to put in a 4k7 to be sure...

This op-amp is supposed to be unity gain compensated...

The data sheet for the STM version (which I am using) is different but it shows the same 6.2k resistors.

I'd appreciate any input on this...

Reply to
Peter
Loading thread data ...

Outside the FB loop and after the pulldown resistor.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

Forces the output stage to sort of be class-A.

I'll look further tonight. Maybe it's an instability in the output stage. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142   Skype: Contacts Only  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

More like +2.2

Hide it anyway.

Usually to prevent crossover distortion.

How much capacitive loading do you have on the op-amp? Eg. a long cable, scope probe, or something like that. Try putting 50-100 ohms in series with the output right at the op-amp.

Reply to
Spehro Pefhany

Jim Thompson wrote

Yes, agreed.

Reply to
Peter

Spehro Pefhany wrote

It is about 1.5 metre of 50 ohm coax, going straight into a Tek 2465B scope. The coax OD is 5mm; not sure of the capacitance. I wasn't using a 10x scope probe because it was going into Input #3 which has only two sensitivity settings ;) and I only have 2 scope probes to hand :)

I have now fixed the 1MHz stuff, with a 4k7 to the -15V rail, so can't try other things.

The weird thing is that I have been using the classic LM358N since c.

1975, for audio work, and it never gave this problem. Maybe it really doesn't like a (small but well nonzero - say a few hundred pF) capacitive load?

The other circuits in the data sheet don't show the 6.2k... why not?

The signal source is a HP3314A, 50 ohm source impedance. 100Hz sinewave.

Reply to
Peter

Den tirsdag den 15. oktober 2013 22.44.57 UTC+2 skrev Peter:

from the datasheet: .. For ac applications, where the load is capacitively coupled to the output of the amplifier, a resistor should be used,from the output of the amplifier to ground to increase the class A bias current and prevent crossover distortion. Where the load is directly coupled, as in dc applications, there is no crossover distortion.

Capacitive loads which are applied directly to the output of the amplifier reduce the loop stability margin. Values of 50pF can be accommodated using the worst-case non-inverting unity gain connection. Large closed loop gains or resistive isolation should be used if larger load capacitance must be driven by the amplifier. ..

the figure with the 6.2k pull down is ac coupled, your coax is probably 100pf

nothing really suprising

-Lasse

Reply to
Lasse Langwadt Christensen

Lasse Langwadt Christensen wrote

In that case, how does the resistor to the -ve rail fix the problem?

Maybe driving it in "Class A" improves the stability?

This isn't crossover distortion. This is a lack of stability when the

*bottom* output transistor is conducting.

I also tested it with a 1k from the output to GND. That changed the instability but really just shifted it along.

I will certainly test the circuit with varying capacitive loads...

Reply to
Peter

It's not because it's in class A per se.

Op-amps oscillate with capacitive loads because the load shunts the output impedance of the op-amp, and introduces a pole. When the thing is running class B and it's neither pushing nor pulling then the output impedance will be higher than otherwise -- this will make the effect worse.

Putting the resistor to the -ve rail does the same thing as the current load in the schematic -- it tends to bias Q6 on all the time, so that the output impedance is Q6's emitter impedance.

"just shifting the instability along" with your 1k to ground makes sense

-- you're not changing the fact that the output stage goes into class B, you're just changing where it happens.

I'd seriously consider isolating the amp from the load with a resistor, per Spehro and Phil, or at least test the thing to make sure that you've got plenty of stability, don't have a circuit that's just hanging on to sanity by its fingernails, waiting for a temperature change or component value drift to go bonkers.

If you _really_ want to be safe, go the full output-isolated method that's traditional for driving a cap: resistor from op-amp to load, cap from op-amp output to -input, and feedback from the load side of the isolating resistor. For such a wimpy op amp you'd probably need more than 100 ohms for guaranteed stability, but I'm not going to hazard a guess at just how much (I don't do enough circuit design to be able to pull a number out of my ear and have it be right -- I'd actually have to WORK to get a good answer).

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

Keeps the output impedance low. With no pull-down it's probably oscillating in the dead-band region..

...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142   Skype: Contacts Only  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

"Peter"

** Huh ? What sort of " audio work " ?

The LM358 is not suited to general audio use and is rarely seen used that way.

It has advantages with single supply rail and battery operation, as it has low idle current.

For general audio, the TL062 is far superior with a similar low drain and ability to work from +/- 3.5 volt rails.

If low drain is not a issue, then go for the TL072 or NE5532.

... Phil

Reply to
Phil Allison

"Lasse Langwadt Christensen"

** That last claim bugs me because it is misleading.

IF you use a single + supply and loads are not AC coupled then the output stage only sources current.

But if you use split rails, the output stage has to source and sink current so there will be HEAPS of crossover distortion.

.... Phil

Reply to
Phil Allison

=lm158-n&fileType=pdf

The 741 and the 748 had a truly vile output stage incorporating a lateral P NP transistor with a current gain of about 3. You used to be able to get th e 748 output to oscillate by asking it to sink current when close-ish to th e negative rail. Bob Widlar did better in the LM301 and LM307.

The LM158 data sheet shows a PNP in the output stage ...

I suspect that the 100pF capacitative load in the coaxial cable on the outp ut is the guilty party. Twisted pair did that to me once - I got more paran oid thereafter.

--
Bill Sloman, Sydney
Reply to
Bill Sloman

I thought you guys were in love with JRC 4558s?

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward" 
speff@interlog.com             Info for manufacturers: http://www.trexon.com 
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

"Spehro Pefhany" "Phil Allison"

** Think again.

... Phil

Reply to
Phil Allison

Although stated as Unity gain stable, judging by 30% overshoot on small signal, it is going to be affected by load impedance and resistor to V- increases the Class B output bias which lowers the impedance. ( read poor stability margin)

2K0 feedback might be too high relative to the open loop output impedance. Try 20k //22K without the Class B load pull-down resistor.
Reply to
Anthony Stewart

ignal, it is going to be affected by load impedance and resistor to V- incr eases the Class B output bias which lowers the impedance. ( read poor stab ility margin)

. Try 20k //22K without the Class B load pull-down resistor.

Also 30pF per foot cable capacitance will eliminate whatever phase margin y ou had and cause oscillation with low gain. Adding a series resistor outsid e the loop fixes that. If you intend to drive it long distances , use imped ance matching divider network, otherwise use FET probe or 10:1 probe with coaxial barrel to 2 pins on board with no ground clip.

Reply to
Anthony Stewart

Tim Wescott wrote

I can have up to about 100R in series with the output (without re-wiring the feedback) so I will do that, and I will test it with a capacitor box to make sure it is stable for all values.

The temp range is a good point - that's why I used the 158 in the first place...

Reply to
Peter

Here is the "standard" way to isolate OpAmps from a capacitive load...

...Jim Thompson

-- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at

formatting link
| 1962 | I love to cook with wine. Sometimes I even put it in the food.

Reply to
Jim Thompson

Peter, that's what I was describing with words -- Jim's just given you a nice schematic.

The idea behind it is that the R2 isolates the op-amp output somewhat from the load, C2 provides some lead compensation without letting the DC value of the op-amp change the feedback, and R1 provides the necessary DC feedback. You unavoidably reduce the bandwidth of the circuit, and the higher that CLOAD gets the bigger C2 needs to be, which means the lower the bandwidth goes. That's something that can't be avoided*, but stable and slow is usually better than unstable.

  • You push the bandwidth up by getting a faster op-amp with a lower output impedance. Faster means lower C2; lower output impedance means lower R2 and R1. When you're shopping, you usually know that the output impedance is lower because the amplifier is specified for higher output current, although occasionally a vendor will actually specify an open- loop output impedance number.
--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.