Asthma Patient Monitoring Device with Location Tracking and Emergency Alert System

Wearable Health Monitoring with ESP32, Heart Rate Sensor, Infrared Thermometer, Air Quality Detection, GPS Tracking, and Telegram Emergency Alerts

Category: IoT, Embedded Systems, Healthcare, Wearable Technology
Tools & Technologies: ESP32, PulseSensor (Heart Rate/BPM), MLX90614 Infrared Temperature Sensor, MQ135 Air Quality Sensor, Neo6M GPS Module, SIM800L GSM Module, OLED 128x64 Display, Telegram Bot API, Firebase Realtime Database, NTP Time Server, Buzzer, Arduino IDE

Status: Completed

Introduction

This project develops a portable health monitoring device specifically designed for asthma patients. The device continuously monitors critical vital signs including heart rate (BPM), body temperature via contactless infrared measurement, and ambient air quality to detect pollutants that may trigger asthma attacks. GPS tracking provides real-time location data, while emergency alerts are sent via Telegram Bot for immediate notification to caregivers. The system logs all health data to Firebase for historical tracking by healthcare providers, and includes GSM backup communication for areas without WiFi connectivity.

System Overview System Overview


Aim and Objectives

Aim:
Design and develop a wearable IoT-based health monitoring device for asthma patients with real-time vital sign tracking, location services, and emergency alert capabilities.

Objectives:

  • Monitor heart rate (BPM) continuously using the PulseSensor for cardiac health tracking.
  • Measure body temperature contactlessly using MLX90614 infrared sensor with fever detection states.
  • Monitor ambient air quality using MQ135 sensor to detect pollutants that may trigger asthma episodes.
  • Track patient location in real-time using Neo6M GPS module.
  • Send emergency alerts via Telegram Bot for fever, abnormal heartbeat, or poor air quality conditions.
  • Log all health data to Firebase Realtime Database for healthcare provider access.
  • Provide GSM backup communication via SIM800L for SMS alerts in areas without WiFi.

Features & Deliverables

  • Heart Rate Monitoring: Continuous BPM tracking with PulseSensor for cardiac rhythm analysis.
  • Contactless Temperature: MLX90614 infrared sensor measures body temperature with mild fever and high fever state detection.
  • Air Quality Monitoring: MQ135 gas sensor detects ambient pollutants and potential asthma triggers.
  • GPS Location Tracking: Neo6M GPS provides real-time patient location for emergency responders.
  • Telegram Emergency Alerts: Instant bot notifications for abnormal vital signs, fever, or poor air quality.
  • Cloud Health Records: Firebase logs all vital sign data with NTP timestamps for healthcare analytics.
  • OLED Display: 128x64 OLED shows real-time BPM, temperature, air quality, and system status.
  • GSM Backup: SIM800L provides SMS alerts when WiFi is unavailable.
  • Buzzer Alert: Audible alarm for critical health conditions requiring immediate attention.

Process / Methodology

Hardware Assembly

Components: ESP32, PulseSensor, MLX90614, MQ135, Neo6M GPS, SIM800L GSM, OLED 128x64, Buzzer, Power Supply.

  • Integrated PulseSensor with analog input for heart rate detection.
  • Connected MLX90614 infrared sensor via I2C for contactless body temperature measurement.
  • Configured GPS and GSM modules for location tracking and SMS backup communication.
  • Assembled compact form factor suitable for wearable/portable use.

Software Development

  • Developed firmware with multi-sensor data acquisition and processing.
  • Implemented temperature state machine with MILD_FEVER and HIGH_FEVER states and corresponding thresholds.
  • Programmed Telegram Bot API integration for real-time emergency notifications.
  • Configured NTP time synchronization for accurate health data timestamping.
  • Implemented Firebase data logging with structured patient health records.

Testing & Calibration

  • Calibrated PulseSensor for accurate BPM readings within physiological ranges.
  • Validated MLX90614 temperature accuracy against clinical thermometers.
  • Tested GPS fix acquisition time and location accuracy in various environments.
  • Verified Telegram alert delivery latency for emergency notification reliability.

Challenges & Solutions

  • Challenge: Accurate heart rate detection with motion artifacts from a wearable device.
    Solution: Implemented signal filtering and confined BPM ranges to physiologically relevant values.
  • Challenge: GPS module power consumption affecting battery life.
    Solution: Implemented periodic GPS polling instead of continuous tracking to optimize power usage.
  • Challenge: Concurrent communication with multiple modules (WiFi, GPS, GSM, Telegram).
    Solution: Implemented task scheduling to avoid serial bus conflicts between modules.

Results & Impact

  • Vital Sign Tracking: Successfully monitored BPM, temperature, and air quality in real-time.
  • Emergency Response: Telegram alerts delivered within seconds of detecting abnormal conditions.
  • Location Awareness: GPS provided accurate patient location for emergency response coordination.
  • Health Records: Firebase-stored data provided healthcare providers with comprehensive patient history.

Future Enhancements

  • Add SpO2 (blood oxygen) sensor for respiratory health monitoring.
  • Implement machine learning for predicting asthma attack likelihood based on vital sign trends.
  • Develop companion mobile app for patient and caregiver interaction.
  • Miniaturize into a wristband form factor with rechargeable battery.

Demonstration / Access

  • GitHub Repository: Coming soon
  • Live Demonstration Video: Coming soon

Thank You for Visiting My Portfolio

I sincerely appreciate you taking the time to explore my portfolio and learn about my work and expertise. If you have any questions or wish to discuss potential collaborations, please feel free to reach out via the Contact section.

Best regards,
Damilare Lekan, Adekeye.