Relay Board Schematic Design

Here’s the schematic plan I’d use for the separate 10-channel 220 VAC relay board.
High-level architecture

Text


Control board harness
10x coil drive signals
        │
        ▼
Relay coil interface / flyback protection
        │
        ▼
10x 24 VDC relay coils

AC mains input
L / N / PE
        │
        ▼
Main protection ~50 A
        │
        ▼
AC live bus
        │
        ├── CH1 fuse 15 A ─ relay contact ─ output terminal CH1
        ├── CH2 fuse 15 A ─ relay contact ─ output terminal CH2
        ├── ...
        └── CH10 fuse 15 A ─ relay contact ─ output terminal CH10

Neutral and protective earth distributed to all output terminals
Schematic blocks to create 1. AC mains input
Use a high-current terminal block for:
  • AC_L_IN
  • AC_N_IN
  • PE_IN
For 220 VAC and high current, I would keep this as a physically separated high-voltage section with clear labeling and wide spacing.
2. Main input protection
Add one main protection device before the per-channel distribution.
Recommended options:
  • Panel-mount / chassis-mount breaker or fuse, not PCB-only, for ~50 A mains input.
  • If represented on the PCB schematic, use a connector or symbol for an external 50 A breaker/fuse.
  • Do not rely on a small PCB fuse holder for 50 A mains protection.
Suggested net flow:

Text


AC_L_IN → MAIN_FUSE_OR_BREAKER → AC_L_PROTECTED
AC_N_IN → AC_N_BUS
PE_IN   → PE_BUS
3. Ten relay output channels
Each channel should have:
  • HANKUK HR85AKS-DC24 relay
  • Replaceable 15 A fuse on the live output path
  • AC output terminal, preferably 3-pin:
    • switched live
    • neutral
    • protective earth
Recommended per-channel topology:

Text


AC_L_PROTECTED → CHx_FUSE_15A → relay COM
relay NO → CHx_L_OUT
AC_N_BUS → CHx_N_OUT
PE_BUS   → CHx_PE_OUT
I’d use the relay in normally-open mode unless you explicitly need fail-on behavior.
4. 24 V relay coil power input
Add a low-voltage power connector:

Text


+24V_COIL_IN
0V_COIL_IN
Then distribute:

Text


+24V_COIL → one side of all relay coils
coil low side → harness drive signal / transistor driver return path
Important question: are the 10 incoming control signals already low-side coil drivers, or are they just ESP32/logic-level signals?
  • If they are already ULN2803/open-drain low-side outputs from the control board, this relay board only needs coil connections and flyback handling.
  • If they are logic-level signals, this relay board needs transistor/MOSFET/ULN2803 drivers.
5. Harness connector from control board
Use a harness connector with at least:
  • COIL_DRV_1
  • COIL_DRV_2
  • COIL_DRV_10
  • 0V_COIL
  • optional +24V_COIL if coil power is also delivered through the harness
  • optional spare / key / detect pin
For reliability, I’d prefer the 24 V coil supply on a separate higher-current connector, not the signal harness, unless the harness is sized for relay coil current.
6. Coil flyback protection
Each 24 V relay coil needs suppression.
Options:
  • Diode across each coil: simple, low-cost, slower relay release.
  • TVS or diode + Zener: faster release, better for relay contact timing.
  • If the control board already has ULN2803A, note that ULN2803 includes clamp diodes, but the relay board still needs the correct COM clamp connection to +24V.
For a separate relay board, I’d put local flyback diodes or TVS protection on the relay board so protection stays close to the coils.
Safety/layout constraints to carry into the schematic
  • Keep low-voltage harness/24 V coil section physically isolated from 220 VAC contact/output section.
  • Use large creepage/clearance between:
    • AC live/neutral/PE and low-voltage control
    • relay contact pins and coil pins
    • adjacent high-current channels
  • Use wide copper or copper pours for 15 A paths.
  • Consider using slots/cutouts between relay coil/control pins and contact pins.
  • Label all high-voltage nets clearly.
  • Prefer external/chassis wiring for the full 50 A main feed if PCB copper thickness/width cannot safely support it.
Open design decisions before schematic capture
  • Are the incoming 10 control signals logic-level inputs or already coil-driver low-side outputs?
  • Should each output socket switch live only, or live and neutral?
  • Should the board include current sensing or status feedback per channel?
  • What connector style/current rating do you want for the AC input and outputs?
  • Will the 50 A main protection be on-board, panel-mounted, or external?
My recommended starting schematic is: external/main 50 A breaker → live bus → 10× 15 A fused normally-open relay channels, with neutral and PE distributed directly to each output, and local flyback suppression for all 24 V relay coils.
Use low-side drivers
Add relay drivers
Switch live only
Specify connectors
Create schematic plan

Refine this doc
Ask about this doc
Firmware Starter — ESP32 Low-Voltage Control Section
Platform & Toolchain
  • MCU/module: ESP32 DevKit library symbol ESP32-DEVKITM-1
  • Framework: Arduino for ESP32
  • Build system: PlatformIO
  • Display library: Adafruit SSD1306
Pin Mapping

Table


FunctionESP32 GPIONet
74HC595 DATA23SR595_DATA
74HC595 SHIFT CLK18SR595_CLK
74HC595 LATCH5SR595_LATCH
74HC165 DATA19SR165_DATA
74HC165 CLK22SR165_CLK
74HC165 LOAD21SR165_LOAD
OLED SDA26I2C_SDA
OLED SCL27I2C_SCL
Isolated PT voltage sense ADC36MAINS_VSENSE_ADC
Note: the uploaded BOM requested OLED GPIO16/GPIO17, but the current ESP32 DevKit symbol does not expose those pins. The schematic uses GPIO26/GPIO27.
74HC165 Input Map
Inputs are active-low. A logic 0 means the readback switch/button is active/pressed; a logic 1 means inactive/released.

Table


Bit nameNet74HC165 input
CH1_READBACK_NCH1_READBACK_NU6 D0
CH2_READBACK_NCH2_READBACK_NU6 D1
CH3_READBACK_NCH3_READBACK_NU6 D2
CH4_READBACK_NCH4_READBACK_NU6 D3
CH5_READBACK_NCH5_READBACK_NU6 D4
CH6_READBACK_NCH6_READBACK_NU6 D5
CH7_READBACK_NCH7_READBACK_NU6 D6
CH8_READBACK_NCH8_READBACK_NU6 D7
CH9_READBACK_NCH9_READBACK_NU7 D0
CH10_READBACK_NCH10_READBACK_NU7 D1
BTN_MENU_NBTN_MENU_NU7 D2
BTN_UP_NBTN_UP_NU7 D3
BTN_DOWN_NBTN_DOWN_NU7 D4
BTN_ENTER_NBTN_ENTER_NU7 D5
platformio.ini

Ini


[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
lib_deps =
    adafruit/Adafruit SSD1306@^2.5.13
    adafruit/Adafruit GFX Library@^1.11.11
src/main.cpp

Cpp


#include <Arduino.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

constexpr int PIN_595_DATA  = 23;
constexpr int PIN_595_CLK   = 18;
constexpr int PIN_595_LATCH = 5;

constexpr int PIN_165_DATA  = 19;
constexpr int PIN_165_CLK   = 22;
constexpr int PIN_165_LOAD  = 21;

constexpr int PIN_I2C_SDA   = 26;
constexpr int PIN_I2C_SCL   = 27;
constexpr int PIN_MAINS_ADC = 36;

constexpr uint8_t OLED_ADDR = 0x3C;
constexpr int OLED_WIDTH = 128;
constexpr int OLED_HEIGHT = 64;

Adafruit_SSD1306 display(OLED_WIDTH, OLED_HEIGHT, &Wire, -1);
uint16_t channelBits = 0;

void writeOutputs(uint16_t bits) {
  digitalWrite(PIN_595_LATCH, LOW);
  shiftOut(PIN_595_DATA, PIN_595_CLK, MSBFIRST, highByte(bits));
  shiftOut(PIN_595_DATA, PIN_595_CLK, MSBFIRST, lowByte(bits));
  digitalWrite(PIN_595_LATCH, HIGH);
}

uint16_t readInputs() {
  uint16_t value = 0;
  digitalWrite(PIN_165_LOAD, LOW);
  delayMicroseconds(5);
  digitalWrite(PIN_165_LOAD, HIGH);

  for (int i = 0; i < 16; i++) {
    value <<= 1;
    value |= digitalRead(PIN_165_DATA) ? 1 : 0;
    digitalWrite(PIN_165_CLK, HIGH);
    delayMicroseconds(2);
    digitalWrite(PIN_165_CLK, LOW);
    delayMicroseconds(2);
  }
  return value;
}

void updateDisplay(uint16_t outputs, uint16_t inputs) {
  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(SSD1306_WHITE);
  display.setCursor(0, 0);
  display.println("10CH Sequencer LV");
  display.print("OUT: 0x"); display.println(outputs, HEX);
  display.print("IN : 0x"); display.println(inputs, HEX);
  display.println("Inputs active LOW");
  display.display();
}

void setup() {
  Serial.begin(115200);

  pinMode(PIN_595_DATA, OUTPUT);
  pinMode(PIN_595_CLK, OUTPUT);
  pinMode(PIN_595_LATCH, OUTPUT);
  digitalWrite(PIN_595_CLK, LOW);
  digitalWrite(PIN_595_LATCH, LOW);
  writeOutputs(0x0000);

  pinMode(PIN_165_DATA, INPUT);
  pinMode(PIN_165_CLK, OUTPUT);
  pinMode(PIN_165_LOAD, OUTPUT);
  digitalWrite(PIN_165_CLK, LOW);
  digitalWrite(PIN_165_LOAD, HIGH);

  pinMode(PIN_MAINS_ADC, INPUT);

  Wire.begin(PIN_I2C_SDA, PIN_I2C_SCL);
  if (!display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR)) {
    Serial.println("OLED init failed");
  } else {
    display.clearDisplay();
    display.display();
  }

  Serial.println("Low-voltage control firmware started");
}

void loop() {
  static uint32_t lastStep = 0;
  static uint8_t activeChannel = 0;

  uint32_t now = millis();
  if (now - lastStep >= 500) {
    lastStep = now;
    channelBits = (1u << activeChannel);
    writeOutputs(channelBits);
    activeChannel = (activeChannel + 1) % 10;
  }

  uint16_t inputs = readInputs();
  int mainsAdcRaw = analogRead(PIN_MAINS_ADC);
  updateDisplay(channelBits, inputs);
  Serial.printf("OUT=0x%04X IN=0x%04X MAINS_ADC=%d\n", channelBits, inputs, mainsAdcRaw);
  delay(200);
}
Note: MAINS_ADC is a raw reading from an isolated PT secondary front end. Convert it to RMS mains voltage only after calibrating against the actual PT ratio and a known safe reference voltage.
Build and flash

Bash


pio run
pio run -t upload
pio device monitor
  • Platform & Toolchain

  • Pin Mapping

  • 74HC165 Input Map

  • `platformio.ini`

  • `src/main.cpp`

  • Build and flash

10-Channel AC Power Sequencer thumbnail
Low-voltage control and power-control electronics for a 10-channel 220 V AC power sequencer using ESP32, shift registers, OLED display, and isolated/high-current AC sections to be added later.

Properties

Properties describe core aspects of the project.

Pricing & Availability

Distributor

Qty 1

Arrow

$6.18–$9.20

Digi-Key

$13.97–$20.25

HQonline

$6.20–$9.80

LCSC

$40.42–$44.80

Mouser

$22.08–$22.60

TME

$9.51

Verical

$4.42–$575.95

Controls