Live data from Hacker News

Choosing an op-amp for your project

lcamtuf.substack.com

21–30 of 90 posts

Re: Choosing an op-amp for your project

#21

Vos doesn't matter until it does. I find it surprising to see Vos mentioned as likely unimportant right next to CMRR, as CMRR and Vos are innately related in some circuits. In particular, any low voltage current sense circuit is going to require very precise Vos. Let's say you have a 0.01 Ohm current-sense resistor on a 5-Amp or so circuit. Your current-sense is now in the range of +/- 0.05Volts (!!!!). So a Vos of 0…

Correct.

A 10% error can be calibrated out if it is constant (in practice it probably varies a bit with temperature).

But for measuring thermocouples or strain gauges, for example, 50 mV (your example) can be 100-500% of the signal, which becomes impractical to calibrate-out (due to maximum output levels, etc).

For these applications, Vos is one of the first things to look at. Another one is the temperature coefficient on the gain. High frequency noise metrics such as CMRR and PSRR are sometimes important if you're looking at high frequency signals, but most of the time mechanical phenomena don't have much interesting content above a few 100s of Hz, and high frequency PS or CM noise can be removed by a simple high pass filter.

Re: Choosing an op-amp for your project

#22

Any comments on the LM4562? As per data sheet it appears to be really good for audio wrt noise and distortion, yet I see it rarely mentioned. https://www.ti.com/lit/ds/symlink/lm4562.pdf

It and the LME49720 (same part) were discontinued a couple years ago along with the entire LME Overture series.

Re: Choosing an op-amp for your project

#23
post #18

Vos doesn't matter until it does. I find it surprising to see Vos mentioned as likely unimportant right next to CMRR, as CMRR and Vos are innately related in some circuits. In particular, any low voltage current sense circuit is going to require very precise Vos. Let's say you have a 0.01 Ohm current-sense resistor on a 5-Amp or so circuit. Your current-sense is now in the range of +/- 0.05Volts (!!!!). So a Vos of 0…

For current measurement, I'd rather use a Hall sensor. But to measure the signal from that sensor a sensitive opamp is needed, and your comment applies :)

Using Hall-effect sensors to measure current isn’t that common when currents are in the uA to mA range. I’ve also never seen them used even for Amp range measurements when the application is purely on-board power supply meaurement.

Re: Choosing an op-amp for your project

#24

Earlier quoted context omitted.

i build and repair audio electronics and the tl071 is used in abundance in audio circuits and is a bad choice imho. But good opamps for audio are at least a few dollars

Any suggestion for a (reasonably) good and cheap one for new designs?

The book "Small Signal Audio Design" by Douglas Self has an entire 50 pages chapter on selecting opamps for audio. The chapter roughly ends with this quote:

> One thing is obvious — the 5532 is still one of the great opamp bargains of all time.

Re: Choosing an op-amp for your project

#25
"Frequency response: The most important AC parameter of an op-amp is known as bandwidth gain product (fGBP or fGBWP). Standard, fully-compensated devices are designed to have an internal gain that rolls off proportionally to signal frequency. At fGBP, this gain is reduced to one:"

"Stuff not to worry about:

Despite what content-farmed articles imply, most of the other parameters in the spec can be usually glanced over. For example, the exact value of open-loop gain (AOL) is almost never of real consequence; the same goes for input offset voltage (VOS) — even in high-precision instruments, the absolute value is less important than drift over time. In any case, the parameters are usually only eyeballed in most specs, so if you’re building sensitive instrumentation, you will still need to calibrate the readings using a known reference."

I rarely think about fGBP and AOL as separate ideas, the author could make the point more directly by saying they are related and that one is easier to select from a single decimal value. AOL or fGBP is a primary design consideration.

Re: Choosing an op-amp for your project

#26
post #21

Vos doesn't matter until it does. I find it surprising to see Vos mentioned as likely unimportant right next to CMRR, as CMRR and Vos are innately related in some circuits. In particular, any low voltage current sense circuit is going to require very precise Vos. Let's say you have a 0.01 Ohm current-sense resistor on a 5-Amp or so circuit. Your current-sense is now in the range of +/- 0.05Volts (!!!!). So a Vos of 0…

Correct. A 10% error can be calibrated out if it is constant (in practice it probably varies a bit with temperature). But for measuring thermocouples or strain gauges, for example, 50 mV (your example) can be 100-500% of the signal, which becomes impractical to calibrate-out (due to maximum output levels, etc). For these applications, Vos is one of the first things to look at. Another one is the temperature coefficie…

Power supply and common mode noise can be 60 Hz.

Re: Choosing an op-amp for your project

#27

Vos doesn't matter until it does. I find it surprising to see Vos mentioned as likely unimportant right next to CMRR, as CMRR and Vos are innately related in some circuits. In particular, any low voltage current sense circuit is going to require very precise Vos. Let's say you have a 0.01 Ohm current-sense resistor on a 5-Amp or so circuit. Your current-sense is now in the range of +/- 0.05Volts (!!!!). So a Vos of 0…

Back in college I was told to not think too hard about Vos, as it's typically temperature dependent so you need to assume it's non-zero or will be in some circumstances and compensate with feedback anyway.

Re: Choosing an op-amp for your project

#28
post #21

Vos doesn't matter until it does. I find it surprising to see Vos mentioned as likely unimportant right next to CMRR, as CMRR and Vos are innately related in some circuits. In particular, any low voltage current sense circuit is going to require very precise Vos. Let's say you have a 0.01 Ohm current-sense resistor on a 5-Amp or so circuit. Your current-sense is now in the range of +/- 0.05Volts (!!!!). So a Vos of 0…

Correct. A 10% error can be calibrated out if it is constant (in practice it probably varies a bit with temperature). But for measuring thermocouples or strain gauges, for example, 50 mV (your example) can be 100-500% of the signal, which becomes impractical to calibrate-out (due to maximum output levels, etc). For these applications, Vos is one of the first things to look at. Another one is the temperature coefficie…

> A 10% error can be calibrated out if it is constant (in practice it probably varies a bit with temperature).

Unfortunately, Vos on cheaper general purpose OpAmps is the kind of thing that varies by... voltage. Ick.

> For these applications, Vos is one of the first things to look at. Another one is the temperature coefficient on the gain. High frequency noise metrics such as CMRR and PSRR are sometimes important if you're looking at high frequency signals, but most of the time mechanical phenomena don't have much interesting content above a few 100s of Hz, and high frequency PS or CM noise can be removed by a simple high pass filter.

No. CMRR is about DC in the applications I'm talking about. It's weird because CMRR is listed in decibels but it's absolutely a DC spec.

If you have a high side current sense circuit with common-mode voltages of 24V +/- 0.05V (ex: 24V power supply that dips to 23.95V at 5Amps), CMRR tells you how accurate you are here.

Your typical 60db (btw I need to kill the engineer who decided db measures DC noise/errors....) means that the 24V of common mode voltage (which is the 24V DC power supply in this case) leaks into your measurements.

Or in other words: 60db * 24V == 3 decades or 24mV of 'Noise' aka your +/-50mV signal/measurement got completely wiped out by your DC errors. Like 50% error bars on your signal now, good luck with that.

That's the real issue with OpAmps. There's surely an OpAmp out there that solves your problems. But it requires knowing the general tradeoffs and picking-and-choosing different parts for different purposes.

Secondly, the specs are not intuitive. 60db CMRR sounds like a high frequency issue but becomes DC in this case.

You could of course go full isolation (optoisolators) that allows you to shift voltages down to near zero (removing CMRR issues) but that's money and additional parts.

You could go low-side voltage sense but this doesn't work for all circuits (most circuits are fine with Vcc error, not Ground errors). So high side current sense is the most flexible and generic well engineered solution. So long as you choose the correct OpAmps.

-------

As far as when this could be useful: consider Maximum PowerPoint Tracking for solar. 0-24 V and 0-1 Amps. And a need to accurately measure Amps and Volts from this entire range. (A variable load + voltage converter like a switch-mode power supply + battery can search for the optimal Voltage/Current combination to maximize the Solar Panels power).

Yes the microcontroller will do the bulk of the math. But the initial multiplies and subtract is best handled by an OpAmp.

Re: Choosing an op-amp for your project

#29

Any comments on the LM4562? As per data sheet it appears to be really good for audio wrt noise and distortion, yet I see it rarely mentioned. https://www.ti.com/lit/ds/symlink/lm4562.pdf

It and the LME49720 (same part) were discontinued a couple years ago along with the entire LME Overture series.

Potential replacements for ultra low THD would be: OPA1612, OPA1656 and OPA1642 with bipolar, cmos and jfet inputs respectively.

Re: Choosing an op-amp for your project

#30
post #8

I found this post extremely interesting and informative, well above my expectations even given the eminence of its author. I'm not sure that everything in it is covered in The Art of Electronics — it's the kind of stuff the book covers, but I learned things from this post I didn't learn from the book. (But possibly it's information that's in the book that I just failed to absorb the last few times.) I was recently lo…

Oh boy you need to take another look at ToEv3 if you think this has better coverage on opamp topics. It has so much about opamps in it that it’s hard to tell you where to find it all - it’s so ubiquitous and spread out in the text.

Recommend Ch5 for Precision Design and Ch8 (or 9? Can’t remember) on noise.

Post reply on HN