
EEG Band-Pass Filter for Clean Brain Signal Acquisition
Arduino firmware sketch that applies a 0.5-29.5 Hz 4th-order Butterworth band-pass filter to raw EEG data for clean electroencephalography recording with BioAmp EXG Pill.
Overview
This firmware example from the Brain BioAmp Arduino Firmware repository implements a 0.5-29.5 Hz 4th-order Butterworth band-pass filter for clean EEG signal acquisition. It removes DC drift and high-frequency noise while preserving the brain signal bands of interest (Delta through Gamma).
Hardware Required
- BioAmp EXG Pill
- Brain BioAmp Band (or gel electrodes)
- BioAmp Cable v3
- Any Arduino-compatible board
- Jumper cables
How It Works
Raw EEG data is sampled at 256 Hz from the BioAmp EXG Pill. The firmware applies a digital Butterworth band-pass filter that:
- Removes DC offset and slow electrode drift (below 0.5 Hz)
- Removes power line noise and high-frequency artifacts (above 29.5 Hz)
- Preserves all five standard EEG bands: Delta (0.5-4 Hz), Theta (4-8 Hz), Alpha (8-13 Hz), Beta (13-30 Hz)
What You'll Learn
- Digital filter design for biosignal processing
- Fixed-rate ADC sampling with hardware timer interrupts
- EEG frequency band fundamentals
