Loading project files...
← Back to Projects
Home Automation

Home Automation System

A full-stack home automation platform built around the ESP32, controlling lighting and appliances over MQTT with a custom relay PCB, live energy monitoring, and a responsive control panel accessible from any device.

ESP32MQTTCustom PCBRelay Control
Overview

The Problem & Approach

Most consumer smart-home kits lock you into a single vendor's app and cloud. This project is a from-scratch alternative: an ESP32-based controller with a custom relay PCB, communicating over local MQTT so lights and appliances stay responsive even if the internet goes down.

Each room is wired to an independently addressable relay channel, with the ESP32 acting as both the MQTT client and a lightweight local web server for direct control. A Node-RED style dashboard subscribes to the same topics, giving live state feedback and per-device energy draw estimates.

The PCB was custom-designed in Altium with proper relay isolation, flyback diode protection, and a fused mains input — safety was treated as a first-class requirement, not an afterthought, given this sits directly on household wiring.

Key Features

What It Does

💡

Room-by-Room Control

Independently addressable relay channels for lights, fans, and appliances in every room.

📶

Local MQTT Broker

Runs entirely on the local network — no cloud dependency, near-instant response times.

Energy Monitoring

Per-channel current sensing estimates real-time power draw and daily usage.

📱

Mobile-Responsive Panel

Control dashboard works from any phone or tablet browser, no app install required.

🛡️

Isolated Relay PCB

Custom board with opto-isolation and flyback protection for safe mains switching.

⏱️

Scheduling & Automation

Time-based rules and simple if-this-then-that automations run locally on the ESP32.

Interactive Demo

Interactive Room Panel

Click any switch below to see the simulated relay state, light animation, and live energy usage bar respond in real time.

LIVING SPACE · 4 CHANNELS
💡
Living Room
💡
Bedroom
💡
Kitchen
🌀
Garage Fan
LIVE ENERGY DRAW0 W
Technical Specification

Under the Hood

ControllerESP32 Dev Module
Relay Channels4 (expandable to 8)
ProtocolMQTT over local Wi-Fi
PCB2-layer, Altium Designed
IsolationOpto-coupled relay drivers
Max Load10A @ 250V per channel
ESP32MQTT (Mosquitto)Altium DesignerNode-REDC++JavaScript

Interested in a similar build?

I take on consultancy and freelance electronics projects — from prototype to production.

Get in Touch →
← Smart Gas Leakage Detection