Skip to the content
2 layers121 × 54 mmSmart plug, the printed circuit board in 3D
Size
121 × 54 mm
Copper layers
2
Thickness
1.6 mm
Parts
21
Nets
27
Pads
71
Tracks, vias
135, 8
Pours
8
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
14 Jul 2026
Updated
14 Jul 2026

Overview

Smart plug is an open-source printed circuit board by tauhidansari07, from the tauhidansari07/ESP32-Smart-Relay repository on GitHub. It is a 2-layer board of 121 × 54 mm with 21 parts on 27 nets, routed with 135 tracks and 8 vias.

It is built around the ESP32-C3-WROOM-02-H4, HLK-PM01 and AMS1117-3.3, with the BC817, IN4148W and MOV-14D471KTR among its other parts. Its parts include 4 resistors, 3 ICs, 2 connectors, 1 capacitor and 1 diode. It belongs with the home automation and IoT boards and the ESP32 and RISC-V boards of this library.

Main components

7

README

README.md

ESP32-Smart-Relay: Open-Source Smart Relay Module

A compact, production-ready 220V AC smart plug relay module built around the ESP32-C3, featuring full galvanic isolation, integrated AC-DC conversion, and exposed UART programming pins.

⚡ Overview

This project is an open-source hardware design for a 10A Wi-Fi/Bluetooth smart relay. It is designed to sit between mains power and everyday appliances (lamps, fans, heaters), allowing for local or cloud-based smart home control. Unlike many commercial closed-source smart plugs, this board exposes a standard 6-pin UART header, making it trivially easy to flash with custom firmware like ESPHome, Tasmota, or your own custom Arduino/C++ code.

🛠️ Hardware Features

  • Microcontroller: ESP32-C3-WROOM-02-H4 (RISC-V, Wi-Fi 4, Bluetooth 5 LE).
  • Power Supply: Onboard Hi-Link HLK-PM01 5V step-down module with an AMS1117 3.3V LDO for clean logic power.
  • Galvanic Isolation: The low-voltage ESP32 logic is physically and electrically isolated from the high-voltage relay coil using a PC817 Optocoupler.
  • Switching Capacity: 10A @ 250V AC Mechanical Relay (Songle SRD-05VDC), capable of switching up to 2200W.
  • Safety First: Includes a 10A slow-blow inline fuse, a Metal Oxide Varistor (MOV) for surge protection, and strict PCB creepage/clearance routing.
  • Developer Friendly: Dedicated 6-pin 2.54mm pitch programming header (3V3, GND, TX, RX, IO9/BOOT, EN/RESET).

⚠️ DANGER: HIGH VOLTAGE WARNING

This project involves working with 220V-240V AC Mains Electricity. Mains voltage is lethal and can cause serious injury, death, or fire if mishandled. This repository is provided for educational and prototyping purposes only.

  • Never touch the PCB while it is connected to wall power.
  • Ensure your PCB manufacturer properly mills the isolation slots between the high-voltage and low-voltage sections.
  • Always house the final board in a non-conductive, fire-retardant enclosure.

🗜️ Flashing the ESP32-C3

To flash custom firmware (like ESPHome):

  1. Connect a 3.3V FTDI / USB-to-Serial programmer to the UART header.
  • Note: Programmer TX goes to Board RX (Pin 11). Programmer RX goes to Board TX (Pin 12).
  1. Do NOT connect AC mains power while the FTDI is plugged in. Power the board via the 3.3V pin on the header.
  2. To enter flash mode, hold IO9 to GND, briefly pulse EN to GND, then release IO9.

📁 Repository Contents

  • /Hardware - KiCad / EDA schematic and PCB layout files.
  • /Firmware - Example Arduino sketches and ESPHome .yaml configuration files.
  • /Enclosure - (Optional) 3D printable STL files for the housing.

Parts

21
QtyValueFootprintReferences
210KResistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR1, R2
110uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC1
11KResistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR4
13.3Connector_Pin:Pin_D1.0mm_L10.0mmTP6
1330Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR3
1AC Plug Input282837-2:2828372J1
1AC Plug Output282837-2:2828372J2
1AMS1117-3.3Package_TO_SOT_SMD:SOT-223-3_TabPin2U1
1BC817Package_TO_SOT_SMD:SOT-23Q1
1BOOTConnector_Pin:Pin_D1.0mm_L10.0mmTP3
1ESP32-C3-WROOM-02-H4ESP32-C3-WROOM-02-H4:ESP32C3WROOM02H4IC1
1GNDConnector_Pin:Pin_D1.0mm_L10.0mmTP1
1HLK-PM01HLK-PM01:HLKPM01PS1
1IN4148Diode_SMD:D_SOD-128D1
1MOV-14D471KTRMOV-14D471KTR:MOV14D471KRV1
1PC817PC817:DIP810W60P254L460H500Q4NIC2
1RSTConnector_Pin:Pin_D1.0mm_L10.0mmTP2
1RXDConnector_Pin:Pin_D1.0mm_L10.0mmTP5
1SRD-05VDC-SL-CSRD-05VDC-SL-C:SRDK1
1TXDConnector_Pin:Pin_D1.0mm_L10.0mmTP4

Similar boards

  • 2 layers94.5 × 70.1 mmTIME BASED RELAY, the printed circuit board in 3D

    TIME BASED RELAY

    MAATHES-THILAK-K/4CH_RELAY_TIMER

    ESP32C3 Mini Based 4CH Relay With Timer Control

    50 parts1Apache-2.0
  • 2 layers132 × 130 mmTesting6, the printed circuit board in 3D

    Testing6

    vairabarath/smart-home-controller-

    ESP32 Smart Home Controller - KiCad test projects

    43 parts
  • 2 layers200 × 100 mmSmart home, the printed circuit board in 3D

    Smart home

    vishal007-hacker/smart-home

    ESP32-based smart home controller for switching 4 independent 230V AC loads, with per-channel current and voltage sensing, manual override buttons, status LEDs, and an I²C LCD display.

    76 parts
  • 2 layers98 × 50 mmAcid vaporizer, the printed circuit board in 3D

    Acid vaporizer

    vad32m/acid_vaporizer

    Oxalic acid vaporizer for varroa treatment

    65 parts
  • 2 layers183.2 × 65.1 mmMusa, the printed circuit board in 3D

    Musa

    rallekralle11/Musa

    Silly banana for scale PCB ruler, with functions

    92 parts1
  • 4 layers82.8 × 58.4 mmESP IOT dev board, the printed circuit board in 3D

    ESP IOT dev board

    PotatoPerchance/ESP32_IOT_Board

    A 4 layer PCB esp32 based IOT device for weather data logging, displays based projects in a gist.

    85 parts
  • 2 layers66.2 × 80 mmSOLDERING IRON CONTROLLER, the printed circuit board in 3D

    SOLDERING IRON CONTROLLER

    MAATHES-THILAK-K/Solder-Master-PRO

    Professional-grade soldering temperature control on a DIY budget

    34 partsApache-2.0

Questions

How big is the Smart plug PCB?

It measures 121 × 54 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Smart plug use?

21 parts, built around the ESP32-C3-WROOM-02-H4, HLK-PM01, AMS1117-3.3 and BC817. 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 Smart plug KiCad files?

From the tauhidansari07/ESP32-Smart-Relay repository on GitHub, at the commit this page was made from: the board is smart plug.kicad_pcb and its schematic smart plug.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Smart plug design in my own project?

Its repository states no licence, so its author keeps all rights: ask tauhidansari07 before reusing the design.