Interactive Mobile Safe
Multi-factor authentication puzzle box with automatic evasion
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
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
| Device | Usage | Price |
|---|---|---|
| STM32 Nucleo-U545RE-Q | Microcontroller | 114.76 RON |
| Motor driver L298N | Controls DC Motors direction and speed | 12.00 RON |
| 2WD Robot Car Chassis Kit | Mechanical platform, wheels, and DC motors | 45.00 RON |
| LCD 1602 Display with I2C | Displays puzzle instructions and status | 24.20 RON |
| Micro Servomotor SG90 | Unlocks the physical latch | 9.50 RON |
| Potentiometer 10k | Analog input for the calibration puzzle | 13.65 RON |
| LDR Light Sensor Module | Detects shadow for the third puzzle | 3.42 RON |
| Push Buttons | PIN input buttons | 2.00 RON |
| 2x 18650 Batteries + Holder | Power supply for the L298N and motors | 36.00 RON |
Software
| Library | Description | Usage |
|---|---|---|
| embassy-executor | Lightweight async executor for embedded tasks | Runs concurrent tasks for motor control, UI updates, and sensor polling. |
| embassy-time | Time management and delays | Manages timing for the evasion sequence and button debouncing. |
| embassy-stm32::timer::simple_pwm | PWM module for motor/servo control | Controls DC motor speed and sets the servo angle for the latch. |
| embassy-stm32::adc | Analog-to-Digital Converter module | Reads values from the potentiometer and LDR sensor. |
| embassy-stm32::i2c | I2C communication protocol | Handles data transmission to the 1602 LCD display. |