Skip to main content
Version: ACS CC

Mini Smart Home

A miniature smart home model featuring automated security, climate control, emergency hazard detection.

info

Author: Badea Andreea-Bianca
GitHub Project Link: link_to_github

Description

This project is a miniature smart home prototype designed to demonstrate practical home automation and safety features. It integrates an RFID-based security system for door access, alongside a climate control module that automatically adjusts windows based on real-time temperature and rain detection. For safety, it features an emergency hazard protocol that triggers an alarm and opens windows if smoke or gas is detected. Additionally, the system includes a built-in LCD screen for monitoring environmental data and a RGB lighting system, creating a complete, interactive model of modern smart living.

Motivation

I chose this project because I wanted to build something highly interactive that you can see working in real life. It is fascinating to learn how data from sensors can control physical movements, like unlocking a door with a card or automatically closing the windows when it rains. I also wanted to create a system that reacts to dangers, such as turning on an alarm and opening windows if it detects smoke or gas. Building this model is a great and simple way to learn how to connect sensors, motors, and lights together.

Architecture

The final system will include modules for: Environment sensing:

  • Digital temperature and humidity sensor (DHT11).

  • Rain sensor (detects precipitation to trigger window and awning control).

  • Gas and smoke sensor (MQ2) for safety monitoring.

Output feedback: LCD 1602 display with an I2C interface, for showing system status (e.g., temperature, humidity, "Emergency Mode", system alerts).

Motorized components: Two SG90 servo motors: one for door access, one for window control.

Input system: RC522 RFID module for scanning the access card.

Indicators: RGB LED module and an active buzzer (for alarms).

SchemaBlock

Log

Week 23 - 29 March

Decided on the project idea.

Week 13 - 19 April

I researched ideas for implementing the project and made a list of necessary materials.

Week 20 - 26 April

I wrote the initial documentation.

Week 27 April - 3 May

I ordered the components.

Week 4 - 10 May

I tested the components and assembled the hardware part of the project.

Week 11 - 17 May

I worked on the project's software.

Hardware

The system is built around the STM32 Nucleo-U545RE-Q microcontroller. The sensory hardware includes a LM35 temperature sensor , a rain sensor , an MQ2 gas/smoke sensor for safety , and an RC522 RFID module for secure access. Outputs and physical movements are driven by SG90 servomotors , an active buzzer , an RGB LED module , and an I2C-enabled LCD1602 screen for displaying system data.

Schematics

Schematics

Bill of Materials

DeviceUsagePrice
STM32 Nucleo-U545RE-QThe microcontrollerLab Provided
SG90 Servo MotorControls door/window9.99 RON
RC522 RFID ModuleAccess control14.99 RON
LM35 Temperature SensorIndoor climate monitor9.99 RON
MQ2 Gas Sensor ModuleHazard and smoke detector11.99 RON
RGB LED ModuleVisual status indicator2.13 RON
LCD1602 Display with I2C/IIC ModuleSystem data screen24.99 RON
Rain sensorRain sensor6.99 RON

Software

LibraryDescriptionUsage
cortex-mLow-level ARM Cortex-M core accessUsed for core processor control and critical sections
cortex-m-rtStartup runtime for Cortex-MUsed for system initialization and reset vector handling
cortex-m-semihostingHost PC debug communicationUsed for sending debug messages during development
defmtHigh-efficiency embedded loggingUsed for formatting system logs and error outputs
defmt-rttRTT logging transport driverUsed for transmitting logs to the host PC in real-time
panic-probePanic handler for probe-rsUsed to catch runtime panics and print call stacks
embassy-stm32Async HAL for STM32 microcontrollersUsed to configure and control GPIO, ADC, I2C, and SPI
embassy-executorAsync/await task schedulerUsed to drive the main asynchronous execution loop
embassy-timeTimekeeping and delay utilitiesUsed for non-blocking sensor pooling and state timing
embedded-halStandardized hardware abstraction traitsUsed as a unified interface for peripheral drivers
embedded-hal-busSPI/I2C bus sharing utilitiesUsed to manage peripheral access on shared buses safely
mfrc522MFRC522 RFID reader driverUsed to scan and read access cards at the entrance
hd44780-driverCharacter LCD display driverUsed to print system status, temperature, and alerts to the screen
  1. DIY Smart Home