Home / Projects / Relay Panel Controller

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

U1ESP32-WROOM-32Wi-Fi + dashboard U3–U10 PC817opto x8, 5kV iso. U2 ULN2803A8-ch driver + diodes K1 SRD-05VDC10A/250VAC K2 ... K7 K8 SRD-05VDC10A/250VAC TB1

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

RefPart / ValueRatingPackage
U1ESP32-WROOM-32 — Wi-Fi MCU module3.0–3.6VModule
U2ULN2803A — 8-channel Darlington driver (built-in flyback diodes)50V, 500mA/chDIP-18
U3–U10PC817 — optocoupler5kV isolationDIP-4
K1–K8SRD-05VDC-SL-C — relay5V coil, 10A/250VAC contactTHT
TB1Screw terminal block, 10A rated300V5.08mm pitch
PSU5V/2A supply — logic + relay coils5V, 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)
Back to Projects