Embedded EDA Recognition Technology Based on STM32
Microcontroller
Huajuan Qi, Wenqing Xu and Xinwei Yang
Weifang Engineering Vocational College, Weifang, 262500, Shandong, China
Keywords: STM32 Microcontroller, Embedded EDA, EDA Identification Technology, Emotional State Recognition.
Abstract: In this paper, the embedded EDA recognition technology is implemented based on the STM32
microcontroller, which can collect the skin conductance signal in real time, and perform preprocessing of the
signal based on the signal processing and feature extraction module. In the process of research, the system
architecture is carried out, then the modeling work is carried out, and further training and optimization are
made, and then the system is integrated and applied to the actual case. The experimental data shows that the
accuracy of the system is 92%, and the average delay is less than 30 milliseconds, which indicates that the
system has high real-time and accuracy. It is concluded that the embedded EDA recognition technology based
on STM32 can achieve efficient and accurate emotional state recognition in resource-constrained
environments, and further provide a powerful boost for portable health monitoring devices.
1 INTRODUCTION
Emotional state recognition is of great significance in
mental health monitoring, especially in the field of
real-time emotion monitoring, and the study of EDA
signals has attracted great attention. Some researchers
have proposed that statistical analysis methods can be
used to solve these problems, but the effect is
obviously not good when dealing with complex and
high-dimensional. Some researchers have also
proposed that traditional classification algorithms,
such as decision trees and decision trees, can be used
to classify emotional states, but these methods are
quite unsatisfactory in terms of real-time performance
and accuracy. In addition, some researchers have
proposed that multi-layer neural networks can be used
for identification, but such methods have more
superior computing resources and are basically
impossible to achieve in embedded systems. In this
paper, intelligent algorithms such as Support Vector
Machine (SVM) are used to carry out this research,
because SVM has excellent performance in
processing high-dimensional data and complex
pattern classification, especially suitable for
embedded environments with limited resources. The
goal of this study is to implement a real-time and
accurate EDA emotion recognition system based on
STM32 microcontrollers, so that it can be better
applied to portable health monitoring devices.
2 RELATED WORKS
2.1 STM32 Microcontroller Theory
Based on the ARM Cortex-M core architecture, the
STM32 microcontroller is a high-performance, low-
power embedded microcontroller. It integrates a
variety of peripheral modules (Fang, Yang et al.
2024), such as analog-to-digital converters, serial
communication interfaces, etc. STM32 has the most
powerful real-time processing power to efficiently
perform complex tasks with limited resources. It
supports low-power modes and flexible power
management, making it especially suitable for
embedded systems where energy efficiency is critical
(He and Liu, 2023). The main task of STM32 in the
EDA recognition system is to collect and process skin
conductance signals, and further ensure the real-time
performance of the signals and the stability of data
transmission. Its embedded architecture supports
multi-task parallel processing, providing a strong
hardware foundation for EDA signal processing.
32
Qi, H., Xu, W. and Yang, X.
Embedded EDA Recognition Technology Based on STM32 Microcontroller.
DOI: 10.5220/0013534900004664
Paper published under CC license (CC BY-NC-ND 4.0)
In Proceedings of the 3rd International Conference on Futuristic Technology (INCOFT 2025) - Volume 1, pages 32-38
ISBN: 978-989-758-763-4
Proceedings Copyright © 2025 by SCITEPRESS Science and Technology Publications, Lda.
2.2 SVM Algorithm Theory
Support vector machine (SVM) is a supervised
learning algorithm based on statistical learning
theory, which can be classified and regressed tasks.
The SVM is based on the construction of a hyperplane
that splits the data into different classes
(Kavoliunaite-Ragauskiene, 2024) and maximizes
the spacing between the classes. SVM can effectively
deal with complex linear indivisibility problems in
high-dimensional spaces, and by using kernel
functions, SVMs map low-dimensional data to high-
dimensional spaces to find an optimal classification
boundary in this space (Li, Hua, et al. 2023). In the
EDA recognition task, SVM can classify different
emotional states based on the analysis of changes in
skin conductance signals. It has the advantage of
being able to process high-dimensional data and
avoid overfitting. SVM has a global optimal decision
boundary, so it performs well in sentiment
classification (Miller, 2023).
2.3 Theory of Embedded EDA
Recognition Technology
EDA recognition technology is based on monitoring
the electrical activity of the skin to reflect the
physiological and emotional state of the human body.
EDA signaling is reflected by changes in skin
conductance caused by sweat gland activity, which
fluctuates with mood (Ortiz-Clavijo, Gallego-Duque,
et al. 2023), especially when stressed, anxious, or
excited, with a significant increase in conductance.
This technology is based on sensors to collect skin
conductance signals in real time, and combines signal
preprocessing and feature extraction methods to
perform noise and interference and extract effective
emotion recognition features (Wang, Wang, et al.
2023). These features will be classified by the
classifier and, ultimately, the different emotional
states will be identified in real time. The real-time
nature and low power consumption of embedded
systems will enable EDA identification technology to
be widely applied to portable health monitoring
devices (Xiong, Yin, et al. 2023).
3 METHODS
3.1 Introduction of Embedded EDA
Identification Technology Based on
STM32 Microcontroller
The function of the signal acquisition module is to
collect the skin conductance signal in real time and
convert it into a digital signal. It is responsible for
collecting small changes in skin conductance based
on sensors, and then converts the analog signal into a
digital signal using the STM32 interface, ensuring
high-frequency sampling to capture subtle
conductance fluctuations. It provides a stable data
source for subsequent modules to process. The
function of the signal pre-processing module is to
denoise and filter the collected signal to filter out the
environmental noise and high-frequency interference
in the EDA number. The signal is then low-pass
filtered to retain the key low-frequency components.
At the same time, it can also be based on
standardization to make the signal suitable for feature
extraction and classification. It ensures maximum
purity and reliability of the input signal. The function
of the feature extraction module is to extract key
features from the preprocessed signal for recognition,
and it will recognize the rate of change of skin
conductance and the baseline value as the basis for
recognition. In its work, it also calculates the
instantaneous spikes and durations of EDA signals to
extract emotional state cues. It also has the ability to
convert the extracted features into vector inputs that
the model can process, which provides the most
discriminating signal features for the classification
model. The function of the classification model
module is to use the extracted features to classify and
identify emotional states. It uses the trained model to
classify the input signals in real time, and
distinguishes different emotional states based on
algorithms such as support vector machines. The
current emotional state is judged according to the
output probability value of the model, and the
corresponding emotional label such as "nervous" or
"relaxed" can be output according to the classification
results. The function of the Feedback & Storage
module is to provide feedback based on the
recognition results and store historical data. It feeds
back the current emotional state to the user based on
the LED display or sound alarm to provide the user
with a visual sentiment trend chart. The Feedback &
Storage module stores the identified emotional states
and the corresponding EDA signals locally or in the
cloud. This provides strong historical data support for
subsequent data analysis and model optimization. At
the same time, it also helps users to track long-term
mood changes and manage emotions.
3.2 Design of Embedded EDA
Identification Technology
In the embedded EDA recognition system based on
Embedded EDA Recognition Technology Based on STM32 Microcontroller
33
STM32, this paper uses the SVM algorithm
modeling, which can use EDA signals to classify the
user's emotional or physiological state. SVM is based
on the construction of an optimal hyperplane to
distinguish the EDA features corresponding to
different emotional states. The decision function is
described in Eq. (1).
𝑦 = 𝑠𝑖𝑔𝑛(𝑊 × 𝑋 + 𝑏)
(1)
In this formula, 𝑦is the output, which represents
the result of the assessment of the emotional or
physiological state after classification. For example,
it is possible to assess whether the current user is in a
state of stress or relaxation. 𝑊is a weight vector that
represents the importance of each EDA feature in the
classification, such as the rate of change in skin
conductance and the baseline value. In EDA
signaling, the feature can be an instantaneous
fluctuation of skin conductance, 𝑋 is a higher weight
indicates that the feature more critical to the
classification of emotions. It refers to the eigenvector
of the input EDA signal, such as the baseline, change
amplitude, frequency and other information of skin
conductance. In SVM, these feature vectors are
actually the basis for classification, which𝑏is used to
identify the different emotional states of the user. In
order to offset the top, it was used to correct the effect
of the SVM model on the baseline difference of skin
conductance in different individuals, and then to
ensure the accuracy of its classification. For example,
bias can correct the normal level of skin electrical
activity in different individuals, and allow the model
to judge the emotional state of individuals more
accurately.
In SVM, 𝑊 is the key to the model to optimize the
weights and bias the top, 𝑏 is different emotional
states can be effectively distinguished based on EDA
features. This is followed by the strategy formula for
classification, as shown in Eq. (2).
𝑓
(𝑥)=𝑊⋅𝑋+ 𝑏
(2)
In this formula, 𝑊is the importance of each EDA
feature in sentiment classification is described. For
example, transient changes in skin conductance and
baseline fluctuations differ in different emotional
states, and it is up to it to determine which feature is
more important in the classification. 𝑋is the
eigenvector from the EDA signal. Each dimension is
a characteristic of the EDA signal, such as the
baseline level of skin conductance, the rate of change,
etc. These traits can be used to identify changes in
mood. 𝑏is used to adjust the output results of the
model to accommodate the differences in skin
conductance characteristics of different individuals.
This ensures that the model can accurately classify
the emotional state of different users, even if they
have different EMG baselines.
In SVM, the classification results depend on the
selection of support vectors. Support vectors
represent those key feature points that are near the
classification boundary. In EDA recognition, support
vectors are generally those EDA signals that have
significant characteristic changes, such as
conductance changes when emotions fluctuate
violently. The model uses vectors to optimize its
classification boundaries to ensure that the interval
between emotional states is maximized. See Eq. (3)
for details.
𝑓
(𝑥)=𝛼

𝑦
𝐾(𝑥
, 𝑥)+𝑏
(3)
In this equation, the Lagrangian multiplier𝛼
is
referred to, representing the contribution of each
support vector to the classification boundary. 𝑦
are
category labels that support vectors that represent
their emotional states, such as high stress, low stress.
𝐾(𝑥
, 𝑥) is a kernel function that calculates the
similarity between the input features and the support
vectors. The kernel function can map the skin
electrical signal to a higher dimensional space, which
in turn prompts the model to truly find the
classification boundary in complex data.
3.3 Embedded EDA Recognition
Technology Training
In the process of model training, SVM uses the loss
function to evaluate the classification accuracy of the
model, and continuously updates the weights and
biases based on the gradient descent method. In EDA
identification, the loss function measures the gap
between the emotional state assessed by the model
and the actual emotional state, and if the gap is large,
the model minimizes the gap based on adjusting the
weights. The descent method adjusts its model
parameters based on changes in its loss function.
Using the update of the weights and biases of each
step, the model will gradually learn to better classify
the emotional features in the galvanic skin signals. In
this process, the learning rate will determine the step
size of the model update, and a larger learning rate
will make the model update faster, however, it will
cause instability. A smaller learning rate ensures a
more stable model, but its training process is slower.
The bias adjustment is used to correct for differences
INCOFT 2025 - International Conference on Futuristic Technology
34
in skin conductance baselines in different individuals,
allowing the model to maintain classification
accuracy among different individuals. In the whole
process of model training, the loss function, gradient
descent, learning rate and bias will play a role
together, so that the model can gradually improve the
accuracy of emotional state recognition, and finally
achieve efficient real-time EDA emotional
recognition.
In embedded systems, the computational
complexity of the model is very limited, so this paper
needs to reduce the size of the model based on
pruning. For EDA recognition, it means that the
features and data points in the model that have less
effect on the judgment of emotional states should be
reduced, so that the model can be more efficient in
processing the galvanic skin signals. The process of
pruning can be based on removing features that do not
affect the classification results of the model. For
example, in the characteristics of skin conductance, it
is possible that the magnitude of some changes and
the frequency of certain fluctuations have little effect
on the identification of the user's emotional state, such
as stress or relaxation, then pruning technology can
be used to remove this information, thereby
minimizing the amount of model computation and
speeding up the classification. For this, see Eq. (4).
𝑊

= 𝑊⋅𝑀
(4)
In Eq. (4), 𝑊

is the weight matrix after
pruning represented, which removes the
electrodermal features that have less effect on the
classification of emotions. This makes the model
more concise and efficient. 𝑀is the mask matrix,
which identifies which EDA features are important
and which can be removed. During the pruning
process, the model retains features that are useful for
emotion recognition, such as sudden changes in
conductance, and
Deletes Extraneous Features.
The learning rate plays a decisive role in model
optimization. In EDA signal recognition, optimizing
the learning rate can ensure that the model can
quickly learn the correlation between the
electrodermal signal and the emotional state during
the training process. If the learning rate is too high,
the model will be too sensitive to the signal, which
will lead to unstable emotion recognition, such as
overreaction to small fluctuations in skin
conductance. If the learning rate is too low, the update
speed of the model is too slow, so it cannot capture
the changes of its skin electrical signal in time, which
will affect the real-time recognition. Therefore,
reasonable optimization of the learning rate can help
the model quickly adapt to the changes in user
sentiment and improve the recognition accuracy. See
Eq. (5) for details.
𝑊

= 𝑊

−𝜂⋅𝛻𝐿(𝑊)
(5)
In this formula, 𝜂 is the speed at which the model
updated is described. For skin conductance signals, a
moderate learning rate allows the model to quickly
identify mood changes while remaining stable.
represents 𝛻𝐿(𝑊) is the gradient of its loss function,
which is the current classification error of the model
on the skin conductance signal. After optimizing the
learning rate, the model can adjust the weights more
accurately, thereby improving the ability to recognize
mood swings. In embedded systems, such as the
STM32 platform, hardware resources are limited.
Therefore, in the EDA recognition system, the
hardware optimization is to accelerate the processing
of the skin electrical signal. Based on optimized
hardware, the system reduces latency in data
transmission and is able to speed up categorical
responses to emotional states. For example, based on
direct memory access technology, the system can
automatically process a large amount of
electrodermal data in the background and reduce
processing time. Based on this, the system can
respond immediately when the user's sentiment
changes, without having to wait for a long time for
data processing. See Eq. (6) for details.
𝑇

=
𝑇

1+𝛼 × 𝑁

(6)
In this formula, 𝑇

refers to the processing time
of the optimized system. After hardware
optimization, the system processes the skin signals
more quickly, and can classify the user's emotional
state in a more timely manner. 𝛼denotes the
optimization factor, which means that hardware
acceleration improves the performance of the system.
Based on hardware optimization, the system can
quickly respond to changes in user sentiment and
further improve the real-time performance of its EDA
signal processing.
3.4 Research and Optimization of
Embedded EDA Recognition
Technology
The system integration adopts a modular design, with
signal acquisition first, and skin conductance signals
based on sensors. The acquired signal is immediately
Embedded EDA Recognition Technology Based on STM32 Microcontroller
35
transmitted to the pre-processing module, which
removes noise and filters to ensure the quality and
purity of the signal. Subsequently, the feature
extraction module extracts key features from the
purified signal (Xue, Jin, et al. 2024), such as the rate
of change and peak of skin conductance, which
provide a basis for the classification of emotional
states. The classification model receives features and
begins to classify them in real time, and also identifies
emotional states, such as nervousness or relaxation,
based on the trained algorithm. Finally, the feedback
module reminds the user according to the
classification results, and stores the data based on
visual and sound feedback emotional states to
facilitate their subsequent analysis. The system
integration process can maintain the continuity of the
data flow, make it truly seamless from collection to
classification feedback, and ensure that the various
modules work together to ensure the real-time
responsiveness of the system (Zheng and Sun, 2024).
4 RESULTS AND DISCUSSION
4.1 Introduction to the Research Case
of EDA Identification Technology
In modern emotion recognition and physiological
state monitoring, EDA is commonly used to track
individual mood fluctuations. EDA technology is
based on measuring changes in skin conductance to
reflect the physiological response of individuals in
different emotional states. Especially in the field of
mental health monitoring, EDA signals can
effectively identify emotional agitation, anxiety,
stress and other states. The embedded EDA
recognition system based on STM32 microcontroller
can provide real-time emotional feedback for
individuals based on real-time collection of
electrodermal activity combined with appropriate
classification algorithms. For example, in stress
management applications, EDA signals will be used
to monitor the individual's stress levels at work and
school, and wearable devices will be used to remind
users to maintain emotional balance in real time, The
results are shown in Table 1.
Table I shows typical changes in skin conductance
in different emotional states such as calm, nervous,
anxious, and pleasant. According to experimental
data, skin conductance increases significantly when
people are in a state of tension and anxiety, while skin
conductance remains at a lower level in a calm state.
The fluctuation of skin conductance increases in the
pleasant state, although the average is lower, the
composition of the microcontroller is shown in Fig. 1.
Table 1: Changes in skin conductance in different
emotional states.
Emotional
state
Mean skin
conductance
(μ
S
)
Fluctuations
in skin
conductance
remark
calm 1.8 low
The
conductance
remains
stable
nervous 5.2 high
Conductance
is markedly
elevate
d
anxiety 4.7 medium
The
conductance
is fluctuatin
g
pleasant 2.5 Higher
Conductivity
is highly
volatile
Figure 1: Composition of STM32 microcontroller.
4.2 The Signal Recognition Process of
Microcontroller
The EDA recognition technology studied the changes
of skin conductance in different emotional states, and
30 people were selected to participate in the
experiment, 4 different emotions were recorded, and
the experiment lasted for 3 days, 5 conductance
fluctuation recognizers, and 3 EDA signal detection
machines. These conductance changes provide the
basis for emotional classification of EDA signals, as
shown in Table 2.
INCOFT 2025 - International Conference on Futuristic Technology
36
Table 2: Real-time EDA signal acquisition performance
based on STM32 microcontrollers
Performance
metrics
Data values remark
Acquisition
accuracy
±0.02 μS High-precision
signal
ac
q
uisition
Average latency 30 ms Ideal for real-
time emotion
monitoring
a
lications
Data transfer
delays
Less than 20
milliseconds
Real-time
response is
guarantee
d
Table 2 shows the performance metrics for real-
time acquisition of EDA signals in an embedded
system based on STM32 microcontrollers. For
example, the accuracy and real-time nature of data
acquisition, and the delay of data transmission. The
results show that STM32 can maintain high-precision
EDA signal acquisition with an average delay of less
than 30 milliseconds under limited computing
resources, indicating that the system can support real-
time emotion monitoring applications,The EDA
recognition process of the microcontroller is shown in
the pattern..
Figure 2: Embedded recognition of microcontroller.
Figure 2 shows that after embedded recognition
by the microcontroller, data correlation analysis can
be achieved and disturbance signals can be identified.
4.3 Research Effect of Embedded EDA
Recognition Technology
Based on the comprehensive analysis of the three
tables, it can be concluded that the embedded EDA
recognition system based on STM32 microcontroller
in this study has a multi-faceted performance in
emotion recognition. The data showed significant
changes in skin conductance in different emotional
states, with significantly higher conductance values in
stress and anxiety states and lower levels in calm
states. This trend provides a very critical basis for the
classification of EDA signaling, indicating that skin
conductance can effectively reflect emotional state,
The comparison of recognition accuracy of
microcontrollers is shown in Table 3.
Table 3: Comparison of recognition accuracy of different
classification algorithms
Algorithm
Recognition
Accurac
y
(%)
Computational
complexit
y
KNN
85 Lower
SVM
92 medium
Random
fores
t
88 Higher
Table 3 shows the performance of different
machine learning algorithms in the EDA signal
sentiment recognition task. Based on the comparison
of the recognition accuracy of KNN, SVM and
random forest algorithms, it can be found that SVM
has the highest accuracy of 92%, while the accuracy
of KNN and random forest is 85% and 88%,
respectively. It fully shows that SVM can still
maintain high classification performance in STM32
systems with limited resources, and is suitable for
actual embedded EDA identification systems,
Accuracy changes, as shown in Figure 3.
Figure 3: Embedded recognition process of
microcontroller.
The data analysis in Figure 3 shows that., the
system is outstanding in high-precision acquisition
and low-latency transmission. The average latency of
30 milliseconds ensures that the system can be
applied in real-time scenarios, so that the emotion
monitoring results can be fed back to users in time.
This conclusion echoes the trend of skin conductance
change, so that the system can capture emotional
fluctuations in time and respond quickly, showing
good real-time processing ability. In addition, the data
Embedded EDA Recognition Technology Based on STM32 Microcontroller
37
shows that SVM has the best performance in
classification tasks, with an accuracy rate of 92%,
which is much higher than that of KNN and random
forest. Based on this, it can be seen that SVM has
stronger discrimination ability and stability when
processing multi-dimensional data such as EDA
signals. Combined with the characteristics of skin
conductance fluctuations, SVM can accurately
capture the differences between different emotional
states, and show high reliability in classification
results.
5 CONCLUSIONS
The conclusion of this paper is that the embedded
EDA based on STM32 microcontroller can use the
effective combination of SVM algorithms to
efficiently distinguish different emotional states,
which reflects the superiority of the SVM algorithm
based on STM32 microcontroller for real-time signal
processing. By extracting the key features of EDA
signals and optimizing the weights and biases, the
model can still maintain high classification accuracy
in the face of individual differences. The selection of
support vectors and the optimization of classification
boundaries ensure that the model can effectively
capture the characteristics of different emotional
states of individuals in complex EDA signals, and at
the same time, maximize the interval between
emotional states. In addition, through model
optimization and other steps, this paper also ensures
the effectiveness of embedded EDA recognition
based on STM32 microcontrollers, and greatly
improves the real-time response ability of the system.
Based on this, the model and its system will provide
further support for the application of intelligent health
monitoring. Although this paper has relatively
complete data support, it still has some technical
limitations and limitations. Based on this, further
optimizations can be made at a later date.
REFERENCES
Fang, L. Y., Z. Yang, T. L. Ma, J. Yue, W. Y. Xie, P.
Ghamisi, and J. Li. (2024). Open-World Recognition in
Remote Sensing. Concepts, challenges, and
opportunities. Ieee Geoscience and Remote Sensing
Magazine, 12(2), 8-31.
He, N., and W. H. Liu. (2023). Network Oral English
Teaching System Based on Speech Recognition
Technology and Deep Neural Network. International
Journal of Advanced Computer Science and
Applications, 14(12), 829-839.
Kavoliunaite-Ragauskiene, E. (2024). Right to Privacy and
Data Protection Concerns Raised by the Development
and Usage of Face Recognition Technologies in the
European Union. Journal of Human Rights Practice,
16(2), 658-674.
Li, W., M. L. Hua, Y. Sun, H. S. Li, and Y. H. Lin. (2023).
FACE, FACIAL RECOGNITION TECHNOLOGY
AND PERSONAL PRIVACY. Acta Bioethica, 29(2),
259-268.
Miller, K. W. (2023). Facial Recognition Technology.
Navigating the Ethical Challenges. Computer, 56(1),
76-81.
Ortiz-Clavijo, L. F., C. J. Gallego-Duque, J. C. David-Diaz,
and A. F. Ortiz-Zamora. (2023). Implications of
Emotion Recognition Technologies. Balancing Privacy
and Public Safety. Ieee Technology and Society
Magazine, 42(3), 69-75.
Wang, Q. W., P. X. Wang, and Y. Z. Chang. (2023). Deep
Learning-Based Intelligent Image Recognition and Its
Applications in Financial Technology Services.
Traitement Du Signal, 40(2), 735-742.
Xiong, J. X., H. Yin, and M. S. Pan. (2023). Book
recommendation and purchase of intelligent image
recognition technology under the background of 5G
environment. Journal of Computational Methods in
Sciences and Engineering, 23(2), 995-1005.
Xue, Y. X., Y. T. Jin, S. P. Chen, H. J. Du, and G. Shen.
(2024). Modulation Signal Automatic Recognition
Technology Combining Truncated Migration
Processing and CNN. Ieee Access, 12, 120414-120428.
Zheng, X., and Z. Sun. (2024). Exploration on multimodal
data recognition method for Internet of Things based on
deep learning. Intelligent Decision Technologies-
Netherlands, 18(2), 759-767
INCOFT 2025 - International Conference on Futuristic Technology
38