EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

TinyML-Based Stress Detection Using Time-Domain HRV Features and a Lightweight DNN on ESP32

Sarmayanta Sembiring, Kemahyanto Exaudi, Abdurahman -, Jorena, Hadir Kaban, M. Buffon Prima, Rahmat Fadli Isnanto

NUANSA INFORMATIKA · 10.07.2025 · 20 (2) · 110-122

DOI: 10.25134/ilkom.v20i2.624 ↗

Kurz gefasst

Fachartikel in der Zeitschrift NUANSA INFORMATIKA, online erschienen am 10.07.2025. Verfasst von Sarmayanta Sembiring und 6 weiteren Autor:innen. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0).

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Stress is a psychophysiological condition that requires continuous and objective monitoring. However, existing wearable stress detection systems often rely on cloud-based processing or computationally intensive algorithms, limiting their applicability for real-time inference on resource-constrained embedded devices. This study presents a TinyML-based framework for real-time stress detection using the MAX30102 sensor and an ESP32 microcontroller. The proposed framework integrates four time-domain Heart Rate Variability (HRV) features (BPM, SDNN, RMSSD, and pNN50), a lightweight Deep Neural Network (DNN), full INT8 TensorFlow Lite quantization, and on-device inference to enable efficient edge-based stress classification. The DNN model was trained and evaluated using the WESAD dataset. Experimental results showed that a decision threshold of 0.70 yielded the best classification performance, achieving an accuracy of 82% and an F1-score of 0.63 for the stress class. The quantized TensorFlow Lite INT8 model preserved 100% prediction compatibility between the Python and ESP32 implementations. Furthermore, the MAX30102 sensor achieved a BPM measurement accuracy of 98.74%, while the HRV feature extraction implemented on the ESP32 produced results consistent with the reference calculations. These findings demonstrate that the proposed end-to-end TinyML framework enables accurate and computationally efficient HRV-based stress detection on resource-constrained microcontrollers, providing a practical foundation for real-time wearable edge-health monitoring

Zitieren

APA

Sembiring, S., Exaudi, K., -, A., Jorena, Kaban, H., Prima, M. B., & Isnanto, R. F. (2025). TinyML-Based Stress Detection Using Time-Domain HRV Features and a Lightweight DNN on ESP32. NUANSA INFORMATIKA, 20(2), 110-122. https://doi.org/10.25134/ilkom.v20i2.624

Vancouver

Sembiring S, Exaudi K, - A, Jorena, Kaban H, Prima MB, et al. TinyML-Based Stress Detection Using Time-Domain HRV Features and a Lightweight DNN on ESP32. NUANSA INFORMATIKA. 2025;20(2):110-122. doi:10.25134/ilkom.v20i2.624

BibTeX
@article{Sembiring2025,
  author = {Sembiring, Sarmayanta and Exaudi, Kemahyanto and -, Abdurahman and Jorena and Kaban, Hadir and Prima, M. Buffon and Isnanto, Rahmat Fadli},
  title = {TinyML-Based Stress Detection Using Time-Domain HRV Features and a Lightweight DNN on ESP32},
  journal = {NUANSA INFORMATIKA},
  year = {2025},
  volume = {20},
  number = {2},
  pages = {110--122},
  doi = {10.25134/ilkom.v20i2.624}
}
Kostenlos starten →