Skip to main content
Version: ACS CC

Labyrinth game

A physical labyrinth platform that mirrors the orientation of a handheld Nucleo board using IMU sensors and servo actuation.

info

Author: PETREA Bianca-Iulia
GitHub Project Link: https://github.com/UPB-PMRust-Students/acs-project-2026-biancapetrea16

Description

The project implements a physical 2-axis (X-Y) labyrinth platform driven by two servomotores. Instead of a traditional joystick, the system uses a handheld Nucleo board equipped with an MPU6050 accelerometer and gyroscope to detect tilt. The hardware labyrinth "mirrors" the handheld board's orientation in real-time. A proximity sensor (IR) marks the end of the maze, and the completion time is recorded onto an SD card to maintain a "High Score" leaderboard.

Motivation

I chose this project to explore the concept of remote motion mirroring. It requires a precise synchronization between the handheld controller (IMU data processing) and the mechanical platform (PWM actuation).

Architecture

The project is built as a motion mirroring system between the controller and the maze:

  • Handheld Controller (Nucleo + IMU): Detects pitch and roll angles via I2C.
  • Main Processor: Translates orientation data into PWM duty cycles.
  • Mechanical Platform: Uses two servos to tilt the physical maze.
  • End-of-Game Logic: An IR sensor triggers the timer stop.
  • Persistence Layer: An SD card module stores the leaderboard via SPI.

Architecture Diagram

Log

Week 14 - 20 April

  • Finalized project theme and received approval.
  • Researched and ordered all hardware components (IMU, servos, SD module, IR sensor).

Week 4 - 8 May

Week 12 - 18 May

Week 19 - 25 May

Hardware

The project uses the STM32 Nucleo-U545RE-Q board as the brain, connected to sensors for input and motors for output.

Schematics

Bill of Materials

DeviceUsagePrice
STM32 Nucleo-U545RE-QMain ControllerLab Provided
MPU6050 IMU (Soldered)Handheld tilt detection (I2C)15.49 RON
2x SG90 ServomotorsLabyrinth tilt control (PWM)27.98 RON
Micro SD Card Slot ModuleSPI Interface for SD card4.39 RON
MediaRange 4GB MicroSDHCStorage for High Scores23.00 RON
IR Obstacle SensorFinish line detection19.99 RON
Breadboard Kit + MB102 PowerPrototyping and power rail35.00 RON
6xAA Battery Holder (DC Jack)Power for motors11.00 RON
Varta Longlife Power AA (8 pcs)Power source22.00 RON
Resistors Set (600 pcs)Circuit components28.00 RON
Jumper Wires (F-M 20cm)Connections14.00 RON
Jumper Wires (F-M 40cm)Long range connections19.00 RON
Jumper Wires (M-M 30cm)Breadboard connections16.00 RON

Software

LibraryDescriptionUsage
embassy-stm32Hardware Abstraction LayerHandling I2C, SPI, and PWM peripherals
mpu6050IMU DriverConverting raw data to tilt angles
embedded-sdmmcSD Card File SystemManaging the High Score log file
  1. MPU6050 Technical Documentation
  2. The Embedded Rust Book
  3. Embassy Framework Docs