Skip to main content
Version: FILS English

Smart Garage Climate and Presence Control System

An IoT-based smart garage system for vehicle detection, automatic lighting, climate monitoring, and smart ventilation control.

Description

This project aims to develop a smart garage system using the NUCLEO-U545RE-Q development board, fully programmed in Rust. The system combines vehicle detection, automatic lighting, environmental monitoring, ventilation control, real-time monitoring and Ethernet networking.

Ultrasonic sensors will detect the presence of a vehicle inside or near the garage. When a vehicle is detected, the garage lights will automatically turn on. If no vehicle is detected for a period of time, the lights will turn off automatically.

A temperature and humidity sensor will monitor the garage environment. If the measured values exceed predefined thresholds, a ventilation system simulated using a motor with fan blades will automatically start. The fan can also be controlled manually using push buttons.

Limit switches will be used to monitor the garage door open and closed positions. LEDs will provide visual feedback for vehicle presence, fan status, light status, and fault conditions.

The system will communicate over Ethernet using the W5500 module and send real-time data to a monitoring dashboard running on a laptop connected to the same local network. The dashboard will display sensor values, vehicle presence, fan status, light status, door state, and operating mode.

Motivation

The smart garage idea is a useful real-world scenario that can improve comfort, safety, and energy efficiency. It presents a practical example of how intelligent monitoring and automatic control can be integrated into a modern garage solution. It also offers the opportunity to develop both hardware and software components using Rust on an embedded platform.

Architecture

This system is built using the STM32 NUCLEO-U545RE-Q development board, which coordinates all system functions.

  • Vehicle Detection Module: Detects the presence of a car inside or near the garage using ultrasonic sensors and sends the information to the control unit for automatic lighting and monitoring.

  • Environmental Monitoring Module: Reads temperature and humidity values using the dedicated sensor and sends the data to the controller for ventilation decisions.

  • Control Logic Module: Processes all sensor inputs and decides when to activate the garage lighting, start or stop the ventilation system, and manage the overall operating mode of the system.

  • Actuator Control Module: Controls the physical outputs of the system, including the garage LEDs, the fan motor, and other status indicators.

  • Networking Module: Uses the W5500 Ethernet interface to transmit real-time data such as sensor values, vehicle presence, fan status, light status, and garage door state to a monitoring dashboard running on a laptop.

  • User Interface Module: Includes push buttons for manual fan control and LEDs that provide visual feedback for the current operating state and fault conditions.

Schema arhitectura

Log

Week 3-5

I researched several possible project ideas and analyzed different concepts before choosing the smart garage system. After deciding on the final direction, I started identifying the hardware components needed for implementation. I looked into sensor modules, networking options, actuator control, user input methods, and visual feedback components compatible with the NUCLEO-U545RE-Q board.

Week 8

During this week, I received the hardware components and tested them individually.

Hardware

The project is based on the STM32 NUCLEO-U545RE-Q development board, used as the main controller. Ultrasonic sensors are used for vehicle detection, while a temperature and humidity sensor monitors the garage environment. A small motor with fan blades is used as the ventilation system, and push buttons allow manual control. LEDs provide visual feedback for the system states. The W5500 Ethernet module enables real-time data transmission to a laptop dashboard. All components are connected on a breadboard using jumper wires and powered with an external 5V supply where needed.

Schematics

To

Bill of Materials

DeviceUsagePrice
STM32 NUCLEO-U545RE-QMain microcontroller board125 RON
W5500 Ethernet ModuleNetwork communication and dashboard data transfer50 RON
HC-SR04 Ultrasonic SensorVehicle presence detectionAlready owned
SG90 Servo motorGarage door movement mechanism25 RON
DHT11 SensorTemperature and humidity monitoringAlready owned
DC Motor + Fan BladesVentilation system simulationAlready owned
Push ButtonsManual fan controlAlready owned
LED KitVisual system status indicators~19 RON
Limit SwitchesGarage door position detection10 RON
Breadboard MB102Prototyping and circuit assembly17 RON
Jumper Wire KitElectrical connections47 RON
Resistor KitLED current limiting and circuits38 RON
5V Power SupplyExternal power for sensors and motorAlready owned

Software

LibraryDescriptionUsage
embassy-stm32STM32 HALGPIO, PWM, SPI
embassy-executorAsync runtimeRun tasks
embassy-timeTime toolsDelays, timers
embedded-halHardware traitsDriver support
heaplessStatic containersBuffers
static_cellStatic memoryShared resources
w5500Ethernet driverNetwork data
embedded-nalNetwork APITCP/UDP support
defmtLoggingDebug output
panic-probePanic handlerError debug
dht-sensorDHT sensor driverTemp / humidity
nbNon-blocking APIAsync drivers
  1. Embassy-rs
  2. Rust Embedded Book
  3. STM32 NUCLEO-U545RE-Q Overview
  4. Embassy GitHub Repository
  5. W5500 Ethernet Controller
  6. embedded-hal crate
  7. heapless crate
  8. Rust Crates Registry