
Board nhiet
NguyenThanhHuy-debug/PCB-Liquid-Dispensing-Cabinet
PCB-Liquid-Dispensing-Cabinet — a software project built with modern tooling.

Professional ESP32-based AC phase-control dimmer for fan speed control with optical isolation and safety features
Ac dimmer is an open-source printed circuit board by arunsaispk12, from the arunsaispk12/esp32-ac-dimmer-fan-controller repository on GitHub. It is a 2-layer board of 150 × 100 mm with 3 parts on 11 nets.
It is built around the BTA16-600B and MOC3021. Its parts include 1 resistor, 1 IC and 1 transistor.
This directory contains PCB layout files for the ESP32 AC Dimmer Fan Controller.
⚡ HIGH VOLTAGE WARNING: This PCB handles mains AC voltage. Only qualified personnel should fabricate and assemble. See SAFETY.md.
| File | Description |
|---|---|
ac_dimmer.kicad_pcb | KiCad 7.0+ PCB layout file |
README.md | This file - PCB documentation |
FABRICATION_NOTES.md | Manufacturing specifications |
gerbers/ | Gerber files for manufacturing (generated) |
| Parameter | Value |
|---|---|
| Length | 150mm |
| Width | 100mm |
| Thickness | 1.6mm (standard FR-4) |
| Layers | 2 (Top and Bottom) |
| Copper Weight | 1oz (35µm) standard, 2oz recommended for high current |
| Parameter | Specification |
|---|---|
| Base Material | FR-4, Tg 130°C minimum (Tg 150°C recommended) |
| Surface Finish | HASL lead-free, ENIG, or OSP |
| Soldermask | Both sides, green/black/blue |
| Silkscreen | Both sides, white color |
| Min Hole Size | 0.3mm |
| Min Via Diameter | 0.6mm (0.3mm drill) |
| Parameter | Value | Notes |
|---|---|---|
| Maximum Voltage | 250V AC | Between mains traces |
| Maximum Current | 10A continuous | On main power traces |
| Isolation Voltage | >1000V | Between mains and low voltage |
| Dielectric Strength | >500V DC | Through PCB thickness |
| Net/Current | Minimum Width | Recommended Width |
|---|---|---|
| AC Mains (5A) | 1.5mm | 2.0mm |
| TRIAC Power (10A) | 2.0mm | 3.0mm |
| Low Voltage Signals | 0.3mm | 0.4mm |
| Power Signals (3.3V) | 0.5mm | 0.8mm |
| Between | Minimum Clearance | Minimum Creepage |
|---|---|---|
| Mains to Mains | 3.0mm | 5.0mm |
| Mains to Low Voltage | 4.0mm | 8.0mm |
| Low Voltage to Low Voltage | 0.2mm | 0.3mm |
| Pad to Pad | 0.2mm | 0.3mm |
CRITICAL: The 8mm creepage distance between mains and low voltage sections is a safety requirement and must not be violated.
| Parameter | Minimum | Recommended |
|---|---|---|
| Via Diameter | 0.6mm | 0.8mm |
| Via Drill | 0.3mm | 0.4mm |
| Via Plating | Tented | Tented or plugged |
| Thermal Vias | - | Under TRIAC for heat dissipation |
┌─────────────────────────────┐
│ Top Silkscreen (White) │
├─────────────────────────────┤
│ Top Soldermask (Green) │
├─────────────────────────────┤
│ F.Cu (Copper - 1oz) │ ← High voltage traces
│ │ ← Component placement
├─────────────────────────────┤
│ Core (FR-4, 1.6mm) │
├─────────────────────────────┤
│ B.Cu (Copper - 1oz) │ ← Ground planes
│ │ ← Return paths
├─────────────────────────────┤
│ Bottom Soldermask (Green) │
├─────────────────────────────┤
│ Bottom Silkscreen (White) │
└─────────────────────────────┘┌────────────────────────────────────────┐
│ │
│ HIGH VOLTAGE SECTION │ LOW VOLTAGE │
│ (Left side) │ (Right) │
│ │ │
│ ┌─────────────────┐ │ ┌──────────┐│
│ │ AC Input │ │ │ ESP32 ││
│ │ Fuse, MOV │ │ │ GPIO ││
│ │ │ │ │ Connector││
│ │ Bridge Rect. │ │ └──────────┘│
│ │ Zero-Cross │ │ │
│ │ │ │ ┌──────────┐│
│ │ TRIAC │ I│ │ Pull-up ││
│ │ (on edge) │ S│ │ Filter ││
│ │ │ O│ │ ││
│ │ Snubber │ L│ └──────────┘│
│ │ │ A│ │
│ │ Load Output │ T│ │
│ └─────────────────┘ I│ │
│ O│ │
│ N│ │
│ │ │
└────────────────────────────────────────┘
145mm mark (isolation barrier)Isolation Barrier at 145mm
TRIAC Placement
Ground Planes
Component Placement
Components:
Layout considerations:
Components:
Layout considerations:
High Voltage Zone:
TRIAC Heat Zone:
ESP32 Ground Plane:
Mains Ground Reference:
Required text:
All components labeled:
J1 (AC Input):
J2 (Load Output):
J3 (ESP32 Interface):
PCB Features:
Heatsink Mounting:
Worst-case scenario:
Thermal path:
Total: ~9°C/W → 108°C rise → Junction temp: 148°C Safe: Tj(max) = 125°C, so need better heatsink (<5°C/W for margin)
| Parameter | Specification |
|---|---|
| Hole Diameter | 3.2mm (for M3 screw) |
| Hole Quantity | 4 (one in each corner) |
| Distance from Edge | 5mm |
| Clearance Zone | 6mm diameter (no copper/traces) |
Locations:
Standoff height: 10mm recommended (for airflow under board)
Clearance Rules:
- Default net clearance: 0.2mm
- High voltage net clearance: 4.0mm
- Mains to low voltage: 8.0mm (creepage)
Track Width Rules:
- Minimum track width: 0.2mm
- Default track width: 0.4mm
- Power track width: 2.0mm (mains)
Via Rules:
- Minimum via diameter: 0.6mm
- Minimum via drill: 0.3mm
- Via to via clearance: 0.4mm
Copper to Edge:
- Minimum clearance: 0.5mm
Silkscreen:
- Minimum line width: 0.15mm
- Minimum text size: 0.8mm heightPlot layers:
Drill files:
Additional files:
gerbers/Professional Quality:
JLCPCB (China) - Low cost, fast turnaround
PCBWay (China) - Good quality
OSH Park (USA) - High quality, purple PCBs
Premium Quality:
Generate Gerber files (see above)
Compress all gerbers into ZIP file
Upload ZIP to manufacturer's website
Specify:
Review preview
Check dimensions (150mm × 100mm)
Order quantity (minimum 5 recommended for prototypes)
See BUILD_GUIDE.md for complete instructions.
Quick reference:
For high-current traces:
For optocouplers:
For TRIAC:
Check for:
Continuity tests:
Isolation test:
See BUILD_GUIDE.md section "Testing Procedures"
For loads >200W:
Changes needed:
Two independent dimmers:
Changes needed:
Add isolated AC-DC converter:
Changes needed:
| Issue | Cause | Solution |
|---|---|---|
| Traces too thin | DRC violation | Increase trace width in design |
| Clearance violation | Insufficient spacing | Increase clearances, redesign |
| Registration error | Layer misalignment | Use better manufacturer |
| Copper shorts | Manufacturing defect | Request replacement |
| Missing copper | Under-etching | Request replacement |
| Issue | Cause | Solution |
|---|---|---|
| Cold solder joints | Insufficient heat/solder | Reheat with proper technique |
| Solder bridges | Too much solder | Remove with solder wick |
| Lifted pads | Excessive heat | Replace PCB or wire repair |
| Component damage | ESD or heat | Replace component |
| Wrong orientation | Assembly error | Desolder and correct |
Before ordering PCBs:
Initial release:
For PCB-related questions:
For KiCad help:
⚡ HIGH VOLTAGE PCB - BUILD RESPONSIBLY ⚡
PCB Documentation Version 1.0 - 2025-01-11
| Qty | Value | Footprint | References |
|---|---|---|---|
| 1 | 330R 2W | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R1 |
| 1 | BTA16-600B | Package_TO_SOT_THT:TO-220-3_Vertical | Q1 |
| 1 | MOC3021 | Package_DIP:DIP-6_W7.62mm | U1 |

NguyenThanhHuy-debug/PCB-Liquid-Dispensing-Cabinet
PCB-Liquid-Dispensing-Cabinet — a software project built with modern tooling.

Ajith-Anand-R/Smart-Home-Controller
Full-stack IoT home automation system with ESP32 firmware, Google Apps Script backend, web dashboard, and Flutter mobile app.



KevinAR-18/EcoLab-Dashboard
EcoLab Dashboard is a smart laboratory EcoLab desktop application for real-time monitoring and control of laboratory devices within the UGM network.

R-Mutura/DISHWASHER
Contains hardware and Software implementation of a dishwasher product


It measures 150 × 100 mm and has 2 copper layers, 1.6 mm thick.
3 parts, built around the BTA16-600B and MOC3021. 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.
From the arunsaispk12/esp32-ac-dimmer-fan-controller repository on GitHub, at the commit this page was made from: the board is hardware/pcb/ac_dimmer.kicad_pcb and its schematic hardware/schematics/ac_dimmer.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask arunsaispk12 before reusing the design.