Klasifikasi Tingkat Stres Berbasis Heart Rate Variability Menggunakan Logistic Regression pada ESP32

Authors

DOI:

https://doi.org/10.30998/string.v11i1.4418

Keywords:

ESP32, Heart Rate Variability, Logistic Regression, Stress Classification, MAX30102

Abstract

Measurement of stress levels relying solely on subjective assessment is often prone to perception bias, thus necessitating an objective method based on physiological biomarkers such as Heart Rate Variability (HRV). This study aims to develop a portable stress detection system using the MAX30102 PPG sensor and ESP32 microcontroller, as well as to analyze changes in HRV parameters before and after a cognitive stimulus. The method used was a pre-post experimental design on 20 subjects, with a mental arithmetic task as the stress trigger. PPG signal data were processed to extract time-domain features (RMSSD, SDNN, and Mean BPM), which were then classified using the Logistic Regression algorithm. Stress level label validation was conducted using the DASS-21 and PSS-10 questionnaires. The results showed a significant physiological response post-stimulus, characterized by an increase in the average Mean BPM from 74 BPM to 84 BPM, and a decrease in heart rate variability values (RMSSD and SDNN), indicating sympathetic nerve activation. The Logistic Regression classification model successfully differentiated stress conditions with an accuracy rate reaching 100% on the test data. However, this perfect achievement on a small-scale dataset (N=20) indicates the need for further testing with a larger sample size in order to minimize the risk of overfitting bias.

Downloads

Download data is not yet available.

Downloads

Published

2026-08-30

Issue

Section

Articles

How to Cite

Diriyah, A., Bahtiar, M. A., Fitria, S., Setiawan, R., & Resfita, N. (2026). Klasifikasi Tingkat Stres Berbasis Heart Rate Variability Menggunakan Logistic Regression pada ESP32. STRING (Satuan Tulisan Riset Dan Inovasi Teknologi), 11(1), 136–143. https://doi.org/10.30998/string.v11i1.4418