IoT DIN-Rail Dual Relay Controller
Custom ESP8266-Based 1-DIN Wi-Fi Automation Controller
Complete custom hardware design from circuit architecture and PCB through power conversion and enclosure integration.

01 Project Overview
A compact 1-DIN Wi-Fi connected dual-relay controller built around the ESP8266. The device integrates a custom mains-powered AC/DC supply, two independently controlled relay outputs, local push-button control, status indication and wireless connectivity into a single DIN-rail module. The complete electronic hardware and PCB were designed from the ground up, with the mechanical design developed around the requirements of a compact 1-DIN enclosure.
- Form factor
- 1-DIN modular enclosure
- Control
- ESP8266 + Wi-Fi
- Outputs
- 2 independent NO relay outputs
02 My Contribution
I was responsible for the complete hardware design of the controller, including the ESP8266-based control electronics, isolated AC/DC power supply, relay output stages, user controls and PCB layout. I also supervised the mechanical design and integration of the electronics into the compact 1-DIN enclosure.
Complete Hardware Design
- Complete electronic hardware architecture
- Schematic design
- Component selection
- Custom PCB design and layout
- ESP8266 integration
- AC mains input interface
- AC/DC power supply design
- Flyback-transformer power conversion
- Relay driver/output circuitry
- Front-panel push-button circuitry
- LED status indication
- Reset interface
- Connector / terminal selection
- PCB bring-up and hardware debugging
Mechanical Integration
- Enclosure requirements
- PCB/enclosure fit
- Front-panel alignment
- Push-button accessibility
- LED visibility
- Terminal selection and accessibility
- DIN-rail mounting
- Mechanical design supervision
- 1-DIN form-factor integration
03 From PCB to Finished Controller
ESP8266 + relays + AC/DC power
1-DIN enclosure
Wi-Fi dual relay controller

04 Hardware Architecture
05 Integrated AC/DC Power Supply
The controller is powered directly from the L/N mains input and includes an integrated AC/DC conversion stage to generate the low-voltage DC rails required by the ESP8266 and relay-control electronics.
- AC mains input
- AC/DC conversion stage
- Flyback transformer
- Rectification / filtering
- DC power rails
- ESP8266 supply
- Relay supply / control circuitry
06 Dual Relay Outputs
Electrical Interfaces
Input
L — Line
N — Neutral
Direct AC mains input to the internal power supply.
Outputs
Relay Output 1 — Normally Open (NO)
Relay Output 2 — Normally Open (NO)
Two independent switched relay outputs.
07 Local Control & Status
Each relay can be operated locally through its dedicated front-panel push button. Dedicated LEDs provide immediate indication of relay state, while a separate status LED indicates the operating state of the embedded controller. A reset button provides direct local system reset.

- Output 1 push button
- Output 2 push button
- Reset push button
- Output 1 LED
- Output 2 LED
- System Status LED
08 Wi-Fi Connectivity
Wi-Fi Connected Control
The ESP8266 provides the embedded control and Wi-Fi connectivity layer of the device. The two relay outputs can be controlled electronically through the embedded system while retaining local physical controls on the front panel.
09 Custom PCB Design
Custom Hardware & PCB
The PCB integrates the ESP8266 communication and control platform, two relay output stages, the mains-powered AC/DC supply, local push buttons, status LEDs and terminal interfaces on a compact board designed specifically for the DIN-rail enclosure.

- ESP8266 module
- Two electromechanical relays
- AC/DC power conversion circuitry
- Flyback transformer
- Power-supply capacitors and filtering
- Terminal connectors
- Push buttons
- Status LEDs
- PCB sized for the 1-DIN enclosure
10 1-DIN Mechanical Integration
The electronic design was developed specifically around the dimensional constraints of a standard 1-DIN enclosure. I supervised the mechanical design to ensure correct PCB fit, terminal accessibility, front-panel alignment and practical DIN-rail installation.

ESP8266, dual relay stages, AC/DC power conversion and local interfaces developed for the enclosure’s dimensional constraints.

- Enclosure requirements
- PCB/enclosure fit
- Front-panel alignment
- Push-button accessibility
- LED visibility
- Terminal selection and accessibility
- DIN-rail mounting
- Mechanical design supervision
- 1-DIN form-factor integration
11 Testing & Bring-Up
My hardware-development contribution included PCB bring-up and hardware debugging, alongside integration of the electronics into the compact 1-DIN enclosure.
- PCB bring-up
- Hardware debugging