A compact and affordable wearable device that measures heart rate and carbon dioxide (CO₂) levels. It is designed for real-time monitoring of patients with respiratory or cardiac issues and for tracking air quality in polluted urban environments. The system transmits data via Bluetooth to a smartphone app for easy access and visualization.
https://youtu.be/anjJuyi0MYo
- Measures heart rate using an XD-58D sensor and detects possible arrhythmia or bradycardia when the BPM falls below 64.
- Measures CO₂ levels using an MQ-135 sensor. According to CDC recommendations during the COVID-19 pandemic, high indoor CO₂ concentrations indicated poor ventilation, which could increase the risk of virus transmission. Monitoring CO₂ levels helps take precautions to improve air circulation and reduce the likelihood of airborne disease spread.
- Uses the CLB (Configurable Logic Block) to process the heart rate signal and activate a warning LED immediately when a low BPM is detected, without CPU intervention.
- Sends both heart rate and CO₂ data to a smartphone application developed in Kodular via an HC-05 Bluetooth module.
- Enables real-time monitoring for both medical applications (e.g., patient monitoring) and environmental situations (e.g., assessing indoor air quality in urban environments).
How the CLB helped bring it to life
The CLB was crucial for efficiently detecting abnormal heart rates. It monitored the heart rate data by reading the CLB1_SWIN_Write16 register and applied a simple majority filter on the ADC readings to avoid noisy signals. By doing this at the hardware logic level rather than in software, the CLB allowed for faster response times and lower power consumption. This enabled the LED warning system to activate instantly in case of critical heart rate drops, improving reliability without burdening the microcontroller
Video