Skip to the content
PCBKitNew board
2 layers66 × 54.5 mmSmartPlug PCB, the printed circuit board in 3D

A standalone WiFi smart plug built around the ESP32-C3 Super Mini, exposing native Apple HomeKit control via esp-homekit-sdk.

Size
66 × 54.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
15
Nets
22
Pads
50
Tracks, vias
65, 3
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
6 Jun 2026
Updated
31 Aug 2026

Overview

SmartPlug PCB is an open-source printed circuit board by mempb, from the mempb/ESP32-SmartPlug repository on GitHub. It is a 2-layer board of 66 × 54.5 mm with 15 parts on 22 nets, routed with 65 tracks and 3 vias.

It is built around the HLK-PM01 and SRD-05VDC-SL-C. Its parts include 2 ICs, 2 diodes, 2 connectors, 2 switches and 1 capacitor. It belongs with the home automation and IoT boards and the ESP32 and RISC-V boards of this library.

Main components

2

README

README.md

ESP32-C3 HomeKit Smart Plug

A standalone WiFi smart plug built around the ESP32-C3 Super Mini, exposing native Apple HomeKit control via esp-homekit-sdk.

Overview

The ESP32-C3 connects directly to the home WiFi network and implements the HomeKit Accessory Protocol (HAP) on-device using Espressif's open-source esp-homekit-sdk. It advertises itself as a HomeKit accessory and pairs directly with the Apple Home app. A relay switches mains power to a connected load (tested with a small AC fan), with a local status LED and a manual push-button override.

Hardware

  • MCU: ESP32-C3 Super Mini (WiFi + BLE)
  • Relay: Songle SRD-05VDC-SL-C
  • Relay drive: 2N3904 NPN, low-side switched, 1k base resistor, 1N4007 flyback diode across the coil
  • Mains supply: Hi-Link HLK-PM01 (AC → 5V)
  • I/O: status LED, manual push-button (SW2)
  • Connectors: 5.08mm pitch screw terminals for mains in/out
  • Custom PCB (KiCad), hand-solderable THT components throughout

Firmware

  • Toolchain: PlatformIO, framework = espidf
  • Application logic: plain ESP-IDF C — GPIO config, debounced button input, LED/relay control
  • HomeKit layer: esp-homekit-sdk (Espressif's open-source HAP implementation), added as an ESP-IDF component
  • WiFi credentials configured via idf.py menuconfig (hardcoded); HomeKit pairing done separately after WiFi connects via the HomeKit setup code

Setup

  • git clone --recursive git@github.com:mempb/ESP32-SmartPlug.git
  • Install PlatformIO VSCode extension
  • WiFi SSID & password:
    • Option A: pio run -t menuconfig → App Wi-Fi → Source of Wi-Fi Credentials → Use Hardcoded → set SSID and password
    • Option B: edit sdkconfig.esp32-c3-devkitm-1:
      • CONFIG_APP_WIFI_SSID="SSID"
      • CONFIG_APP_WIFI_PASSWORD="pass"
  • Build/flash: pio run -t upload -t monitor

Roadmap

  • Schematic design
  • PCB layout and routing, order
  • PCB assembly (hand soldering)
  • GPIO firmware: button input, debounce, LED toggle
  • HomeKit firmware (esp-homekit-sdk integration, relay control, button + LED sync)
  • Respin PCB, order (smaller form factor, fix missing GND trace, add capacitor)
  • Enclosure design/print
  • Final writeup: build photos, schematics, wiring diagram, etc

Repo Structure

text
/components esp-homekit-sdk location
/pcb        KiCad project
/src        ESP-IDF source
/docs       Schematics, pictures, etc. (TODO)
/housing    3D print housing design (TODO)

References

Parts

15
QtyValueFootprintReferences
11N4007Diode_THT:D_DO-41_SOD81_P10.16mm_HorizontalD1
11kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1
12N3904Package_TO_SOT_THT:TO-92_InlineQ1
1470uCapacitor_THT:CP_Radial_D8.0mm_P3.50mmC1
1ESP32-C3_SUPERMINI_THESP32-C3_SUPERMINI_TH:MODULE_ESP32-C3_SUPERMINI_THU1
1HLK-PM01Converter_ACDC:Converter_ACDC_Hi-Link_HLK-PMxxU2
1LED_ARGBLED_THT:LED_D5.0mm-4_RGB_Wide_PinsD3
1SRD-05VDC-SL-CSRD-05VDC-SL-C:RELAY_SRD-05VDC-SL-CK1
1SW_PushButton_Switch_THT:SW_PUSH_6mmSW2
1Screw_Terminal_01x02-MainInTerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_HorizontalJ1
1Screw_Terminal_01x02-MainOutTerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_HorizontalJ2

The 11 most common of 15 parts.

Questions

How big is the SmartPlug PCB PCB?

It measures 66 × 54.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the SmartPlug PCB use?

15 parts, built around the HLK-PM01 and SRD-05VDC-SL-C. 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 SmartPlug PCB KiCad files?

From the mempb/ESP32-SmartPlug repository on GitHub, at the commit this page was made from: the board is pcb/smartPlug-PCB.kicad_pcb and its schematic pcb/smartPlug-PCB.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the SmartPlug PCB design in my own project?

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

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 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
  • 2 layers76 × 66 mmRadiator controller, the printed circuit board in 3D

    Radiator controller

    Plokkke/sauter-marapi-esphome

    ESPHome / Home Assistant pilot wire (fil pilote) controller for the Sauter Marapi tactile towel radiator — KiCad PCB, reverse engineering notes. Study phase, untested.

    19 parts
  • 2 layers121 × 54 mmSmart plug, the printed circuit board in 3D

    Smart plug

    tauhidansari07/ESP32-Smart-Relay

    21 parts
  • 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 layers100 × 100 mmGate controller v1.1, the printed circuit board in 3D

    Gate controller v1.1

    walterwhiteita/esp8266-mqtt-gate-controller

    Welcome to the ESPGate repository! This project offers a comprehensive retrofit solution tailored to upgrade a variety of gate control boards.

    50 partsGPL-3.0
  • 2 layers87 × 71 mmSocket, the printed circuit board in 3D

    Socket

    eddyem/STM8_samples

    Some code samples and ready projects based on STM8 (deprecated)

    89 parts80