4th-Order Sallen-Key Active Butterworth Filter for Sensor Anti-Aliasing
Design, simulate, build, and sweep a 4th-order active Butterworth low-pass filter providing -80dB/decade roll-off prior to ADC sampling.
2. Prerequisites & Background Theory:
Operational amplifier feedback analysis, complex Laplace s-domain poles, and Bode magnitude plots.
Goal & Engineering Objectives
Synthesize a 1 kHz 4th-order active low-pass anti-aliasing filter with maximally flat passband response and -80 dB/decade attenuation in the stopband.
Governing Mathematical Formulation & Physics
System Architecture & Block Flow Diagram
[Sensor Raw Analog Signal] --> [Section 1 (Q=0.541, fc=1kHz)]
|
v
[Section 2 (Q=1.306, fc=1kHz)]
|
v
[-80dB/dec Filtered Signal] --> [Microcontroller ADC]
Required Hardware Bill of Materials (BOM)
| Hardware Component | Qty | Engineering Specification |
|---|---|---|
| OPA2134 Precision Audio Dual Op-Amp | 1 | Ultra-low distortion (0.00008%), 8MHz GBWP, FET inputs |
| Precision Resistors (0.1% Metal Film) | 8 | 15.8 kΩ and 10.0 kΩ values |
| C0G/NP0 Ceramic Capacitors (1% tolerance) | 4 | 10 nF and 4.7 nF values |
| Decoupling Capacitors | 2 | 100 nF ceramic X7R close to IC power pins |
Wiring, Pinout & Schematics Mapping
Firmware Implementation & Algorithms
// Python / Scipy: 4th-Order Butterworth Frequency Response Sweep
import numpy as np
import scipy.signal as signal
fc = 1000.0 # 1 kHz cutoff
order = 4
# Generate 4th-order Butterworth transfer function
b, a = signal.butter(order, 2 * np.pi * fc, analog=True)
w, mag, phase = signal.bode((b, a))
print("Frequency (Hz) | Attenuation (dB)")
for freq_hz in [100, 500, 1000, 2000, 5000, 10000]:
w_eval = 2 * np.pi * freq_hz
_, mag_at_f, _ = signal.bode((b, a), [w_eval])
print(f"{freq_hz:14d} | {mag_at_f[0]:16.2f} dB")