Skip to main content

AI-Powered Dual Wearable Monitoring System for Early Detection of Cardiac Anomalies and Diabetic Ris

Page 1

International Research Journal of Engineering and Technology (IRJET) Volume: 13 Issue: 09 | Sep 2026

www.irjet.net

e-ISSN: 2395-0056 p-ISSN: 2395-0072

AI-Powered Dual Wearable Monitoring System for Early Detection of Cardiac Anomalies and Diabetic Risk Using IoT and Machine Learning Ananya C M¹, Preetham L Singh², Dr. T N Anitha³ ¹Student, USN: 1MV23CS012, Dept. of Computer Science and Engineering, Sir M Visvesvaraya Institute of Technology Technology, Bangalore, Karnataka, India ²Student, USN: 1MV23CS117, Dept. of Computer Science and Engineering, Sir M Visvesvaraya Institute of Technology Technology, Bangalore, Karnataka, India ³Guide, Dept. of Computer Science and Engineering, Sir M Visvesvaraya Institute of Technology, Bangalore, Karnataka, India ------------------------------------------------------------------------***------------------------------------------------------------------------------

Abstract-India carries a rising non-communicable disease burden, with cardiovascular disease as the leading cause of death

and diabetes affecting an estimated 101 million adults, while a physician-to-patient ratio of roughly 1:900 leaves most of the rural population without continuous risk monitoring. Commercial wearables that track a single vital sign further remain priced out of reach for the population that needs them most. This paper presents a low-cost wearable that screens simultaneously for cardiac anomalies and diabetic risk on one ESP32-based hardware platform costing under INR 2,780, using a cardiac CNN trained via transfer learning (98.84% test accuracy), an LSTM Autoencoder for secondary verification, and a diabetes-risk LSTM (98.97% AUC), all sharing a single heart-rate-variability biomarker computed from one sensor. Findings are classified into a four-tier alert system and delivered through a Flutter clinician dashboard and, for critical events, Firebase Cloud Messaging push notifications verified to reach a locked device within three seconds. Live-hardware integration testing surfaced and corrected four real reliability defects a sensor-glitch false alarm, a mis-attributed alert message, notification-repeat fatigue, and an unstable trend computation a verification step this paper documents explicitly rather than reporting model accuracy alone. Key Words: Remote patient monitoring, IoT healthcare, wearable sensors, convolutional neural network, LSTM, arrhythmia detection, diabetes risk prediction, heart rate variability, Firebase Cloud Messaging.

1. INTRODUCTION 1.1 Motivation Cardiovascular disease and diabetes are rarely treated as connected problems, despite diabetes doubling to quadrupling the risk of a subsequent cardiac event and both conditions sharing an early warning sign in autonomic nervous system dysregulation, a change that shows up in heart rate variability well before either disease becomes clinically obvious. Most remote patient monitoring products nonetheless screen for one condition at a time, so a household wanting to track both a family member's heart rhythm and their blood sugar trend has to buy, charge, and maintain two separate devices. India's shortage of specialists compounds the problem: with roughly one doctor for every 900 people against a WHO benchmark of 1:600, and most of that limited pool concentrated in cities, a rural patient often has to travel 40 to 80 kilometres just to be examined, by which point a preventable complication may already have occurred. doctor for every 900 people against a WHO benchmark of 1:600, and most of that limited pool concentrated in cities, a rural patient often has to travel 40 to 80 kilometres just to be examined, by which point a preventable complication may already have occurred.

1.2 Problem Statement and Contributions A device that only shows numbers on a screen is only as useful as the attention someone pays to that screen. Unless a worsening reading is actively pushed to the person who can act on it, a dashboard adds little over the status quo. This paper therefore treats getting an alert to a clinician's phone not just producing an accurate prediction — as something to be engineered and tested in its own right, and reports what happened when that full pipeline was run against real hardware rather than only against benchmark data. The contributions are: (i) a single wearable built from an ESP32 and four low-cost sensors that screens for both cardiac and diabetic risk at once; (ii) three machine-learning models that share one heart-rate-

© 2026, IRJET

|

Impact Factor value: 8.315

|

ISO 9001:2008 Certified Journal

|

Page 417


International Research Journal of Engineering and Technology (IRJET) Volume: 13 Issue: 09 | Sep 2026

www.irjet.net

e-ISSN: 2395-0056 p-ISSN: 2395-0072

variability signal instead of needing separate biomarkers for each disease; (iii) a four-tier alert system that reaches a clinician's phone through Firebase Cloud Messaging even when that phone is locked; and (iv) a documented set of reliability fixes found only once the system was run continuously against live sensor data, rather than assumed to be correct from offline testing alone.

2. RELATED WORK AND DATASETS 2.1 Benchmark Datasets Cardiac model training drew on two public datasets: the MIT-BIH Arrhythmia Database [2], 48 dual-channel ECG recordings sampled at 360 Hz with cardiologist-verified beat labels, used for fine-tuning; and the larger Chapman-Shaoxing-Ningbo corpus [3] of 45,152 ten-second recordings across 11 rhythm classes, used for pre-training. Diabetic risk modelling used the BIG IDEAs Lab dataset [4], which pairs Empatica E4 wristband readings with Dexcom G6 continuous glucose monitor values from 16 participants; Bent et al. [5] separately showed that wrist-worn features alone can estimate interstitial glucose to within an RMSE of about 21 mg/dL, supporting the case for a non-invasive sensing approach.

2.2 Prior IoT Health Monitoring Systems Gawande et al. [6] built an ESP32/MAX30100-based heart-rate and SpO₂ monitor that raised alerts purely on fixed thresholds, with no learning involved. Vyas et al. [7] extended a similar design with a temperature sensor and Firebase-based mobile alerts, which is the closest existing hardware precedent to the system described here, but neither work looked at diabetes risk, computed HRV, or attempted to monitor both conditions from one device. The present work builds on that hardware lineage by adding a sweat-glucose sensor and a motion sensor, replacing fixed thresholds with three trained models, and verifying that alerts genuinely reach a clinician's phone rather than only a local dashboard.

2.3 Comparative Summary Table -1: Comparison with prior IoT health monitoring systems and commercial wearables. System Disease Alerting Push Cost ( ) Gawande [6] Cardiac Threshold No ~1,500 Vyas [7] Cardiac Threshold Yes ~2,000 Commercial Single Vendor app Yes 20k-80k Proposed Cardiac+Diab. 3-tier AI FCM < 2,780

3. SYSTEM ARCHITECTURE Fig -1: End-to-end system architecture sensing, edge sampling, cloud inference, and dual-channel alert delivery.

3.1 Hardware Platform The device is built around an ESP32-WROOM-32 microcontroller connected to a MAX30102 pulse oximeter for heart rate, SpO₂ and PPG over I²C, a DS18B20 probe for body temperature over a single-wire bus, an MPU6050 accelerometer for activity detection sharing the same I²C bus, and an electrochemical sweat-glucose sensor read through the ADC. Total component cost stays under INR 2,780 roughly a seventh to a twenty-ninth of what a single-purpose commercial wearable costs and a 1000 mAh Li-Po cell with a TP4056 charging module keeps the unit small enough for continuous wrist wear.

3.2 Software Pipeline Every 5 seconds, the firmware reads all four sensors and writes the values to Firebase Realtime Database. A Flask backend watches that same location, runs all three models on each new reading, works out an alert tier, writes the result back to Firebase, and for anything RED or AMBER sends a push notification through Firebase Cloud Messaging. A Flutter app reads from the same Firebase path to show a live dashboard, and separately registers its own notification token so the backend knows where to send alerts.

© 2026, IRJET

|

Impact Factor value: 8.315

|

ISO 9001:2008 Certified Journal

|

Page 418


International Research Journal of Engineering and Technology (IRJET) Volume: 13 Issue: 09 | Sep 2026

www.irjet.net

e-ISSN: 2395-0056 p-ISSN: 2395-0072

reset back to Firebase, and for anything RED or AMBER sends a push notification through Firebase Cloud Messaging. A Flutter app reads from the same Firebase path to show a live dashboard, and separately registers its own notification token so the backend knows where to send alerts.

3.3 Firmware and Communication Protocol Each sampling cycle bundles the heart rate and SpO₂ from the MAX30102, the temperature from the DS18B20, an activity value from the MPU6050, and the glucose reading, all timestamped and pushed to a single Firebase path over the ESP32's WiFi connection through Firebase's REST interface. Because each write is independent, a brief Wi-Fi drop simply means the next reading resumes normally rather than requiring the firmware to maintain and recover a persistent connection.

4. AI MODELS 4.1 Cardiac CNN A 1-D convolutional network with three convolution blocks (32, 64 and 128 filters, each followed by batch normalisation and max-pooling) feeds into dense layers ending in a sigmoid output. It was pre-trained on the Chapman-Shaoxing-Ningbo corpus and then fine-tuned on MIT-BIH, reaching 98.84% test accuracy, 97.65% precision, 96.40% recall and a 97.02% F1-score on 22,509 held-out samples. Because the model was trained on ECG but deployed against PPG, a domain gap is expected and is discussed in Section 7.

4.2 LSTM Autoencoder An encoder-decoder LSTM, trained only on normal-rhythm windows, offers a second opinion on cardiac events: a reading only counts as confirmed once the CNN's probability exceeds 0.75 and the autoencoder's reconstruction error exceeds 0.020282, a threshold set at the mean plus 1.5 standard deviations over the normal validation set. Since the network has only ever seen healthy rhythms, an abnormal window naturally reconstructs poorly, giving a numeric anomaly score that is easier to reason about than a single opaque probability.

4.3 Diabetes LSTM A stacked LSTM (64 units followed by another 64) reads a rolling two-hour window of five features heart rate, temperature, activity, HRV and glucose and reaches 94.68% accuracy with a 98.97% AUC on 7,313 test samples. Recall (97.66%) was deliberately favoured over precision (24.46%): in a screening tool feeding an advisory alert, missing a genuinely high-risk reading is far more costly than raising an extra advisory that turns out to be benign.

4.4 Shared HRV Biomarker The same PPG stream that feeds the cardiac models also yields an HRV (RMSSD) value that becomes one of the five inputs to the diabetes LSTM. This works because the autonomic nervous system governs both heart rhythm and insulin regulation, so a single signal can meaningfully inform both pipelines without needing a second dedicated sensor.

5. ALERT CLASSIFICATION AND NOTIFICATION DELIVERY 5.1 Four-Tier Classification Logic Table -2: Four-tier alert classification logic and delivery channel. Tier Trigger Condition Delivery RED SpO2<90%; OR (CNN>0.75 AND AE-err>0.020282 AND (HR>150/<40 or SpO2<94%)); OR glucose<0.05 (2-reading confirm); OR activity>0.8 AND HR>100 AND glucose<0.1 Dashboard + FCM (immediate) AMBER Diabetes-LSTM>0.65 OR glucose>0.80; OR CNN>0.50 AND HR>100 Dashboard + FCM (on tier change) BLUE Diabetes-LSTM>0.40; OR HRV decline>30% Dashboard only

© 2026, IRJET

|

Impact Factor value: 8.315

|

ISO 9001:2008 Certified Journal

|

Page 419


International Research Journal of Engineering and Technology (IRJET) Volume: 13 Issue: 09 | Sep 2026

www.irjet.net

e-ISSN: 2395-0056 p-ISSN: 2395-0072

NONE No condition satisfied Dashboard only Each reading is classified into one of four tiers, checked in a fixed order so a genuinely dangerous reading can never be masked by a lower-priority one computed in the same cycle.

5.2 Notification Delivery Pipeline Whenever a cycle produces a RED or AMBER result, the backend looks up the clinician device's Firebase Cloud Messaging token written once by the Flutter app when it first launches and sends a notification carrying the alert tier and message. This was tested with the receiving phone locked and screen off, confirming that an alert reaches the clinician without anyone needing to have the dashboard open at the time.

6. RESULTS 6.1 Model Performance Table -3: AI model performance on held-out test sets. *Detection rate at 5.4% false-alarm rate. Model Test N Cardiac CNN LSTM AE Diabetes LSTM

Acc. F1 AUC 22,509 98.84% 97.02% val. set 55.0%* 7,313 94.68% 39.12% 98.97% Chart -1: AI model performance summary across accuracy, F1/detection rate and AUC.

6.2 End-to-End Verification • RED (cardiac): CNN=0.990, AE error=0.158, HR=155 bpm, SpO2=88%. Dashboard and FCM notification both confirmed within 2 seconds. • RED (hypoxia): SpO2 in the 88-91% range consistently triggered RED across repeated live trials and reached a locked phone. • AMBER (diabetes): sustained glucose above 0.80 mmol/L correctly triggered AMBER, with the notification naming whichever condition glucose or LSTM risk score actually caused it. • BLUE (HRV decline): a sustained RMSSD decline beyond 30% correctly triggered BLUE on the dashboard only, with no notification sent, as intended.

6.3 Reliability Fixes Verified on Live Hardware Defect Root Cause Fix Spurious RED Single noisy low glucose reading 2-reading confirm Misleading text Msg. always cited LSTM score Cite real trigger Notif. fatigue Sent every 5s while alert held Send on tier change HRV spikes 0.0 ms after buffer reset Exclude invalid reads

© 2026, IRJET

|

Impact Factor value: 8.315

|

ISO 9001:2008 Certified Journal

|

Page 420


International Research Journal of Engineering and Technology (IRJET) Volume: 13 Issue: 09 | Sep 2026

www.irjet.net

e-ISSN: 2395-0056 p-ISSN: 2395-0072

Running the system continuously against live sensor data, rather than only against benchmark test sets, surfaced four defects that offline evaluation could never have caught. A single noisy glucose reading below 0.05 mmol/L, caused by sensor transition noise, could trigger a RED hypoglycemia alert on its own; this was fixed by requiring two consecutive low readings ten seconds apart before firing. The AMBER diabetes message always quoted the diabetes-LSTM risk score even when raw glucose was the true trigger, at one point printing a confusing "Risk score=0.00" on a genuinely valid alert; the message generator now names whichever condition actually fired. FCM notifications originally repeated every five seconds for as long as an alert stayed active, producing eight or more notifications within a minute for one sustained event; a tier-change guard now sends exactly one notification per event onset. Finally, an occasional 0.0 ms HRV reading right after a buffer reset produced nonsensical decline percentages in the thousands; invalid readings below a sensible floor are now excluded before the trend is computed. Table -4: Reliability defects discovered through live-hardware log analysis and their corrections.

7. DISCUSSION 7.1 Contributions The value of this work lies less in any single number and more in combining simultaneous dual-disease screening on sub-INR3,000 hardware with a delivery path to a clinician's device that was actually tested end to end, including the reliability pass in Section 6.3 that most comparable student prototypes skip entirely.

7.2 Limitations MIT-BIH was recorded from a US hospital population in the late 1970s, and training used ECG while the deployed sensor captures PPG, leaving a domain gap that transfer learning only partly closes. The BIGIDEAs dataset covers just 16 participants with no South Asian representation. The sweat-glucose sensor needs active perspiration and periodic calibration against a fingerprick reading. None of the RED or AMBER conditions reported here came from a genuinely unwell subject — they were elicited through controlled sensor perturbation so what has been verified is that the classification and delivery logic responds correctly to qualifying readings, not that it has been validated on real pathological physiology in a patient.

7.3 Comparison with Prior Systems Where Gawande et al. [6] and Vyas et al. [7] each monitor one condition using fixed thresholds, this system screens for two conditions using trained models and a push-notification channel that was verified rather than assumed to work, at a comparable or lower hardware cost, as summarised in Table -1.

7.4 Future Work The most useful next steps are clinical validation on an India-specific patient group with cardiologist-confirmed outcomes; moving the backend from a single hardcoded patient path to proper multi-patient support with Firebase security rules, since the current open rules are meant only for prototyping; a local buzzer or on-device alert for RED conditions when Wi-Fi is unavailable, since the system currently has no offline fallback; and collecting a small labelled PPG dataset from the deployed sensor itself to fine-tune the cardiac model on the signal it actually sees in the field rather than relying solely on ECG-trained weights.

8. CONCLUSIONS This paper described a dual-disease wearable that screens for cardiac and diabetic risk from one low-cost sensor platform, using a cardiac CNN, an LSTM Autoencoder and a diabetes-risk LSTM that share a single HRV signal, with results delivered through both a live dashboard and verified push notifications. Beyond the offline numbers 98.84% cardiac accuracy and 98.97% diabetic AUC the more distinctive result is that running the complete system against live hardware surfaced four real defects that benchmark testing alone would have missed, each traced to a specific cause and confirmed fixed against a fresh log before being accepted. Future work includes clinical validation, multi-patient support, and a local fallback alert independent of network connectivity.

© 2026, IRJET

|

Impact Factor value: 8.315

|

ISO 9001:2008 Certified Journal

|

Page 421


International Research Journal of Engineering and Technology (IRJET) Volume: 13 Issue: 09 | Sep 2026

www.irjet.net

e-ISSN: 2395-0056 p-ISSN: 2395-0072

ACKNOWLEDGEMENT The authors thank Dr. T N Anitha for her guidance throughout this project, and the Department of Computer Science and Engineering, Sir M Visvesvaraya Institute of Technology, for its support.

REFERENCES 1) International Diabetes Federation, "IDF Diabetes Atlas," 10th ed., 2021. 2) G. B. Moody and R. G. Mark, "The impact of the MIT-BIH Arrhythmia Database," IEEE Eng. Med. Biol. Mag., vol. 20, no. 3, pp. 45-50, 2001. 3) J. Zheng et al., "A 12-lead electrocardiogram database for arrhythmia research (Chapman-Shaoxing-Ningbo)," Sci. Data, vol. 9, art. 272, 2022. 4) P. Cho, J. Kim, B. Bent, and J. Dunn, "BIG IDEAs Lab Glycemic Variability and Wearable Device Data," PhysioNet, v1.1.3, 2023. 5) B. Bent et al., "Engineering digital biomarkers of interstitial glucose from noninvasive smartwatches," npj Digit. Med., vol. 4, art. 89, 2021. 6) S. Gawande et al., "IoT based health monitoring system using ESP32 and MAX30100," Int. J. Eng. Res. Technol., vol. 9, no. 6, 2020. 7) K. Vyas et al., "Firebase-integrated wearable vital-sign monitor with mobile alerting," Int. J. Comput. Appl., vol. 183, no. 12, 2021. 8) A. L. Goldberger et al., "PhysioBank, PhysioToolkit, and PhysioNet," Circulation, vol. 101, no. 23, pp. e215-e220, 2000. 9) A. Y. Hannun et al., "Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network," Nat. Med., vol. 25, pp. 65-69, 2019. 10) World Health Organization, "WHO Global Health Workforce Statistics," 2023.

BIOGRAPHIES 1) Author Photo Ananya C M is pursuing a B.E. in Computer Science and Engineering at Sir M Visvesvaraya Institute of Technology. Her contribution covered the diabetes-risk LSTM, the Flutter dashboard, and reliability-fix verification. 2) Author Photo Preetham L Singh is pursuing a B.E. in Computer Science and Engineering at Sir M Visvesvaraya Institute of Technology. His contribution covered the ESP32 firmware, the Flask backend, and the cardiac model training pipeline.

© 2026, IRJET

|

Impact Factor value: 8.315

|

ISO 9001:2008 Certified Journal

|

Page 422


Turn static files into dynamic content formats.

Create a flipbook