Noise Filtering Circuit for Audio: Build with Op-Amp
Audio noise filtering with op-amps is a fundamental skill for any electronics engineer working on sound systems, sensor interfaces, or communication equipment. Whether you need to eliminate 50Hz hum from India’s mains power, remove high-frequency switching noise from SMPS, or build a precision low-pass filter for microphone preamplifiers, op-amp filter circuits provide the solution. This guide covers Butterworth, Sallen-Key, and active notch filter designs with practical calculations and component values for Indian electronics projects.
Common Audio Noise Types in India
Indian electronics projects face specific noise challenges:
- 50Hz mains hum: India’s 230V/50Hz AC power induces 50Hz (and harmonics at 100Hz, 150Hz…) into audio through ground loops, transformer coupling, or inadequate shielding. This is the most common audio noise complaint.
- Switching noise (SMPS): USB chargers, LED drivers, and DC-DC converters produce 50-500kHz switching transients that appear as high-pitched whine in audio
- RF interference: Mobile phone GSM bursts (217Hz characteristic buzz), WiFi (2.4GHz), and Bluetooth cause intermittent audio artifacts
- Thermal noise: Johnson-Nyquist noise from resistors — unavoidable but minimizable through component selection
- Microphone preamp noise: Input-referred noise of op-amps amplified to audible levels at high gain settings
Op-Amp Filter Fundamentals
Op-amp active filters use resistors and capacitors with an op-amp to achieve precise frequency response without inductors (which are bulky and have parasitic resistance). The key parameters:
/* Filter Design Fundamentals
*
* Cutoff Frequency (fc):
* For RC filter: fc = 1 / (2π × R × C)
*
* Filter order:
* 1st order: -20dB/decade rolloff beyond fc
* 2nd order: -40dB/decade rolloff beyond fc
* 4th order: -80dB/decade rolloff (Butterworth cascade)
*
* Butterworth response: maximally flat passband
* Chebyshev: steeper rolloff but ripple in passband
* Bessel: best time-domain (phase) response, audio preferred
*
* Quality factor Q:
* Q = 0.707 (Butterworth, no peaking)
* Q > 1 (resonance peak at fc)
*
* Component selection for India:
* Use 1% metal film resistors (not 5% carbon)
* Use NPO/C0G ceramic or polypropylene film capacitors
* Avoid X7R/Y5V ceramics in filter circuits (capacitance varies with voltage)
*/
Low-Pass Filter: Remove High-Frequency Noise
A low-pass filter (LPF) passes frequencies below fc and attenuates above. Essential for anti-aliasing before ADC, removing SMPS whine, and limiting audio bandwidth.
2nd Order Sallen-Key Low-Pass Filter at 4kHz
/* Sallen-Key LPF Design
* Topology: Voltage-controlled voltage-source (VCVS)
* Response: Butterworth (Q = 0.707)
* Cutoff: 4kHz (voice frequency limit)
* Op-amp: LM358, TL072, or NE5532
*
* Component values for 4kHz Butterworth:
* R1 = R2 = R = 10kΩ (standard E24 value)
* C1 = 2C, C2 = C
* C = 1 / (2π × fc × R × √2)
* = 1 / (2π × 4000 × 10000 × 1.414)
* = 2.82nF → use 2.7nF (nearest standard)
* C1 = 5.6nF, C2 = 2.7nF
*
* Circuit:
* Vin ---R1--- Node A ---R2--- (+) op-amp
* | |
* C1 | (Output)
* | |
* GND C2 between Node A and Output
*
* Op-amp feedback: Output → (-) directly (unity gain buffer)
* For gain > 1: Add Rf/Rg voltage divider at (-) input
*/
// LM358 Pinout reminder:
// Pin 3: (+) IN_A
// Pin 2: (-) IN_A
// Pin 1: OUT_A
// Pin 8: VCC (3.3V-32V single supply)
// Pin 4: GND
// Mid-supply biasing for single supply op-amp:
// Create VCC/2 reference: two 10kΩ resistors from VCC to GND
// Connect midpoint to input signal via 1µF cap (AC coupling)
// Connect midpoint to (+) input via 100kΩ (DC bias)
Simplified First-Order RC LPF
/* Passive RC Low-Pass Filter (no op-amp)
* Simple, effective for gentle rolloff
* fc = 1 / (2π × R × C)
*
* For 10kHz cutoff (remove high-frequency hash, keep audio):
* Choose C = 10nF (standard)
* R = 1 / (2π × 10000 × 0.00000001) = 1592Ω → use 1.5kΩ
*
* For 20kHz cutoff (audio bandwidth limit):
* C = 10nF, R = 800Ω → use 820Ω
*
* Disadvantage: source loading — op-amp buffer recommended after filter
*/
Recommended Product
Analog Sound Sensor Microphone Module for Arduino
After building your noise filter circuit, test it with this microphone module to verify improved SNR and reduced interference in your audio capture chain.
Category: Audio & Sound Modules
High-Pass Filter: Eliminate DC and Low-Frequency Rumble
High-pass filters (HPF) remove DC offset and low-frequency noise like mechanical vibration and HVAC rumble below a cutoff frequency. Essential for microphone preamplifiers and audio interfaces.
/* 2nd Order Sallen-Key High-Pass Filter
* Cutoff: 80Hz (remove mechanical rumble, keep voice bass)
* Response: Butterworth
*
* Component values for 80Hz HPF:
* C1 = C2 = C = 100nF (standard)
* R = 1 / (2π × fc × C × √2)
* = 1 / (2π × 80 × 0.0000001 × 1.414)
* = 14,095Ω → use two 7.5kΩ in series = 15kΩ (closest standard)
* Or use 15kΩ directly
*
* Circuit (mirrors LPF with R and C swapped):
* Vin ---C1--- Node A ---C2--- (+) op-amp
* | |
* R1 | (Output)
* | |
* GND R2 between Node A and GND
*
* DC blocking: This filter inherently blocks DC (cuts below 80Hz)
*/
/* Simple voice frequency HPF at 300Hz:
* Removes low-frequency rumble while preserving speech clarity
* C = 100nF
* R = 1 / (2π × 300 × 0.0000001) = 5.3kΩ → use 5.1kΩ (E24)
*/
50Hz Notch Filter: Kill Mains Hum
The Twin-T notch filter is the most effective passive circuit for eliminating a specific frequency — critical for removing India’s 50Hz mains hum from audio signals. The notch can achieve 40-60dB attenuation at exactly 50Hz with proper component matching.
/* Twin-T Notch Filter Design for 50Hz
* Achieves deep notch at single frequency
* India mains frequency: 50Hz (±2Hz per DISCOMS)
*
* Component values:
* Choose C = 100nF (2× precision required)
* R = 1 / (2π × f_notch × C)
* = 1 / (2π × 50 × 0.0000001)
* = 31,831Ω → use 33kΩ (E24, close enough)
*
* If exact 50Hz needed:
* R = 31.83kΩ → parallel 33kΩ and 1MΩ → ≈ 32.7kΩ
* Or use 10-turn trimpot for fine adjustment
*
* TWIN-T Circuit (3R and 3C arrangement):
*
* R R
* IN ---[33k]--- N1 ---[33k]--- OUT
* | |
* C(100nF) C(100nF)
* | |
* GND N2
* | |
* C(100nF) R/2(16.5kΩ)
* | |
* IN (junction)----GND
*
* Simplified: Use EasyEDA or KICAD to draw properly
* Online calculator: www.electronics2000.co.uk/calc/twin-t.php
*
* ACTIVE version (with op-amp) — sharper notch:
* Connect op-amp as unity gain buffer at output
* Feedback partial output back to center node (R/2, C×2 junction)
* This increases Q factor: notch depth improves to 60dB+
*/
void testNotchFilter() {
// Arduino ADC-based verification
// Generate 50Hz sine wave on DAC, measure filtered output
// Compare amplitude with and without filter
// Expected: >30dB reduction at 50Hz, <3dB at 100Hz and 20Hz
}
Bandpass Filter for Voice Frequencies
/* Voice Bandpass Filter: 300Hz - 3400Hz
* Passes telephone-quality voice band
* Cascade HPF + LPF for bandpass response
*
* Stage 1: HPF at 300Hz (removes rumble + hum below voice)
* Stage 2: LPF at 3400Hz (removes noise above voice)
*
* Combined: 4th order bandpass, -80dB/decade outside band
*
* Op-amp cascade (using quad op-amp LM324 or NE5532 dual):
*
* [LM324 Op-Amp A] [LM324 Op-Amp B]
* Mic → | HPF 300Hz | → | LPF 3400Hz | → ADC/Recording
* ¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯
*
* Total gain: Set to unity (0dB) at 1kHz for clean signal
* Add gain stage (Op-Amp C) before filter: 20-26dB for mic preamp
*/
// For Arduino noise reduction via digital filtering:
// Apply Butterworth IIR filter in software if hardware filter not practical
void softwareLowPass(float input, float &output) {
// 2nd order Butterworth LPF, fc = 1kHz, fs = 8kHz
// Coefficients from: mkfilter.sourceforge.net
static float x1 = 0, x2 = 0, y1 = 0, y2 = 0;
float b0 = 0.2929, b1 = 0.5858, b2 = 0.2929;
float a1 = -0.0000, a2 = 0.1716; // Denominator coefficients
float y = b0*input + b1*x1 + b2*x2 - a1*y1 - a2*y2;
x2 = x1; x1 = input;
y2 = y1; y1 = y;
output = y;
}
Recommended Product
INMP441 MEMS Microphone Module (High Precision)
Digital MEMS microphone with excellent built-in noise characteristics — reduces the need for complex analog filtering by starting with a cleaner signal source.
Category: Audio & Sound Modules
Practical Build and PCB Tips
Op-Amp Selection for India
| Op-Amp | Noise (nV/√Hz) | GBW | India Price | Best For |
|---|---|---|---|---|
| LM358 | 40 | 1MHz | ₹5-10 | Basic audio, low cost |
| TL072 | 18 | 3MHz | ₹10-20 | General audio filters |
| NE5532 | 5 | 10MHz | ₹15-30 | Mic preamps, HiFi |
| OPA2134 | 8 | 8MHz | ₹80-150 | Professional audio |
Layout Guidelines
- Keep bypass capacitors (100nF + 10µF) as close as possible to op-amp power pins
- Use a ground plane on PCB — eliminates loop antennas that pick up 50Hz hum
- Separate analog and digital grounds — connect only at single star point
- Route audio signal traces away from power traces and clock lines
- Shield audio input with surrounding ground pour on PCB
- For microphone preamplifiers, use shielded cable between microphone and PCB
Recommended Product
Mini Digital Amplifier Module — 3W
After filtering noise from your audio signal, amplify it with this clean Class D module. Filter output connects directly to amplifier input for noise-free audio playback.
Category: Audio & Sound Modules
Frequently Asked Questions
Q: How do I know if my audio noise is 50Hz hum or something else?
A: Use free audio analysis software (Audacity, free; Spectrum Analyzer app on phone): (1) Record the noise with no signal input, (2) View the spectrum — a single peak at 50Hz (and harmonics at 100, 150, 200Hz) indicates mains hum, (3) Broadband white noise suggests resistor thermal noise or ADC noise floor, (4) A single non-50Hz peak suggests an oscillator or switching supply.
Q: Can I build these filters on a breadboard?
A: Yes for testing, but breadboard stray capacitance (1-3pF per node) affects filter performance above ~100kHz and introduces additional noise pickup from nearby components. For audio frequencies (20Hz-20kHz), breadboard filters work adequately for prototyping. Transfer to stripboard or PCB for final builds to improve performance and reliability.
Q: What’s the minimum supply voltage for audio op-amp filters?
A: LM358 and LM324 work from 5V single supply (Arduino compatible). TL072 needs ±5V minimum (10V total) for best performance. NE5532 needs ±5V minimum. For single-supply operation, create a VCC/2 virtual ground reference using two equal resistors and bypass with 10µF capacitor.
Q: My notch filter doesn’t seem to work. How to troubleshoot?
A: Twin-T notch is very sensitive to component tolerances — even 1% resistor mismatch shifts the notch frequency. Steps: (1) Measure actual resistor values with multimeter before soldering, (2) Use capacitance meter to verify capacitor values (especially small ceramics which vary ±20%), (3) Replace fixed resistors with trimpots and tune for maximum attenuation, (4) Verify the actual mains frequency with an oscilloscope on your power supply output (it varies ±2Hz).
Q: What causes the “fizz” sound in Arduino audio projects?
A: This is typically PWM switching noise from Arduino’s voltage regulator or LED drivers leaking into analog circuitry. Solutions: (1) Add LC filter (10µH + 100µF) on Arduino 5V before supplying audio circuitry, (2) Power audio circuits from separate battery or linear regulator, (3) Add 10kΩ series resistor on analog output followed by 100pF to ground (RC LPF at 160kHz cuts PWM noise).
Add comment