PyBCI is an open-source Python framework designed to streamline brain-computer interface (BCI) research. It offers a comprehensive platform for real-time data acquisition, labeling, classification and analysis. PyBCI is compatible with a wide range of time-series hardware and software data sources, thanks to its integration with the Lab Streaming Layer (LSL) protocol (Kothe et al., 2023).
In this study, we present the design and development of a mobile, multi-modal electroencephalography and functional near-infrared spectroscopy (EEG/fNIRS) device for wireless neurophysiological monitoring. The system was engineered to achieve high signal fidelity, low power consumption, and a fully untethered operation suitable for ambulatory brain research. The device integrates four Texas Instruments ADS1299 24-bit biopotential amplifiers, providing up to 32 simultaneous acquisition channels. Signal control, processing, and local storage via an SD card are managed by an STM32H7 microcontroller, while an ESP32-S2 module handles Wi-Fi communication. Dual-wavelength light-emitting diodes and OPT101 photodiodes form the optical front-end, driven by digitally controlled constant-current sources for stable illumination. The design employs galvanic isolation, multi-rail power management, and a four-layer PCB layout to minimise interference between analogue, power, and digital domains. Data are captured by a deterministic, clock-driven STM32 acquisition loop and forwarded to the ESP32, which operates under an RTOS and streams packets over Wi-Fi for collection on a mobile phone or PC using the Lab Streaming Layer (LSL) framework. The STM32H7 architecture was chosen for its capability to support future embedded edge-machine-learning functions, enabling on-device signal quality assessment and artefact rejection. Validation demonstrations include 32-channel synchronised acquisition using the ADS1299 internal test signal, eyes-open/eyes-closed alpha modulation visualised in EEGLAB, a forehead fNIRS breath-hold response with physiological spectral content, and real-time ECG/optical pulse streaming via LSL. The resulting system provides a compact platform with explicitly defined acquisition and data interfaces for synchronised EEG/fNIRS acquisition, enabling scalable, low-cost mobile neuroimaging research.
Physiology-based mental workload classification is hard to compare across studies because task design, preprocessing, segmentation, and validation protocols vary widely. Using OpenNeuro ds007262, an open multimodal arithmetic dataset of synchronised 19-channel 10–20 system electroencephalography (EEG), electrocardiography (ECG), and pupillometry data from 18 released participants (16 retained after participant-level quality control for downstream modelling) spanning seven objective difficulty bands plus baseline fixation, we present a reproducible end-to-end machine learning pipeline for graded workload classification. The pipeline standardises participant-level quality control, trial-aligned windowing, modality-specific preprocessing and feature extraction (153 EEG, 18 ECG, and 25 pupillometry features), and supervised evaluation under three validation protocols (within-participant, pooled-stratified, and group-holdout) over eleven models and five class scenarios. Fused representations generally performed best; EEG was the strongest unimodal modality, and classical models outperformed deep models in most feature-based conditions. The best 6 s pipeline reached a balanced accuracy of 0.635; under denser 3 s overlap segmentation, the best pipeline reached 0.718. Mean balanced accuracy across 60 matched cells rose from 0.324 to 0.380, with gains concentrated in within-participant and pooled-stratified evaluation rather than strict unseen-participant transfer. The pipeline provides a transparent benchmark framework for fine-grained physiological workload modelling.