Active filters and comparators
Low-, high-, band-pass and notch active filters, order and roll-off, Sallen-Key sections and Q, comparators and Schmitt triggers, with first-order LPF, Schmitt-trigger and Butterworth Sallen-Key examples.
Drafted with Aria, reviewed by the AiCanCode.org team. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Sensor signals arrive with mains hum, PWM ripple and high-frequency noise, and an ADC sampling them will alias anything above half its sampling rate. Active filters remove that unwanted content before conversion. Comparators and Schmitt triggers turn analog signals into clean on/off decisions: limit switches, over-temperature trips, encoder squaring and zero-crossing detection in motor drives all rely on them.
Key ideas
Filter types. A low-pass filter (LPF) passes frequencies below its cut-off f_c and attenuates those above; a high-pass filter (HPF) does the opposite; a band-pass filter (BPF) passes a band around a centre frequency f₀; a band-stop (notch) filter rejects a band, for example 50 Hz hum. The cut-off is the −3 dB point, where the gain is 1/√2 (70.7 %) of the passband gain.
Why "active". An op-amp is added to RC networks. Compared with passive RLC filters, active filters need no inductors (bulky, lossy, impossible to integrate), can provide passband gain, have high input and low output impedance so stages can be cascaded without loading each other, and can be tuned by changing resistors. Limits: they need a power supply, the op-amp's gain-bandwidth and slew rate restrict the usable frequency range, and the output cannot exceed the supply rails.
Order and roll-off. Each reactive (capacitor) pole adds 20 dB/decade (6 dB/octave) of roll-off beyond cut-off. A first-order filter falls at 20 dB/decade, a second-order at 40 dB/decade, an n-th order at 20n dB/decade. Higher orders are built by cascading first- and second-order sections.
First-order active LPF/HPF. An RC network feeding a non-inverting amplifier. The RC sets f_c = 1/(2πRC); the amplifier sets the passband gain 1 + R_f/R1 and buffers the network.
Second-order sections and Q. A second-order section is described by its natural frequency f₀ and quality factor Q. Q = 0.707 gives the Butterworth (maximally flat) response; higher Q gives a peak near f₀ (Chebyshev-like); lower Q gives a slower, more rounded knee (Bessel-like, better step response).
- Sallen-Key: a non-inverting op-amp stage with two R's and two C's, where one capacitor feeds part of the output back (a controlled positive feedback that sets Q). With equal R's and C's, Q = 1/(3 − K), where K is the stage's non-inverting gain; K = 1.586 gives Butterworth, and K ≥ 3 makes it oscillate. Simple and low component count, but Q is sensitive to K at high Q.
- Multiple-feedback (MFB): an inverting topology, better for band-pass and higher-Q designs.
Band-pass filters. A wide band is obtained by cascading a HPF (lower cut-off f_L) and a LPF (upper cut-off f_H) with f_L < f_H; bandwidth BW = f_H − f_L and f₀ ≈ √(f_L·f_H). A narrow band (Q > about 1) needs a single second-order BPF section, with Q = f₀/BW.
Comparators. An op-amp (or a dedicated comparator IC) used without negative feedback. The output goes to +V_sat when v₊ > v₋ and to −V_sat when v₊ < v₋.
- Non-inverting comparator: signal on v₊, reference on v₋.
- Inverting comparator: signal on v₋, reference on v₊; output goes low when the signal exceeds the reference.
- Zero-crossing detector: reference = 0 V; converts a sine into a square wave.
- Dedicated comparators (LM393, LM339) are faster and often have open-collector outputs with a pull-up, which also lets them drive a different logic voltage.
Schmitt trigger (regenerative comparator). A slow or noisy input crossing a single threshold makes a plain comparator chatter. Positive feedback from the output to v₊ creates two thresholds, upper V_UT and lower V_LT. The output switches only when the input passes V_UT going up or V_LT going down, so noise smaller than the hysteresis V_H = V_UT − V_LT cannot cause false switching.
Formulas
f_c = 1 / (2π·R·C) (first-order LPF or HPF)
A_F = 1 + R_f / R1 (passband gain of a non-inverting active filter)
|H(f)| = A_F / √(1 + (f/f_c)²) (first-order LPF); |H(f)| = A_F / √(1 + (f_c/f)²) (first-order HPF)
f₀ = 1 / (2π·√(R₁R₂C₁C₂)) (second-order Sallen-Key); with equal R, C: f₀ = 1/(2πRC), Q = 1/(3 − K)
K = 3 − √2 ≈ 1.586 for a Butterworth (Q = 0.707) equal-component section
BW = f_H − f_L; f₀ = √(f_L·f_H); Q = f₀ / BW (band-pass)
Roll-off = 20·n dB/decade (n = filter order)
V_UT = +V_sat·R1/(R1 + R2); V_LT = −V_sat·R1/(R1 + R2); V_H = 2·V_sat·R1/(R1 + R2)
- Inverting Schmitt trigger: input on v₋, R2 from output to v₊, R1 from v₊ to ground; ±V_sat are the output saturation levels.
- Units: R in Ω, C in F, f in Hz, voltages in V; gains are V/V (dB = 20·log₁₀ of the ratio).
Worked examples
Example 1 (standard: first-order active LPF). A first-order LPF uses R = 10 kΩ, C = 15 nF and a non-inverting stage with R1 = R_f = 10 kΩ. Find f_c, the passband gain in dB and the gain at 5 kHz.
f_c = 1/(2πRC) = 1/(2π × 10⁴ Ω × 15 × 10⁻⁹ F) = 1061 Hz.A_F = 1 + R_f/R1 = 2, i.e. 20·log₁₀2 = 6.02 dB.|H(5 kHz)| = 2/√(1 + (5000/1061)²) = 2/√(1 + 22.21) = 0.415.- In dB: 20·log₁₀(0.415) = −7.64 dB.
f_c ≈ 1.06 kHz, passband gain 2 (6.02 dB), gain at 5 kHz ≈ 0.415 (−7.6 dB).
Example 2 (GATE level: Schmitt trigger). An inverting Schmitt trigger uses an op-amp that saturates at ±12 V, R1 = 10 kΩ (v₊ to ground) and R2 = 50 kΩ (output to v₊). Find the thresholds and hysteresis. Will a 0.5 V peak-to-peak noise riding on a slowly rising signal cause false switching?
- Feedback fraction
β = R1/(R1 + R2) = 10/60 = 0.1667. V_UT = +12 × 0.1667 = +2.0 V;V_LT = −12 × 0.1667 = −2.0 V.V_H = V_UT − V_LT = 4.0 V.- After the output switches low at +2.0 V, the input must fall below −2.0 V to switch back. Noise of 0.5 V p-p is far below 4 V, so there is no chatter.
V_UT = +2 V, V_LT = −2 V, V_H = 4 V; no false switching.
Example 3 (Butterworth Sallen-Key LPF). Design an equal-component second-order Butterworth LPF with R = 10 kΩ and C = 10 nF.
f₀ = 1/(2πRC) = 1/(2π × 10⁴ × 10⁻⁸) = 1592 Hz.- Butterworth needs
K = 3 − 1/Q = 3 − 1.414 = 1.586. K = 1 + R_f/R1, so with R1 = 10 kΩ,R_f = 0.586 × 10 kΩ = 5.86 kΩ.
f₀ ≈ 1.59 kHz, R_f ≈ 5.86 kΩ for R1 = 10 kΩ; roll-off 40 dB/decade.
Common mistakes
- Using ω_c = 1/(RC) and reporting it as a frequency in Hz; f_c = 1/(2πRC).
- Taking the −3 dB point as half the passband gain (it is 0.707 of it).
- Forgetting the passband gain when computing the output at a given frequency.
- Assuming the op-amp golden rules (v₊ = v₋) in a comparator or Schmitt trigger; there is no negative feedback.
- Swapping V_UT and V_LT, or forgetting the reference voltage shifts both thresholds.
- Designing a band-pass by cascading a LPF and HPF with f_L > f_H (no passband).
- Choosing K ≥ 3 in an equal-component Sallen-Key section, which makes it oscillate.
For GATE ME
Typical questions: cut-off frequency of an RC or active first-order filter, identifying the filter type from a circuit, gain at a given frequency, roll-off for a given order, comparator output state for given inputs, and Schmitt-trigger thresholds and hysteresis from two resistors and the saturation voltage. Practise reading which input the signal goes to and whether the feedback is positive or negative.
Quick check
- What is the cut-off frequency of an RC LPF with R = 1 kΩ and C = 1 µF?
- How fast does a third-order low-pass filter roll off beyond cut-off?
- An inverting comparator has V_ref = 2 V and the input is 3 V. Is the output high or low?
- A Schmitt trigger saturates at ±10 V with R1 = 10 kΩ and R2 = 90 kΩ. What is the hysteresis?
- Why does a Schmitt trigger reject noise that a plain comparator does not?
Answers: 1. 159 Hz. 2. 60 dB/decade. 3. Low. 4. 2 V (thresholds ±1 V). 5. Its two thresholds, set by positive feedback, mean the input must move by the full hysteresis to switch back.
Interview questions
All Electrical Circuits and Electronics interview questionsTry answering each one aloud before you open it.
1.What is an active filter, and how does it differ from a passive filter?Concept
An active filter combines resistors and capacitors with an active device, usually an op-amp, to shape the frequency response. A passive filter uses only R, L and C, so it cannot give gain, its response changes with source and load impedance, and low-frequency designs need large, lossy inductors. An active filter needs no inductors, can provide passband gain, and has high input and low output impedance, so sections can be cascaded for higher order without loading each other. Its drawbacks are the need for a power supply and an upper frequency limit set by the op-amp's gain-bandwidth and slew rate.
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?