# ESP32 Relay Controller
## Description
12V-powered ESP32 relay dry-contact controller with USB-C data-only programming/debug and an onboard 3.3V rail for the ESP32.
## Project Details
- **Owner:** benboy
- **Created:** 5/28/2026
- **Last Updated:** 5/28/2026
- **Visibility:** Public
- **Domain:** ESP32 relay controller
- **Power Requirements:** External 12V input powers relay and 3.3V regulator; USB-C is data-only, not board power.
- **Connectivity:** USB-C data-only to ESP32 native USB; WiFi/BLE available from ESP32 module.
- **Implementation Details:** Single relay switches an isolated dry-contact output; relay coil driven from 12V by a transistor/MOSFET with flyback protection.
- **Operating Voltage:** 12V input, 3.3V ESP32 rail
## Key Components
### BOOT_SW — [6x6mm micro tactile switch](https://www.flux.ai/jecstronic/6x6mm-micro-tactile-switch~igw.md)
- Role: Switching
- Part Type: Switch
- Purchase Url: https://shopee.ph/20Pcs-Micro-Tactile-Switch-Momentary-Tact-DIP-Switch-2Pin-6-X-6mm-Micro-Touch-Push-Button-Switch-High-5mm-6mm-7mm-8mm-9mm-i.1018846655.22773354064?sp_atk=2b55ff5c-bbfc-4967-b7e3-adb8c93c34e2&xptdk=2b55ff5c-bbfc-4967-b7e3-adb8c93c34e2&is_from_login=true
- Manufacturer Part Number: PTS645SK43SMTR92 LFS
- Role Details: Momentary user button for ESP32 reset/boot control
- Manufacturer Name: C&K
**Pins:**
- P1 [pin 1]
- P2 [pin 2]
### D1 — [USBLC6-2SC6](https://www.flux.ai/lcsc/usblc6-2sc6~2e9x.md)
- Maximum Clamping Voltage: 17V
- Package or Case Code: SOT-23-6_L2.9-W1.6-P0.95-LS2.8-BL
- Operating Temperature: -55°C ~ 125°C (TJ)
- Breakdown Voltage: 6V
- Manufacturer Part Number: USBLC6-2SC6
- Symbol Style: parametric-v1
- LCSC Part Number: C2687116
- Manufacturer Name: UMW(友台半导体)
- Role Details: USB 2.0 D+/D- ESD clamp near USB-C connector
- Datasheet URL: https://www.lcsc.com/datasheet/C2687116.pdf?spm=wm.sxq.inf.ggs&lcsc_vid=FlkNBAIDRQULVABfFAVZBgZVFVZYBgZSQ1NeBVIFQlExVlNRTlhdUVdURFlXXzsOAxUeFF5JWBYZEEoKFBINSQcJGk4dAgUUFAk%3D
- Part Type: ESD Protection Devices
- JLCPCB Part Class: Extended Part
- Power: 150W
- Role: ESD Protection
- Peak Pulse Current: 5A
**Pins:**
- GND [pin 2]
- I/O1 [pin 1]
- I/O1 [pin 6]
- I/O2 [pin 3]
- I/O2 [pin 4]
- VBUS [pin 5]
### D2 — [SS12](https://www.flux.ai/adrian95/ss12~i7b.md)
- Part Type: Diode
- Datasheet URL: https://www.onsemi.com/pdf/datasheet/ss19-d.pdf
- License: https://creativecommons.org/licenses/by/4.0/
- Manufacturer Part Number: SS12
- Manufacturer Name: onsemi
- Role: Flyback / Freewheeling
- Role Details: Flyback diode across 12V relay coil; cathode to +12V, anode to MOSFET drain/coil low side
**Pins:**
- A [pin 2]
- K [pin 1]
### J1 — [USB-C 2.0 Receptacle](https://www.flux.ai/vasy_skral/usb-c-2p0-receptacle~1xw.md)
- Datasheet URL: https://gct.co/files/drawings/usb4105.pdf
- Symbol Style: parametric-v1
- Role: USB Connector
- Manufacturer Name: GTC
- Purchase Url: https://www.digikey.com/en/products/detail/gct/USB4105-GF-A/11198441
- Manufacturer Part Number: USB4105-GF-A
- Role Details: USB-C connector for data only; D+/D- routed to ESP32 native USB, CC pins configured as UFP/sink
- Part Type: USB C
**Pins:**
- CC1 [pin 6]
- CC2 [pin 12]
- D- [pin 7]
- D- [pin 9]
- D+ [pin 10]
- D+ [pin 8]
- GND [pin 1]
- GND [pin 16]
- GND [pin 15]
- GND [pin 2]
- SBU1 [pin 11]
- SBU2 [pin 5]
- VBUS [pin 3]
- VBUS [pin 14]
- VBUS [pin 4]
- VBUS [pin 13]
### J2 — [KF128-5.08-2P-AA](https://www.flux.ai/lcsc/kf128-5p08-2p-aa~0pbi.md)
- Operating Temperature: -40℃~+105℃
- Connector Gender: Female
- Connector Type: Screw terminal
- Package or Case Code: CONN-TH_P5.08_KF128-5.08-2P
- Manufacturer Name: KEFA(科发)
- Connector Rows: 1
- Role: Power Input
- Datasheet URL: https://storage.googleapis.com/graviton-electric-symbols/document_assets/lcsc/2408211511_Cixi-Kefa-Elec-KF128-5-08-2P-AA_C474952.pdf
- LCSC Part Number: C474952
- Connector Positions: 2
- Current Rating: 24A
- Manufacturer Part Number: KF128-5.08-2P-AA
- JLCPCB Part Class: Extended Part
- Part Type: Screw terminal
- Connector Pitch: 5.08mm
- Product Info Url: https://lcsc.com/product-detail/New-Quadratic-Unclassified-Data_Cixi-Kefa-Elec-KF128-5-08-2P_C474952.html
- Role Details: 2-pin 5.08mm terminal for external 12V input supply
**Pins:**
- 1 [pin 1]
- 2 [pin 2]
### J3 — [282837-3](https://www.flux.ai/adrian95/282837-3~5mc.md)
- Part Type: Connector
- Role Details: 3-pin 5.08mm terminal exposes relay COM, NO, and NC dry contacts
- License: https://creativecommons.org/licenses/by/4.0/
- Datasheet URL: https://www.te.com/usa-en/product-282837-3.datasheet.pdf
- Role: Dry Contact Output
- Manufacturer Name: TE Connectivity AMP Connectors
- Manufacturer Part Number: 282837-3
**Pins:**
- Pin_1 [pin 1]
- Pin_2 [pin 2]
- Pin_3 [pin 3]
### K1 — [ACNM1112](https://www.flux.ai/jecstronic/acnm1112~g7y.md)
- Manufacturer Part Number: ACNM1112
- Datasheet URL: https://mm.digikey.com/Volume0/opasdata/d220001/medias/docus/819/CN-M_Relays_DS.pdf
- Part Type: Relay
- Role: Relay
- Manufacturer Name: Panasonic Electric Works
- License: https://creativecommons.org/licenses/by/4.0/
- Role Details: 12V coil relay, ESP32-controlled via low-side MOSFET; COM/NO/NC routed to dry-contact terminal
**Pins:**
- COIL_1 [pin 2]
- COIL_2 [pin 5]
- COM_1 [pin 1]
- COM_2 [pin 6]
- N.C. [pin 3]
- N.O. [pin 4]
### Q1 — [FS8205A](https://www.flux.ai/lcsc/fs8205a~r2vk.md)
- Role Details: Logic-level N-channel MOSFET driven by ESP32 GPIO to switch 12V relay coil
- Manufacturer Part Number: FS8205A
- JLCPCB Part Class: Extended Part
- Manufacturer Name: TECH PUBLIC(台舟)
- Role: Relay Driver
- Part Type: MOSFETs
- LCSC Part Number: C2830320
- Datasheet URL: https://mm.digikey.com/Volume0/opasdata/d220001/medias/docus/7158/5272_FS8205A.pdf
- Package or Case Code: SOT-23-6_L2.9-W1.6-P0.95-LS2.8-BR
**Pins:**
- D1/D2 [pin 5]
- D1/D2 [pin 2]
- G1 [pin 6]
- G2 [pin 4]
- S1 [pin 1]
- S2 [pin 3]
### RST_SW — [6x6mm micro tactile switch](https://www.flux.ai/jecstronic/6x6mm-micro-tactile-switch~igw.md)
- Role: Switching
- Manufacturer Name: C&K
- Manufacturer Part Number: PTS645SK43SMTR92 LFS
- Purchase Url: https://shopee.ph/20Pcs-Micro-Tactile-Switch-Momentary-Tact-DIP-Switch-2Pin-6-X-6mm-Micro-Touch-Push-Button-Switch-High-5mm-6mm-7mm-8mm-9mm-i.1018846655.22773354064?sp_atk=2b55ff5c-bbfc-4967-b7e3-adb8c93c34e2&xptdk=2b55ff5c-bbfc-4967-b7e3-adb8c93c34e2&is_from_login=true
- Role Details: Momentary user button for ESP32 reset/boot control
- Part Type: Switch
**Pins:**
- P1 [pin 1]
- P2 [pin 2]
### U1 — [ESP32-S3-WROOM-1-N16R8](https://www.flux.ai/adrian95/esp32-s3-wroom-1-n16r8~fs1.md)
- Datasheet URL: https://www.mouser.com/datasheet/2/891/esp32_s3_wroom_1_wroom_1u_datasheet_en-2930317.pdf
- Role Details: ESP32-S3 module controls relay and connects to USB-C D+/D- for data-only programming/debug
- Role: Microcontroller
- License: https://creativecommons.org/licenses/by/4.0/
- Manufacturer Name: Espressif Systems
- Manufacturer Part Number: ESP32-S3-WROOM-1-N16R8
- Part Type: Module
- Symbol Style: parametric-v1
**Pins:**
- 3V3 [pin 2]
- EN [pin 3]
- GND_1 [pin 1]
- GND_10 [pin 48]
- GND_11 [pin 49]
- GND_2 [pin 40]
- GND_3 [pin 41]
- GND_4 [pin 42]
- GND_5 [pin 43]
- GND_6 [pin 44]
- GND_7 [pin 45]
- GND_8 [pin 46]
- GND_9 [pin 47]
- IO0 [pin 27]
- IO1 [pin 39]
- IO10 [pin 18]
- IO11 [pin 19]
- IO12 [pin 20]
- IO13 [pin 21]
- IO14 [pin 22]
- IO15 [pin 8]
- IO16 [pin 9]
- IO17 [pin 10]
- IO18 [pin 11]
- IO19 [pin 13]
- IO2 [pin 38]
- IO20 [pin 14]
- IO21 [pin 23]
- IO3 [pin 15]
- IO35 [pin 28]
- IO36 [pin 29]
- IO37 [pin 30]
- IO38 [pin 31]
- IO39 [pin 32]
- IO4 [pin 4]
- IO40 [pin 33]
- IO41 [pin 34]
- IO42 [pin 35]
- IO45 [pin 26]
- IO46 [pin 16]
- IO47 [pin 24]
- IO48 [pin 25]
- IO5 [pin 5]
- IO6 [pin 6]
- IO7 [pin 7]
- IO8 [pin 12]
- IO9 [pin 17]
- RXD0 [pin 36]
- TXD0 [pin 37]
### U2 — [AP63203WU-7](https://www.flux.ai/lcsc/ap63203wu-7~j9cl.md)
- Operating Temperature: -40 ~ +85℃
- Part Type: AC-DC Controllers & Regulators
- LCSC Part Number: C780769
- IC Type: Synchronous Buck Converter
- Output Current: 2A
- Symbol Style: parametric-v1
- Manufacturer Name: DIODES(美台)
- Max Input Voltage: 3.8~32V
- Operating Voltage: 4.5V to 60V
- Max Output Voltage: 3.3V
- Frequency: 1100kHz
- Manufacturer Part Number: AP63203WU-7
- JLCPCB Part Class: Extended Part
- Role Details: 3.3V fixed buck regulator sized for ESP32 WiFi current peaks from 12V input
- Role: Regulator
- Datasheet URL: https://www.diodes.com/assets/Datasheets/AP63200-AP63201-AP63203-AP63205.pdf
- Package or Case Code: TSOT-26_L2.9-W1.6-P0.95-LS2.8-BL
**Pins:**
- BST [pin 6]
- EN [pin 2]
- FB [pin 1]
- GND [pin 4]
- SW [pin 5]
- VIN [pin 3]
*The full schematic, PCB layout, bill of materials, and interactive design are available at [https://www.flux.ai/benboy/esp32-relay-controller~yl](https://www.flux.ai/benboy/esp32-relay-controller~yl).*
---
*Generated from [https://www.flux.ai/benboy/esp32-relay-controller~yl](https://www.flux.ai/benboy/esp32-relay-controller~yl)*