EcoLink
A LoRa-powered smart-home ecosystem using an STM32 hub and ESP32 nodes to optimize energy consumption through automated climate and appliance control.
Author: Nastase Denis-Cristian
GitHub Project Link: link_to_github
Description
A smart-home solution designed to efficiently manage the electrical consumption of home appliances based on personal needs and preferences. The target temperature of different rooms or areas in the house is set through a mobile or desktop app that communicates with the microcontrollers in the system.
Motivation
I chose this project to show the potential of embedded software development in improving daily life through practical, energy-efficient automation.
Architecture
The system is built around a central hub and distributed room nodes:
- STM32 central hub coordinates logic, receives node data, and manages system decisions.
- ESP32 edge nodes collect room-level sensor data and control actuators locally.
- LoRa communication links all nodes to the hub over long distances with low power consumption.
- Control app (mobile/desktop) sets user preferences such as room temperature targets.
Log
Week 16 - 22 March
Decided on the project idea and started initial research.
Week 23 - 29 March
Submitted the project idea together with the planned components.
Week 30 March - 5 April
Ordered the components and waited for delivery.
Week 6 - 12 April
Checked component integrity, performed debugging, and finalized the architecture before implementation.
Week 13 - 19 April
Finished setting up the distributed nodes, each with sensors, actuators, and one ESP32 controller.
Hardware
The hardware setup includes one high-performance central controller and multiple distributed edge nodes connected through long-range wireless communication.
- Main Hub (STM32 NUCLEO-U545RE-Q): ultra-low-power MCU for coordination and high-level control logic.
- Edge Nodes (ESP32 DFR1139): room-level controllers for sensing and local actuation.
- Environmental Sensors: temperature and humidity inputs for climate automation.
- Energy Monitoring Sensors: voltage/current tracking for real-time consumption analysis.
- Actuators (relays): physical switching of connected appliances.
- LoRa modules: low-power, long-distance communication between hub and nodes.
Schematics
Bill of Materials
| Device | Usage | Price |
|---|---|---|
| STM32 NUCLEO-U545RE-Q | Central hub microcontroller | 107 RON |
| ESP32 DFR1139 | Distributed edge nodes (x2) | 122 RON total |
| PT100 Inline Temperature Sensor | Temperature sensing | 8 RON |
| DHT11 + ESP-01S Board | Temperature and humidity sensing (x2) | 50 RON total |
| INA219 Bidirectional Sensor | Voltage and current monitoring (x2) | 24 RON total |
| 5V Relay Module, High-Level Trigger | Appliance switching (x2) | 14 RON total |
Software
| Library | Description | Usage |
|---|---|---|
| embassy-stm32 | Hardware abstraction layer | Async support for STM32 Nucleo-U545RE peripherals |
| embassy-executor | Async executor | Concurrent task management (LoRa polling, processing) |
| lorawan-device | LoRaWAN protocol stack | Long-range communication handling |
| esp-idf-hal | ESP-IDF HAL | Hardware access on ESP32 nodes |
| esp-idf-svc | ESP-IDF services | Wi-Fi and system services for nodes |
| dht-sensor | DHT11/22 sensor driver | Temperature and humidity reading |
| heapless | Static memory collections | Heap-free data structures |
| nb | Non-blocking abstractions | Polling-style peripheral interactions |
| embedded-ads1115 | ADC driver | Precise voltage/current sensor reading |