Op-Amps Deep Dive

Feedback & the Golden Rules · Slew · Noise · Every Spec and How to Measure It
inverting · non-inverting · buffer · summing · filter · overdrive // TL072 · NE5532 · 4558 // most of the focus is audio // companion to the Diodes dive

Gain, Tamed

An op-amp amplifies the difference between its two inputs by an enormous factor (100000x and up). Raw, that gain is useless. You wrap it in negative feedback (route the output back to the inverting input) and the circuit's behaviour becomes set by the resistors around it, not the messy chip. Nearly every preamp, mixer, EQ, active filter, and overdrive pedal is this one block plus a few passives.

                        +Vs
                         │
     V+ (non-inv) ───┤+╲ │
                     │  ╲│
                     │   ►──────○ out
                     │  ╱│
     V- (inverting) ─┤-╱ │
                         │
                        -Vs
   powered from +Vs / -Vs (studio, eurorack) or +Vs / GND (single-supply pedals)
The two golden rules (ideal, with feedback) 1. No current flows into the inputs (input impedance is infinite). 2. The output does whatever it must to make V+ = V-. Solve almost any op-amp circuit by applying these two and reading off the resistors. When V- is pinned to a grounded V+, that node is a virtual ground: 0 V but not wired to ground.

The ideal op-amp has infinite gain, infinite input impedance, zero output impedance, infinite bandwidth, zero noise, zero offset. Every real-world departure from that list is a spec in Properties, and every one is audible somewhere.

Core Topologies

The handful of circuits that make up almost all audio electronics. Each one falls out of the two golden rules.

Non-inverting, and the buffer

      in ○──────────────┤+╲
                        │  ╲
                        │   ►────┬──────○ out
                        │  ╱     │
                 ┌──────┤-╱      │
                 │               │
                 ├────[ Rf ]─────┘
                 │
               [ Rg ]
                 │
               Vref            Vout = (1 + Rf/Rg) * Vin

  tie the output straight to V- (drop Rf/Rg) => BUFFER, gain 1, hi-Z in / lo-Z out
  the workhorse: isolates a delicate hi-Z source (guitar, piezo, the pickup coil) from its load

Inverting, and the virtual-earth mixer

                  ┌──────[ Rf ]───────┐
                  │                   │
      in ○─[Rin]──┴──────┤-╲          │
                         │  ╲         │
                         │   ►────────┴──○ out
                         │  ╱
           Vref ─────────┤+╱

           Vout = -(Rf/Rin) * Vin     V- = virtual ground (0 V)

  V- is a virtual ground, so many input resistors to it do NOT interact:
  that is a SUMMING MIXER -- the heart of every console.  Vout = -(Rf/R1*V1 + Rf/R2*V2 + ...)
CircuitDoesAudio use
Difference / instrumentationamplifies (V+ - V-), rejects common modebalanced line receivers, DI boxes, hum rejection
Integratoroutput = -1/RC times the integral of inputramp/LFO cores, state-variable filters
Sallen-Key filter2nd-order lowpass / highpass / bandpasssynth VCFs, active crossovers, tone stacks
Precision rectifierrectifies below Vf (diode in the loop)envelope detection, meters (see Diodes)
Feedback clippersoft overdrive (diodes across Rf)Tube Screamer, Klon, most soft-clip pedals

The feedback clipper: op-amp meets diode

                  ┌────────[ Rf ]────────┐
                  │     ┌───►|───┐       │      diodes across the feedback:
                  ├─────┤        ├───────┤      full gain at low level, gain
                  │     └───|◄───┘       │      folds down as the output
                  │                      │      passes ±Vf: soft clipping
      in ○─[Ri]───┴──┤−╲                 │
                     │  ╲                │
                     │   ►───────────────┴───○ out
                     │  ╱
     ref ○───────────┤+╱

  this is why the two dives are companions: the op-amp sets the gain + drive, the diode sets the clip

Properties & the Waveform

The master table. The ideal value is in parentheses; the real number is the departure that matters, and every departure is audible somewhere.

Property (ideal)What it isEffect on the waveform
Open-loop gain Aol (inf)raw gain before feedback, ~100-120 dB, falls with freqmore Aol = more loop gain = more feedback = lower distortion
GBW (inf)gain x bandwidth is constant above the dominant poleclosed-loop BW = GBW/gain; too little rolls off highs and raises HF distortion
Slew rate (inf)fastest the output can move, V/uscaps undistorted output at HF+level; too low = slew/TIM distortion, smeared transients
Offset voltage Vos (0)tiny DC imbalance between inputsDC at output (x gain): wasted headroom, thumps/clicks on switching
Offset drift (0)how Vos moves with temperatureslow warm-up drift; the op-amp analogue of germanium temp drift
Bias current Ib (0)DC current the inputs actually drawthrough a high source R makes offset + noise; matters on hi-Z sources
Input impedance (inf)differential + common-mode input Zloads the source; hi-Z sources need FET inputs or a buffer
Output drive (0 Zout)how low-Z a load it can swingheadphones/long cable/600 ohm: weak drive = sag + distortion under load
CMRR (inf)common-mode rejection ratiohow well a balanced stage rejects hum/noise common to both inputs
PSRR (inf)power-supply rejection ratiohow much supply ripple/hum leaks into the signal
Noise en / in (0)input-referred voltage + current noise densitythe hiss floor; low-noise parts for mic/phono preamps
THD+N (0)total harmonic distortion + noisethe purity when clean, before you overdrive on purpose
Supply / Iqrail span, quiescent currenthigher rails = more headroom; Iq sets pedal battery life
Output swinghow close output gets to the railsold parts lose ~1.5 V per rail; rail-to-rail swings almost fully
CLOSED-LOOP GAIN VS FREQUENCY, GBW 3 MHZ frequency gain (dB) 10 Hz 100 Hz 1 kHz 10 kHz 100 kHz 1 MHz 10 MHz -10 0 10 20 30 40 50 20 kHz gain 1, -3 dB at 3 MHz gain 10, -3 dB at 300 kHz gain 100, -3 dB at 30 kHz
Above its corner each curve falls 20 dB per decade, and the corner is GBW divided by the gain. At a gain of 100, a 3 MHz part is 3 dB down at 30 kHz and already losing top end inside the audio band.
20 KHZ, 10 V PEAK: TWO SLEW RATES time (us) volts 0 25 50 75 100 -10 -5 0 5 10 input TL072, 13 V/us LM358, 0.3 V/us
This sine needs 1.26 V/us at its steepest point. The TL072 follows it exactly. The LM358 can only ramp at 0.3 V/us, so the output becomes a small triangle: slew distortion, which no amount of feedback removes.
Crossover distortion -- the class-B gotcha Cheap single-supply parts (LM358, LM324) have a class-B output stage that kinks right at the zero crossing. At LOW levels this makes nasty little steps (crossover distortion) exactly where the ear is sensitive. Fine for a comparator, poor for a clean audio path. The op-amp equivalent of a diode's knee gotcha.

How to Measure

Almost all of it yields to a scope, a signal generator, a DMM, and a soundcard running an FFT (REW, Plugin Doctor, or Python). The one rule: your measurement chain must be cleaner than the part under test, or you are measuring your own rig.

PropertyBench method
Offset Vosbuild a x100 stage, short the input, measure output DC, divide by gain
Offset driftsame, then warm the chip (finger, heat gun) and watch the DC crawl
Bias current Ib1M in series with an input, measure the offset it creates: Ib = dV / R
GBWsweep a small sine, plot gain vs freq, find -3 dB; GBW = f(-3dB) x gain
Slew ratefeed a fast square wave, scope the output edge, measure volts per microsecond
Full-power BWbig sine, raise freq until peaks triangle: that onset is slew limiting
Noise enterminate input (low R), gain up a lot, FFT the output, refer to input, divide by root-BW
THD+Nclean sine in, FFT out (or notch + AC meter), harmonics/residual vs fundamental
CMRRdrive both inputs with the same signal, measure the tiny output, ratio to normal-mode gain
PSRRinject ripple (100 Hz) onto the rail, measure how much appears at the output
Output driveload the output down (600 / 150 / 32 ohm), watch level sag and THD rise
The single most useful audio measurement A THD+N vs level sweep and a noise spectrum, together, tell you ~90% of what an audio op-amp will sound like. Douglas Self built an entire (excellent) book out of exactly these two, applied ruthlessly. See History.

Input Stages

The input transistor type sets noise, bias current, and impedance, so it decides what the chip is for.

Input typeBias currentVoltage noiseBest atExamples
Bipolar (BJT)higher (nA)lowest possiblelow source-Z: mic pres, phono, lineNE5532/5534, LT1028, AD797
JFETtiny (pA)lowhigh source-Z: guitar, piezo, synth, pedalsTL07x, OPA2134, OPA627
CMOStinyhigherlow power, single-supply, rail-to-railTLC2262, MCP600x

Rule of thumb: low source impedance wants a bipolar input (its current noise is irrelevant into a low R and its voltage noise is the lowest); high source impedance wants a FET input (bipolar bias current through a big resistor would make offset and noise). That is why a mic pre is a 5534 and a fuzz input buffer is a TL072.

Dual supply vs single supply

Studio and eurorack gear runs dual rails (+/-15 V, +/-12 V): signals swing around real 0 V ground. Pedals and battery gear run a single supply (9 V): you fake a "ground" at half the rail (a Vref bias, often 4.5 V) and AC-couple everything with capacitors. The math is identical, you just reference V+ to Vref instead of ground. That is why every pedal schematic is littered with a 4.5 V bias network and coupling caps.

The Sound (and the myth)

How the section-3 numbers map to what you hear, plus the honest part.

   PROPERTY          →  WHAT YOU HEAR

   slew rate         →  HF transients + top end   low SR = dull/soft or harsh (TIM), misses fast peaks
   GBW               →  bandwidth + HF dist       too little = rolled highs, distortion climbs with freq
   noise (en,in)     →  the hiss floor            the quiet-passage character; the mic-pre spec
   THD               →  purity when clean         how transparent before you overdrive on purpose
   offset / drift    →  DC, thumps, headroom      clicks on switching, wasted swing, warm-up drift
   output drive      →  behaviour under load      headphones/long cable: sag + distortion if weak
   rails / swing     →  headroom                  higher rails + rail-to-rail = more clean level
   crossover dist    →  low-level grunge          class-B parts (358/324) get ugly near zero
Do op-amps have a sound? Mostly no, sometimes yes. A modern op-amp run well inside its specs (comfortable load, enough GBW/slew, no rail-clipping) is, by measurement, effectively transparent, and swaps are usually inaudible. Where a "sound" is real it is because the chip is pushed PAST a spec: a 4558 in a Tube Screamer is band-limited and modest-slew, so it softens and colours; an LM358 grunges at low level from crossover distortion; a weak output stage sags into headphones. The character is the limitation, not magic, which is also exactly what makes a chip fun in a distortion box.

The Canon

The chips audio gear actually uses, and what each brings.

ChipInputWhere it livesCharacter
TL071/072/074JFETpedals, synths (Juno, DX7 analog), generalthe default: clean, quiet, hi-Z, cheap
NE5532 / NE5534bipolarmixing consoles, studio outboard, DIsthe studio workhorse; low noise, drives 600 ohm
JRC/NJM4558bipolarTube Screamer TS808 "magic" chip, cheap combos741-class: band-limited, modest slew, softens the OD
uA741bipolarhistoric general-purposeslow, noisy by modern standards; the teaching classic
LM358 / LM324bipolar, single-supplycheap battery gear, non-audiocrossover distortion at low level; cautionary for clean audio
OPA2134 / OPA134FEThi-fi, DIY audiophilevery low THD, easy drop-in upgrade
OPA627FETpremium hi-fi front endsexcellent, expensive
LT1028 / AD797bipolarmic preamps, RIAA phonoultra-low noise, the bottom of the hiss floor
Not an op-amp but it lives here: the LM386 A small power amp, not an op-amp, but it shows up constantly in lo-fi builds (noise toys, mini amps, the Smokey amp). Overdriven, it is a whole aesthetic. Know it is a different animal (fixed-ish gain, drives a speaker) when a schematic looks op-amp-shaped but is really a 386.

History

"Operational amplifier" is older than the chip: it meant an amplifier that performed math operations for analog computers.

Math & DSP

Core equations

   inverting gain        Vout = -(Rf / Rin) * Vin
   non-inverting gain    Vout = (1 + Rf / Rg) * Vin
   closed-loop bandwidth f(-3dB) = GBW / gain          gain trades directly for bandwidth
   full-power bandwidth  f_max  = SR / (2*pi*Vpeak)     where slew limiting begins
   total input noise     En = en * sqrt(BW)   + source Johnson noise sqrt(4kTR*BW)
   Sallen-Key cutoff     fc = 1 / (2*pi*sqrt(R1*R2*C1*C2))
   integrator            Vout = -(1/RC) * integral(Vin dt)

Modeling it in DSP

For a linear stage, the op-amp circuit is a transfer function you implement directly (bilinear or TPT). The non-ideal behaviours worth adding when you want the character:

   overdrive pedal as a gray-box chain (op-amp stage + diodes):

     in ─► gain ─► 1-pole LPF ─► slew limiter ─► diode f(x) ─► rail clip ─► out
          Rf/Rin   finite GBW       |dV/dt|

   finite GBW  = a one-pole lowpass on the ideal response
   slew limit  = a rate limiter (a real nonlinearity: "slew distortion")
   diode f(x)  = the soft-clip curve from the Diodes dive (diodes steal the feedback)
   rail clip   = hard clip at the swing limit (aliases: oversample or ADAA)
Why the two dives are one project A distortion pedal is an op-amp gain stage (this note) with diodes in or after it (the Diodes dive). Model the stage as gain + one-pole (GBW) + slew limiter, add the diode transfer curve, mind the aliasing. That is a complete gray-box overdrive model, and the smallest end-to-end example in the analog-emulation notes.

Glossary & Further

TermMeaning
Virtual groundthe inverting input held at (not wired to) 0 V by feedback
Loop gainthe feedback in hand (open-loop minus closed-loop gain) that lowers distortion
GBWgain-bandwidth product; gain x bandwidth is constant above the dominant pole
Slew ratemax output dV/dt; sets full-power bandwidth
TIMtransient intermodulation, from hitting the slew limit on fast signals
Offset / bias currentDC input imbalance / DC current the inputs draw; both make output DC
CMRR / PSRRrejection of common-mode input / power-supply noise, in dB
en / ininput-referred voltage / current noise density
Rail-to-railoutput (or input) swings to within millivolts of the supplies
Compensationthe internal pole that keeps it stable; unity-gain stable = safe at gain 1
Crossover distortionzero-crossing kink from a class-B output stage at low level
Headroomclean level available before clipping into the rails

References

Parts in the offline reference (partinfo)

partinfo tl072        # JFET dual, the pedal/synth default
partinfo ne5532       # bipolar low-noise studio dual
partinfo opa4134      # FET audiophile quad
partinfo tle2071      # precision JFET single
partinfo search opamp
Companions and what's next Read alongside the Diodes dive (clipping, the feedback-clipper half) and the analog-hardware-emulation notes (the full modeling method). Next candidates in the series: transistors/JFETs, or filters (Sallen-Key / state-variable) as their own deep dive.
// topologies · properties · measure · inputs · sound · canon · history · dsp · further //