OpenEarable ExG is an open-source hardware platform for measuring biopotentials in and around the ears, including electroencephalography (EEG), electrooculography (EOG), and electromyography (EMG). It builds on OpenEarable v1.3 and supports up to seven sensing channels (including one reference) plus ground.
This repository contains the electronics designs, printable mechanical parts, firmware, and Python tools for recording and visualizing biopotential signals.
OpenEarable ExG: Open-Source Hardware for Ear-Based Biopotential Sensing Applications
Philipp Lepold, Tobias Röddiger, Tobias King, Kai Kunze, Christoph Maurer, and Michael Beigl. UbiComp Companion 2024.
The paper describes the hardware and its initial evaluation for eye movements, alpha brain activity, and jaw clenching.
| Path | Contents |
|---|---|
| OpenEarable ExG EasyEDA/ | EasyEDA JSON files for the main-board schematic and PCB layout. |
| CAD/ | Fusion 360 source models (.f3d, .f3z) and printable STL files for the housing, earpieces, and earplugs. |
| Code/OpenEarableExG PlatformIO/ | PlatformIO firmware project, including the local OpenEarable Arduino Mbed framework. |
| Code/record_and_realtime_plot_BLE.py | Receive biopotential samples over Bluetooth Low Energy, plot them live, and optionally save CSV recordings. |
| Code/record_and_realtime_plot_Serial.py | Receive biopotential samples over serial, plot them live, and optionally save CSV recordings. |
| Code/plot_recorded_data.py | Plot previously recorded CSV data. |
| Code/digitalfilter.py | Streaming digital filters used by the recording scripts. |
For PlatformIO setup and general instructions on compiling and flashing OpenEarable firmware, see here and here.
To use the ExG firmware supplied here:
- Install Visual Studio Code with the PlatformIO extension as described in the linked repository.
- Open
Code/OpenEarableExG PlatformIO/as the PlatformIO project; this directory containsplatformio.ini. - Build and upload using PlatformIO and the upstream flashing instructions.
Use this repository's project for ExG acquisition. Its main.cpp configures the AD7124 ADC and streams samples over serial and BLE. The supplied configuration enables one differential ADC channel with a nominal sampling rate of 256 samples per second; the hardware's available channels are not all enabled by default.
The Python scripts contain example settings that must be adapted to your device and acquisition configuration.
From the repository root, install the Python dependencies and enter the script directory:
python3 -m pip install bleak pyserial matplotlib numpy scipy pandas
cd CodeBefore running a live plot:
- Set
BLE_ADDRESSinrecord_and_realtime_plot_BLE.py, or the serial port inrecord_and_realtime_plot_Serial.py. - Match the sampling rate, amplifier gain (
inamp_gain), and filter settings to your firmware and hardware setup. - To save CSV files, create a
recordings/directory insideCode/and setwrite_to_file = Truein the selected script. Recording is disabled by default.
Run the script for your connection:
python3 record_and_realtime_plot_BLE.py
# Or, for serial:
python3 record_and_realtime_plot_Serial.pyTo view a saved recording, set folder, filename, and the plotting parameters at the bottom of plot_recorded_data.py, then run:
python3 plot_recorded_data.py