Skip to main content
Version: FILS English

Smart Security System

This project is a smart security system built on the Raspberry Pi Pico 2W by using asynchronous rust programming

info

Author: Petrescu Alexandra-Maria
GitHub Project Link: https://github.com/UPB-PMRust-Students/fils-project-2026-alexandra.petrescu

Description

My project idea was to try and implement a smart security system logic on a Raspberry Pi Pico 2W, with the help of a PIR sensor for motion detection, an IR sensor, and a buzzer for audio alarms. The entire logic will be written in rust using the Embassy framework to ensure asynchronous execution

Motivation

The main reason why I chose to build this project was because I wanted it to be very interactive, and this idea gave me the perfect way to do it. Besides the coding aspect of it, I wanted to do something that would actually challenge me in terms of hardware and that would ultimately provide immediate and physical feedback, such as waving my hand in front of a sensor and the system actually reacting. Furthermore, I definitely wanted to work with a Raspberry Pi Pico and see for myself the way it performs and can handle a real-world problem.

Architecture

Software Architecture

Log

Week 5 - 11 May

Week 12 - 18 May

Week 19 - 25 May

Hardware

  1. Raspberry Pi Pico 2W: The main microcontroller unit running the asynchronous rust firmware;
  2. PIR Motion Sensor: Used to detect human movement in the monitored area;
  3. IR Proximity Snesor: Acts as a secondary close-range trigger, detecting any objects passing directly in front of it;
  4. Active Buzzer: Provides the loud audible alarm when a security breach is detected;
  5. Push Button: Allows the user to physically arm or disarm the system;
  6. Status LED (with a 330OHM resistor): Gives visual feedback on the current state of the alarm(Armed, Disarmed, Triggered);
  7. Breadboard & Jumper Wires: It will be used for prototyping and connecting all peripherals to the Pico's GPIO pins.

Schematics

Schema Electrica

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico 2WThe microcontroller32 RON
LCD 1602 with Interface I2CDisplaying information and messages14.99 RON
Micro Servomotor SG90 90°Precision mechanical movement13.99 RON
5V Passive BuzzerGenerating sounds and audio alerts1.40 RON
Jumper Wires Female-Male (10p) 10 cmConnecting components on the breadboard2.99 RON
Infrared Line Sensor ModuleLine detection (line-follower) or obstacle detection3.87 RON
Jumper Wires Female-Male (10p) 20 cmLonger connections between modules3.99 RON
WS2812 8-Bit RGB LED RingBright and colorful visual indicators14.99 RON
4x4 Matrix KeypadData entry or control code input3.99 RON
2.54 mm Male Pin HeaderSoldering to the Pico board for breadboard usage0.69 RON
Jumper Wires Male-Male (10p, 10 cm)Direct pin connections on the breadboard2.85 RON
100K Linear Mono Rotary PotentiometerAdjusting variable resistance7.26 RON
SW-520D Vibration SensorDetecting tilt, vibration, or physical impact4.99 RON
HC-SR501 PIR Motion SensorDetecting human or animal motion via infrared14.49 RON

Software

LibraryDescriptionUsage
embassy-rpHardware Abstraction Layer & Async runtimeUsed for core hardware control on the RP-series chip: GPIO pins (Sensors), PWM (Servo, Buzzer), ADC (Potentiometer), and I2C (LCD).
embassy-timeTime and scheduling moduleUsed for adding async delays (Timer::after) and managing non-blocking loop timing for sensor readings.
smart-leds + ws2812-pioWS2812 (NeoPixel) LED driverUsed to control the colors and animations of the 8-LED RGB Ring using the Pico's unique Programmable I/O state machines.
hd44780-driverExternal I2C LCD driverUsed to interface with the 1602 LCD via the I2C bus to display text, numbers, and custom characters.
keypadMatrix keypad scanning logicUsed to scan the rows and columns of the 4x4 keypad and debounce button presses safely.
  1. link

...