Author Topic: External pull up/down/GND resistor's on op-amp output's ?  (Read 1628 times)

0 Members and 1 Guest are viewing this topic.

Offline MathWizardTopic starter

  • Super Contributor
  • ***
  • Posts: 1431
  • Country: ca
External pull up/down/GND resistor's on op-amp output's ?
« on: February 05, 2024, 06:51:26 pm »
With jellybean op-amps, is it good practice or not, to have some dummy load, like 10k or 100k, on the output's ? If I was making some peak detector, I might not want to, so I know not all circuits would benefit.

So when is it a benefit for the op-amp itself? Or is there any with common modern jellybean op-amps ? Or is it usually all taken care of internally, and usually doesn't need extra DC loading. Then AC loading and compensation, well that's more complicated than I'm thinking about, like DC or low frequency logic circuit's.


As an example, if the output of 1 op-amp was only connected to an input of another op-amp, I would place some resistor between them, but I would also think I should have some much larger external shunt resistor to GND. I'm sure I've seen circuit's where it's left out, maybe for cost reasons, or it didn't matter in that circuit.

I know a common-emitter amplifier should have low AC output impedance, and pretty low DC output resistance, so maybe most op-amp's never need it, IDK.
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6203
  • Country: ro
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #1 on: February 05, 2024, 07:26:39 pm »
Most opamps don't need a pullup or pulldown resistor at all, but some opamps models, by design, have crossover distortions.  These need to be helped with an output resistor, to mitigate the crossover, for example LM358 or LM324:

#215: Basics of crossover distortion | LM358 op amp example
w2aew



Offline MathWizardTopic starter

  • Super Contributor
  • ***
  • Posts: 1431
  • Country: ca
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #2 on: February 05, 2024, 11:29:36 pm »
OK I use LM358 a lot, I know CO dist. makes them bad for audio, but I didn't know adding increasing the load can help, I'll try and remember that.

And then there's the LM393 comparator, it took me a few years to remember or find out it needs a pull up resistor to work.
 

Online BillyO

  • Super Contributor
  • ***
  • Posts: 1399
  • Country: ca
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #3 on: February 06, 2024, 01:03:24 am »
The LM328/324 only need the pull up/down if you use them with a split supply.  The design is optimized for a single supply.

Oh, and it's not increasing the load.  It's providing a current path when the output would normally cross zero.
« Last Edit: February 06, 2024, 05:13:43 pm by BillyO »
Bill  (Currently a Siglent fanboy)
--------------------------------------------------
Want to see an old guy fumble around re-learning a career left 40 years ago?  Well, look no further .. https://www.youtube.com/@uni-byte
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16621
  • Country: us
  • DavidH
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #4 on: February 06, 2024, 01:05:39 am »
The feedback network counts as a load on the output also.

For precision operational amplifiers, a heavy load on the output will spoil precision because of self heating of the output transistors.

As mentioned, operational amplifiers with class-b output stages can have their crossover distortion removed by forcing the output into class-a with a load to one supply rail.
 
The following users thanked this post: RoGeorge

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19528
  • Country: gb
  • 0999
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #5 on: February 06, 2024, 09:55:21 am »
The LM328/324 only need the pull up/down if you use them with a split supply.  The design is optimized for a single supply.

Oh, and it's not increasing the load.  It's providing a current path when the output crosses zero.
That's not quite true. Crossover distortion occurs when the current flowing through the output changes direction, because one of the transistors in the output stage turns off, before the other turns on. This won't happen, if the load is connected directly to 0V and it's run off a single supply, but it will if it's AC coupled. Another occasion when this will happen is an inverting amplifier, with the +input biased at half the supply voltage and a load which draws less current than the feedback resistor.
 

Online BillyO

  • Super Contributor
  • ***
  • Posts: 1399
  • Country: ca
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #6 on: February 06, 2024, 11:45:03 am »
That's not quite true.
What I said is true for the LM358.  Please have a look at the datasheet. :palm:
Bill  (Currently a Siglent fanboy)
--------------------------------------------------
Want to see an old guy fumble around re-learning a career left 40 years ago?  Well, look no further .. https://www.youtube.com/@uni-byte
 

Online magic

  • Super Contributor
  • ***
  • Posts: 6779
  • Country: pl
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #7 on: February 06, 2024, 11:51:54 am »
Everything you wrote is wrong ;)

LM358 has crossover distortion when it needs to alternately sink and source current, that's the only criterion. Supply voltages don't matter and not all applications drive loads connected to ground.

Adding a resistor to whichever supply does increase load on the output stage, both in terms of static DC current which needs to be supplied to the resistor and in terms of change in said current which needs to be produced to change the output voltage.

It's better to load LM358 towards the negative rail because then you are using the NPN darlington part of the output stage, which has high current gain and doesn't affect the preceding stages as much as the sinking side would.
« Last Edit: February 06, 2024, 11:53:57 am by magic »
 
The following users thanked this post: MathWizard

Offline ArdWar

  • Frequent Contributor
  • **
  • Posts: 373
  • Country: sc
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #8 on: February 06, 2024, 11:52:24 am »
Here's an overview on LM358/324's mostly output idiosyncrasies

https://www.ti.com/lit/an/sloa277b/sloa277b.pdf

It is indeed a rather peculiar little device. The output basically have three different operating mode. The two asymmetric push-pull stage that may cause aforementioned crossover problem, and a third "30uA" pulldown that may cause some problem if your application load line happen to cross it.
 
The following users thanked this post: MathWizard

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16621
  • Country: us
  • DavidH
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #9 on: February 06, 2024, 12:26:29 pm »
Back when the 358 and 324 were new, there were alternatives which had the same design and performance but also included a class-ab output stage.  I do not know why, but the alternatives died out while the 324 and 358 became the standard.

The 358/324 already include a 50 microamp current sink pulling the output down to the negative supply to support single supply operation, but this is not enough to support class-a operation with most loads.
 

Online BillyO

  • Super Contributor
  • ***
  • Posts: 1399
  • Country: ca
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #10 on: February 06, 2024, 05:07:01 pm »
Everything you wrote is wrong ;)

Why do people even say sh!t like this on the internet.  The LM358 IS optimized for single supply.  When used in a single supply situation where the load does not change drastically you will NOT have crossover distortion .. because there is no crossover happening.  Look to the spec sheet and notice that EVERY application circuit is for a single voltage supply.

The resistor on the output to one rail or the other is NOT for load.  It is to bias the output such that it is either always sourcing or always sinking to specifically avoid the situation where it needs to crossover.

Read the appnote ArdWar linked to.  Pay special attention to section 4.

Also, look at this video.  He's not especially eloquent, but he does a demonstration and gets the message across.



Bill  (Currently a Siglent fanboy)
--------------------------------------------------
Want to see an old guy fumble around re-learning a career left 40 years ago?  Well, look no further .. https://www.youtube.com/@uni-byte
 

Online magic

  • Super Contributor
  • ***
  • Posts: 6779
  • Country: pl
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #11 on: February 06, 2024, 05:15:18 pm »
Then try using LM358 in a single supply headphone amplifier with AC coupled outputs like here and report how it went...
:popcorn:
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19528
  • Country: gb
  • 0999
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #12 on: February 06, 2024, 05:58:11 pm »
That's not quite true.
What I said is true for the LM358.  Please have a look at the datasheet. :palm:
Alright.
Quote from: LM358 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.
https://www.ti.com/lit/ds/snosbt3j/snosbt3j.pdf

It's got nothing to do with the power supply rail configuration and all to do with the fact the output is switching from sourcing to sinking current.
Then try using LM358 in a single supply headphone amplifier with AC coupled outputs like here and report how it went...
:popcorn:
I had a play with LTSpice.

The model from TI, or wherever I downloaded it from doesn't simulate the output stage properly, but I have already made my own, more detailed one.

As you and I both know, it shows horrible crossover distortion,when the output is capacitively coupled to the load, even with a single supply rail. The real LM358 will be very similar.

 
The following users thanked this post: RoGeorge

Online BillyO

  • Super Contributor
  • ***
  • Posts: 1399
  • Country: ca
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #13 on: February 06, 2024, 06:57:53 pm »
This site is having horrible trouble today.

Anyway, sure, I agree.  Using it single sided as a headphone amplifier improperly will cause trouble.  You'd then need to bias the output to the  V+ rail, or better still use an amplifier better suited to the purpose like a TLC272.

Use it as it's supposed to be used, it will work fine.  But as I already said, this chip is optimized for single supply operation.  You can use it for cases where the output would normally cross zero, but you have to use it properly in those cases and bias the output so that it does not cross zero.

It's simple.  Use it properly.

As for me, I'm lazy.  I do use the LM358, but usually only as buffers or small gain amplifiers where is run single ended and direct coupled.  Like to buffer a voltage reference, or a R2R ladder, etc..

I don't use it for audio or zero crossing applications because there are better, easier options.
Bill  (Currently a Siglent fanboy)
--------------------------------------------------
Want to see an old guy fumble around re-learning a career left 40 years ago?  Well, look no further .. https://www.youtube.com/@uni-byte
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19528
  • Country: gb
  • 0999
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #14 on: February 06, 2024, 07:10:36 pm »
This site is having horrible trouble today.

Anyway, sure, I agree.  Using it single sided as a headphone amplifier improperly will cause trouble.  You'd then need to bias the output to the  V+ rail, or better still use an amplifier better suited to the purpose like a TLC272.

Use it as it's supposed to be used, it will work fine.  But as I already said, this chip is optimized for single supply operation.  You can use it for cases where the output would normally cross zero, but you have to use it properly in those cases and bias the output so that it does not cross zero.

It's simple.  Use it properly.

As for me, I'm lazy.  I do use the LM358, but usually only as buffers or small gain amplifiers where is run single ended and direct coupled.  Like to buffer a voltage reference, or a R2R ladder, etc..

I don't use it for audio or zero crossing applications because there are better, easier options.
The output of the LM358 in the simulation I posted above doesn't cross through zero. It swings about 4.5V. I plotted the voltage across the load resistor through habit.
 

Online BillyO

  • Super Contributor
  • ***
  • Posts: 1399
  • Country: ca
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #15 on: February 06, 2024, 07:15:37 pm »
No, but it has to cross over from charging the capacitor through the top pair of transistors to discharging the capacitor through the bottom transistor.  The same thing has to happen in this case too.  Again, 1) it can be solved by proper output biasing, 2) there are better ways to do this. :horse:
« Last Edit: February 06, 2024, 07:18:39 pm by BillyO »
Bill  (Currently a Siglent fanboy)
--------------------------------------------------
Want to see an old guy fumble around re-learning a career left 40 years ago?  Well, look no further .. https://www.youtube.com/@uni-byte
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19528
  • Country: gb
  • 0999
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #16 on: February 06, 2024, 09:55:18 pm »
No, but it has to cross over from charging the capacitor through the top pair of transistors to discharging the capacitor through the bottom transistor.  The same thing has to happen in this case too.  Again, 1) it can be solved by proper output biasing, 2) there are better ways to do this. :horse:
Exactly. You've got it.

Connecting a resistor from the output, to either power supply rail will bias the output into class A and eliminate the problem.

The next question is what resistor value to use? The answer is, it depends on the peak load current and minium output voltage, relative to the supply rail the resistor is connected to. For example, in this case, the op-amp's output swings to within 2.5V of either rail and the peak load current is 2mA, so R = V/I = 2.5/0.002 = 1250 Ohms, so use a slightly lower value, 1k2 or even 1k. Note the op-amp will need to be able output enough current to drive both the load a bias resistor.
 

Online BillyO

  • Super Contributor
  • ***
  • Posts: 1399
  • Country: ca
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #17 on: February 06, 2024, 10:39:38 pm »
Exactly. You've got it.
From my end I always had it.  I'm getting the feeling that the same thing has been said different ways.

The next question is what resistor value to use? The answer is, it depends on the peak load current and minium output voltage, relative to the supply rail the resistor is connected to. For example, in this case, the op-amp's output swings to within 2.5V of either rail and the peak load current is 2mA, so R = V/I = 2.5/0.002 = 1250 Ohms, so use a slightly lower value, 1k2 or even 1k. Note the op-amp will need to be able output enough current to drive both the load a bias resistor.
Yes, keeping in mind the maximum current the op-amp can muster on either the source or sink side.  As you said, the combined current of the load and the bias should not exceed this, and all that gives my head an ace, so I use better suited amplifiers. :-DD
Bill  (Currently a Siglent fanboy)
--------------------------------------------------
Want to see an old guy fumble around re-learning a career left 40 years ago?  Well, look no further .. https://www.youtube.com/@uni-byte
 

Offline MathWizardTopic starter

  • Super Contributor
  • ***
  • Posts: 1431
  • Country: ca
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #18 on: February 07, 2024, 01:51:06 pm »
In my circuit, I'm making a continuity tester for 1 of my older DMM's. In resistance mode, the DMM sinks current from GND into the DUT, so I'll be measuring a few mV below GND. Unless I want to convert that signal to a positive voltage, I was just going to use the +/-15 rails, and amplify that voltage, and compare to a divided down zener reference. Then if I used a LM324, I was going to make an RC osc. and control a peizo.

I have most of it on a breadboard, besides that 1 negative voltage, IDK if it's better to have it all on 1 rail, and I need to see how much current the buzzer circuit will use.

I made a version of this circuit ages, but used my own current source, and never matched it to make the DMM read out nice numbers. So now it will be on the 2k ohms range, when a button it pushed.
 

Online BillyO

  • Super Contributor
  • ***
  • Posts: 1399
  • Country: ca
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #19 on: February 07, 2024, 05:28:43 pm »
Do you have a schematic?  It seems if you have a split supply using an "almost as cheap" TL074 might be a way better approach and just not worry about odd behavior.
Bill  (Currently a Siglent fanboy)
--------------------------------------------------
Want to see an old guy fumble around re-learning a career left 40 years ago?  Well, look no further .. https://www.youtube.com/@uni-byte
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19528
  • Country: gb
  • 0999
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #20 on: February 07, 2024, 06:44:51 pm »
The LM324 will work with its inputs biased slightly below the negative rail, say 100mV or so.

The TL074 is a decent suggestion. It has a lower noise, lower bias current current and no crossover distortion, but higher offset voltage and power consumption. It depends on the application.
 

Offline MathWizardTopic starter

  • Super Contributor
  • ***
  • Posts: 1431
  • Country: ca
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #21 on: February 22, 2024, 08:16:46 am »
I'm just back to breadboarding the LM324 continuity mode addition to a benchtop DMM. I have lots of cheap ebay ones I might aswell use. I set it up with split rails, and set it to trigger on 2 ohms resistance. Which gives an output of +1V, then a difference amplifier compares that to an adjustable reference so I can change it if I want, with a poteniometer poking out of the case. Seems to work good.

I can see the output of the inverting amplifier go from 920mV to 840mV when the diff.amp goes from high to low. In fact just connecting/disconnecting a 1x probe to the diffamp output, drops the inverting OA output from 860mV to 800mV. I'm only using 2of4 of the LM324, the other 2 have NonInv pins on GND and INV tied to their outputs.

I have plenty of fine details to learn about op-amp's, but I don't know if that's typical, it sounds huge, but my gain is ~1000x, so IDK. Some of it might be the breadboard and wires back to the PSU, the whole thing with a PWR LED and  continuity LED uses 35mA for now. IDK what the buzzer circuit will use, but I hope it won't be too much for the little transformer in the DMM.



The only path from the outside world to my added circuit is via a 100k resistor, to the op-amp. I'll use the DMM on 2Kohm mode, and the DMM has a buffer as part of the resistance mode, that senses the DUT from across 100kohms also, with no added safety protections, so I'll just have to be as careful when using it, no different than before tho.

On the breadboard, there's about 920mV at the output of the 1st OA from the 2 ohms, and then about that from the divided down 5V1 zener.
« Last Edit: February 22, 2024, 08:39:14 am by MathWizard »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19528
  • Country: gb
  • 0999
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #22 on: February 22, 2024, 07:22:49 pm »
How are you going to compensate for the LM324's offset voltage, which is typically 2mV? The first stage has a gain of 1000, which will amplify the offset voltage to around 2V. Even if it's not as bad as that, it's still significant, relative to the voltage you're trying to measure across the DUT, which will be around 2mV.

You need an op-amp with a much lower input offset for the first stage. The OP07 is widely available, has an offset voltage of just 75µV and isn't hugely expensive.
 

Offline MarkT

  • Frequent Contributor
  • **
  • Posts: 367
  • Country: gb
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #23 on: February 22, 2024, 08:49:01 pm »
I have plenty of fine details to learn about op-amp's, but I don't know if that's typical, it sounds huge, but my gain is ~1000x, so IDK.

That's a shed load of gain to use, the bandwidth will be terrible.

Even with a fast opamp a gain of 1000 is normally done with 2 or 3 stages to avoid hammering the bandwidth into the ground and for less distortion.

The first stage might usefully be a zero-offset opamp.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19528
  • Country: gb
  • 0999
Re: External pull up/down/GND resistor's on op-amp output's ?
« Reply #24 on: February 22, 2024, 09:51:19 pm »
It's a large gain, but if it's DC, it's not going to be as bigger problem as the offset voltage.

Calculate the actual closed loop gain, taking the op-amps finite open loop gain into account.

Closed loop gain formula:
ACL = AOL / (1 + β*AOL)

Open loop gain of the LM324 is:
AOL = 100*103 according to the data sheet.

β is the amount of negative feedback, which is:
β = 1/R2/(R1+R2) = 999*10-6

Calculate the closed loop gain.
ACL = AOL / (1 + β*AOL)
ACL = 100*103/(1+999*10-6*100*103) = 991

Calculate the error
error = 1-ACL/AIDEAL
error = 1-991/1000 = 0.9%

So that's 0.9% below the desired gain of 1000, which is no good for a precision application but is nothing compared to the effect of the input offset voltage.
« Last Edit: February 22, 2024, 10:47:49 pm by Zero999 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf