Smart Security System
Author: Khalifa Mohammad
GitHub Project Link: https://github.com/UPB-PMRust-Students/fils-project-2026-khalifamohammad
Description
the project is a smart home security locker system, it activates a PIR Motion sensor whenever it detects motion which then triggers an OLED screen then it requires the user to enter a valid PIN code to open the door in case of 3 wrong attempts the system will activate an Alarm State which is a buzzer starts making sounds and flashing LED lights and ESP32-CAM caputres an image of the person and sends a notification to the server
Motivation
its important to have a secure home and private space, traditional locks provide no feedback or history of attempted breaches, this project fills that gap by creating a smart security system
Architecture
-
Raspberry Pi Pico 2W (Main Controller) The Raspberry Pi Pico 2W acts as the brain of the security system. It is responsible for managing the system state, processing inputs from the keypad and sensors, and controlling the output
-
Motion Sensor
The PIR sensor serves as the system's "wake-up" trigger. It constantly monitors for infrared changes in the environment.
- OLED Display (I2C)
The OLED screen provides the User Interface for example enter PIN, Wrong PIN, DOOR UNLOCKED and Access Denied
- 4x4 Matrix Keypad
This is the primary input device for security.
- Buzzer and LED Array
These components represent the local warning system.
- ESP32-CAM (Surveillance Node)
The ESP32-CAM functions as an independent imaging component when the third attempt fails it activates.
Log
Week 5 - 11 May
Week 12 - 18 May
Week 19 - 25 May
Hardware
The Raspberry Pi Pico 2W serves as the main hub, handling the PIR motion sensor, 4x4 Keypad, and I2C OLED display.
For the alarm system, an active buzzer and LEDs provide local alerts. A separate ESP32-CAM is used as a dedicated surveillance node; it captures photos upon a security breach and sends them to a remote server via wifi.
Schematics

Bill of Materials
| Device | Usage | Price |
|---|---|---|
| Raspberry Pi Pico 2W | Central logic controller and system orchestrator | 43 RON |
| ESP32-CAM | Surveillance camera for image capture and notifications | 42 RON |
| OLED Display 0.96" I2C | Visual interface for system status and prompts | 20 RON |
| SG90 Micro Servo Motor | Physical locking mechanism (actuator) | 11 RON |
| PIR HC-SR505 | Miniature motion sensor for system wake-up | 9 RON |
| 4x4 Matrix Keypad | User input for the security PIN code | 7 RON |
| Active Buzzer | Audible alarm for unauthorized access attempts | 3 RON |
Software
| Library | Description | Usage |
|---|---|---|
| embassy-rp | Hardware Abstraction Layer (HAL) | Provides async support for the RP235x (Pico 2) peripherals like GPIO, I2C, and PWM. |
| embassy-executor | Async Executor | Manages the execution of concurrent tasks, allowing the system to monitor sensors and handle the keypad simultaneously. |
| embassy-time | Time keeping and Delays | Handles asynchronous timers for the PIR sensor stabilization and OLED screen timeouts. |
| embassy-sync | Synchronization Primitives | Provides channels and signals to communicate security states between different system tasks. |
Links
- link ...