Battery Safe Box
A battery-powered electronic safe box.
Author: John-Roberto Nau
GitHub Project Link: https://github.com/UPB-PMRust-Students/proiect-JohnRobertoNau
Description
This project implements an electronic safe that opens only after entering a valid PIN code. The user inputs the PIN using a 4x4 matrix keypad. Visual feedback is provided on an LCD display, while audio feedback is generated using a passive buzzer. The unlocking mechanism is controlled by a servo motor. The device is battery-powered and includes a MicroSD card module to log access attempts.
Motivation
I chose this project because I wanted to have a useful device to use in my daily life, knowing that is built by me. I wanted to combine practical embedded Rust programming with hardware interaction. It will be a challenge to work with GPIOs, I2C, PWM, and SPI for developping the this safe box.
Architecture
A schematic diagram is provided to illustrate the connections and layout of the components.
Log
Week 5 - 11 May
Week 12 - 18 May
Week 19 - 25 May
Hardware
- Raspberry Pi Pico 2W: the main microcontroller
- 4x4 Matrix Keypad: used to securely enter the PIN code to unlock the safe
- LCD 1602 with I2C and yellow-green backlight: provides visual feedback
- Passive buzzer: provides audio feedback
- Micro Servo Motor SG90: physically locks or unlocks the safe mechanism
- SPI microSD card reader module:
- Kit Breadboard HQ830 + jumper wires: used for prototyping and connecting all components
- Female-to-male and male-to-male jumper wires: used to connect components like the keypad, LCD, and sensors to the microcontroller
- Battery holder for 4x R6 (AA) batteries: powers the entire system
- Pin headers (2.54 mm, 40p): used to connect the components with the breadboard
Schematics
A KiCad schematic is provided:
Bill of Materials
Device | Usage | Price |
---|---|---|
Raspberry Pi Pico 2W | The microcontroller | 2 X 35 RON |
[Matrix Keypad 4x4] | Pin input | 6.99 RON |
[LCD 1602 with I2C] | Display | 14.99 RON |
[Passive Buzzer Module] | Audio feedback | 2.99 RON |
Micro Servo Motor SG90 | Lock mechanism | 13.99 RON |
[MicroSD SPI Reader Module] | Logging access attempts | 3.99 RON |
[Breadboard HQ830 + Wires] | Prototyping and wiring | 22 RON |
[Female-to-male jumper wires] | Wiring keypad, LCD, etc. | 7.99 RON |
[Male-to-male jumper wires] | General conections | 4.99 RON |
[Battery Holder (4x R6 AA)] | Power supply | 4.86 RON |
[4 X Red Pin Headers (2.54 mm, 40p)] | Connecting components on breadboard | 4 X 0.99 RON |
Software
Library | Description | Usage |
---|---|---|
embassy-rs | HAL support for Raspberry | Access to GPIO, PWM, I2C, SP |
defmt | Lightweight logging framework | For printing debug via probe-rs |
probe-rs | Debugging and flashing | Used for debugging on Raspberry |
heapless | Fixed-capacity buffers | For handling user input |
Links
...