# Senior Green X-Wing
## Description
Welcome to your new project. Imagine what you can build here.
## Project Details
- **Owner:** ak47-g
- **Created:** 3/9/2026
- **Last Updated:** 3/9/2026
- **Visibility:** Public
- **Board Specification:** FR4 UL94V-0, 1.6 mm thickness, 1oz copper
- **Creepage and Clearance Note:** Maintain minimum 6.0 mm clearance/creepage between HV and LV copper on all layers; keep silkscreen out of the HV/LV clearance gap. AC mains traces minimum 3.0 mm width.
- **System Architecture:** flowchart TD
subgraph HV [HV AC Section]
AC_IN["AC input terminal L N"]
SR["Strain relief clamp holes"]
FUSE["Fuse 1A slow blow 5x20"]
MOV["MOV across L N"]
HLK["HLK-PM01 AC-DC 5V"]
BR["Bridge rectifier 4x 1N4007"]
R_SENSE["Hot series sense resistor 10k"]
OPTO["PC817 optocoupler"]
TP5V["Test point 5V"]
TPGND["Test point GND"]
EARTH["Earth screw terminal"]
CHASSIS["Chassis ground pad near mounting hole"]
end
subgraph LV [Low Voltage ESP32 Section]
ESP32["ESP32 DOIT DevKit V1 in female headers"]
PROG["6 pin programming header"]
CHG["TP4056 charger module footprint"]
BAT["18650 battery holder"]
PFET["IRLML6401 P MOSFET"]
TX433["433 MHz TX header"]
LED["Status LED plus 330R"]
ANT["Antenna screw terminal"]
DECOUP["5V decoupling 100uF plus 100nF"]
PULLUP["10k pullup to 3V3 for opto"]
BLEED["1M bleeder across bridge DC"]
end
AC_IN --> SR --> FUSE --> MOV --> HLK
MOV --> BR
BR --> OPTO
OPTO -->|GPIO4| ESP32
HLK -->|5V| CHG
CHG --> BAT
BAT --> PFET -->|VIN| ESP32
HLK -->|5V| TX433
ESP32 -->|GPIO17| TX433
ESP32 -->|GPIO2| LED
ANT --> TX433
EARTH --> CHASSIS
HLK --> TP5V
TPGND --> ESP32
## Key Components
### B1 — [BH-18650-A1AJ0062](https://www.flux.ai/birkanozer/bh-18650-a1aj0062.md)
- Role: Battery
- Role Details: 18650 holder for 1 cell
- Voltage: 4.2V
- Package: Through Hole
- Manufacturer Part Number: BH-18650-A1AJ006
**Pins:**
- NEGATIVE [pin -]
- POSITIVE [pin +]
### D1 — [1N4007_AY_10001](https://www.flux.ai/lcsc/1n4007ay10001.md)
- Role: Rectification
- Manufacturer Part Number: 1N4007_AY_10001
- LCSC Part Number: C115999
- Manufacturer Name: PANJIT(强茂)
- Datasheet URL: https://storage.googleapis.com/graviton-electric-symbols/document_assets/lcsc/1811061711_PANJIT-International-1N4007-AY-10001_C115999.pdf
- Package: DO-41 THT
- Role Details: Bridge rectifier for mains sense
- JLCPCB Part Class: Extended Part
- Package or Case Code: DO-41_BD2.4-L4.7-P8.70-D0.9-RD
- Product Info Url: https://lcsc.com/product-detail/Diodes-General-Purpose_1N4007_C115999.html
- Part Type: Diodes - General Purpose
**Pins:**
- A [pin 2]
- C [pin 1]
### D2 — [1N4007_AY_10001](https://www.flux.ai/lcsc/1n4007ay10001.md)
- Manufacturer Part Number: 1N4007_AY_10001
- Role: Rectification
- Datasheet URL: https://storage.googleapis.com/graviton-electric-symbols/document_assets/lcsc/1811061711_PANJIT-International-1N4007-AY-10001_C115999.pdf
- Manufacturer Name: PANJIT(强茂)
- Role Details: Bridge rectifier for mains sense
- LCSC Part Number: C115999
- Package: DO-41 THT
- Package or Case Code: DO-41_BD2.4-L4.7-P8.70-D0.9-RD
- JLCPCB Part Class: Extended Part
- Part Type: Diodes - General Purpose
- Product Info Url: https://lcsc.com/product-detail/Diodes-General-Purpose_1N4007_C115999.html
**Pins:**
- A [pin 2]
- C [pin 1]
### D3 — [1N4007_AY_10001](https://www.flux.ai/lcsc/1n4007ay10001.md)
- Manufacturer Part Number: 1N4007_AY_10001
- Package: DO-41 THT
- Datasheet URL: https://storage.googleapis.com/graviton-electric-symbols/document_assets/lcsc/1811061711_PANJIT-International-1N4007-AY-10001_C115999.pdf
- Manufacturer Name: PANJIT(强茂)
- LCSC Part Number: C115999
- Role: Rectification
- Package or Case Code: DO-41_BD2.4-L4.7-P8.70-D0.9-RD
- JLCPCB Part Class: Extended Part
- Part Type: Diodes - General Purpose
- Product Info Url: https://lcsc.com/product-detail/Diodes-General-Purpose_1N4007_C115999.html
- Role Details: Bridge rectifier for mains sense
**Pins:**
- A [pin 2]
- C [pin 1]
### D4 — [1N4007_AY_10001](https://www.flux.ai/lcsc/1n4007ay10001.md)
- Manufacturer Part Number: 1N4007_AY_10001
- Package: DO-41 THT
- Datasheet URL: https://storage.googleapis.com/graviton-electric-symbols/document_assets/lcsc/1811061711_PANJIT-International-1N4007-AY-10001_C115999.pdf
- Manufacturer Name: PANJIT(强茂)
- LCSC Part Number: C115999
- Package or Case Code: DO-41_BD2.4-L4.7-P8.70-D0.9-RD
- Role: Rectification
- JLCPCB Part Class: Extended Part
- Part Type: Diodes - General Purpose
- Role Details: Bridge rectifier for mains sense
- Product Info Url: https://lcsc.com/product-detail/Diodes-General-Purpose_1N4007_C115999.html
**Pins:**
- A [pin 2]
- C [pin 1]
### F1 — [Fuseholder Cylinder 5x20mm](https://www.flux.ai/adrian95/fuseholder-cylinder-5x20mm.md)
- Role Details: Series Hot fuse holder for 5x20mm 1A slow-blow
- Role: Protection
- Package: Through Hole
- Part Type: Fuse
**Pins:**
- P1
- P2
### J1 — [2-Position Screw Terminal](https://www.flux.ai/corynrobinson/2-position-screw-terminal.md)
- Manufacturer Part Number: 691137710002
- Manufacturer Name: Würth Elektrik
- Part Type: Connector
- Package: Through Hole
- Role: Connector
- Datasheet URL: https://www.we-online.com/katalog/datasheet/691137710002.pdf
- Role Details: AC input terminal L/N
**Pins:**
- P1 [pin 1]
- P2 [pin 2]
### J2 — [2-Position Screw Terminal](https://www.flux.ai/corynrobinson/2-position-screw-terminal.md)
- Manufacturer Name: Würth Elektrik
- Package: Through Hole
- Part Type: Connector
- Manufacturer Part Number: 691137710002
- Role Details: Earth ground terminal (single pole used)
- Datasheet URL: https://www.we-online.com/katalog/datasheet/691137710002.pdf
- Role: Connector
**Pins:**
- P1 [pin 1]
- P2 [pin 2]
### J3 — [Pin Header 01x03 2.54mm Vertical](https://www.flux.ai/adrian95/pin-header-01x03-254mm-vertical.md)
- Part Type: Connector
- Role Details: 433MHz TX module header
- Role: Connector
- Package: THT 1x3 2.54mm
**Pins:**
- Pin_1 [pin 1]
- Pin_2 [pin 2]
- Pin_3 [pin 3]
### J4 — [640456-6](https://www.flux.ai/adrian95/640456-6.md)
- Manufacturer Part Number: 640456-6
- Package: THT 1x6 2.54mm
- Datasheet URL: https://www.te.com/usa-en/product-640456-6.datasheet.pdf
- Manufacturer Name: TE Connectivity AMP Connectors
- License: https://creativecommons.org/licenses/by/4.0/
- Part Type: Connector
- Role: Connector
- Package or Case Code: SHDR6W66P0X254_1X6_1524X572X1003P
- Role Details: Programming header 3V3 GND TX RX EN GPIO0
**Pins:**
- 1 [pin 1]
- 2 [pin 2]
- 3 [pin 3]
- 4 [pin 4]
- 5 [pin 5]
- 6 [pin 6]
### J6 — [Pin Socket 02x15 2.54mm Vertical](https://www.flux.ai/adrian95/pin-socket-02x15-254mm-vertical.md)
- Role Details: 2x15 female sockets for ESP32 DevKit V1 (mounting headers)
- Part Type: Connector
- Role: Connector
- License: https://creativecommons.org/licenses/by/4.0/
- Package: Through Hole
**Pins:**
- Pin_1 [pin 1]
- Pin_10 [pin 10]
- Pin_11 [pin 11]
- Pin_12 [pin 12]
- Pin_13 [pin 13]
- Pin_14 [pin 14]
- Pin_15 [pin 15]
- Pin_16 [pin 16]
- Pin_17 [pin 17]
- Pin_18 [pin 18]
- Pin_19 [pin 19]
- Pin_2 [pin 2]
- Pin_20 [pin 20]
- Pin_21 [pin 21]
- Pin_22 [pin 22]
- Pin_23 [pin 23]
- Pin_24 [pin 24]
- Pin_25 [pin 25]
- Pin_26 [pin 26]
- Pin_27 [pin 27]
- Pin_28 [pin 28]
- Pin_29 [pin 29]
- Pin_3 [pin 3]
- Pin_30 [pin 30]
- Pin_4 [pin 4]
- Pin_5 [pin 5]
- Pin_6 [pin 6]
- Pin_7 [pin 7]
- Pin_8 [pin 8]
- Pin_9 [pin 9]
### J7 — [Pin Socket 02x15 2.54mm Vertical](https://www.flux.ai/adrian95/pin-socket-02x15-254mm-vertical.md)
- Package: Through Hole
- Role Details: 2x15 female sockets for ESP32 DevKit V1 (mounting headers)
- Role: Connector
- Part Type: Connector
- License: https://creativecommons.org/licenses/by/4.0/
**Pins:**
- Pin_1 [pin 1]
- Pin_10 [pin 10]
- Pin_11 [pin 11]
- Pin_12 [pin 12]
- Pin_13 [pin 13]
- Pin_14 [pin 14]
- Pin_15 [pin 15]
- Pin_16 [pin 16]
- Pin_17 [pin 17]
- Pin_18 [pin 18]
- Pin_19 [pin 19]
- Pin_2 [pin 2]
- Pin_20 [pin 20]
- Pin_21 [pin 21]
- Pin_22 [pin 22]
- Pin_23 [pin 23]
- Pin_24 [pin 24]
- Pin_25 [pin 25]
- Pin_26 [pin 26]
- Pin_27 [pin 27]
- Pin_28 [pin 28]
- Pin_29 [pin 29]
- Pin_3 [pin 3]
- Pin_30 [pin 30]
- Pin_4 [pin 4]
- Pin_5 [pin 5]
- Pin_6 [pin 6]
- Pin_7 [pin 7]
- Pin_8 [pin 8]
- Pin_9 [pin 9]
### LED1 — [LTL-307EE](https://www.flux.ai/vasy_skral/ltl-307ee.md)
- Part Type: LED
- Role Details: Status LED on GPIO2
- Datasheet URL: https://mm.digikey.com/Volume0/opasdata/d220001/medias/docus/1153/LTL-307EE.pdf
- Manufacturer Name: Lite-On Inc.
- License: https://creativecommons.org/licenses/by/4.0/
- Manufacturer Part Number: LTL-307EE
- Package: LED_THT_5mm
- Role: Indicator
**Pins:**
- A [pin 2]
- K [pin 1]
### PS1 — [HLK-PM01](https://www.flux.ai/adrian95/hlk-pm01.md)
- Role: Power
- Role Details: Mains AC to 5V isolated module
- Package: Through Hole Module
- Part Type: ACDC
- License: https://creativecommons.org/licenses/by/4.0/
- Manufacturer Name: Hi_Link
- Manufacturer Part Number: HLK-PM01
- Datasheet URL: https://www.lcsc.com/datasheet/lcsc_datasheet_2409141600_HI-LINK-HLK-PM01_C209903.pdf
**Pins:**
- -Vout [pin 3]
- +Vout [pin 4]
- AC/L [pin 1]
- AC/N [pin 2]
### Q1 — [IRLML6401TRPBF](https://www.flux.ai/adrian95/irlml6401trpbf.md)
- License: https://creativecommons.org/licenses/by/4.0/
- Role Details: High-side PFET battery to VIN, gate on GPIO25
- Manufacturer Name: Infineon Technologies
- Part Type: Transistor
- Manufacturer Part Number: IRLML6401TRPBF
- Package: SOT-23-3
- Datasheet URL: https://www.infineon.com/dgdl/irlml6401pbf.pdf
- Role: Power Path
**Pins:**
- D [pin 3]
- G [pin 1]
- S [pin 2]
### RV1 — [MOV-14D121K](https://www.flux.ai/adrian95/mov-14d121k.md)
- License: https://creativecommons.org/licenses/by/4.0/
- Manufacturer Part Number: MOV-14D121K
- Package: THT Disc
- Role Details: MOV across L/N for surge protection (footprint larger than 7mm)
- Datasheet URL: https://www.bourns.com/docs/Product-Datasheets/MOV14D.pdf
- Part Type: Varistor
- Role: Protection
- Manufacturer Name: Bourns Inc.
**Pins:**
- 1 [pin 1]
- 2 [pin 2]
### TP1 — [5014](https://www.flux.ai/adrian95/5014.md)
- License: https://creativecommons.org/licenses/by/4.0/
- Manufacturer Part Number: 5014
- Part Type: Connector
- Package: Through Hole Test Point
- Role Details: Test points for 5V and GND rails
- Datasheet URL: https://www.keyelco.com/userAssets/file/M65p56.pdf
- Manufacturer Name: Keystone Electronics
- Role: Test
**Pins:**
- 1 [pin 1]
### TP2 — [5014](https://www.flux.ai/adrian95/5014.md)
- Part Type: Connector
- Manufacturer Part Number: 5014
- License: https://creativecommons.org/licenses/by/4.0/
- Package: Through Hole Test Point
- Role: Test
- Role Details: Test points for 5V and GND rails
- Datasheet URL: https://www.keyelco.com/userAssets/file/M65p56.pdf
- Manufacturer Name: Keystone Electronics
**Pins:**
- 1 [pin 1]
### U1 — [PC817](https://www.flux.ai/kicad-part-library/pc817.md)
- Role: Isolation
- Package or Case Code: DIP-4_W7.62mm
- Role Details: Mains sense optocoupler into GPIO4
- Manufacturer Part Number: PC817
- Package: DIP-4
- Datasheet URL: http://www.soselectronic.cz/a_info/resource/d/pc817.pdf
**Pins:**
- ~ [pin 1]
- ~ [pin 3]
- ~ [pin 2]
- ~ [pin 4]
### U2 — [TP4056_Module](https://www.flux.ai/wolfxpac/tp4056module.md)
- Part Type: Module
- Package: Through Hole Module
- Datasheet URL: https://robocraze.com/products/tp4056-lithium-battery-charging-board
- Role Details: TP4056 charger module footprint (IN/B/OUT pins)
- Manufacturer Name: Generic
- Role: Battery Charger
- License: https://creativecommons.org/licenses/by/4.0/
**Pins:**
- BAT- [pin 5]
- BAT+ [pin 6]
- IN- [pin 1]
- IN+ [pin 2]
- OUT- [pin 3]
- OUT+ [pin 4]
### U3 — [KF128-5.08-2P-AA](https://www.flux.ai/lcsc/kf128-5p08-2p-aa.md)
- Manufacturer Part Number: KF128-5.08-2P-AA
- Product Info Url: https://lcsc.com/product-detail/New-Quadratic-Unclassified-Data_Cixi-Kefa-Elec-KF128-5-08-2P_C474952.html
- Manufacturer Name: KEFA(科发)
- Package or Case Code: CONN-TH_P5.08_KF128-5.08-2P
- Role: Connector
- LCSC Part Number: C474952
- Connector Rows: 1
- Role Details: Antenna wire terminal
- JLCPCB Part Class: Extended Part
- Connector Pitch: 5.08mm
- Connector Gender: Female
- Current Rating: 24A
- Connector Type: Screw terminal
- Datasheet URL: https://storage.googleapis.com/graviton-electric-symbols/document_assets/lcsc/2408211511_Cixi-Kefa-Elec-KF128-5-08-2P-AA_C474952.pdf
- Package: Through Hole 5.08mm
- Part Type: Screw terminal
- Connector Positions: 2
- Operating Temperature: -40℃~+105℃
**Pins:**
- 1 [pin 1]
- 2 [pin 2]
*The full schematic, PCB layout, bill of materials, and interactive design are available at [https://www.flux.ai/ak47-g/senior-green-x-wing](https://www.flux.ai/ak47-g/senior-green-x-wing).*
---
*Generated from [https://www.flux.ai/ak47-g/senior-green-x-wing](https://www.flux.ai/ak47-g/senior-green-x-wing)*