NeuroSense – Real-Time Mental Health Monitoring System on STM32N6

NeuroSense is a real-time, embedded mental health monitoring device powered by STM32N6. It uses speech analysis, EEG signals, and facial emotion recognition to detect stress, anxiety, depression, and other emotional states. With the use of interactive TouchGFX-based touchscreen UI, users can receive instant feedback, mood tracking, and alerts, enabling applications in personal health, workplaces, therapy, and clinical environments. Our proposed system aims to be an optimized, lightweight and efficient.
The solution is supported by EEG acquisition circuitry based on established STM32 designs, enabling high-precision amplification, filtering, and digitization of bio-signals. Results and feedback are presented through a TouchGFX-powered interactive LCD interface, offering users instant insights into their stress and mood levels.
Problem Statement
Mental health disorders such as stress, anxiety, and depression are among the most pressing global health challenges, affecting one in eight people worldwide, as reported by the World Health Organization. Beyond the human cost, stress-related conditions result in more than $1 trillion annually in lost productivity. Despite this scale, technological innovation has disproportionately focused on physical health monitoring, leaving mental well-being under-served. The few solutions that exist are either prohibitively expensive, confined to specialized clinical settings, or too basic to deliver actionable insights.
System Architecture
- 2 Input streams: EEG and facial data
- Preprocessing: amplification/filtering (EEG).
- AI Inference: Yolov8 for Facial expression processing and FFT for EEG signal processing
- Fusion on STM32N6 MCU
- Outputs: TouchGFX LCD screen displays current facial expression and along with that the type of EEG signal currently observed.

- STM32N6570-DK Board (main MCU with NPU)
- EEG electrodes for brain signal acquisition.
- INA128 instrumentation amplifier + OpAmps for filtering.
- SD card for local storage.
- Battery for portable operation.
- EEG:
- Introduction: Electroencephalography (EEG) is a technique to measure the electrical activity of the brain by placing electrodes on the scalp. Typical EEG signals are in the range of microvolts, with frequency content mainly between 0.5 Hz and 100 Hz. Since these signals are extremely weak, a dedicated circuit is required to amplify and filter the signal.
- Ideation and Design Approach: The core challenges in EEG signal acquisition are:
- Very low signal amplitude (µV level) → requires high-gain, low-noise amplifiers.
- Noise contamination (especially 50 Hz mains hum) → requires careful filtering.
- ADC compatibility (microcontrollers work on 0–3.3 V or 0–5 V) → requires level-
shifting and safe output scaling.
- Chosen Solution:
- INA118 instrumentation amplifier for initial amplification and common-mode noise rejection.
- Passive low-pass filter to reduce high-frequency interference.
- Twin-T notch filter tuned to 50 Hz to suppress mains interference.
- Final gain stage using op-amp for signal scaling.
- Circuit Design:
- Input Stage: INA118 Instrumentation Amplifier
- Chosen because of high CMRR (~120 dB), essential for rejecting common-mode noise from the body and environment.
- Gain is set using an external resistor:
G = 1 + (50k/Rg). - The amplifier boosts EEG signals from tens of µV to a few mV.
- Powered with dual supply to allow symmetric swing around 0 V.
- Low-Pass Filter
- Implemented as a passive RC filter with R = 1 kΩ, C = 1.5 µF.
- Cutoff frequency:
- Fc = 1/(2πRC) = 106 Hz
- Purpose: remove high-frequency interference (>100 Hz), preserving EEG content.
- Buffer Stage
- Implemented with an op-amp in voltage follower configuration.
- Purpose: prevent loading of the RC filter and stabilize impedance for the next stage.
- Twin-T Notch Filter
- Designed to suppress 50 Hz mains noise.
- Component selection: R ≈ 3.16 kΩ, C = 1 µF.
- Notch frequency:
- F = 1/(2πRC) = 50.5 Hz
- Achieved by combining two RC networks (series and parallel) for destructive interference at 50 Hz.
- The red curve in the above photo shows the final output.
- Input Stage: INA118 Instrumentation Amplifier
- Implementation:
- The complete circuit was assembled on a breadboard using the INA118, LM741 op-amps, resistors, and capacitors.
- Power was provided by a ±12 V dual rail supply.
- Electrodes were connected to the inputs of the INA118.
- Outputs were observed on an oscilloscope, showing visible EEG activity with mains
interference suppressed.
- The complete circuit was assembled on a breadboard using the INA118, LM741 op-amps, resistors, and capacitors.
- Testing and Observations:
- Preliminary tests confirmed amplification of weak input signals.
- The Twin-T notch filter successfully attenuated 50 Hz noise.
- The final op-amp stage produced output signals in the expected range (hundreds of mV).
- Some limitations observed:
- Noise floor is still present due to breadboard parasitics and op-amp choice.
- LM741 op-amp added offset and drift; modern low-noise op-amps would improve performance.
- High-pass filter was not implemented but is recommended for long-term stability.
- Preliminary tests confirmed amplification of weak input signals.
For this we used a code from STM32N6 code firmware (VENC) to record video and capture images in my desired size 480x480 after making some changes in IMX335 header file and following instructions from ST Community Forum.
We also used existing dataset available on roboflow

- Total of 6 classes :
- Anger
- Fear
- Happy
- Neutral
- Sad
- Disgust
- Contempt
Power Management
Potential Use Cases and Applications
- Personal Use
- Daily mood and stress tracking.
- Helps individuals with anxiety or depression monitor changes over time.
- Provides actionable insights into emotional well-being.
- Workplace Use
- Burnout and stress detection in high-pressure jobs (healthcare, IT, emergency services).
- Enables preventive measures to improve employee health and productivity.
- Healthcare/Clinical Use
- Therapy support tool with real-time emotional state data.
- Enhances therapy effectiveness.
- Useful for remote or resource-limited settings.
- Emergency triage of psychological distress in hospitals.
- Broader Societal Impact
- Reduces stigma by making mental health monitoring seamless and non-invasive.
- Can integrate with wellness programs and public health initiatives.
- Potential use in educational environments to promote resilience and awareness.
Conclusion
Some Additional Testing Images
Discussion (0 commentaire(s))