Story
My grandmother loves having nightwalks, yet her health condition is deteriorating at the age of 90. She once accidentally fell in the field during a nightwalk. My family and I spent a night searching for her and eventually called the police to find her. My parents were worried about her and told her that she must have a companion in order to have a nightwalk.
During last weekend at LA Hacks, I shared this story with my friends in the same team. After brainstorming, we thought, why not build a wearable device that could detect the elderly wearer's health emergency and send alert to his or her family and friends? Here’s how Cura comes.

Research
During my research, I found that not only my grandma, but also a lot of the seniors out there, share the concerns of healthy emergency issues. The two major types of emergency are falling and arrhythmia (unusual heart rate), caused by deteriorating body and organs.

According to CDC, about 36 million falls are reported among older adults each year, resulting in 3 million emergency department treatments and more than 32, 000 deaths. And according to NHANES, 70% of older adults have hypertension, causing stroke, heart failure, and even sudden death.
Moreover, a research by BMC Emergency Medicine suggests that 60 minutes after a traumatic injury is the greatest chance of survival if given medical attention. This proves our idea can be life-saving to seniors by reporting their health emergency in time, so we start building it.
Health Emergency Detection
We use Arduino Uno as our main board (since Nano R3 is somehow incompatible with higher versions of MacOS, we tried), along with MPU6050 accelerometer, pulse sensor, ESP-8266 12-e WiFi module, pushbutton, LED bulb, and 3.7V battery.
All the code and wire diagrams are at the bottom of this page. MPU6050 and pulse sensor requires soldering first.

Detect Fall
We use the accelerometer to detect fall, since fall is a "lower version" of free fall, which gives us a smaller gravitational acceleration than usual (G < 9.8 - falling threshold). Some projects use DPS310 to detect fall by measuring a decrease in the wearer's altitude, but we found that inaccurate (e.g. going downhills or staircases) and not as intuitive as gravitational acceleration.
We make the fall detection more accurate and avoids wrong alert by incorporating code from this project. The accelerometer must receives a lower G when falling, a reverse spike in G when hit the ground, and no change in G for a time period, suggesting the user has fallen and is lying still on the ground.
EXPANDED TECHNICAL DETAILS:
The MPU6050 Accelerometer/Gyroscope Matrix continuously monitors the total absolute physical force scalar (sqrt(x^2 + y^2 + z^2)). If this value drops near 0g (freefall) and then violently spikes heavily to 3g+ (impact), it defines an explicit "Freefall / Impact" anomaly vector that triggers an alert.
Detect arrhythmia
We use the pulse sensor to measure the wearer's heart rate. As research results suggest, a heart rate higher than 200 or lower than 27 beats per minute (BPM) is life threatening. Taking into account that the wearer may be exercising or sleeping, a heart rate at this danger range is abnormal regardless of the wearer's state of movement.
EXPANDED TECHNICAL DETAILS: Translating Blood Oxygenation Optics Monitoring Heart Rate is not tracking electrical current; it relies entirely on biological photon absorption physics!
- A pulse oximeter module intensely shoots pure Red (660nm) and Infrared (880nm) light into the physical capillary bed beneath the skin.
- Oxygenated hemoglobin absorbs entirely different light spectrums natively compared to un-oxygenated blood.
- A sensitive Photodetector captures the microscopic light reflections bouncing back.
- Using mathematical algorithms embedded inside libraries like
<MAX30105.h>, the Arduino isolates the AC/DC spectral fluctuations and derives precise Beats-Per-Minute.
Emergency button
Since emergency caused by stroke and heart attack may not have an obvious change in heart rate, we add an emergency button that allows the wearer to send alert directly when feeling uncomfortable.
When emergency is triggered by either of the three above, the emergency LED bulb turns on. The light signals potential people around that the wearer is in emergency, not to confuse with the belief that the wearer is sleeping or just laying down.
Send SMS alert with location
Once an emergency is triggered, Arduino Uno outputs a HIGH pin to ESP8266, which then sends an SMS to the wearer's emergency contact with the wearer's location.

Twilio SMS API
Twilio supports sending SMS via WiFi connection using ESP8266. We follow this doc to implement this feature.
UnwiredLab Geolocation API
Through research, we find WiFi positioning system (WPS) allows us to get the wearer's current location using information from the connected network. UnwiredLab provides a Geolocation API that utilizes WPS to return the location. Given the location in the SMS, the emergency contact can find the wearer before the wearer's sign of life worsens.
EXPANDED TECHNICAL DETAILS: The Cellular Power Crisis
If using a GSM module like the SIM800L, power management is critical. The module can demand spike currents up to 2.0 Amps (2000mA) when connecting to a cell tower. Supplying this from an Arduino's 5V pin can cause a reboot or damage. You must use an independent power source, such as an LM2596 Buck Converter stepping a lithium battery down to 4.0 Volts, wired directly with a large capacitor (e.g., 1000µF) into the GSM module's power terminals to buffer these RF power spikes.
Demo

Future works
- Use Arduino Nano R3 and ESP8266-01 to make the device size smaller
- Add a 3D printed shell to the hardware components
- Press the emergency button again to cancel the emergency and send another SMS
- Add health features like steps and exercise time measured by accelerometer
- Add a monitor or implement Blynk app to see health data, past emergency alerts, and edit emergency contacts
Hope this article helps you. Happy building!