Secure RFID Zhome
Author: ARIFOGLU Gul Neva
GitHub Project Link: https://github.com/UPB-PMRust-Students/fils-project-2026-nevoss-s
Description
This project presents a smart home door system based on the STM32 microcontroller using the Rust programming language. The system provides secure and automated access control for a house entrance.
When a person approaches the door, a PIR motion sensor detects movement and activates the system. The user must scan an RFID card to gain access. If the card is valid, the door opens using a servo motor. If invalid, access is denied.
The system also uses LEDs and an LCD display to provide feedback, and a photoresistor to automatically control lighting after entry.
Motivation
This project was chosen to simulate a real-life smart home system that combines security, automation, and embedded systems design. It provides practical experience with Rust in embedded environments and interaction with hardware components.
Architecture
System workflow:
- Person approaches the door
- PIR sensor detects motion
- RFID system activates
- Card is scanned
- STM32 verifies the card
- If valid:
- Door opens (servo motor)
- Green LED turns on
- LCD displays welcome message
- If invalid:
- Door remains closed
- Red LED turns on
- After entry:
- Light is controlled automatically using photoresistor
Log
WEEK 1
- Project idea selection.
WEEK 2
- Component research.
WEEK 3
- Hardware planning.
WEEK 4
- Initial setup.
WEEK 7
- Started to connect components.
Hardware
Main components:
- STM32 microcontroller
- RFID module (RC522)
- PIR motion sensor
- Servo motor (SG90)
- LCD display (16x2 I2C)
- LEDs
- Photoresistor
- Breadboard and jumper wires
The STM32 microcontroller controls all peripherals. The RFID module is used for authentication, the PIR sensor detects motion, and the servo motor controls the door mechanism. The LCD provides feedback to the user, while LEDs indicate system status. The photoresistor enables automatic lighting control.
Bill of Materials
| Device | Usage | Price |
|---|---|---|
| STM32 NUCLEO | The main microcontroller | ~125 RON |
| RFID RC522 Module | Card authentication | ~40 RON |
| PIR Motion Sensor | Motion detection | ~10 RON |
| Servo Motor SG90 | Door lock/unlock mechanism | ~10 RON |
| LCD 16x2 I2C | Display system messages | ~20 RON |
| LED Kit | Status indication (green/red) | ~5 RON |
| Photoresistor (LDR) | Ambient light detection | ~2 RON |
| Breadboard | Circuit prototyping | ~20 RON |
| Jumper Wires | Component connections | ~20 RON |
Software
| Library | Description | Usage |
|---|---|---|
| embassy-stm32 | Hardware abstraction layer for STM32 microcontrollers | Used to control GPIO, timers, I2C and other peripherals |
| embassy-executor | Async task executor for embedded systems | Runs concurrent tasks such as motion detection and RFID processing |
| embassy-time | Time management utilities | Handles delays and timing operations |
| embedded-hal | Standard embedded hardware interfaces | Provides common interfaces for sensors and peripherals |
| mfrc522 | RFID reader driver | Reads and processes RFID card data |
| lcd-lcm1602-i2c | LCD display driver | Controls the 16x2 LCD display over I2C |
| embedded-hal-bus | Bus sharing utilities | Allows multiple devices to share I2C communication |
| defmt | Lightweight logging framework | Used for debug messages |
| defmt-rtt | RTT transport for logs | Sends debug output to host PC |
| panic-probe | Panic handler for embedded debugging | Reports system crashes during development |
Links
- link ...