UPDF AI

An EEG Emotion Recognition System Based on the STM32 Microcontroller

Chong Chen,Ziyi Zhu,Yong He,Wen Xu

2025 · DOI: 10.54254/2755-2721/2025.po24523
Applied and Computational Engineering · 0 Citations

TLDR

An EEG emotion recognition system based on the STM32 microcontroller is proposed, utilizing deep learning for real-time, portable mental health monitoring, and maintains an accuracy of 81% on the STM32 platform, demonstrating the practical value of the system.

Abstract

Mental health issues, particularly depression, have become a significant challenge in global public health. Early screening for depression faces difficulties due to the limitations of subjective diagnostic methods. This study proposes an EEG emotion recognition system based on the STM32 microcontroller, utilizing deep learning for real-time, portable mental health monitoring. The system processes EEG signals captured by the Muse headband using sliding window techniques, combined with time-frequency domain fusion to enhance emotional feature representation. A convolutional neural network (CNN) is employed to classify emotions into negative, neutral, and positive categories. Optimization techniques are applied to adapt the model to resource-constrained embedded devices, achieving a compression rate of 67.4%. Despite performance trade-offs in microcontrollers, the optimized CNN model maintains an accuracy of 81% on the STM32 platform, demonstrating the practical value of the system. Cross-platform comparison analysis shows that microcontrollers exhibit a larger performance gap in more emotionally polarized categories but still hold potential for edge computing applications. This study provides a feasible solution for deploying deep learning models on embedded devices, supporting continuous mental health monitoring in daily life.