Skip to main content

SecureStash

Creating a secure safe box with Rust on Raspberry Pi Pico.

info

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.

Architecture photo

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.

Above photo

Here I took a picture from the front for a better view.

Front photo

This is how my project less or more will look like.

Connections photo

This is the final version of the project

Connections photo

Schematics

Kicad schematics photo

Bill of Materials

DeviceUsagePrice
Rapspberry Pi Pico WThe microcontroller35 RON
4x4 KeypadThe keypad7 RON
Servo MotorThe servo motor14 RON
Passive buzzerThe alarm2 RON
I2C LCDThe display were you will see your PIN17 RON
BreadboardFor assembling the prototype10 lei
Female-to-Male WiresFor connections5 lei per pack
Female-to-Female WiresFor connections3 lei per pack
Male-to-Male WiresFor connections9 lei for 3 packs
Micro USB CableTo power the Raspberry Pi Pico W3 lei
RED LedIndicates "Access Denied."1 leu
GREEN LedIndicates "Access Permitted."1 leu

Software

LibraryDescriptionUsage
embassy-timeTime management libraryUsed for time-based operations such as delays
embassy-rpPeripheral access libraryUsed for initializing and interacting with peripherals
pwmPulse-width modulationUsed for controlling the buzzer's sound
embassy-executorAsynchronous executor for Rust embedded systemsUsed for task scheduling and asynchronous programming
  1. Project of a student from past years
  2. Door Lock
  3. Anti-theft lock