Inspiration
During an epileptic seizure, every second counts—especially when a patient is alone or out of sight. Delayed caregiver intervention can lead to severe physical injury or life-threatening complications. While clinical EEG monitoring is accurate, it is expensive, bulky, and impractical for everyday life. We were inspired to build SeizeSafe: a low-cost, wearable, autonomous emergency response system that detects seizure anomalies in real time and dispatches life-saving alerts even without Wi-Fi or mobile data.
What it does
SeizeSafe is an IoT-enabled wearable seizure detection and automated emergency response system that monitors a user's physiological and kinetic vitals continuously:
- Multi-Sensor Anomaly Detection: Combines real-time motion tracking and heart-rate monitoring to detect sudden convulsive movements alongside ictal tachycardia (rapid heart-rate spikes associated with seizures).
- Local & Mobile Telemetry: Triggers an immediate piezo buzzer alarm to alert nearby bystanders while streaming live sensor telemetry to an Android companion app over Bluetooth Low Energy (BLE GATT).
- Offline-Capable Emergency Dispatch: Automatically sends multi-part emergency SMS alerts containing critical vitals and live Google Maps GPS coordinates to registered caregivers via an onboard GSM/GPS module.
- Incident Logging: Stores timestamped seizure events locally on the companion app so doctors and caregivers can review episode history.
How we built it
- Edge Hardware & Firmware: Built around an ESP32 microcontroller running MicroPython (
esptool.py,mpremote). We integrated an MPU6050 6-axis accelerometer/gyroscope and an optical Pulse Sensor for real-time sensor fusion, paired with a SIM800L GSM/GPS module and an active piezo buzzer. - Detection Logic: Implemented threshold-based sensor fusion on the ESP32 to filter out normal daily motion from sustained seizure patterns ($a_{\text{net}} = \sqrt{a_x^2 + a_y^2 + a_z^2}$ combined with sudden BPM elevation).
- Android Companion App: Built a native Android application using BLE GATT to receive live telemetry streams, manage local episode logs via
SharedPreferences, and handle multi-part SMS stitching with Google Maps location links.
Challenges we ran into
- False Positives from Daily Activities: Vigorous hand movements or exercise initially triggered false alerts. Tuning the dual-condition sensor fusion (requiring both abnormal acceleration variance and elevated heart rate) significantly improved reliability.
- SIM800L Power Spikes & GSM Latency: The SIM800L module draws high current bursts during cellular transmission, causing brownouts on the ESP32. Stabilizing power delivery and handling asynchronous AT commands cleanly in MicroPython resolved dropped packets.
- BLE & Multi-Part SMS Payload Limits: Fitting vitals, timestamps, and full Google Maps URLs within standard SMS character limits required implementing clean multi-part SMS stitching on the companion app.
Accomplishments that we're proud of
- Delivering a working, self-contained wearable hardware prototype capable of functioning in low-connectivity environments without relying on cloud servers or Wi-Fi.
- Achieving seamless end-to-end communication across edge firmware (MicroPython), BLE GATT, cellular GSM SMS, and the Android companion app.
What we learned
- Designing fault-tolerant embedded architectures where edge hardware handles critical alerting autonomously even if a paired smartphone disconnects.
- Practical power management and real-time sensor fusion techniques on resource-constrained microcontrollers.
What's next for SeizeSafe
- Integrating lightweight TinyML anomaly classification on the ESP32 for personalized seizure pattern recognition.
- Adding an agentic caregiver triage assistant that summarizes episode logs and automatically escalates unacknowledged alerts to secondary emergency contacts.
- Miniaturizing the PCB into a compact, rechargeable wristband enclosure.
Built With
- android
- android-studio
- bluetooth
- esp32
- gps
- gsm
- iot
- micropython
- mpu6050
- python
- sensor-fusion