  Traditional brain-computer systems are complex and expensive, and emotion
classification algorithms lack repre-sentations of the intrinsic relationships
between different channels of electroencephalogram (EEG) signals. There is
still room for improvement in accuracy. To lower the research barrier for EEG
and harness the rich information embedded in multi-channel EEG, we propose and
implement a simple and user-friendly brain-computer system for classifying four
emotions: happiness, sorrow, sadness, and tranquility. This system utilizes the
fusion of convolutional attention mechanisms and fully pre-activated residual
blocks, termed Attention-Convolution-based Pre-Activated Residual Network
(ACPA-ResNet).In the hardware acquisition and preprocessing phase, we employ
the ADS1299 integrated chip as the analog front-end and utilize the ESP32
microcontroller for initial EEG signal processing. Data is wirelessly
transmitted to a PC through UDP protocol for further preprocessing. In the
emotion analysis phase, ACPA-ResNet is designed to automatically extract and
learn features from EEG signals, thereby enabling accurate classification of
emotional states by learning time-frequency domain characteristics. ACPA-ResNet
introduces an attention mechanism on the foundation of residual networks,
adaptively assigning different weights to each channel. This allows it to focus
on more meaningful EEG signals in both spatial and channel dimensions while
avoiding the problems of gradient dispersion and explosion associated with deep
network architectures.Through testing on 16 subjects, our system demonstrates
stable EEG signal acquisition and transmission. The novel network significantly
enhances emotion recognition accuracy, achieving an average emotion
classification accuracy of 95.1%.
