# ESP32 Smart Plug Modular Power Hub ## Description Mains-powered smart plug PCB using an ESP32-WROOM 3.3 V development board, relay-switched AC Hot, pass-through Neutral and Ground, and two side-mounted USB-C power-only modular accessory ports. ## Project Details - **Owner:** endosym50 - **Created:** 4/20/2026 - **Last Updated:** 4/20/2026 - **Visibility:** Public ## Key Components ### D1 — [SS14](https://www.flux.ai/jecstronic/ss14~ri4.md) - Datasheet URL: https://datasheet.lcsc.com/lcsc/1912111437_Slkor-SLKORMICRO-Elec--SS14_C444721.pdf - Role: Flyback Protection - Manufacturer Name: Slkor(SLKORMICRO Elec.) - Role Details: Clamp relay coil inductive kick on turn-off - Package: SMA - Manufacturer Part Number: SS14 - Part Type: Diode - License: https://creativecommons.org/licenses/by/4.0/ **Pins:** - Anode [pin A] - Cathode [pin C] ### ESP1 — [ESP32-DEVKITC](https://www.flux.ai/vasy_skral/esp32-devkitc~7mc.md) - Part Type: Development Boards - Manufacturer Part Number: ESP32-DEVKITC - Symbol Style: Parametric - Datasheet URL: http://espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf - Implementation Details: Powered from 5V on EXT_5V. Uses IO23 to drive relay optocoupler. Preserve ESP32 boot strap defaults; do not load IO0, GPIO2, or GPIO12 with external relay circuitry. - Manufacturer Name: Espressif Systems - Role Details: ESP32-WROOM 3.3V development board for smart plug control and accessory power management - Role: Controller - License: https://creativecommons.org/licenses/by/4.0/ - Package: DevKit **Pins:** - 3V3 [pin 1] - CLK [pin 20] - CMD [pin 18] - EN [pin 2] - EXT_5V [pin 19] - GND1 [pin 14] - GND2 [pin 32] - GND3 [pin 38] - IO0 [pin 25] - IO12 [pin 13] - IO13 [pin 15] - IO14 [pin 12] - IO15 [pin 23] - IO16 [pin 27] - IO17 [pin 28] - IO18 [pin 30] - IO19 [pin 31] - IO2 [pin 24] - IO21 [pin 33] - IO22 [pin 36] - IO23 [pin 37] - IO25 [pin 9] - IO26 [pin 10] - IO27 [pin 11] - IO32 [pin 7] - IO33 [pin 8] - IO34 [pin 5] - IO35 [pin 6] - IO4 [pin 26] - IO5 [pin 29] - RXD0 [pin 34] - SD0 [pin 21] - SD1 [pin 22] - SD2 [pin 16] - SD3 [pin 17] - SENSOR_VN [pin 4] - SENSOR_VP [pin 3] - TXD0 [pin 35] ### J1 — [282837-3](https://www.flux.ai/adrian95/282837-3~5mc.md) - Role Details: AC_IN terminal block: Pin_1=Hot, Pin_2=Neutral, Pin_3=PE - Manufacturer Part Number: 282837-3 - Connector Type: Terminal Block - Datasheet URL: https://www.te.com/usa-en/product-282837-3.datasheet.pdf - Connector Positions: 3 - Role: AC Input - Package: Terminal Block - License: https://creativecommons.org/licenses/by/4.0/ - Part Type: Connector - Manufacturer Name: TE Connectivity AMP Connectors **Pins:** - Pin_1 [pin 1] - Pin_2 [pin 2] - Pin_3 [pin 3] ### J2 — [282837-3](https://www.flux.ai/adrian95/282837-3~5mc.md) - Role Details: AC_OUT terminal block: Pin_1=Hot, Pin_2=Neutral, Pin_3=PE - Manufacturer Part Number: 282837-3 - Datasheet URL: https://www.te.com/usa-en/product-282837-3.datasheet.pdf - Package: Terminal Block - Connector Type: Terminal Block - Connector Positions: 3 - Manufacturer Name: TE Connectivity AMP Connectors - Role: AC Output - License: https://creativecommons.org/licenses/by/4.0/ - Part Type: Connector **Pins:** - Pin_1 [pin 1] - Pin_2 [pin 2] - Pin_3 [pin 3] ### K1 — [SPDT SRD Series Form C](https://www.flux.ai/jharwinbarrozo/spdt-srd-series-form-c~yz.md) - Datasheet URL: https://datasheet.lcsc.com/lcsc/1811021933_Ningbo-Songle-Relay-SRD-05VDC-SL-C_C35449.pdf - Manufacturer Name: Ningbo Songle Relay - Role Details: Relay switches AC Hot only between input and output terminal blocks - Part Type: Switch - Role: AC Switch - Manufacturer Part Number: SRD-05VDC-SL-C - Package: THT Relay **Pins:** - A - B - COM - L1 - L2 ### PS1 — [HLK-5M05](https://www.flux.ai/adrian95/hlk-5m05~37g.md) - Part Type: Power Source - License: https://creativecommons.org/licenses/by/4.0/ - Package: Module - Manufacturer Part Number: HLK-5M05 - Role: Power Supply - Datasheet URL: https://datasheet.lcsc.com/lcsc/2212011400_HI-LINK-HLK-5M05_C209907.pdf - Manufacturer Name: HI-LINK - Role Details: Isolated AC-DC module converting mains to 5V for relay coil and ESP32 dev board input **Pins:** - -VO [pin 3] - +VO [pin 4] - AC1 [pin 1] - AC2 [pin 2] ### Q1 — [SOT95P240X111-3N](https://www.flux.ai/ipc-7351-packages/sot95p240x111-3n~bb.md) - License: https://creativecommons.org/licenses/by/4.0/ - Role Details: Low-side transistor switches relay coil from optocoupler output - Package: TO-92 - Package or Case Code: SOT95P240X111-3N - Part Type: Transistor - Role: Relay Driver **Pins:** - P1 [pin 1] - P2 [pin 2] - P3 [pin 3] ### TP1 — [1040](https://www.flux.ai/cherepanyadima/1040~lm.md) - Role Details: Left module VBUS solder point for external USB-C breakout board - Manufacturer Name: Keystone - Role: Accessory Power Pad - Part Type: Connectors - Manufacturer Part Number: 1040 - Datasheet URL: https://www.keyelco.com/userAssets/file/K75p63.pdf **Pins:** - TP [pin TP] ### TP2 — [1040](https://www.flux.ai/cherepanyadima/1040~lm.md) - Datasheet URL: https://www.keyelco.com/userAssets/file/K75p63.pdf - Manufacturer Part Number: 1040 - Part Type: Connectors - Role Details: Left module GND solder point for external USB-C breakout board - Role: Accessory Ground Pad - Manufacturer Name: Keystone **Pins:** - TP [pin TP] ### TP3 — [1040](https://www.flux.ai/cherepanyadima/1040~lm.md) - Datasheet URL: https://www.keyelco.com/userAssets/file/K75p63.pdf - Manufacturer Part Number: 1040 - Role Details: Right module VBUS solder point for external USB-C breakout board - Part Type: Connectors - Manufacturer Name: Keystone - Role: Accessory Power Pad **Pins:** - TP [pin TP] ### TP4 — [1040](https://www.flux.ai/cherepanyadima/1040~lm.md) - Role: Accessory Ground Pad - Manufacturer Name: Keystone - Role Details: Right module GND solder point for external USB-C breakout board - Part Type: Connectors - Datasheet URL: https://www.keyelco.com/userAssets/file/K75p63.pdf - Manufacturer Part Number: 1040 **Pins:** - TP [pin TP] ### U1 — [PC817](https://www.flux.ai/kicad-part-library/pc817~0c.md) - Datasheet URL: http://www.soselectronic.cz/a_info/resource/d/pc817.pdf - Role: Isolation - Manufacturer Part Number: PC817 - Package: DIP-4_W7.62mm - Role Details: Optocoupler isolates ESP32 control side from relay drive side - Package or Case Code: DIP-4_W7.62mm **Pins:** - ~ [pin 1] - ~ [pin 3] - ~ [pin 2] - ~ [pin 4] *The full schematic, PCB layout, bill of materials, and interactive design are available at [https://www.flux.ai/endosym50/esp32-smart-plug-modular-power-hub~g7](https://www.flux.ai/endosym50/esp32-smart-plug-modular-power-hub~g7).* --- *Generated from [https://www.flux.ai/endosym50/esp32-smart-plug-modular-power-hub~g7](https://www.flux.ai/endosym50/esp32-smart-plug-modular-power-hub~g7)*