External pull up/down/GND resistor's on op-amp output's ? - Page 1
Forum section: electronics / beginners

author: MathWizard
author_rank: Super Contributor
timestamp: February 05, 2024, 06:51:26 pm
content: 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.

author: RoGeorge
author_rank: Super Contributor
timestamp: February 05, 2024, 07:26:39 pm
content: 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 examplew2aew

author: MathWizard
author_rank: Super Contributor
timestamp: February 05, 2024, 11:29:36 pm
content: 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.

author: BillyO
author_rank: Super Contributor
timestamp: February 06, 2024, 01:03:24 am
content: 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.

author: David Hess
author_rank: Super Contributor
timestamp: February 06, 2024, 01:05:39 am
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: February 06, 2024, 09:55:21 am
content: Quote from: BillyO on February 06, 2024, 01:03:24 amThat'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.

author: BillyO
author_rank: Super Contributor
timestamp: February 06, 2024, 11:45:03 am
content: Quote from: Zero999 on February 06, 2024, 09:55:21 amWhat I said is true for the LM358. Please have a look at the datasheet.

author: magic
author_rank: Super Contributor
timestamp: February 06, 2024, 11:51:54 am
content: Everything you wrote is wrongLM358 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.

author: ArdWar
author_rank: Frequent Contributor
timestamp: February 06, 2024, 11:52:24 am
content: Here's an overview on LM358/324's mostly output idiosyncrasieshttps://www.ti.com/lit/an/sloa277b/sloa277b.pdfIt 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.

author: David Hess
author_rank: Super Contributor
timestamp: February 06, 2024, 12:26:29 pm
content: 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.

author: BillyO
author_rank: Super Contributor
timestamp: February 06, 2024, 05:07:01 pm
content: Quote from: magic on February 06, 2024, 11:51:54 amWhy do people even say sh!t like this on the internet. The LM358ISoptimized for single supply. When used in a single supply situation where the load does not change drastically you willNOThave 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 isNOTfor 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.

author: magic
author_rank: Super Contributor
timestamp: February 06, 2024, 05:15:18 pm
content: Then try using LM358 in a single supply headphone amplifier with AC coupled outputs likehereand report how it went...

author: Zero999
author_rank: Super Contributor
timestamp: February 06, 2024, 05:58:11 pm
content: Quote from: BillyO on February 06, 2024, 11:45:03 amAlright.Quote from: LM358 Datasheethttps://www.ti.com/lit/ds/snosbt3j/snosbt3j.pdfIt'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.Quote from: magic on February 06, 2024, 05:15:18 pmI 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.

author: BillyO
author_rank: Super Contributor
timestamp: February 06, 2024, 06:57:53 pm
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: February 06, 2024, 07:10:36 pm
content: Quote from: BillyO on February 06, 2024, 06:57:53 pmThe 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.

author: BillyO
author_rank: Super Contributor
timestamp: February 06, 2024, 07:15:37 pm
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: February 06, 2024, 09:55:18 pm
content: Quote from: BillyO on February 06, 2024, 07:15:37 pmExactly. 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.

author: BillyO
author_rank: Super Contributor
timestamp: February 06, 2024, 10:39:38 pm
content: Quote from: Zero999 on February 06, 2024, 09:55:18 pmFrom my end I always had it. I'm getting the feeling that the same thing has been said different ways.Quote from: Zero999 on February 06, 2024, 09:55:18 pmYes, 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.

author: MathWizard
author_rank: Super Contributor
timestamp: February 07, 2024, 01:51:06 pm
content: 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.

author: BillyO
author_rank: Super Contributor
timestamp: February 07, 2024, 05:28:43 pm
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: February 07, 2024, 06:44:51 pm
content: 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.

author: MathWizard
author_rank: Super Contributor
timestamp: February 22, 2024, 08:16:46 am
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: February 22, 2024, 07:22:49 pm
content: 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.

author: MarkT
author_rank: Frequent Contributor
timestamp: February 22, 2024, 08:49:01 pm
content: Quote from: MathWizard on February 22, 2024, 08:16:46 amThat'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.

author: Zero999
author_rank: Super Contributor
timestamp: February 22, 2024, 09:51:19 pm
content: 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*103according to the data sheet.β is the amount of negative feedback, which is:β = 1/R2/(R1+R2) = 999*10-6Calculate the closed loop gain.ACL= AOL/ (1 + β*AOL)ACL= 100*103/(1+999*10-6*100*103) = 991Calculate the errorerror = 1-ACL/AIDEALerror = 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.

author: MathWizard
author_rank: Super Contributor
timestamp: February 22, 2024, 10:17:18 pm
content: I have to learn the calculations for input offset voltages and bias currents very soon, after messing around with this circuit in LTSpice, I can have very different results by changing resistor size or op-amps. But it could be the Brodynov LM324/58 models I'm using too, some of his models give me problems.Now I have a few caps left out of the schematic, I forgot about them, like on the zener reference, and a 1uF across the feedback 100k resistor, as 60Hz gets in there too from my hand or the scope probes. But just as a continuity tester, it seems very fast and sharp. The way it's set up now, 2 ohms trigger's it, but 2.2 won't.I'm not sure yet how good common op-amp's really are, so I went with the higher gain to compare larger voltages. Then I'm also measuring them with my scopes, not a good DMM, so IDK really what they are doing yet anyways, or the affect probing has.Just attaching a 1x probe on the input area, also seemed to add a lot of I think 60 or 120Hz hum. And just touching my finger to the outside package of the 100k input resistor, also makes the DC output change a lot, and couple in 60Hz. So I did put 1uF across the 100k feedback resistor. I never bother to try any other op-amp or use any comparator tho, I just wanted to make do with these LM324's I have.For now I'll try the oscillator, then try it powered from the DMM using it's current source. But yeah I don't want the other section to turn into an oscillator, that 1uF cap should help but maybe it's too large, but the LED seems to work fine for me.I have a great looking book here called "Operational amplifiers and linear integrated circuits" by Coughlin/Driscoll, I've been doing physical work all month, I need to take a texkbook month again.

author: Zero999
author_rank: Super Contributor
timestamp: February 22, 2024, 11:02:49 pm
content: The input offset voltage is the problem here. It appears as a voltage source in series with on of the inputs. It's easy to model.Here's an example.I often don't bother using special models for generic op-amps such as the LM324. It's not worth the bother and seldom gives more accurate results, than LTSpice's built-in models, which also have parameters that can be changed to mimic common op-amps well enough. In the above example the open loop gain is set to 100k and GBW 1Meg, which is similar to the LM324, although the GBW is irrelevant to the simulation shown which is purely DC.

author: MathWizard
author_rank: Super Contributor
timestamp: February 27, 2024, 04:15:07 am
content: Yeah I measured the output voltage when both inputs are tied together to GND, on these ebay LM324's, and with +/-15V, the worst of the quad was about 1.1mV, the other 3 were about -500uV. With +15 and GND rails, they went to 800uV, and the other 3 went down to -800uV. So that's not too bad, these are marked TI, and their datasheet says 2mV is typical, and upto 5mV max, as the input offset, not quite the same thing I know, nevermind. Maybe I tied the NonInv to GND, made a buffer and that's the output offset voltage I measured. I made that above circuit from Zero99 too. Yeah tying the inputs together and to GND, the offset and gain are enough to drive the output to a rail.I've gone back to BJT differatial pair circuits, and just played around with changing little things like resistors or beta's, etc.Well another thing I forget about split voltage rails like +/-15V, and op-amp circuits, is that 2mV above GND could be called a small voltage, but it's also 15.002V above the negative rail. So yeah a good difference amplifier should only care about the difference, not the actual voltages.

author: Zero999
author_rank: Super Contributor
timestamp: February 27, 2024, 08:24:27 am
content: The easiest way to measure the input offset voltage of an op-amp is to build a DC coupled amplifier circuit with it and short the amplifier's input to 0V. The output voltage will simply be the input offset voltage, multiplied by the gain. To minimise the effect of the input bias currents, which pass through the feedback resistors, make the resistors as low as possible. Ideally the resistance between 0V and each input should be matched, although this is less important with the LM324 as the bias currents are tiny and the main error will be the offset voltage. A non-inverting gain of 1000 for measuring the input offset and 100R and 100k are reasonable values to use. Another 100R resistor could go in series with the + input, but I doubt it'll make much difference.

author: Zero999
author_rank: Super Contributor
timestamp: December 28, 2024, 04:24:20 pm
content: Quote from: Zero999 on February 06, 2024, 05:58:11 pmIt turns out I was wrong. I've downloaded the latest model from TI, ran it and it does model the crossover distortion.