The Window That Closes While the Patient Sleeps
In the United States, roughly 29,000 people suffer a recurrent stroke during sleep every year. Stroke treatment has a hard time constraint: patients typically have a four-hour window from symptom onset to receive tPA, a clot-busting drug that can prevent severe, irreversible brain damage. Miss that window, and the outcomes change dramatically.
The F.A.S.T. method — observing Facial drooping, Arm weakness, Speech difficulty — is the current standard for stroke detection. It breaks down completely when the patient is asleep. You can’t observe symptoms that require consciousness to express. For wake-up strokes, the time of onset is simply unknown, which means patients routinely miss the therapeutic window. This project was built to close that gap: detect a stroke during sleep without waking the patient, and establish “time zero” automatically.
Why Eyes, Not Limbs or Brain Waves
The device shifts the diagnostic focus from physical limb and face symptoms to involuntary ocular changes. The human eye acts as a natural dipole — the cornea is positively charged, the retina negatively charged — which makes it possible to measure eye position and movement highly accurately with minimal hardware. An EEG would require a cumbersome electrode array that no one would actually wear to sleep. A VIPS system adds bulk and discomfort. Electrooculography (EOG) gives clinical-grade sensitivity from a few electrodes integrated into a sleep mask.
The device embeds a 5-electrode EOG array into a lightweight sleep mask, measures the corneo-retinal dipole potential continuously, and runs real-time signal processing on an onboard microcontroller. If a stroke is detected, it triggers a localized alarm and pushes a notification to emergency contacts within a 10-second threshold. The hardware transmits less than 10 µA to the patient — below any threshold of physiological effect — and doesn’t interrupt normal sleep.
The Algorithm: Separating REM Sleep from a Stroke
The hardest engineering challenge was not capturing the biological signal. It was interpreting it correctly. During REM sleep, the eyes move rapidly and continuously. A naive detection algorithm would trigger false positives constantly.
The breakthrough came from adapting the clinical HINTS exam — specifically the “Test-of-Skew.” During normal sleep, eye movements are predominantly horizontal. Even in REM, the eyes remain vertically aligned with each other. When a stroke disrupts the vestibular system, it causes “skew deviation” — the eyes decouple and shift vertically in opposite directions. This is a specific, clinically validated indicator of stroke onset.
The algorithm computes the difference between the left and right eye EOG signals and compares it against a dynamically generated 95% confidence interval built from the patient’s own resting-state data through bootstrapping. Rather than hardcoding generic voltage thresholds that might fail across different facial structures or sleep patterns, this approach tailors the baseline to the specific user, which substantially reduces false positives.
To account for transient artifacts and noise, a stroke is only flagged if 10 consecutive differential values fall outside the confidence interval. In prototype testing, this approach achieved 93% sensitivity and 100% specificity for detecting skew deviation.
What Designing This Taught Me
The most accurate sensor in the world is useless if the patient refuses to wear it. Integrating medical-grade electrodes into a comfortable off-the-shelf sleep mask was a constraint that shaped every hardware decision. User compliance isn’t a UX afterthought in a medical device — it’s the primary engineering constraint. A sensor that’s too uncomfortable gets taken off, which means zero data and zero protection.
The detection algorithm didn’t come from computer science alone. It came from studying emergency room neurology. The HINTS exam is a bedside procedure neurologists use to differentiate between central and peripheral vertigo. Translating a physical clinical exam into a mathematical model that runs on a microcontroller required understanding both the neurology and the signal processing simultaneously. Cross-disciplinary synthesis produced a solution that neither domain would have arrived at independently.
Where This Goes
Transitioning from traditional gel electrodes to dry sensors or conductive graphene woven into the mask fabric would improve long-term durability and patient comfort significantly — gel electrodes work for overnight use, but they’re not practical for chronic daily wear.
The current alert system uses a localized alarm. The meaningful next step is a mobile companion app with Bluetooth or Wi-Fi telemetry that pushes alerts to caregivers and can dispatch emergency medical services automatically — transforming the device from a local alarm into a network-connected safety system.
The threshold-based confidence interval algorithm works well for the current prototype. Training a lightweight, on-device neural network on a wider dataset of polysomnographic recordings would further refine the device’s ability to classify anomalous eye movements, particularly for patients with atypical sleep patterns or pre-existing eye conditions that might affect the baseline EOG signal.