

Smart Home Controller
Full-stack IoT home automation system with ESP32 firmware, Google Apps Script backend, web dashboard, and Flutter mobile app.
- Size
- 100 × 80 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 11
- Nets
- 36
- Pads
- 84
- Tracks, vias
- 60, 4
- Pours
- 4
- Routed
- Yes
- KiCad
- KiCad 6 (file 20211014)
- Created
- 6 May 2026
- Updated
- 6 May 2026
Overview
Smart Home Controller is an open-source printed circuit board by Ajith-Anand-R, from the Ajith-Anand-R/Smart-Home-Controller repository on GitHub, published under the MIT licence. It is a 2-layer board of 100 × 80 mm with 11 parts on 36 nets, routed with 60 tracks and 4 vias.
It is built around the ESP32-WROOM-32, BT136-600E and MOC3021, with the AMS1117-5.0 among its other parts. Its parts include 7 ICs and 4 transistors. It belongs with the home automation and IoT boards and the ESP32 boards of this library.
Main components
4ESP32-WROOM-32
SMD,18x25.5mm-40℃~+85℃ -98dBm 2.4GHz 2.7V~3.6V 20dBm Bluetooth4.2 ESP32-DOWDQ6 UART、SDIO、SPI、I2C、GPIO、PWM、ADC、DAC SMD,25.5x18mm WiFi Modules ROHSEspressif SystemsWiFi ModulesBT136-600E
TO-220-40℃~+125℃@(Tj) 1 TRIAC 1.5V 1.5W 1.7V 10mA 15mA 30A 4A 600V TO-220 Thyristors (SCR)/Modules ROHSJSMSEMIThyristors (SCR)/ModulesMOC3021
DIP-6-55℃~+110℃ 1 1.15V 1000V/us 1A 330mW 400V 50mA 5kV 6 No TRIAC DIP-6 Triac, SCR Output Optoisolators ROHSLite-OnTriac, SCR Output OptoisolatorsAMS1117-5.0
SOT-223-40℃~+125℃ 1 1.3V 15V 1A 5V 60dB Fixed Positive Short Circuit Protection、Thermal shutdown SOT-223 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSAdvanced Monolithic SystemsVoltage Regulators - Linear, Low Drop Out (LDO) Regulators
README
README.md"# Smart Home Controller
Full-stack IoT home automation system with ESP32 firmware, Google Apps Script backend, web dashboard, and Flutter mobile app. Controls 4 AC load channels via TRIAC phase-angle dimming with cloud synchronization, scheduling, and Amazon Alexa voice control.
Project Status
Maturity: Portfolio project / advanced prototype Tested on: ESP32-WROOM-32 with custom TRIAC controller board Known limitations:
- Google Assistant integration (SinricPro) is stubbed but not yet functional
- No automated test suite for firmware or backend
- Flutter app requires manual API URL configuration
What works:
- 4-channel TRIAC phase-angle control with zero-cross detection
- Amazon Alexa voice control (via Espalexa, local network)
- Google Apps Script cloud backend with polling
- Web dashboard with real-time device control
- Flutter mobile app with device control, schedules, and scenes
- OTA firmware updates with rollback protection
- Scene and schedule automation
- WebSocket real-time state sync
- Persistent storage across reboots
- GitHub Actions CI for automated APK builds
Not yet implemented:
- Google Assistant control (SinricPro code is stubbed)
- Automated tests
UI Preview
Web dashboard with real-time device control and system statistics
Quick Start
- Deploy backend — Copy
backend/google-apps-script/files to a Google Apps Script project and deploy as a web app. See Deployment Guide. - Flash firmware — Open
firmware/main/main.inoin Arduino IDE, set your Apps Script URL, and upload to ESP32. See Installation Guide. - Build mobile app — Run
flutter build apk --releaseinfrontend/flutter project/demo/. Or download from Releases.
Documentation
- Deployment Guide — Full system setup
- Installation Guide — Firmware and hardware setup
- Features List — Complete feature documentation
- Hardware Guide — Circuit diagrams and assembly
- OTA Updates — Firmware update procedures
- Mobile App — APK download and build instructions
- Backend & Dashboard — API and web dashboard
- Bill of Materials — Component list and cost
- Security Practices — Security considerations
System Architecture
Components
- Multi-core architecture: Time-critical TRIAC control on Core 1, network operations on Core 0
- Amazon Alexa: Voice control via Espalexa (local network discovery)
- Cloud backend: Google Apps Script + Google Sheets for remote control and configuration
- Web dashboard: HTML5 control panel served from Apps Script
- Flutter mobile app: Cross-platform app with device control, schedules, and scenes
- OTA updates: Over-the-air firmware updates with rollback protection
- Scenes & schedules: Automation and preset device combinations
- Safety features: Watchdog timers, zero-cross monitoring, auto-shutoff
- Persistent storage: Configuration and state retention across reboots
Repository Structure
smarthome-controller/
├── firmware/ # ESP32 firmware code
│ ├── main/ # Main 4-channel controller firmware
│ └── mini_controller/ # Simplified single-channel variant
├── backend/ # Cloud backend
│ └── google-apps-script/ # Google Apps Script API + web dashboard
├── frontend/ # Mobile app
│ └── flutter project/demo/ # Flutter cross-platform app
├── hardware/ # Hardware design files
│ ├── pcb/ # KiCad PCB design
│ ├── schematics/ # Circuit diagrams
│ └── bom/ # Bill of materials
├── app/ # Android APK builds (via CI)
├── docs/ # Additional documentation
├── DEPLOYMENT.md # Full system deployment guide
├── INSTALL.md # Firmware installation and setup
├── FEATURES.md # Feature list
├── OTA_GUIDE.md # OTA update procedures
└── CHANGELOG.md # Version historyHardware Requirements
ESP32 Module
- ESP32-WROOM-32 or compatible
- Minimum 4MB flash
- Dual-core operation
TRIAC Controller Hardware
- 4x TRIAC channels (BT136 or similar)
- Zero-cross detection circuit
- MOC3021/3041 optocouplers
- 5V power supply
Pin Configuration
| Function | GPIO Pin | Notes |
|---|---|---|
| Zero-Cross Detection | 13 | Rising edge interrupt |
| TRIAC 1 | 16 | Channel 1 control |
| TRIAC 2 | 17 | Channel 2 control |
| TRIAC 3 | 18 | Channel 3 control |
| TRIAC 4 | 19 | Channel 4 control |
| Switch 1 | 32 | Physical button input |
| Switch 2 | 33 | Physical button input |
| Switch 3 | 25 | Physical button input |
| Switch 4 | 26 | Physical button input |
Software Architecture
Core Separation
CORE 1 (PRO_CPU) - TIME-CRITICAL:
├── Zero-cross detection ISR (RISING edge @ GPIO13)
├── Hardware timer ISR for phase-angle control (100µs intervals)
├── TRIAC firing with <50µs accuracy
└── NO blocking calls or network operations
CORE 0 (APP_CPU) - CONNECTIVITY:
├── WiFi management with auto-reconnect
├── Google Apps Script cloud polling (2.5s interval)
├── Alexa voice assistant handling
├── Physical switch debouncing
├── Web servers (port 80, 8080, WebSocket 81)
├── OTA update handling
├── Schedule execution
├── Scene activation
├── Fade transitions
└── Watchdog monitoring (15s timeout)Data Flow
Physical Switch → Debounce → Device State Update → TRIAC Control
↓
Cloud Sync / WebSocket Broadcast
Voice Command → Alexa → Device State Update → TRIAC Control
↓
Cloud Sync / WebSocket BroadcastLocal REST API (Port 8080)
| Endpoint | Method | Description |
|---|---|---|
/status | GET | Current device states |
/control | POST | Control a device ({"id": 0, "state": true, "brightness": 75}) |
/info | GET | System information (firmware, IP, uptime, RSSI, heap) |
/config | POST | Update device configuration |
/schedules | GET/POST | List or create schedules |
/schedules/{id} | DELETE | Delete a schedule |
/scenes | GET/POST | List or create scenes |
/scenes/{id}/activate | POST | Activate a scene |
/scenes/{id} | DELETE | Delete a scene |
/restart | POST | Restart device |
/factory-reset | POST | Factory reset (requires {"confirm": true}) |
WebSocket on port 81 provides real-time device state updates.
License
MIT License — See LICENSE file for details.
Support
Parts
11| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | BT136-600E | Package_TO_SOT_THT:TO-220-3_Vertical | Q1, Q2, Q3, Q4 |
| 4 | MOC3021 | Package_DIP:DIP-6_W7.62mm | U2, U3, U4, U5 |
| 1 | 4N25 | Package_DIP:DIP-6_W7.62mm | U6 |
| 1 | AMS1117-5.0 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U7 |
| 1 | ESP32-WROOM-32 | RF_Module:ESP32-WROOM-32 | U1 |
Similar boards
- 2 layers95 × 60 mm

- 2 layers100 × 73.5 mm

Smart Socket Final Version
KevinAR-18/EcoLab-Dashboard
EcoLab Dashboard is a smart laboratory EcoLab desktop application for real-time monitoring and control of laboratory devices within the UGM network.
45 parts - 2 layers217 × 116 mm

Board nhiet
NguyenThanhHuy-debug/PCB-Liquid-Dispensing-Cabinet
PCB-Liquid-Dispensing-Cabinet — a software project built with modern tooling.
191 parts4 - 2 layers150 × 100 mm

Ac dimmer
arunsaispk12/esp32-ac-dimmer-fan-controller
Professional ESP32-based AC phase-control dimmer for fan speed control with optical isolation and safety features
3 parts - 2 layers100.1 × 99.9 mm

- 4 layers230 × 196.7 mm

Steel form Dish washer
R-Mutura/DISHWASHER
Contains hardware and Software implementation of a dishwasher product
156 parts - 2 layers

- 2 layers

Questions
How big is the Smart Home Controller PCB?
It measures 100 × 80 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Smart Home Controller use?
11 parts, built around the ESP32-WROOM-32, BT136-600E, MOC3021 and AMS1117-5.0. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Smart Home Controller KiCad files?
From the Ajith-Anand-R/Smart-Home-Controller repository on GitHub, at the commit this page was made from: the board is hardware/pcb/SmartHomeController.kicad_pcb and its schematic hardware/pcb/SmartHomeController.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Smart Home Controller design in my own project?
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).