SynthMaker Circuits Manual Open SynthMaker (opens in a new tab)
Chapter 4 · Filters

How a Sallen-Key filter works

A Sallen-Key filter is two resistors, two capacitors and one op-amp: a low-pass falling 12 dB per octave above f = 1/(2π√(R1R2C1C2)). Output fed back through one capacitor makes a peak: with equal parts, Q = 1/(3 − gain), and at a gain of 3 it sings.

SallenKey · the parts list
circuit SallenKey  setting input: 0.5 V  setting output: 6 V  setting cutoff: 12k, from 150k to 3.3k  setting resonance: 17k, from 1k to 19.6k  R1 in a cutoff  R2 a b cutoff  C1 a out 10n  C2 b gnd 10n  U1 b m out opamp rails 4.5V  Ra m gnd 10k  Rb out m resonanceend
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

Two resistors and two capacitors make two poles: 12 dB per octave above f = 1/(2π√(R1R2C1C2)). R1 with C1, and R2 with C2, are each an RC filter, and each pole falls 6 dB per octave. Two in a row fall 12 dB per octave far above the corner: at four times the corner, this one is 23.5 dB under its passband. The op-amp's + input takes no current, so it reads C2 without loading it. Its other side, Ra and Rb, is a non-inverting amp with a gain K = 1 + Rb/Ra. With equal resistors and equal capacitors the corner is the RC formula: f = 1/(2πRC) = 1/(2π × 12 kΩ × 10 nF) ≈ 1.33 kHz. The cutoff knob turns both resistors together, as a dual pot does:

cutoff (R1 and R2)corner
150 kΩ106 Hz
47 kΩ339 Hz
22 kΩ723 Hz
12 kΩ1.33 kHz
4.7 kΩ3.39 kHz
3.3 kΩ4.82 kHz

At Q 3.3 the peak sits 2% under the corner. At the top of the knob, the digital version's corner comes out about 1% lower than the formula.

The first capacitor goes to the output, not to ground: that's the feedback. C1 runs from the point between the resistors to the op-amp's output. Far below the corner, a 10 nF capacitor is a large resistance (160 kΩ at 100 Hz, against 12 kΩ at the corner), so it does little. Far above, C2 shorts the op-amp's input to ground, and there's almost nothing to feed back. Near the corner, the output swings in step with the point between the resistors, and C1 pushes it further the same way. That push is the peak, and more gain pushes harder.

With equal parts, the gain sets the peak, Q = 1/(3 − K), and at 3 it sings on its own. Q says how sharp the peak is. The resonance knob turns Rb, so K = 1 + Rb/10 kΩ:

button or settingresonance (Rb)gain KQpassbandpeak above the passband
Low Q5.6 kΩ1.560.69+3.9 dBnone: 3.2 dB down at the corner
Low-pass, Q 3.317 kΩ2.73.3+8.6 dB+10.6 dB at 1.30 kHz
High Q19 kΩ2.910+9.3 dB+20.0 dB at 1.32 kHz
knob at its top19.6 kΩ2.9625+9.4 dB+28.0 dB at 1.33 kHz

Q 0.71 is the flattest a two-pole filter gets without a bump, so Low Q, just under it, has none. The gain also lifts the whole passband: at K 2.7 the lows come out 8.6 dB louder than they go in. And as K nears 3, Q = 1/(3 − K) heads for infinity. At 3, what C1 feeds back makes up everything the filter loses on each cycle, so it keeps ringing at its corner with nothing going in. Past 3 the ringing grows until something stops it: here the op-amp's rails, ±4.5 V. The knob stops at 19.6 kΩ, a gain of 2.96, so each note rings long but dies away. At high Q the loudest notes reach the rails, and the peak gets a hard edge.

The unity-gain version takes its Q from the capacitors. Many Sallen-Keys use the op-amp as a buffer, a gain of 1. Then Q = √(R1R2C1C2)/((R1 + R2)C2); with equal resistors that's ½√(C1/C2). Equal capacitors give Q 0.5, no peak, 6 dB down at the corner. C1 twice C2 gives 0.71. With 10 kΩ, 100 nF and 4.7 nF, the corner is 734 Hz and Q 2.31, a peak of 7.5 dB. Q 10 would need C1 400 times C2. And with a gain of 1 it can never reach 3, so it never squeals: if yours won't, that's often why.

Swap the resistors and capacitors, and it's a high-pass. The capacitors go in series and the resistors to ground and to the output. The corner and Q follow the same formulas, so at Q 3.3 the peak is +10.6 dB, now 2% above the corner, at 1.36 kHz. Below it the lows fall 12 dB per octave, and the saw's buzzy top comes through with the gain, 8.6 dB up.

Why synths and pedals use it: one op-amp, two poles and a peak. It's one of the simplest resonant filters to build, and its cutoff is two resistors turned together. Two in a row make four poles, 24 dB per octave. The transistor ladder is steeper still than one Sallen-Key: 24 dB per octave from a single circuit. The screaming filter in the Circuits 2 lesson is this family pushed hard. Its op-amp has a gain of about 58 (1 + 270 kΩ / 4.7 kΩ), and the peak knob sends only 1% to 9% of the output back to the feedback capacitor, through a 10 kΩ resistor and a resistor to ground you can turn from 100 Ω to 1 kΩ. Near 540 Ω that's about 5%, and 58 × 5% ≈ 3: it sings on its own. Two diodes across the 270 kΩ start to conduct once the output passes about 0.6 V, the gain falls, and they catch the resonance before it runs to the rails. That fight is the scream.

Try this

  • Turn cutoff from the bottom to the top while you hold a note. The peak sweeps from about 106 Hz to 4.8 kHz, and the saw opens up from a dark thud to a bright, vocal buzz.
  • Press "Low Q (0.69): no peak", then "High Q (10): it rings". The peak goes from nothing to 20 dB over the passband, and every note's edge rings at the cutoff. Turn resonance to the top and the ring lasts longer still.
  • Open the example sound "Swept Sallen-Key". An Envelope sweeps the cutoff on every note, from about 160 Hz to 1.6 kHz and back. Open it in SynthMaker to change the parts: make resonance's range end at 22k, a gain of 3.2, and past 20k it sings on its own, held by the rails.

The parts list

SallenKey · the parts list
circuit SallenKey  setting input: 0.5 V  setting output: 6 V  setting cutoff: 12k, from 150k to 3.3k  setting resonance: 17k, from 1k to 19.6k  R1 in a cutoff  R2 a b cutoff  C1 a out 10n  C2 b gnd 10n  U1 b m out opamp rails 4.5V  Ra m gnd 10k  Rb out m resonanceend

The cutoff setting is written from the bigger value (150k down to 3.3k), so turning the knob up raises the cutoff. setting output: 6 V keeps the rails' ±4.5 V under full volume. For the high-pass, the resistors and capacitors swap places: C1 in a 10n, C2 a b 10n, R1 a out cutoff, R2 b gnd cutoff.

How we checked it

Checked against ngspice, a standard circuit simulator: the whole circuit, rails included, at Q 3.3, Q 10 and as a high-pass, driven by a 1 kHz sine, is within 0.11% of ngspice across the audible band at the 2× rate it runs at.

Build it step by step

Further reading

  • R. P. Sallen and E. L. Key, "A Practical Method of Designing RC Active Filters", IRE Transactions on Circuit Theory, 1955: the paper the circuit is named after.
  • The corner and Q formulas, the unity-gain version and the high-pass: Wikipedia: Sallen–Key topology.
  • The equal-component version, whose gain sets Q: P. Horowitz and W. Hill, The Art of Electronics, third edition, Cambridge University Press, 2015. Book site
  • What Q measures: Wikipedia: Q factor.
  • Why a loop gain that makes up its losses keeps ringing: Wikipedia: Barkhausen stability criterion.
  • Filters in synthesizers: Wikipedia: Voltage-controlled filter.
  • How SynthMaker simulates a circuit with op-amps: M. Holters and U. Zölzer, "A Generalized Method for the Derivation of Non-Linear State-Space Models from Circuit Schematics", EUSIPCO 2015. PDF