DWT-Based Real-Time R-Wave Detection for Heart Rate Calculation in Embedded ECG Systems
Electrocardiograph (ECG) signals during treadmill testing are frequently affected by motion artifacts and baseline drift, which obscure R-wave peaks required for accurate heart rate (BPM) measurement. Conventional monitoring devices are often costly, stationary, and unsuitable for dynamic, real-time appli-cations, creating the need for low-cost, portable solutions. This study proposes a real-time embedded ECG monitoring system that applies the Discrete Wavelet Transform (DWT) to enhance R-wave detection and BPM calculation during treadmill activity. The system was implemented on an Arduino Mega 2560 Pro, with ECG signals acquired from RA, RL, and LL electrodes, processed through analog filters, and decom-posed using Daubechies wavelets up to level 5. R-peaks were identified from D2 detail coefficients, and BPM values were displayed in real time on a Nextion screen. Key contributions of this work include inte-gration of DWT into a microcontroller-based embedded platform for real-time ECG processing, develop-ment of a portable, low-cost diagnostic tool with high accuracy in motion conditions, the comparative evaluation of DWT decomposition levels for optimal R-peak detection, and the validation of system accu-racy against a clinical-grade oximeter. System performance was assessed through BPM comparison with a reference device and signal-to-noise ratio (SNR) evaluation, achieving a maximum SNR of 32.6 dB and an average BPM error of 2.3%, with the best accuracy (0.52% error) at the D2 level. These results demon-strate reliable and accurate real-time ECG monitoring during treadmill activity. Future improvements will focus on broader testing, advanced signal classification, and wireless integration for wearable applica-tions.
Authors
- Singgih Yudha Setiawan
- Anita Miftahul Maghfiroh (ORCID: https://orcid.org/0000-0002-2570-7374)
- Nur Hasanah Ahniar (ORCID: https://orcid.org/0000-0003-1761-2604)
- Syevana Dita Musvika (ORCID: https://orcid.org/0000-0003-3560-8828)
- Berliana Fadhilah Faiza
Institutions
- Kementerian Kesehatan Republik Indonesia (ID)
- Poltekkes Kemenkes Surabaya (ID)
- Poltekkes Kemenkes Jakarta I (ID)
Publication Details
- Journal
- Jurnal ELTIKOM
- Published
- 2026-11-23
- DOI
- https://doi.org/10.31961/eltikom.v10i2.1864
- Primary Topic
- ECG Monitoring and Analysis
- Type
- article
- Field-Weighted Citation Impact
- 0.00