SynthMaker Circuits Manual Open SynthMaker (opens in a new tab)
Chapter 3 · Op-amps

How op-amp overdrive works: diodes in the feedback loop

An op-amp overdrive is a gain stage with two diodes across its feedback resistor. Here the gain runs from 12 to 118, but once the output gets about half a volt past the input, the diodes conduct, the gain falls smoothly, and the tops round off: soft clipping.

Overdrive · the parts list
circuit Overdrive  setting input: 0.35 V, from 0.03 V to 3 V  setting output: 0.75 V, from 0.1 V to 5 V  setting drive: 220k, from 51k to 551k  setting tone: 3.3k, from 470 to 47k  U1 in m a opamp rails 4V  Rg m g 4.7k  Cg g gnd 47n  Rf a m drive  Cf a m 51p  D1 a m 1N4148  D2 m a 1N4148  R2 a out tone  C2 out gnd 22nend
Scope · out

Press Play to see the wave after the circuit, at out.

A short riff through the circuit, round and round. Turn the knobs while it plays. Open in SynthMaker ↗ (opens in a new tab)

What you're hearing

The op-amp sets its gain from two resistors. An op-amp drives its output until its two inputs are at the same voltage. Here the sound goes into the plus input. The minus input sits on a divider between the output, the drive resistor (Rf) and the 4.7 kΩ resistor (Rg) to ground. So the output has to be 1 + Rf/Rg times the input. The drive knob turns Rf from 51 kΩ to 551 kΩ, a gain from 11.9 (21.5 dB) to 118 (41.5 dB). As set, 220 kΩ gives 47.8 (33.6 dB).

The diodes take over the feedback. The diodes sit across Rf, so the voltage across Rf is the output minus the input. While that voltage is small, the diodes pass almost nothing and the full gain applies. As it nears a diode's knee, a diode starts to carry the feedback current, Rf matters less, and the gain falls. It doesn't switch off at a threshold; it bends. With the input set to 0.35 V, a 1 kHz note comes out at 0.80 V peak, only about 0.45 V above the input's own peak. A clean gain of 38 at that frequency would have tried for 13 V.

The clean signal is always there. The output is the input plus the voltage across the diodes. The diodes cap only the second part, so the stage's gain never drops below 1. Turn the input up to the top of its range, 3 V, and the peaks come out at about 3.55 V. That's the input with up to 0.56 V on top. Loud playing stays louder than soft playing, which is part of why this kind of clipping feels smooth.

The 47 nF capacitor makes the mid hump. Rg reaches ground through 47 nF, so at low frequencies it isn't really there, and the gain falls towards 1. The corner is f = 1/(2π × 4.7 kΩ × 47 nF) ≈ 720 Hz. Below it, the gain falls 6 dB per octave. At drive 220 kΩ, the gain is 14.6 dB at 82 Hz, against 31.6 dB at 1 kHz. So bass notes clip less: at 82 Hz the same input peaks at 0.64 V, not 0.80 V. The low end stays tighter, and the mids break up first.

The 51 pF capacitor trims the top. Across Rf, it lowers the gain at high frequencies: 1/(2π × 220 kΩ × 51 pF) ≈ 14 kHz as set. At full drive it's 5.7 kHz, because Rf is larger. Between the two capacitors, the gain peaks in the middle: 33.0 dB at about 3.2 kHz as set. That's the hump.

Drive changes how much clips, not how loud. At 0.35 V in and 1 kHz, the peak is 0.79 V at minimum drive and 0.80 V at maximum. More drive means the diodes take over earlier in each cycle, so more of the wave is rounded. The level hardly moves, because the diodes cap it.

Soft against hard. In a diode clipper, the diodes go to ground and cap the whole signal: 40 V in still comes out under 0.73 V. Here they cap only what the gain adds, so the input passes through underneath. Take the diodes out (the second button) and the op-amp's output runs into its rails at ±4 V instead. The rails don't bend; they stop the output dead, which is hard clipping at the rails. With the diodes in, the output never gets past 3.57 V, so it never reaches them.

The tone control is a low-pass after it. R2 (the tone knob) and 22 nF roll off the top: 1/(2π × 3.3 kΩ × 22 nF) ≈ 2.2 kHz as set. The knob runs from 470 Ω (about 15.4 kHz) to 47 kΩ (about 154 Hz). Turning it up makes it darker. The op-amp drives it directly, so the formula holds at every setting.

The op-amp here is ideal. A real one can't change its output instantly, and that adds an effect of its own: see slew rate and the real-world op-amp.

Try this

  • Turn drive from 51 kΩ to 551 kΩ. The level barely changes, but the sound gets thicker and more sustained, as the diodes round more of each cycle.
  • Turn tone to 470 Ω and watch the Scope. With the tone corner at 15.4 kHz, the Scope shows the stage's own wave. Play a high note, then a low one: the low note's tops are rounded less (the mid hump).
  • Press "No diodes: the rails clip". Without the diodes, notes below about 175 Hz don't reach the rails at this input; above that, they slam flat into ±4 V and sound harsher and buzzier. Switch back to hear the round version. To go further, open it in SynthMaker to change the parts: try 1N34A diodes in the loop for an earlier, softer round.

The parts list

Overdrive · the parts list
circuit Overdrive  setting input: 0.35 V, from 0.03 V to 3 V  setting output: 0.75 V, from 0.1 V to 5 V  setting drive: 220k, from 51k to 551k  setting tone: 3.3k, from 470 to 47k  U1 in m a opamp rails 4V  Rg m g 4.7k  Cg g gnd 47n  Rf a m drive  Cf a m 51p  D1 a m 1N4148  D2 m a 1N4148  R2 a out tone  C2 out gnd 22nend

How we checked it

Checked against ngspice, a standard circuit simulator: the whole circuit, rails and tone control included, as this page plays it (2×), driven by a 1 kHz sine, is within 0.13% of ngspice across the audible band, and within 0.35% at every drive and tone setting we tried, with the diodes or without.

Build it step by step

Further reading

  • D. T. Yeh, J. S. Abel and J. O. Smith, "Simulation of the diode limiter in guitar distortion circuits by numerical solution of ordinary differential equations", DAFx 2007. PDF
  • D. T. Yeh, "Digital Implementation of Musical Distortion Circuits by Analysis and Simulation", PhD thesis, Stanford University, 2009 (the DK method). PDF
  • M. Holters and U. Zölzer, "A Generalized Method for the Derivation of Non-Linear State-Space Models from Circuit Schematics", EUSIPCO 2015. PDF
  • The op-amp's two rules and the non-inverting stage: Wikipedia: Operational amplifier.