< Back to Projects

Audio Processing & Filtering System

Overview

A self-directed project I started because I wanted to understand audio hardware on a more full scale: not just the code, but the actual physics of getting sound from a microphone to a speaker and doing something useful with it along the way.

I built a full analog signal chain: MAX4466 electret microphone, LM386 audio amplifier, coupling capacitors, and an 8-ohm speaker. Then I connected the mic to an Arduino to digitize the signal and do real-time processing in C.

Technical Details

Analog Signal Chain

Getting clean audio passthrough required understanding each stage. The LM386 clips badly if the input is too hot. The DC bias on the mic output will saturate the amp if you don’t block it. Every coupling cap and bypass cap is doing a specific job.

Signal Processing in C (Arduino) Once audio was flowing, I added processing on the Arduino side reading raw ADC samples (0-1023):

What’s Next Planning to add RL, RC, and LC analog filters to shape the frequency response, and pitch detection via FFT to drive LED color mapping.

What I Learned

Building a signal chain from scratch made abstract concepts concrete in a way that lecture never quite does. I understood coupling capacitors on paper. I understood them differently after hearing my audio go flat and DC-saturated and having to figure out why.

The gap between “the mic outputs audio” and “clean audio reaches the speaker” is filled with a dozen small decisions such as biasing, gain, noise, impedance matching. Each one is invisible until you get it wrong.

The software side reinforced something I’ve been noticing across projects, which is that raw sensor data is almost never ideal. The moving averager exists because analogRead on an Arduino is noisy enough to make direct RMS calculations meaningless. Signal processing starts before the interesting algorithms.