Skip to the content
PCBKitNew board
2 layers80 × 60 mmESP32 Relay, the printed circuit board in 3D

sACN/OSC controlled relay

Size
80 × 60 mm
Copper layers
2
Thickness
1.6 mm
Parts
14
Nets
7
Pads
42
Tracks, vias
15, 0
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
7 Jul 2026
Updated
7 Jul 2026

Overview

ESP32 Relay is an open-source printed circuit board by BlueJayLouche, from the BlueJayLouche/remote-relay repository on GitHub, published under the MIT licence. It is a 2-layer board of 80 × 60 mm with 14 parts on 7 nets, routed with 15 tracks and 0 vias.

Its parts include 2 resistors, 2 connectors, 1 IC, 1 diode and 1 transistor. It belongs with the home automation and IoT boards and the ESP32 boards of this library.

README

ESP32_Relay/README.md

ESP32_Relay — AromaDiffuser carrier board

A basic 2-layer carrier PCB for the AromaDiffuser controller: 12 V in → buck → ESP32-C3 Super Mini → transistor → relay → pump out.

board top

~80 × 60 mm, 2-layer, fully routed with a GND pour. The relay is a dry SPDT contact, so the switched side works for an AC or DC pump (subject to the mains caveat below).

How it was generated

Three scripts, run in order with KiCad's bundled Python. KiCad has no schematic Python API, so each .kicad_* is written directly; the schematic and PCB are kept consistent by sharing the same net names.

bash
KPY=/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python3
$KPY gen_board.py    # footprints, nets, GND pour, outline, mounting holes
$KPY gen_sch.py      # matching schematic (symbols + net labels)
$KPY gen_routes.py   # route the 6 non-GND nets

Verified with kicad-cli: schematic ERC clean, PCB DRC clean (0 violations, 0 unrouted), and the schematic netlist matches the PCB. See schematic.pdf.

The PCB carries its own netlist (no sheet-to-board link). If you edit the schematic and want to push changes, re-run gen_routes.py rather than KiCad's "Update PCB from schematic".

⚠️ Before you fabricate — verify these

It's DRC/ERC-clean, but still bench-verify the part-specific assumptions:

  1. C3 header pitch. A1/A2 are 2× 1×8 headers, rows 13 mm apart. "Super Mini" clones vary — measure yours and adjust the A1/A2 X positions in gen_board.py if needed before fab.
  2. Relay pinout. Wired to the KiCad SANYOU SRD map (derived from the symbol): pin 1 = COM, pin 3 = NO, pins 2 & 5 = coil, pin 4 = NC (unused). Confirm your relay matches (SRD-05VDC-SL-C does).
  3. Transistor pinout. Laid out for PN2222A in TO-92, pads 1-2-3 = E-B-C. A BC547 is C-B-E — different. Match the part to the footprint or you'll cook it.
  4. Mains pump = STOP. This board's spacing (2.54 mm / 5 mm) is for a low-voltage DC pump only. If your pump is AC mains, do not run mains on this board — keep the mains switching on a separately mains-rated relay module off-board, or redesign for proper creepage/clearance + fusing + enclosure. (We still haven't measured the pump — do that first; see IMPLEMENTATION.md.)
  5. Buck. U1 is an MP1584 module on a 1×4 header — set its trimmer to 5.0 V before connecting the C3.

Netlist (matches schematic.pdf and the PCB)

NetConnections
+12VJ1.1 (12V IN), U1.1 (buck VIN+), K1.1 (relay COM)
+5VU1.3 (buck VOUT+), A1.1 (C3 5V), K1.2 (coil+), D1.1 (diode K)
GNDJ1.2, U1.2, U1.4, A1.2 (C3 GND), Q1.1 (emitter), R2.2, J2.2, H1–H4, pour
CTRL_IO10A2.6 (C3 GPIO10), R1.1, R2.1
Q_BASER1.2, Q1.2 (base)
COIL_DRVQ1.3 (collector), K1.5 (coil−), D1.2 (diode A)
PUMPK1.3 (relay NO), J2.1

R2 (10 k, GPIO10→GND) holds the transistor off during boot/reset → pump off at power-up. D1 is the coil flyback (band/cathode to +5 V).

BOM

RefPartNotes
A1, A22× 1×8 socket header, 2.54 mmseat the ESP32-C3 Super Mini
U1MP1584 buck module + 1×4 header12 V → 5.0 V
K1SPDT relay, 5 V coilSRD-05VDC-SL-C (or pin-compatible)
Q1NPN BJT, TO-92PN2222A (E-B-C)
D1diode, DO-411N4007
R1resistor1 kΩ (base)
R2resistor10 kΩ (pulldown)
J1, J22-pin screw terminal, 5 mmJ1 = 12V IN, J2 = PUMP
H1–H4M3 mounting holesgrounded

Fab

Export gerbers:

bash
/Applications/KiCad/KiCad.app/Contents/MacOS/kicad-cli pcb export gerbers --output gerbers/ ESP32_Relay.kicad_pcb
/Applications/KiCad/KiCad.app/Contents/MacOS/kicad-cli pcb export drill   --output gerbers/ ESP32_Relay.kicad_pcb

…or just upload ESP32_Relay.kicad_pcb directly to JLCPCB/PCBWay.

Parts

14
QtyValueFootprintReferences
4MountingHole_3.2mm_M3_DIN965_PadMountingHole_3.2mm_M3_DIN965_PadH1, H2, H3, H4
110k pulldownR_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR2
112V INTerminalBlock_MaiXu_MX126-5.0-02P_1x02_P5.00mmJ1
11N4007 (band=K -> +5V)D_DO-41_SOD81_P7.62mm_HorizontalD1
11k baseR_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1
15V relay SRD-05VDC-SL-CRelay_SPDT_SANYOU_SRD_Series_Form_CK1
1C3 L:5V,GND,3V3,IO4,IO3,IO2,IO1,IO0PinHeader_1x08_P2.54mm_VerticalA1
1C3 R:IO5,IO6,IO7,IO8,IO9,IO10,RX,TXPinHeader_1x08_P2.54mm_VerticalA2
1MP1584 12V->5V: VIN+,VIN-,VOUT+,VOUT-PinHeader_1x04_P2.54mm_VerticalU1
1PN2222A E-B-CTO-92_InlineQ1
1PUMPTerminalBlock_MaiXu_MX126-5.0-02P_1x02_P5.00mmJ2

Questions

How big is the ESP32 Relay PCB?

It measures 80 × 60 mm and has 2 copper layers, 1.6 mm thick.

What parts does the ESP32 Relay use?

14 parts. 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 ESP32 Relay KiCad files?

From the BlueJayLouche/remote-relay repository on GitHub, at the commit this page was made from: the board is ESP32_Relay/ESP32_Relay.kicad_pcb and its schematic ESP32_Relay/5vAroma/5vAroma.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the ESP32 Relay 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).

Similar boards

  • 2 layers116.8 × 30 mmType d, the printed circuit board in 3D

    Type d

    google/mozc-devices

    Circuit diagrams and firmware source code for Gboard DIY keyboards

    14 parts3kApache-2.0
  • 2 layers32 × 22 mmDiff driver, the printed circuit board in 3D

    Diff driver

    rene-dev/stmbl

    AC Servo Driver for STM32F4

    14 parts990GPL-3.0
  • 2 layers34 × 45 mm2032Charger, the printed circuit board in 3D

    2032Charger

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    14 parts915
  • 2 layers34 × 109.9 mmTdisplay s3, the printed circuit board in 3D

    Tdisplay s3

    landonr/homeThing

    Wifi Smart Home Remotes that run on ESPHome

    14 parts551GPL-3.0
  • 2 layers45.3 × 42.7 mmMainPcb, the printed circuit board in 3D

    MainPcb

    adamb314/ServoProject

    Getting the most out of your hobby servo

    14 parts545
  • 2 layers42.5 × 28.8 mmC5VRX JACK DIY, the printed circuit board in 3D

    C5VRX JACK DIY

    Twotoz/C5VRX

    Ultra-minimal, zero-CPU 5.8 GHz analog FPV video receiver using ESP32-C5 Wi-Fi 6 PHY MODEM_DIAG, BitScrambler WBFM demodulation & resistor DAC CVBS

    14 parts515GPL-3.0
  • 2 layers62 × 24 mmMai button, the printed circuit board in 3D

    Mai button

    whowechina/mai_pico

    Pico controller for Maimai

    14 parts475