LIBRARYHow to Build an EEG Brain-Computer Interface
A first-principles roadmap to a real DIY EEG brain-computer interface: from what the signal is, through the electronics that capture it, to turning brainwaves into a command.
A brain-computer interface (BCI) turns measured brain activity into a command, with no muscles in the loop (Wolpaw et al., 2002). The most accessible non-invasive way in is the EEG: electrodes on the scalp that read the brain's electrical activity. This guide is the map for building a real one from first principles, and it is honest about what that does and does not mean. An EEG BCI is not mind-reading. It is pattern detection on very small, very noisy signals: microvolts, buried in interference. Everything hard about building one follows from that single fact.
The five-stage EEG BCI pipeline
Every EEG BCI is the same five-stage pipeline. Electrodes pick up microvolt voltages on the scalp. An analog front-end amplifies them and rejects the noise they are drowning in. An analog-to-digital converter turns them into numbers. Signal processing filters the data and extracts features (which rhythms, which electrodes). A classifier maps those features to a small set of intents, which become commands. Master each stage and the whole thing works; skimp on one, usually noise, and nothing downstream can recover it.
EEG BCI · SIGNAL CHAIN
From brain to command, in five stages
Brain activity
Electrodes
Pick up microvolt scalp voltages
hard part: contact impedance + placement
Analog front-end
Amplify, reject common-mode noise
hard part: noise floor + mains rejection
ADC
Digitize every channel at once
hard part: resolution + simultaneous sampling
Signal processing
Filter, extract features
hard part: signal vs artifact
Classifier
Map features to an intent
hard part: low, noisy bandwidth
Command
NEVER connect a mains-powered rig (a USB device plugged into a wall charger, a bench supply) directly to electrodes on a person. A fault could drive mains current through the body. Power the front-end from a battery, or use a properly isolated supply. This is not optional caution. It is the one rule that keeps DIY EEG safe.
| Stage | What it does | The hard part |
|---|---|---|
| Electrodes | Pick up µV-scale scalp voltages | Contact impedance, placement (10-20 system) |
| Analog front-end | Amplify µV signals, reject common-mode noise | Noise floor + 50/60 Hz mains rejection |
| ADC | Digitize each channel | Resolution + simultaneous sampling |
| Signal processing | Filter + extract features (bands, spatial patterns) | Separating signal from artifact |
| Classifier | Map features to intent to command | Low, noisy bandwidth; per-session variability |
How to build one, step by step
- Understand the signal: what EEG is, and what it isn't.
- Place electrodes: the 10-20 system, wet vs dry, the reference and bias electrodes.
- Build the analog front-end: amplify microvolts without amplifying noise (this is where the ADS1299 comes in).
- Kill the noise: 50/60 Hz mains, the right-leg-drive / bias loop, shielding.
- Read the rhythms: delta/theta/alpha/beta/gamma and what they mean.
- Pick a control paradigm: motor imagery, SSVEP, or attention.
- Turn signal into a command: features (CSP) and classifiers (EEGNet).
- Control something real: close the loop on a robot or a drone.
▸Deep dive· Go deeper: why scalp EEG is so hard
The brain's electrical activity has to cross the cortex, skull, and scalp before it reaches an electrode, a process called volume conduction that smears and attenuates it down to microvolts. Meanwhile the body acts as an antenna for 50/60 Hz mains hum that is orders of magnitude larger, and every muscle twitch, eye blink, and cable movement adds artifact. So the whole front-end is a fight for signal-to-noise: high common-mode rejection, a low noise floor, a clean reference, and an active bias/right-leg-drive loop that cancels the mains interference before it ever reaches the ADC.
Each stage explained
References
Ready to build the hardware instead of just reading about it? The OTD Academy EEG front-end project walks the full design, schematic to bring-up, of a real multi-channel front-end: the board at the center of this whole path.
One Thousand Drones Academy · reviewed June 2026
Coming soon
8-Channel EEG Front-End on ESP32 →Design the analog board that reads real brainwaves: the BCI.