Skip to main content
Version: FILS English

Secure RFID Zhome

info

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:

  1. Person approaches the door
  2. PIR sensor detects motion
  3. RFID system activates
  4. Card is scanned
  5. STM32 verifies the card
  6. If valid:
    • Door opens (servo motor)
    • Green LED turns on
    • LCD displays welcome message
  7. If invalid:
    • Door remains closed
    • Red LED turns on
  8. 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

DeviceUsagePrice
STM32 NUCLEOThe main microcontroller~125 RON
RFID RC522 ModuleCard authentication~40 RON
PIR Motion SensorMotion detection~10 RON
Servo Motor SG90Door lock/unlock mechanism~10 RON
LCD 16x2 I2CDisplay system messages~20 RON
LED KitStatus indication (green/red)~5 RON
Photoresistor (LDR)Ambient light detection~2 RON
BreadboardCircuit prototyping~20 RON
Jumper WiresComponent connections~20 RON

Software

LibraryDescriptionUsage
embassy-stm32Hardware abstraction layer for STM32 microcontrollersUsed to control GPIO, timers, I2C and other peripherals
embassy-executorAsync task executor for embedded systemsRuns concurrent tasks such as motion detection and RFID processing
embassy-timeTime management utilitiesHandles delays and timing operations
embedded-halStandard embedded hardware interfacesProvides common interfaces for sensors and peripherals
mfrc522RFID reader driverReads and processes RFID card data
lcd-lcm1602-i2cLCD display driverControls the 16x2 LCD display over I2C
embedded-hal-busBus sharing utilitiesAllows multiple devices to share I2C communication
defmtLightweight logging frameworkUsed for debug messages
defmt-rttRTT transport for logsSends debug output to host PC
panic-probePanic handler for embedded debuggingReports system crashes during development
  1. link ...