Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LM358 Significant Data Sheet Errors

Status
Not open for further replies.

MrAl

Well-Known Member
Most Helpful Member
Hello there,


The LM358 gets a bad rap a lot because of various reasons, one of them being the crossover distortion. This is due mostly because the data sheet contains subtle errors about the correct use of the device for many applications that need a clean sine output or just low distortion.

The main crossover problem comes from the output section of the LM358, which is a class B amplifier.

Shown in the first attachment is the result of simulations of a class B amplifier with plus and minus 10 volt power supplies driven with a pure sine source of varying levels starting at 1v peak and doubling up to 8v peak, and a 25k resistor to ground. As clearly shown, the distortion is very bad for lower inputs, but distortion gets lower and lower as the input gets higher and higher. This makes the output stage look better and better. Indeed the harmonics do get lower and lower as the input goes higher, so the output does in fact get cleaner. This is similar to what we might get from the LM358 if we follow the data sheet word for word.

But that's not the end of it of course. The data sheet tells us that to get a crossover free output we need a resistor from the output to *GROUND*. Here's where the confusion comes into play. We all know what ground is, but what the data sheet implies is that GROUND is ground no matter how we hook up the LM358. That isnt true. We already have a resistor to ground and that's the load, and decreasing this value doesnt help much. The mistake is that GROUND on the data sheet actually should read: "The most negative supply voltage", not: "ground" as it does. This leads designers to place a resistor from output to ground, even in dual supply circuits, and it effectively does not help. People using the device more casually notice this too, and they don't like it.

The idea with the output resistor (connected properly that is) is to bias the output stage into class A operation. This means we can get a clean output.
If you look at the second attachment, you'll see the difference. When the amplifier is biased into class A operation we get a much cleaner output even with the lower level input signal because we effectively don't use the lower transistor anymore. The crossover distortion comes from having to wait for one transistor to turn on while the other turns off, but by biasing correctly we never turn anything off, and only use the upper transistor.
The second attachment shows the clean output and that's all because of a single added resistor, but that single added resistor has to be connected properly.

So the output resistor does not always go to ground, it goes to the most negative supply voltage. That may or may not be the true circuit ground. This is something that is absolutely mandatory for correct operation in circuits that need a clean output.

There are still some limitations for the LM358, but now at least we can get a clean output. The limitation for the output to negative rail resistor is probably around 500 ohms, but it depends on power suppply levels so you should test your design. The requirement for this resistor in your application is such that it has to be small enough to be able to pull the load down to the required low level, but not draw so much current that it overloads the output of the LM358. This is often easy to achieve for lower level output requirements. It's only the most demanding output current applications that this may not be possible for. Signal level circuits however should have no problem with this little modification. This should include audio circuits where the output level isnt too high, probably about 3v peak maximum.

Side note:
Ignore the offset voltage in the second attachment. This is because the amplifier used in the simulations did not contain feedback. For a normal LM358 amplifier connection the output would be centered at 0v as usual.
 

Attachments

  • ClassB_OutputStageDirectDrive.gif
    ClassB_OutputStageDirectDrive.gif
    53.7 KB · Views: 828
  • ClassB_OutputWithBias.gif
    ClassB_OutputWithBias.gif
    13.6 KB · Views: 574
Last edited:
Hi MrAl,

I build this circuit

**broken link removed**

Red is the input signal, blue output signal.

And here you have some real measurement
For RL = ∞

**broken link removed**

RL = 10KΩ

**broken link removed**

And for RL = 1K
 
Last edited:
To MrAl, thanks for posting that! I've used LM358 with excellent results in the past and always wondered why it had a bad rap.

The times I used it was with a single rail +ve supply, and resistor load to ground, so that makes sense. :)
 
Hi Jony,

Nice. Can you show your circuit where you connected the load resistor?
Also, can you try a resistor to the minus supply, say 1k, directly from the output ?
 
Last edited:
Ok , no problem today I show you where I connect the load and try connect 1K directly from the output to GND.
But now I need to go to sleep (3:11 AM in POLAND).
 
LM324 has the same problem. Never forget the little oscillations when the output was around virtual ground.
 
To MrAl, thanks for posting that! I've used LM358 with excellent results in the past and always wondered why it had a bad rap.

The times I used it was with a single rail +ve supply, and resistor load to ground, so that makes sense. :)

Hi MrRB,

Oh yes, with the resistor to ground in a single supply circuit it would help alot, as long as the resistor can be made low enough to handle the bulk of the output current for pulling the load down.
This resistor has to be low enough to provide the negative peak for the output without involving the internal lower PNP transistor, but cant be too low so that it draws too much current when the output positive peak goes to a maximum. If those conditions can be met, the output should be quite clean.
 
Hello there,


The LM358 gets a bad rap a lot because of various reasons, one of them being the crossover distortion. This is due mostly because the data sheet contains subtle errors about the correct use of the device for many applications that need a clean sine output or just low distortion.

The main crossover problem comes from the output section of the LM358, which is a class B amplifier.

Shown in the first attachment is the result of simulations of a class B amplifier with plus and minus 10 volt power supplies driven with a pure sine source of varying levels starting at 1v peak and doubling up to 8v peak, and a 25k resistor to ground. As clearly shown, the distortion is very bad for lower inputs, but distortion gets lower and lower as the input gets higher and higher. This makes the output stage look better and better. Indeed the harmonics do get lower and lower as the input goes higher, so the output does in fact get cleaner. This is similar to what we might get from the LM358 if we follow the data sheet word for word.

But that's not the end of it of course. The data sheet tells us that to get a crossover free output we need a resistor from the output to *GROUND*. Here's where the confusion comes into play. We all know what ground is, but what the data sheet implies is that GROUND is ground no matter how we hook up the LM358. That isnt true. We already have a resistor to ground and that's the load, and decreasing this value doesnt help much. The mistake is that GROUND on the data sheet actually should read: "The most negative supply voltage", not: "ground" as it does. This leads designers to place a resistor from output to ground, even in dual supply circuits, and it effectively does not help. People using the device more casually notice this too, and they don't like it.

The idea with the output resistor (connected properly that is) is to bias the output stage into class A operation. This means we can get a clean output.
If you look at the second attachment, you'll see the difference. When the amplifier is biased into class A operation we get a much cleaner output even with the lower level input signal because we effectively don't use the lower transistor anymore. The crossover distortion comes from having to wait for one transistor to turn on while the other turns off, but by biasing correctly we never turn anything off, and only use the upper transistor.
The second attachment shows the clean output and that's all because of a single added resistor, but that single added resistor has to be connected properly.

So the output resistor does not always go to ground, it goes to the most negative supply voltage. That may or may not be the true circuit ground. This is something that is absolutely mandatory for correct operation in circuits that need a clean output.

There are still some limitations for the LM358, but now at least we can get a clean output. The limitation for the output to negative rail resistor is probably around 500 ohms, but it depends on power suppply levels so you should test your design. The requirement for this resistor in your application is such that it has to be small enough to be able to pull the load down to the required low level, but not draw so much current that it overloads the output of the LM358. This is often easy to achieve for lower level output requirements. It's only the most demanding output current applications that this may not be possible for. Signal level circuits however should have no problem with this little modification. This should include audio circuits where the output level isnt too high, probably about 3v peak maximum.

Side note:
Ignore the offset voltage in the second attachment. This is because the amplifier used in the simulations did not contain feedback. For a normal LM358 amplifier connection the output would be centered at 0v as usual.

Posts like this keep ETO at the forefront of Electronic Forums ;) And as usual, I will write it all down.

Thanks MrAl. I have once again learnt something :)

Kind regards,
TV Tech
 
Last edited:
hi Al,
This LM358 app note also covers the points you have made.

E.
 

Attachments

  • snoa662a.pdf
    152.4 KB · Views: 840
This is the diagram that I use during the measurement.



And here you have some real world measurement

For RL = ∞ and R_sliding_bias = ∞

**broken link removed**


RL = 1K and R_sliding_bias = ∞

**broken link removed**


RL = 1K ; R_sliding_bias = 4.7KΩ

**broken link removed**

RL = 1K ; R_sliding_bias = 1KΩ



So this sliding bias work quiet well. And to be honest I completely forgot about this old trick.
Thx MrAl
 
Last edited:
Yes, adding a DC load so that the output operates in class-A instead of producing crossover distortion in class-B works well.

There is a forum about hi-fi headphones amplifiers (www.headwize.com I think).
The audiophools are using high quality audio opamps like the OPA2134 that has 0.00008% distortion and adding a DC load so that the output operates in class-A instead of in class-AB TO REDUCE THE DISTORTION!

Now how can we reduce the high hissss level from the LM358 and LM324 without cutting their already poor high frequency response?
 
Hi again,

I have some formulas for this bias resistor i'll post at the end after my replies.



ronv:
Yeah i think the LM324 has the same internal structure per op amp section.

tvtech:
I was hoping to shed a little light on this topic so maybe we can get some better operation out of the little LM358. I've used these since 1980 in both commercial and hobby circuits so they cant be too bad.

Eric:
Thanks for posting that app note. It looks interesting and i'll have to read it better. Took a quick look already and yeah they do mention the negative supply rail, finally. This app note must have missed entry into my 1980 app note collection book from National or i would have mentioned it.

Jony:
Thanks for doing the tests as a test is usually so informative and helps to verify the theory. I'm posting some formulas here you can try if you like that allow us to select a good value for this bias
resistor.

audioguru:
Yeah, so we can get rid of some of this distortion in many applications. Of course there will be some that cant use this trick but many that will.
That's interesting on that other site, i'll have to check that site out more carefully. What no tubes? Im surprised at them :)
I think the 'hiss' might not be a problem unless we try to use this device as a pre amp, which probably isnt that good of an idea :)



THE FORMULAS:

The bias resistor has to be low enough to be able to drive the output load to the most negative output peak without the need to use the lower transistor in the output stage of the LM358 if we are to make sure that the crossover distortion gets eliminated. But it also can not draw too much power on the positive peak because after all this resistor acts as a load directly to the minus supply voltage.
This leads to the following constraint for the bias resistor Rb:
RbMax>=RbMin
where
RbMax is the maximum value for the bias resistor Rb and RbMin is the minimum value calculated as follows:

RbMax=(VoN-MVcc)*RL/(Ipb*RL-VoN)
RbMin=(VoP-MVcc)*RL/(IoP*RL-VoP)
where
VoN is the negative peak out of the device output terminal,
VoP is the positive peak out of the device output terminal,
MVcc is the negative voltage of the negative supply voltage,
RL is the load resistor assumed to go to ground,
IoP is the max positive output peak current of the LM358 (typically 20ma),
Ipb is the min current to keep the output stage biased into class A.

For example, with the following values:
VoP=3 (the positive peak out of the LM358 output terminal)
VoN=-3 (the negative peak out of the LM358 output terminal)
MVcc=-7 (the negative supply rail voltage, which is of course negative)
RL=1000 (the load resistor from output to ground or capacitively coupled output to ground)
IoP=0.020 (typical min)
Ipb=0.001 (assumed)

Using the above formula for RbMin and RbMax we get:
RbMax=1000
RbMin=588.2

Since for this example RbMax>RbMin, the value of Rb can be set to 1000 ohms, or anywhere between 588 ohms and 1000 ohms.
There will be some designs that wont work this way however, because RbMax will come out less than RbMin...
Consider changing MVcc to -5v. In this case we get RbMax=500 and RbMin=470.6 ohms, and here RbMax is just barely over RbMin, but it should work.
However, change MVcc to -4v and we get RbMax=250 ohms and RbMin=411.8 ohms. Since RbMax is less than RbMin in this example this design will not work because there is no resistor value that will satisfy all of the the constraints outlined above.

Try this out when you get a chance :)
 
Last edited:
Hi MrRB,

Oh yes, with the resistor to ground in a single supply circuit it would help alot, as long as the resistor can be made low enough to handle the bulk of the output current for pulling the load down.
This resistor has to be low enough to provide the negative peak for the output without involving the internal lower PNP transistor, but cant be too low so that it draws too much current when the output positive peak goes to a maximum. If those conditions can be met, the output should be quite clean.

The last one I remember was supplied from +5v regulated siggle supply, driving a resistive load (voltage divider) of maybe 1k to ground, and the result was good.

I can't see why the lower driver would have even turned on there was practically no load capacitance and output current was always within a 1v-3v (-1mA to -3mA) range.
 
Hi MrRB,

If the output terminal never has to pull the load down, the lower internal drive transistor will never turn on. It's only when the load can source some current into the pin that the lower transistor would have to turn on to pull it down. This can either be a temporary condition or a steady state condition. If there is load capacitance then the lower transistor might turn on.
If we provide a resistor from output pin to most negative supply, we provide an additional path to the negative rail which can then pull the load down if it happens to source some current.

If we already have a load and it's a resistance and it goes to the most negative supply rail then the lower transistor will never turn on because the resistance will never be able to source any current into the output pin.

Probably the most common application where this is going to matter most is with the capacitor coupled outputs. Since the cap stores a charge, it will source current into the output pin at some point, unless we bypass the output to the minus supply rail with a resistor when then takes care of the crossover problem.

In the formulas i posted in my previous post i didnt include the feedback resistor for simplicity, although i thought i should mention that the feedback resistor comes into play too if it is significantly low enough to draw more current or source some current.
 
Don't overlook the fact that the feedback network is part of the load. It may be insignificant, but it should be considered, especially if you need the output to go very close to the negative rail.
 
Hi,

I didnt include the feedback resistor because the type of input network varies considerably, and the feedback resistor will often be made much larger than the 'pulldown' resistor we've been talking about. I mentioned the exclusion in my previous post. For most applications this will be sufficient, but instead of complicating the formulas too much i decided to leave it up to the reader to decide for themselves if they should lower the pulldown resistor or not because of feedback.

I can include that in the formulas, but it will mean adding another two variables and a more complex pair of formulas. I guess it couldnt hurt though :)
 
Hi,

I didnt include the feedback resistor because the type of input network varies considerably, and the feedback resistor will often be made much larger than the 'pulldown' resistor we've been talking about. I mentioned the exclusion in my previous post. For most applications this will be sufficient, but instead of complicating the formulas too much i decided to leave it up to the reader to decide for themselves if they should lower the pulldown resistor or not because of feedback.

I can include that in the formulas, but it will mean adding another two variables and a more complex pair of formulas. I guess it couldnt hurt though :)
I totally missed that comment.:(
 
Hi Ron,

I worked up a different formula that includes the feedback resistor, but if they dont use just a resistor then it has to change again anyway. For example a capacitor also with the resistor, then the cap current has to be taken into account. So i thought at that point it is better to leave the rest to the user who might have to think about it themselves.
 
Hi Ron,

I worked up a different formula that includes the feedback resistor, but if they dont use just a resistor then it has to change again anyway. For example a capacitor also with the resistor, then the cap current has to be taken into account. So i thought at that point it is better to leave the rest to the user who might have to think about it themselves.
I agree with your assessment.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top