MRM MRM MRM MRM
SYSTEM BOOTING
Back to projects
Embedded Systems

SCADA Smart Home Monitoring & Control

An industrial-style SCADA master-slave network over RS485, with EEPROM-backed historical logging surviving power loss.

Difficulty — advanced Complexity — 8/10 Category — Embedded Systems

Overview

A smart-home monitoring and control system built to industrial SCADA conventions rather than a typical hobbyist IoT project: a laptop acts as the supervisory master station, and an embedded remote terminal unit handles sensing, relay actuation, and persistent logging — communicating over long-range RS485 with a custom command-response protocol.

Architecture

Master-slave topology over UART/RS485. The master issues structured commands; the RTU firmware parses, validates and responds, while independently polling sensors and managing EEPROM-backed historical state.

Key Features

  • Custom serial command-response protocol with packet parsing, validation and synchronization.
  • Remote ON/OFF relay control for external appliance loads issued from the master station.
  • Live temperature/humidity telemetry delivered to the master on request.
  • EEPROM-based non-volatile logging of max/min/latest sensor readings that survives power cycles.

Development Process

  • Defined the command-response packet format before writing firmware, to keep master and slave development decoupled.
  • Built relay control and sensor polling as independent firmware modules.
  • Added EEPROM logging last, once the live data path was already verified reliable.
  • Tested over extended runs to confirm state persistence across simulated power loss.

Challenges & Solutions

Challenge

RS485 half-duplex communication is prone to timing and collision issues absent from simple point-to-point UART links.

Solution

Implemented structured packet framing and validation so the RTU could reliably distinguish valid commands from line noise.

Challenge

Logging needed to survive power cycles without wearing out EEPROM through excessive write cycles.

Solution

Logged only max/min/latest values rather than continuous history, minimizing write frequency while preserving the data that matters.

Results & Impact

The system reliably performs long-distance bidirectional communication, real-time monitoring and remote actuation, with historical readings intact across power interruptions — mirroring the reliability expectations of real industrial SCADA deployments.

Future Improvements

  • Add configurable threshold-based alarms.
  • Support multiple RTUs on a shared RS485 bus.
  • Build a lightweight master-side dashboard UI.