Portable ECG Prototype based on Arduino and Random Forest Classification for Home Heart-Rate Monitoring

R. Ferdy Akbar Nugraha, Novendy Alberto Will Tindaon, Arya Susena, Alfonso Duandes, Achmad Ridwan

Submitted : 2025-07-05, Published : 2025-08-19.

Abstract

Electrocardiogram (ECG) examination is essential for detecting heart rhythm disorders, yet limited access and high costs often prevent routine medical check-ups for many people. This study addresses these obstacles by designing and developing a portable ECG prototype capable of independent home-based heart monitoring. The system integrates an AD8232 sensor for signal acquisition, an Arduino Uno microcontroller as the main processor, and a simplified Random Forest classification algorithm to distinguish between normal, bradycardia, and tachycardia conditions. Measurement results are saved in CSV format on an SD card, then visualized and analyzed using Jupyter Notebook. The prototype was tested on 100 samples in a static and relaxed state to ensure signal stability. Its heartbeat classification achieved an accuracy of 99.0%, slightly higher than the PTB-XL reference dataset’s 98.0%, and consistent with results reported by recent TinyML- and Random Forest-based ECG studies. Unlike prior IoT-based frameworks, this work combines cost-effective microcontroller hardware with simplified offline on-device classification for practical daily monitoring without continuous cloud access. These findings confirm that the proposed system can produce reliable readings approaching clinical standards while remaining simple, affordable with a component cost under USD 31, and accessible for routine public heart health screening.

Keywords

Portable ECG; random forest; heartbeat classification; Arduino Uno; AD8232.

Full Text:

PDF

References

A. Abdelrazik et al., “Wearable Devices for Arrhythmia Detection: Advancements and Clinical Implications,” Sensors, vol. 25, no. 9, pp. 1–28, 2025. https://doi.org/10.3390/s25092848

J. Z. Metcalfe et al., “Validation of a Handheld 6-Lead Device for QT Interval Monitoring in Resource-Limited Settings,” JAMA Netw. Open, vol. 7, no. 6, p. E2415576, 2024. https://doi.org/10.1001/jamanetworkopen.2024.15576

J. Medina-Avelino, R. Silva-Bustillos, and J. A. Holgado-Terriza, “Are Wearable ECG Devices Ready for Hospital at Home Application?,” Sensors, vol. 25, no. 10, 2025. https://doi.org/10.3390/s25102982

T. Moller, Y. Georgie, M. Voss, and L. Kaltwasser, “An Arduino Based Heartbeat Detection Device (ArdMob-ECG) for Real-Time ECG Analysis,” 2022 IEEE Signal Process. Med. Biol. Symp. SPMB 2022 - Proc., pp. 1–26, 2022. https://doi.org/10.1109/SPMB55497.2022.10014819

A. A. Yusuf, N.-N. Nnenna Harmony, D. P. Eze-Steven, and N. Charles N, “Design and Implementation of Portable Low-Cost Heart Rate Monitoring ECG System,” Eng. Technol. J., vol. 10, no. 01, 2025. https://doi.org/10.47191/etj/v10i01.05

J. Heaney, J. Buick, M. U. Hadi, and N. Soin, “Internet of Things-Based ECG and Vitals Healthcare Monitoring System,” Micromachines, vol. 13, no. 12, 2022. https://doi.org/10.3390/mi13122153

S. Smigiel, K. Pałczyński, and D. Ledziński, “ECG Signal Classification Using Deep Learning Techniques Based on the PTB-XL Dataset,” Entropy, vol. 23, no. 9, p. 1121, 2021. https://doi.org/10.3390/e23091121

E. Kim, J. Kim, J. Park, H. Ko, and Y. Kyung, “TinyML-Based Classification in an ECG Monitoring Embedded System,” Comput. Mater. Contin., vol. 75, no. 1, pp. 1751–1764, 2023. https://doi.org/10.32604/cmc.2023.031663

T. Subba and T. Chingtham, “Comparative Analysis of Machine Learning Algorithms With Advanced Feature Extraction for ECG Signal Classification,” IEEE Access, vol. 12, no. March, pp. 57727–57740, 2024. https://doi.org/10.1109/ACCESS.2024.3387041

C. Prajitha, K. P. Sridhar, and S. Baskar, “ECG diagnosis for arrhythmia detection with a cloud-based service and a wearable sensor network in a smart city environment,” Front. Sustain. Cities, vol. 4, 2022. https://doi.org/10.3389/frsc.2022.1073486

Y. Niu, H. Wang, H. Wang, H. Zhang, Z. Jin, and Y. Guo, “Diagnostic validation of smart wearable device embedded with single-lead electrocardiogram for arrhythmia detection,” Digit. Heal., vol. 9, 2023. https://doi.org/10.1177/20552076231198682

M. Bravo-Zanoguera, D. Cuevas-González, J. P. García-Vázquez, R. L. Avitia, and M. A. Reyna, “Portable ECG System Design Using the AD8232 Microchip and Open-Source Platform,” in Proc. 6th Int. Electron. Conf. Sensors Appl., 2020, p. 49, 2020. https://doi.org/10.3390/ecsa-6-06584

R. E. Cañón-Clavijo, C. E. Montenegro-Marin, P. A. Gaona-Garcia, and J. Ortiz-Guzmán, “IoT Based System for Heart Monitoring and Arrhythmia Detection Using Machine Learning,” J. Healthc. Eng., vol. 2023. https://doi.org/10.1155/2023/6401673

K. Rjoob et al., “Machine learning and the electrocardiogram over two decades: Time series and meta-analysis of the algorithms, evaluation metrics and applications,” Artif. Intell. Med., vol. 132, p. 102381, Oct. 2022. https://doi.org/10.1016/j.artmed.2022.102381

M. D. Nadeem, M. T. I. Ansari, P. Shekhar Pandey, A. Shadab, S. Kumar Raghuwanshi, and S. Kumar, “Recent advances of ECG monitoring and webserver health monitoring applications: A review,” Opt. Laser Technol., vol. 177, p. 111039, Oct. 2024. https://doi.org/10.1016/j.optlastec.2024.111039

Article Metrics

Abstract view: 103 times
Download     : 5   times

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

Refbacks

  • There are currently no refbacks.