SecureStash
Creating a secure safe box with Rust on Raspberry Pi Pico.
Author: RAPA Denis-Andrei
GitHub Project Link: https://github.com/UPB-FILS-MA/project-adenis033
Description
With this project, my goal is to craft a secure safebox using the Raspberry Pi Pico. Access to the safebox is made easy with a keypad, where users put in their unique PIN code for authentication. When the correct code is entered, the safebox unlocks, greeted by a friendly green LED and a message on the display. However, if the PIN code is off, a red LED signals a denial of access, accompanied by a buzzer alert. This setup ensures both security and user-friendly feedback, making it a reliable option for protecting valuables.
Motivation
I chose this project because it immediately appealed to me as a cool and practical idea. Not only does it offer the excitement of building something tangible, but it also provides a solution that I can continue to benefit from in my everyday life by securely storing valuable items. This project perfectly blends utility with learning, which was a key factor in my decision-making process. I saw it as an opportunity not only to create something functional but also to expand my knowledge and skills in programming and electronics.
Architecture
Main Components:
Raspberry Pico: Serves as the brain of the safebox, handling all processing tasks.
4x4 Matrix Keypad: Enables user input for PIN verification, ensuring secure access to the safebox.
Servo Motor: Functions as the locking mechanism, engaging when the correct PIN is entered to unlock the safebox.
Buzzer: Acts as the audible alarm, alerting users in case of an incorrect PIN entry.
I2C LCD : A display where you can see the PIN that you are typing.
Connection overview :
The 4x4 Matrix Keypad interfaces directly with the Raspberry Pico, facilitating PIN input.
Acting as the central unit, the Raspberry Pico controls and coordinates all components of the safebox. This includes the LCD display, servo motor, and buzzer, which are all connected to and dependent on the Pico for operation.
Log
Week 6 - 12 May
- I did the hardware the best way possible. I had a prototype before that was messier, and now I managed to make it more understandable and cleaner.
- With the hardware part done, I also completed my KiCad design.
- I improved the software part. It's not finished yet, but I’m making good progress so far.
Week 13 - 19 May
- I changed from the 4x4 keypad to an RFID RC522 module.
- I’m almost finished with the code. It still has some errors, but I am working hard on them. Most likely, one or two more days of work and everything will be smooth.
- I ordered an active buzzer instead of a passive one for better accuracy related to the alarm, as the sound is louder and more explicit for its use.
Week 20 - 26 May
- I finished the whole code after many hours of debugging.
- I put the hardware in a box and gave it the look of a safe box.
Hardware
In my project, the Raspberry Pi Pico microcontroller serves as the central processing unit, mandated for the task. Its low power consumption ensures efficiency throughout. I've also integrated a 4x4 Matrix Keypad for user input, a servo motor for secure locking, and a buzzer for audible alarms. Each component is chosen with care to ensure a dependable system for safeguarding valuables.
This picture shows the project from the above.
Here I took a picture from the front for a better view.
This is how my project less or more will look like.
This is the final version of the project
Schematics
Bill of Materials
Device | Usage | Price |
---|---|---|
Rapspberry Pi Pico W | The microcontroller | 35 RON |
4x4 Keypad | The keypad | 7 RON |
Servo Motor | The servo motor | 14 RON |
Passive buzzer | The alarm | 2 RON |
I2C LCD | The display were you will see your PIN | 17 RON |
Breadboard | For assembling the prototype | 10 lei |
Female-to-Male Wires | For connections | 5 lei per pack |
Female-to-Female Wires | For connections | 3 lei per pack |
Male-to-Male Wires | For connections | 9 lei for 3 packs |
Micro USB Cable | To power the Raspberry Pi Pico W | 3 lei |
RED Led | Indicates "Access Denied." | 1 leu |
GREEN Led | Indicates "Access Permitted." | 1 leu |
Software
Library | Description | Usage |
---|---|---|
embassy-time | Time management library | Used for time-based operations such as delays |
embassy-rp | Peripheral access library | Used for initializing and interacting with peripherals |
pwm | Pulse-width modulation | Used for controlling the buzzer's sound |
embassy-executor | Asynchronous executor for Rust embedded systems | Used for task scheduling and asynchronous programming |