Maker Pro
Maker Pro

Why is this LM158 oscillating?

P

Peter

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
http://www.ti.com/general/docs/lit/getliterature.tsp?genericPartNumber=lm158-n&fileType=pdf
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...
 
P

Phil Hobbs

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.

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
 
S

Spehro Pefhany

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.

More like +2.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...

Hide it anyway.
Looking at the schematic e.g. here
http://www.ti.com/general/docs/lit/getliterature.tsp?genericPartNumber=lm158-n&fileType=pdf
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?

Usually to prevent crossover distortion.
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...

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.
 
P

Peter

Spehro Pefhany said:
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.
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.
 
L

Lasse Langwadt Christensen

Den tirsdag den 15. oktober 2013 22.44.57 UTC+2 skrev Peter:
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.


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
 
P

Peter

Lasse Langwadt Christensen said:
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

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...
 
P

Phil Allison

"Peter"
The weird thing is that I have been using the classic LM358N since c.
1975, for audio work, and it never gave this problem.


** 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
 
P

Phil Allison

"Lasse Langwadt Christensen"
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.


** 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
 
B

Bill Sloman

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


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

The 741 and the 748 had a truly vile output stage incorporating a lateral PNP transistor with a current gain of about 3. You used to be able to get the 748 output to oscillate by asking it to sink current when close-ish to the 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 output is the guilty party. Twisted pair did that to me once - I got more paranoid thereafter.
 
S

Spehro Pefhany

"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

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


Best regards,
Spehro Pefhany
 
A

Anthony Stewart

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.
 
A

Anthony Stewart

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.

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

Peter

Tim Wescott said:
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).

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...
 
P

Peter

Tim Wescott said:
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.

OK - thank you both.

It turns out that the load I am driving is 300k and a 1k series
resistor is going to introduce a negligible error in this case.

I've been doing both analog and switching power supplies since the
1970s but have never got my head around poles and zeroes :)

I can certainly see the principle behind taking the DC feedback from
after the resistor - that's obvious. But the feedback cap is more
subtle...

Re the other question - a LM358 was widely used for basic audio
circuits years ago. It's not really suitable for anything decent, of
course. My present application is a very simple DC one, but I am
testing with an AC waveform because it's an easy way to check the
voltage range.
 
W

whit3rd

Which makes me puzzle over the stability of OTA's... their open-loop
output impedance is very high.

You never use them without a load resistor (they're always tested with
one). And, you don't always care about feedback stability, because
they don't always get used with feedback. They perform operational
tasks, without being 'operational amplifiers' in the traditional sense
of high-input-impedance, low-output-impedance with high voltage gain.
 
P

Peter

Tim Wescott said:
Is the six feet (or whatever) of 50-ohm coax going to be in the product,
or is that just how you're measuring things?

If it's just a development artifact, get a decent scope probe!

In the actual installation it will be driving about 2m of a shielded
cable, Raychem type 55, impedance unknown to any degree, plus some
input capacitance of an indicating instrument, so I think that coax is
a reasonable thing to do.

Funnily enough had I used a 10x scope probe the problem would have
never surfaced...
 
Top