Relay Panel Controller
An 8-channel isolated relay driver with a web dashboard, for switching real loads from a browser without risking the control electronics.
Overview
The control side and the switched side never share a ground reference — each relay channel is driven through an optocoupler, so a fault or spike on the load side has no direct electrical path back into the MCU. That isolation is the whole point of a panel meant to switch anything from small DC loads to mains-connected equipment.
A Wi-Fi-capable MCU hosts a small web dashboard (or publishes over MQTT, depending on how you want to integrate it), so channels can be toggled from a browser or folded into a larger home/lab automation setup without any extra gateway hardware.
Block Diagram
Key Components
- Wi-Fi-capable MCU running the web dashboard or MQTT client
- Optocoupler array — one channel per relay, isolating control from switching side
- Flyback diodes across each relay coil
- Relay driver transistor array (or a dedicated driver IC)
- 8x relays rated for the loads being switched
- Screw-terminal blocks for field wiring
- Separate, appropriately isolated supply for the relay coils
Bill of Materials
| Ref | Part / Value | Rating | Package |
|---|---|---|---|
| U1 | ESP32-WROOM-32 — Wi-Fi MCU module | 3.0–3.6V | Module |
| U2 | ULN2803A — 8-channel Darlington driver (built-in flyback diodes) | 50V, 500mA/ch | DIP-18 |
| U3–U10 | PC817 — optocoupler | 5kV isolation | DIP-4 |
| K1–K8 | SRD-05VDC-SL-C — relay | 5V coil, 10A/250VAC contact | THT |
| TB1 | Screw terminal block, 10A rated | 300V | 5.08mm pitch |
| PSU | 5V/2A supply — logic + relay coils | 5V, 2A | — |
Build Requirements
- Mains-safety awareness and correct creepage/clearance spacing if any channel switches AC loads
- Basic firmware/web development — a lightweight HTTP server or MQTT client on the MCU
- An enclosure that keeps the mains side physically inaccessible
- Comfort with relay coil flyback suppression and driver sizing
Input / Output
InputControl commands from the web dashboard or MQTT; separate 5V/12V supply for the relay coils
Output8 isolated switched channels, each rated to the relay's contact specification (AC or DC per channel)