Skip to main content
Version: ACS CC

Multi-modal Reaction Time Trainer

A reaction time training device with random rounds selected from 4 stimulus-response pairs.

info

Author: Alexandru Dima
GitHub Project Link: https://github.com/UPB-PMRust-Students/acs-project-2026-dimutz

Description

A multi-modal reaction-time training device built on an STM32 microcontroller, using various visual, audio, and mechanical stimuli (LEDs, buzzer, OLED display, servo motor) and multiple user input methods (buttons, analog sensors, and IMU gestures). The device measures reaction time across randomized rounds, calculates performance scores in real time, stores user profiles and leaderboards in non-volatile memory, and provides a structured game-like experience with menus, sessions, and statistical feedback.

Motivation

I chose this project in order to explore embedded systems through an interactive application focused on training and measuring human reaction times. It combines real-time input processing with precise timing to evaluate how quickly users respond to different stimuli. This makes it both a technical exercise in building a responsive system and a practical tool for improving reaction speed under varying conditions.

Architecture

Architecture Diagram

Log

Week 21 - 27 April

Researched and ordered hardware components from Sigmanortec.

Week 5 - 11 May

Tested hardware components, soldered MPU pins and built the hardware.

Week 12 - 18 May

Developed the software and tested it. Some tweaks are needed.

Week 19 - 25 May

Hardware

The system is based on an STM32 NUCLEO development board, complemented by multiple input and output peripherals. It includes visual outputs (OLED display and LED), an audio output (buzzer), and mechanical output (servo motor). User interaction is handled through a push button, a rotary encoder, analog sensors (potentiometer and photoresistor), and an IMU sensor for gesture detection. Data storage is implemented using an SD card module and non-volatile memory (EEPROM) for saving user profiles and leaderboards.

Inside Outside

Schematics

Schematic

Bill of Materials

DeviceUsagePrice
Nucleo-U545-RE-QThe microcontrollerLab provided
OLED display & EC11 Encoder ModuleDisplay - menu + stimulus; Encoder - menu control39.98 RON
SG90 ServomotorStimulus9.49 RON
Active 5V BuzzerStimulus1.11 RON
LEDStimulus0.30 RON
Momentary push buttonResponse4.05 RON
PotentiometerResponse13.65 RON
PhotoresistorResponse1.69 RON
MPU-6500 ModuleResponse12.00 RON
MicroSD ModuleData export4.38 RON
MicroSDHC CardData export14.98 RON
EEPROM AT24C256Profile storage7.24 RON
MB102 Power SupplyServo power6.69 RON
Resistor kitResistors15.16 RON
Jumper Wires (M-M 20cm)Connections8.97 RON
Jumper Wires (M-F 20cm)Connections8.97 RON

Software

LibraryDescriptionUsage
embassy-stm32Async HAL for STM32 (GPIO, I²C, ADC, PWM, EXTI)Board init, peripherals, and drivers for the STM32U545
embassy-executorAsync/await executor for embeddedRuns main, encoder/button tasks, and the application loop
embassy-timeTimers and delaysRound timing, debounce, random wait, and frame pacing
embassy-syncSync primitives for EmbassyMutex around the shared I²C bus
embassy-embedded-halAdapters between Embassy and embedded-halI2cDevice for OLED, EEPROM, and MPU on one bus
ssd1306Display driver for SSD1306 OLED128×64 OLED over I²C
embedded-graphics2D graphics libraryMenus, game UI, text, and the false-start mark
embedded-halHardware abstraction traitsI²C trait used by EEPROM and MPU drivers
defmtEfficient embedded loggingDebug logs (rounds, false starts, sensor values)
defmt-rttRTT transport for defmtSends log output to the debug probe
cortex-mCortex-M support crateLow-level CPU access (e.g. nop during ADC sampling)
cortex-m-rtRuntime for Cortex-MReset vector and runtime startup
panic-probePanic handlerPrints panics over defmt on the probe
heaplessCollections without heap allocationFixed-size Vec and String for profiles and UI
static_cell'static initialization helperStores the shared I²C bus for the firmware lifetime