Turn a Raspberry Pi into an 8-channel brain-computer interface.
Open-source Raspberry Pi shield for measuring EEG, EMG and ECG with the TI ADS1299.
π Documentation Β· π How to Start Β· π Buy Β· π¬ Discord
Warning
PiEEG-8 is not a medical device and has not been certified by any regulator for use with the human body. It is a tool for research, education and engineering. You use it at your own risk.
Caution
Battery only. The Raspberry Pi, the shield and everything cabled to them (monitor, keyboard) must run from a 5 V power bank while electrodes are on a person. Never use a wall charger or a mains-powered monitor or computer. The board has no isolation. Read the Safety page and the liability notice.
| Channels | 8 biosignal inputs, plus reference and bias |
| Converter | TI ADS1299, 24-bit, simultaneous sampling |
| Sample rate | 250 SPS (default) |
| Signals | EEG, EMG, ECG |
| Host | Raspberry Pi 4 or Raspberry Pi 5 |
| Link to the Pi | SPI0 on the 40-pin header, DRDY on GPIO 26 |
| Electrodes | Dry or wet Ag/AgCl, 2.54 mm header |
| Power | 5 V power bank, 3 A, up to 10,000 mAh |
| Software | PiEEG Server, Python SDK (this repo), BrainFlow |
Electrodes 1β8 ββ
Reference (ear) βΌββΊ PiEEG-8 βSPIββΊ Raspberry Pi ββΊ PiEEG Server
Bias (ear) ββββββ (ADS1299) 4 or 5 β dashboard :1617
β² β WebSocket :1616
5 V power bank βββββββββββ β CSV Β· LSL Β· OSC
- Mount the shield on the Raspberry Pi's 40-pin header (Pi switched off).
- Connect 8 electrodes to channels 1β8, a reference ear clip and a bias ear clip.
- Power the Pi from a 5 V power bank. The LED on the shield lights up.
- Install and run PiEEG Server:
curl -sSL https://raw.githubusercontent.com/pieeg-club/PiEEG-server/main/install.sh | bash
sudo reboot # first time only: enables SPI
pieeg-server --device pieeg8- Open
http://raspberrypi.local:1617, click Connect, close your eyes and watch the alpha rhythm rise.
Note
The installer's background service starts in 16-channel mode. To make it start as PiEEG-8, see How to Start.
Full walkthrough: docs.pieeg.com β PiEEG-8 β How to Start
| Input | Electrode | Purpose |
|---|---|---|
| Channels 1β8 | EEG electrodes in a cap (10-20 system) | Signal |
| Reference | Ear clip on one earlobe | Common 0 Β΅V point for all channels |
| Bias | Ear clip on the other earlobe | Cancels common-mode noise (mains hum) |
| Header pin | GPIO | Signal |
|---|---|---|
| 19 | GPIO 10 | SPI0 MOSI |
| 21 | GPIO 9 | SPI0 MISO |
| 23 | GPIO 11 | SPI0 SCLK |
| 24 | GPIO 8 | SPI0 CE0 |
| 37 | GPIO 26 | DRDY (data ready) |
| Best for | |
|---|---|
| PiEEG Server (recommended) | Browser dashboard, recording, WebSocket, LSL, VRChat OSC, webhooks |
Python SDK (this repo, 1.GUI) |
Learning the ADS1299, raw data, custom register settings |
| BrainFlow | BoardIds.PIEEG_BOARD (ID 56); build BrainFlow on the Pi with --build-periphery |
| Script | Pi | What it does |
|---|---|---|
1.8_ch_Pi5.py |
Pi 5 | Live 8-channel graph, band-pass filtered (system python3-libgpiod) |
1.8_ch_Pi5_gpiod_1_5_4.py |
Pi 5 | Same, for pip install gpiod==1.5.4 |
1.8_ch_Pi4.py |
Pi 4 | Live 8-channel graph, band-pass filtered |
Raw_data_1Ch_Pi5.py |
Pi 5 | Raw view of one channel |
save_data_short_Pi5.py |
Pi 5 | Save raw Β΅V to Excel |
save_data_gpiod_1_5_4.py |
Pi 5 | Save raw Β΅V to Excel, gpiod==1.5.4 |
save_data_short_Pi4.py |
Pi 4 | Save raw Β΅V to Excel |
Install (recent Raspberry Pi OS needs a virtual environment):
python3 -m venv --system-site-packages ~/pieeg-env
source ~/pieeg-env/bin/activate
pip install spidev matplotlib scipy pandas openpyxl
# Raspberry Pi 5 β pick one:
sudo apt install -y python3-libgpiod # for 1.8_ch_Pi5.py
pip install gpiod==1.5.4 # for 1.8_ch_Pi5_gpiod_1_5_4.py
# Raspberry Pi 4:
pip install RPi.GPIORun:
cd 1.GUI
python 1.8_ch_Pi5.py # or 1.8_ch_Pi4.pyDetails, troubleshooting and the data format: Software docs Β· Specification
EEG: alpha rhythm (eyes closed)
EEG: chewing and blinking artifacts
EMG and ECG
| Folder | Content |
|---|---|
1.GUI |
Python SDK: live graphs and saving data for Raspberry Pi 4 and 5 |
1.GUI/dataset |
Raw EEG with chewing and blinking (4-3-2-1 times), plus plotting scripts |
Datasets |
Raw EEG with dry Ag/AgCl electrodes, 250 SPS |
2.Software |
Legacy PiEEG desktop app and data-conversion scripts |
ML_application |
Machine-learning example: record β alpha power β classifier |
images |
Images used in the original README |
Manual. Conenction and start - PiEEG1.pdf |
Printable quick-start manual |
Wet EEG cap - How to use it.pdf |
Instructions for the wet-electrode cap |
| Page | |
|---|---|
| PiEEG-8 Intro | Overview and specs at a glance |
| What's in the Box | What you need besides the shield |
| How to Start | Step-by-step setup and first signal checks |
| Electrodes & Pinout | Wiring, montage, GPIO pins |
| Software | PiEEG Server, Python SDK, BrainFlow |
| Signals & Datasets | Example recordings, datasets, ML example |
| Specification | Data frame, Β΅V conversion, ADS1299 registers |
| Troubleshooting | Fixes for SPI, GPIO, software and noise |
| Safety | Battery-only operation and responsible use |
If you use PiEEG-8 in research, please cite:
I. Rakhmatulin et al. PIEEG: Turn a Raspberry Pi into a Brain-Computer-Interface
to measure biosignals. arXiv:2201.02228, 2022.
I. Rakhmatulin et al. Raspberry Pi Shield β for measure EEG (PIEEG). 2021 5th International
Conference on Electrical, Electronics, Communication, Computer Technologies and Optimization
Techniques (ICEECCOT), pp. 410β413. DOI: 10.1109/ICEECCOT52851.2021.9707969
Software and SDK: MIT. Hardware use is subject to the terms in license.txt and the PiEEG liability notice.
- π pieeg.com
- π docs.pieeg.com
- π¬ Discord
- βοΈ pieeg@pieeg.com