Skip to main content
Version: ACS CC

Interactive Mobile Safe

Multi-factor authentication puzzle box with automatic evasion

info

Author: Calciu Tudor Andrei
GitHub Project Link: https://github.com/UPB-PMRust-Students/acs-project-2026-TudorAndreiCalciu

Description

This project presents an interactive mobile safe that acts as an "escape room" style puzzle box. The system protects its contents and requires the user to successfully pass three consecutive validation stages to unlock: entering a digital PIN via push buttons, calibrating an analog potentiometer to a specific threshold, and blocking light from reaching an LDR sensor.

To prevent brute-force attacks, the safe features an active evasion mechanism. If the user fails the puzzle stages three times, the system triggers two DC motors that physically drive the safe away from the user to a safe distance, temporarily locking all inputs.

Motivation

The main idea for this project was inspired by puzzle boxes and escape room mechanics. I wanted to build a security system that isn't just a static box but interacts physically with its environment. Combining standard sensory inputs (digital and analog) with a mobile robotics platform felt like a great engineering challenge, blending logic state machines with physical movement and anti-tampering behaviors.

Architecture

Diagram

Main Components:

  • Microcontroller (STM32 Nucleo): The brain of the project, managing the state machine and processing inputs/outputs.
  • Display (LCD 1602 I2C): Guides the user through the puzzle stages and displays warnings.
  • Sensors (Potentiometer & LDR): Used for the analog calibration and environmental light puzzles.
  • Buttons: Used to input the digital PIN code and navigate the interface.
  • Servo Motor: Used to actuate the physical locking mechanism (latch) of the safe.
  • DC Motors & Motor Driver: Used to spin the wheels and drive the safe away during the evasion state.
  • Power Supply: Separate batteries for the motors to prevent voltage drops and noise on the logic board.

Log

Week 27 April - 1 May

Created documentation, finalized the logic state machine concept, and defined the Bill of Materials.

Week 5 - 11 May

[In Progress]

Week 12 - 18 May

[To be updated]

Week 19 - 25 May

[To be updated]

Hardware

Hardware used:

  • Microcontroller (STM32 Nucleo): Controls all the other components.
  • Display: LCD 1602 with I2C module for user interface.
  • Buttons: 4x Push buttons for entering the PIN and interacting with the menu.
  • Analog Sensors: 10k Potentiometer and an LDR (Light Dependent Resistor) module.
  • DC Motors & Wheels: 3V-6V DC Motors with a 2WD robot chassis.
  • Motor Driver: L298N module controls the speed and direction of the two DC motors.
  • Servo Motor: SG90 90-degree motor used for releasing the latch.
  • Power Supply: 2x 18650 Li-Ion batteries to power the L298N driver and motors.

Schematics

TBD.

Bill of Materials

DeviceUsagePrice
STM32 Nucleo-U545RE-QMicrocontroller114.76 RON
Motor driver L298NControls DC Motors direction and speed12.00 RON
2WD Robot Car Chassis KitMechanical platform, wheels, and DC motors45.00 RON
LCD 1602 Display with I2CDisplays puzzle instructions and status24.20 RON
Micro Servomotor SG90Unlocks the physical latch9.50 RON
Potentiometer 10kAnalog input for the calibration puzzle13.65 RON
LDR Light Sensor ModuleDetects shadow for the third puzzle3.42 RON
Push ButtonsPIN input buttons2.00 RON
2x 18650 Batteries + HolderPower supply for the L298N and motors36.00 RON

Software

LibraryDescriptionUsage
embassy-executorLightweight async executor for embedded tasksRuns concurrent tasks for motor control, UI updates, and sensor polling.
embassy-timeTime management and delaysManages timing for the evasion sequence and button debouncing.
embassy-stm32::timer::simple_pwmPWM module for motor/servo controlControls DC motor speed and sets the servo angle for the latch.
embassy-stm32::adcAnalog-to-Digital Converter moduleReads values from the potentiometer and LDR sensor.
embassy-stm32::i2cI2C communication protocolHandles data transmission to the 1602 LCD display.
  1. L298N Motor Driver Technical Tutorial
  2. Embassy-rs Documentation