Laser Alarm System
Check out for intruders. Or your noisy kids. Or both.
Author: Ștefan Adrian Brai
GitHub Project Link: https://github.com/UPB-PMRust-Students/proiect-StefanBrai
Description
This project implements a security system where a continuous laser beam is emitted toward a photo-sensor. If the beam is interrupted, the system sounds an alarm and pushes a notification to the user’s phone via the Pico W’s Wi-Fi module. A manual button allows arming and disarming the system. The most recent intrusions will be stored in a database with their timestamps
Motivation
The goal of the project is to develop an affordable and easy-to-implement security solution using low-cost components and the Raspberry Pi Pico W platform, which provides integrated Wi‑Fi connectivity for real-time notifications.
Architecture
The system is divided into four logical modules:
- Laser Module (emitter + sensor)
- Control Unit (Raspberry Pi Pico W firmware)
- User Interface (buzzer + push-button)
- Network Service (cloud notification endpoint)
+----------------+ +----------------+
| Laser | | Notification |
| emitter+sensor | | Service (Wi-Fi)|
+----------------+ +----------------+
^ ^
v |
+----------------+ |
| Raspberry Pi |-------------+
| Pico W |
+----------------+
| ^
v |
+--------+ +--------+
| Buzzer | | Button |
+--------+ +--------+
Hardware
We use off-the-shelf components mounted on a breadboard and powered by a 5 V supply. The main utilities are the button, the passive buzzer which will be configured to emit a custom tune, the laser which will just be controlled by the button and the photoresistor which checks the laser output.
Bill of Materials
Device | Usage | Price (RON) |
---|---|---|
Raspberry Pi Pico W | Microcontroller with integrated Wi-Fi | 35 |
5 V Laser Diode | Laser beam emitter | 14 |
LDR / Photoresistor | Laser-beam interruption sensor | 1.90 |
Passive Buzzer | Audible alarm output | 1 |
Push-Button | Manual arm/disarm control | 2 |
Breadboard & Jumper Wires | Prototyping | 22 |
5 V /3.3 V Power Supply | System power | 0(came with breadboard) |
Software
Library | Description | Usage |
---|---|---|
rp2040-hal | RP2040 hardware abstraction layer | GPIO, timer and peripheral configuration |
embedded-hal | Common embedded-Rust traits | Unified driver interfaces |
cyw43 | Wi-Fi driver for CYW43 module | Network stack and connectivity |
defmt | Efficient logging framework | Capture debug logs over USB/UART |
cortex-m-rtic | Real-time interrupt-driven concurrency | Task scheduling and timing |