DOI: 10.3390/s26216710 ISSN: 1424-8220

An ESP32-S3 Multimodal Wearable Sensor Platform with Embedded XGBoost for Focal-to-Bilateral Tonic–Clonic Seizure Detection and IoT Alerting

Mohamed Ali Torad, Mina Hany Thabet, Mohammed Youssef Taha, Ahmed Ali Mohamed Torad, Mona Mohamed Taha, András Attila Horváth, Mohamed Abdelaziz Emam

Wearable seizure-detection systems can provide objective event monitoring and rapid caregiver alerting without continuous bedside observation. This study presents a resource-constrained multimodal wearable sensor platform for focal-to-bilateral tonic–clonic seizure (FBTCS) detection using edge artificial intelligence and Internet of Things (IoT) communication. The prototype integrates an ESP32-S3 microcontroller, an analog electromyography (EMG) channel, an MPU6050 inertial sensor, MAX30102 photoplethysmography, GPS, a TFT display, local vibration/buzzer outputs, and Blynk cloud telemetry. The seizure–decision path uses synchronized EMG and acceleration acquired at 100 Hz in non-overlapping 10 s windows. EMG and acceleration are resampled for compatibility with the reference feature pipeline, 13 statistical features are extracted from each modality (26 total), and an 85-tree XGBoost model is executed locally. A probability threshold of 0.85 is combined with temporal smoothing, consecutive-window confirmation, and a 60 s refractory interval. Software verification showed maximum absolute probability differences of approximately 1.19 × 10−7 for random feature-vector tests and 1.49 × 10−8 for end-to-end recorded windows relative to the Python reference. Within the reported validation record covering 2643.69 h and 18 record-labeled FBTCS events, 12 events were detected (12/18; 67% sensitivity). Precision was approximately 26%, F1-score approximately 38%, the reported false-alarm rate was 0.31 per 24 h, and median detection latency was 61.5 s. Approximately 34 false alarms are estimated from the reported false-alarm rate and evaluation duration; this is an estimated count rather than a percentage or directly observed count. Hardware, local alarm, display, GPS, and cloud communication functions passed functional integration tests. The small event count, uncertain label provenance, low precision, and long latency mean that these data support an engineering proof-of-concept only and do not establish clinical applicability.

More from our Archive