Trojancare Smart Health Monitoring System
Overview
The Trojancare System was a monitoring solution designed for patients in hospitals and retirement homes. It featured a health monitoring wristband equipped with a pulse sensor for heart rate monitoring, an accelerometer for fall detection, and an S.O.S button for emergencies. Additionally, a cane with an ultrasonic sensor was available for patient use. As part of a group project for my cloud computing class, my primary responsibility involved the development of the health monitoring wristband and the implementation of cloud-based data storage and analysis functionalities.
Pulse Rate Monitor
The MAX30102 pulse monitor utilizes infrared and red lights alongside a photodetector. The amount of reflected infrared light, which correlates with oxygenated hemoglobin levels, fluctuates with blood vessel contractions, generating a pulse-like signal in the time series data. By employing a peak detection algorithm, we swiftly determined the number of peaks within a finite time, converting them to beats per minute (bpm). Our method involved continuous one-second data collection, utilizing the past five seconds for bpm calculation. The raw data is transferred to our microcontroller via an i2c data connection, where the peak detection algorithm is executed. Additionally, the amount of reflected red light, proportional to unoxygenated hemoglobin levels, enables the calculation of blood oxygen using a lookup table based on raw values.
Acceleromer Fall Detection
The MPU6050 accelerometer was utilized for fall detection. Falls are characterized as a rapid change in acceleration as well as a high magnitude of accereration. During freefall, gravitational acceleration guides your descent, you abruptly come to a halt when hitting the ground, necessitating an immensely powerful acceleration in the opposite direction. To identify these rapid changes, the accelerometer's onboard high-pass filter was activated via commands sent by the microcontroller through the I2C connection. Additionally, the accelerometer was set to interrupt mode. If the magnitude of acceleration post high-pass filtering surpassed a threshold, an interrupt signal was sent to the microcontroller, signaling a potential fall event.
Wireless Communication
The microcontroller used was the Multitech xDot. The xDot communicated with a Gateway via LoRaWAN communiation, known for its long-distance coverage and low power consumption, making it ideal for IoT applications. The Multitech gateway is connected to a router and uploads the information packets to the cloud. The xDot microcontroller, paired with LoRa, offers exceptional long-range communication. With the Multitech Gateway's ability to support multiple devices, only a minimal number of gateways would be needed to track patients in retirement homes or hospitals.
Cloud Dashboard
The cloud platform ThingsBoard was utilized to receive and store the data. In ThingsBoard, individual dashboards can be created for patients with a wristband. The dashboards provide real-time heart rate moniotring as well as displayed current and unacknowledged alarms. There are two types of a alarms for fall detection. The first activates wehenver the acceleromater detected a fall. Additionally, a higher alert alarm is triggered when, in conjuction with the accelerometer fall detection, the cloud platform observes a significant increase in heart rate compared to the average heart rate over the past few minutes. During a fall, the body undergoes an extreme amount of stress, typically resulting in an elevated heart rate. Therefore, if this higher alert alarm triggers, it is highely likely that a fall has occured and the patient should receive immediate attention.
Additionally, when the SOS button is pressed on the wristband, an interrupt is generated on the xDot microcontroller. This information is transmitted to the cloud and subsequently, an alarm is triggered to indicate the emergency situation.
Demo Video
Although a fully functional wristband was never developed, all functionalities were successfully implemented. Here is a demo video showcasing and explaining the system in action.
Link to code
Here is the github link to my project and report. Feel free to take a look!