

Layouts
Heater + PID driver board for Hacker Fab tools, written in atopile. Builds offline; ESP32-C3, MCP9601 thermocouple, 10 A MOSFET or external SSR.
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 76
- Nets
- 52
- Pads
- 262
- Tracks, vias
- 0, 0
- Routed
- Not yet
- KiCad
- KiCad 0.15.9 (file 20241229)
- Created
- 18 Sep 2026
- Updated
- 18 Sep 2026
Overview
Layouts is an open-source printed circuit board by m9h, from the m9h/ato-heater-pid repository on GitHub, published under the MIT licence. It is a 2-layer board with 76 parts on 52 nets.
Its parts include 21 resistors, 18 capacitors, 9 diodes, 7 connectors and 5 ICs.
README
README.mdato-heater-pid
One heater driver board for every Hacker Fab tool that gets hot, written as code in atopile.
The spin-coater hotplate and the tube furnace in the hacker-fab org each carry a one-off controller: different boards, different firmware, different failure modes, re-drawn at every new node. This is the shared building block they could both import instead: a PID loop on a thermocouple, driving either a DC heater directly or a mains heater through an external solid-state relay, with the safety inputs a student lab actually needs.
Status: designed and builds clean, not yet fabricated or tested on hardware. Treat this as a design review candidate. Firmware is written against the pin map but has never run on a board.
What it does
┌──────────────────────────────────────────────────────────┐
12–24 V DC ──J1──► │ PowerInput: TVS crowbar, 100 µF bulk, VIN/VBUS diode-OR │
│ └──► LV2842X buck ──► 3V3 │
USB-C ────────────► │ ESP32-C3-MINI-1 (USB-serial-JTAG console, Wi-Fi) │
│ I²C ──► MCP9601 thermocouple amp ◄── J5 K-type TC │
│ ADC0 ◄── INA185A1 across 5 mΩ shunt (heater current) │
│ ADC1 ◄── 10 k / NTC divider ◄── J6 NTC │
│ GPIO ◄── interlock (pull-up) ◄── J7 dry contact│
│ UART0 ─► SP3485 RS-485 ◄─► J4 A/B/GND │
│ PWM ──► IRLR7843 low-side MOSFET ──► J2 DC heater │
│ GPIO ──► AO3400A open-drain ──► J3 SSR+/SSR- │
└──────────────────────────────────────────────────────────┘Two output stages, pick one per tool in firmware:
- PWM mode: a 12–24 V resistive heater (hotplate, Peltier, heated stage) is switched low-side by an IRLR7843 at a few hundred Hz. Up to about 10 A continuous with a copper pour, no heatsink. Current is measured on the low side so an open heater or a stuck switch shows up as a fault.
- SSR mode: a mains heater (furnace element) is switched by an external DC-input solid-state relay. The board only ever sees the SSR's 3–32 V input; mains never touches it. Firmware time-proportions the SSR over a 2 s window, which is what zero-cross SSRs want.
Temperature comes from a K-type thermocouple through an MCP9601 (cold-junction compensated, ±1.5 °C, open/short detection, good to the furnace's range) with an NTC channel as a second, cheap input for hotplate work.
Why atopile, and why this way
atopile lets a board be a versioned text file with typed interfaces and reusable modules. That is exactly the problem Hacker Fab has across six-plus university nodes: every node rebuilds the same control electronics from a student's schematic. A HeaterSwitch module that any node's tool can import is the point of this repo.
The catch: in 2026 atopile moved to a hosted app (0.16+), and the last open CLI release (0.15.x) can no longer reach the package registry or its part-picker without an account. So this repo is deliberately self-contained and offline:
- every atopile package it uses is vendored under
vendor/atopile/(MIT, seeNOTICE), with registry dependencies rewritten to relative paths; - every passive is an explicitly-picked part under
parts/, with footprint and symbol committed, so the picker is never invoked; tools/lcsc2ato.pyturns any LCSC part number into such a part with no account, andtools/fpconv.pyconverts the legacy KiCad footprints that EasyEDA exports into the format atopile parses.
Two atopile 0.15 gotchas this repo works around, documented here so nobody rediscovers them: the -> retype operator inside a for loop is silently a no-op, so array elements are retyped one by one; and subclassing Capacitor or Resistor is not enough to skip the picker, the subclass itself needs the is_atomic_part and has_part_picked traits.
Build
uv tool install "atopile==0.15.9"
ato buildNo network access is needed. Outputs land in build/builds/default/ (BOM as CSV and JSON, pinout, variable report, power tree) and the unrouted layout in layouts/default/default.kicad_pcb. Open that in KiCad 8 or 9 to place and route.
The BOM is 33 line items, 76 placements including test points and mounting holes, every one with an LCSC part number, so it goes straight into JLCPCB assembly. Two cosmetic quirks of building without the picker: the BOM's Value column is empty or shows ℝ+ for passives instantiated directly from parts/ (the part number is still right), and the build prints "Value is not the same for two equal partnumbers" warnings where a vendored module's tolerance differs from ours. The build also logs five "Failed to download datasheet" errors because LCSC now serves HTML at the URLs baked into the symbol files; they are non-fatal and ato build exits 0.
Add a new part from LCSC without an account:
uv run tools/lcsc2ato.py C21988 Infineon_IRLR7843TRPBF --prefix Q --pin G=1 --pin S=3 --pin D=4Check the emitted pin numbers against the datasheet and the footprint's pad numbers before using it.
Pin map
Defined in heater_pid.ato and mirrored in firmware/main.py. Keep them in sync.
| ESP32-C3 pin | Function | Notes |
|---|---|---|
| GPIO10 | HEAT_PWM | IRLR7843 gate via 27 Ω, 10 k pull-down |
| GPIO7 | SSR | AO3400A gate, open-drain to SSR− |
| GPIO3 | RS485_DE | SP3485 DE and /RE tied |
| GPIO4 | INTERLOCK | input, 10 k pull-up, closed to GND = safe |
| GPIO0 / ADC1_0 | ISENSE | INA185A1 out, 0.1 V/A |
| GPIO1 / ADC1_1 | NTC | 10 k pull-up divider |
| GPIO8 | LED_HEAT | active low; strapping pin, idles high |
| GPIO2 | LED_FAULT | active low; strapping pin, idles high |
| GPIO5 / GPIO6 | I²C SDA / SCL | MCP9601 at 0x60 |
| GPIO20 / GPIO21 | UART0 RX / TX | RS-485 |
| GPIO18 / GPIO19 | USB D− / D+ | native USB-serial-JTAG |
Terminals, all 5.08 mm screw blocks: J1 VIN/GND, J2 HEATER+/HEATER−, J3 SSR+/SSR−, J4 A/B/GND, J5 TC+/TC−, J6 NTC/GND, J7 ILK/GND.
Firmware
firmware/main.py is MicroPython for the ESP32-C3. It runs a PID with anti-windup and derivative-on-measurement, reads the MCP9601, drives PWM or the SSR, and refuses to heat on thermocouple fault, over-temperature, or open interlock. One-line ASCII protocol on both USB and RS-485:
SP 180 setpoint in °C
MODE PWM or SSR or OFF
KP 8 KI 0.05 KD 20
MAX 400 software over-temperature trip
? status: T= N= I= SP= OUT= MODE= ILK= F=
RESET clear a latched faultFlash MicroPython for ESP32-C3, copy main.py over, done. A Modbus RTU front end would make it a drop-in for the furnace repo's existing RS-485 code and is the obvious next step.
Safety notes, read before powering a heater
- Fit an inline fuse on VIN sized for the heater. The SMBJ33A across the input is a reverse-polarity crowbar: it only protects by blowing that fuse.
- The DC stage is rated for the IRLR7843's 30 V absolute maximum. Use 12–24 V supplies. Do not put 36 V or 48 V heaters on it.
- The interlock input is sensed by firmware. For a hard interlock, wire the same contact in series with SSR− as well, so the relay cannot energise regardless of software.
- Mains wiring to the SSR is your problem, not this board's. Use a properly rated SSR with a heatsink and an enclosure.
- The MCP9601 is the cold junction. Keep it near its terminal and away from the MOSFET pour, or the reading drifts with board temperature.
- Nothing here has been tested. First power-up should be on a current-limited bench supply with no heater attached.
Design choices worth arguing about
- ESP32-C3-MINI-1 over RP2040. Fewer generic passives to pin down, native USB, Wi-Fi for a lab dashboard, and the RP2040 package did not compile under atopile 0.15.9 anyway. The C3's ADC is mediocre; that is why the primary temperature channel is I²C.
- Gate driven straight from 3.3 V. IRLR7843 is fully on well below 3.3 V and the gate charge is small enough that at 200 Hz switching loss is nil. A gate driver would let you PWM at 20 kHz, which a heater does not need.
- Low-side sense. Simpler than high-side, and INA185's common-mode range would have allowed either. The cost is that HEATER− is not ground; that is fine for an isolated heater element and wrong for one whose case is bonded to supply ground. Check before wiring.
- 120 Ω RS-485 termination on-board. Fit it only at the two ends of the bus.
Layout
The .kicad_pcb atopile emits has every footprint placed at the origin. Placement guidance: MOSFET, shunt, and J2 in one corner on a wide pour; MCP9601 and J5 on the opposite side of the board; buck inductor away from the thermocouple amp; RS-485 and USB on the edge.
License
MIT. Vendored atopile packages are MIT, copyright atopile. See NOTICE.
Parts
76| Qty | Value | Footprint | References |
|---|---|---|---|
| 6 | Kangnex_WJ500V_5_08_2P:CONN-TH_2P-P5.00_WJ500V-5.08-2P | J1, J2, J3, J4, J6, J7 | |
| 5 | TestPoint_SMDPad_D1_5mm:TestPoint_SMDPad_D1.5mm | TP2, TP4, TP6, TP8, TP10 | |
| 5 | 10kΩ ±1% | R_10k_0402:R0402 | R9, R10, R12, R18, R19 |
| 5 | 10µF ±20% | C_10uF_50V_1206:C1206 | C3, C4, C5, C6, C7 |
| 4 | MountingHole_3_2_M3:MountingHole_3.2_M3 | H1, H2, H3, H4 | |
| 4 | 100nF ±20% | C_100nF_0402:C0402 | C9, C15, C16, C17 |
| 4 | {ℝ+}Ω | R_10k_0402:R0402 | R4, R6, R13, R16 |
| 3 | Guangdong_Hottech_1N5819WS:SOD-323_L1.8-W1.3-LS2.5-RD | D1, D3, D4 | |
| 3 | {ℝ+}Ω | R_1k_0402:R0402 | R7, R8, R15 |
| 2 | Hubei_KENTO_Elec_KT_0603R:LED0603-RD | LED1, LED2 | |
| 2 | MDD_SS34:SMA_L4.3-W2.6-LS5.2-RD | D2, D6 | |
| 2 | ALPSALPINE_SKRPACE010:KEY-SMD_4P-L4.2-W3.2-P2.20-LS4.6 | SW1, SW2 | |
| 2 | 100nF ±10% | C_100nF_0402:C0402 | C12, C18 |
| 2 | {ℝ+}F | C_100nF_0402:C0402 | C10, C13 |
| 2 | {ℝ+}Ω | R_5k1_0402:R0402 | R20, R21 |
| 1 | Espressif_Systems_ESP32_C3_MINI_1_N4:WIFIM-SMD_ESP32-C3-MINI-1 | U3 | |
| 1 | STMicroelectronics_USBLC6_2SC6:SOT-23-6_L2.9-W1.6-P0.95-LS2.8-BL | D7 | |
| 1 | Kangnex_WJ300V_5_0_3P:CONN-TH_3P-P5.00_WJ300V-5.00-3P | J5 | |
| 1 | Texas_Instruments_LV2842XLVDDCR:SOT-23-6_L2.9-W1.6-P0.95-LS2.8-BR | U1 | |
| 1 | SHOU_HAN_TYPE_C_16PIN_2MD_073:USB-C-SMD_TYPE-C-6PIN-2MD-073 | USB1 | |
| 1 | BHFUSE_BSMD0805_050_15V:F0805 | F1 | |
| 1 | MICROCHIP_TECHNOLOGY_MCP9601_E_MX:TQFN-20_L5.0-W5.0-P0.65-BL-EP3.3 | U5 | |
| 1 | Infineon_IRLR7843TRPBF:TO-252-2_L6.5-W6.1-P4.58-LS10.0-TR | Q1 | |
| 1 | MaxLinear_SP3485EN_L_TR:SOIC-8_L5.0-W4.0-P1.27-LS6.0-BL | U4 | |
| 1 | Honor_RVT1V101M0607:CAP-SMD_BD6.3-L6.6-W6.6-FD | C14 | |
| 1 | Brightking_SMBJ33A:SMB_L4.6-W3.6-LS5.3-RD | D5 | |
| 1 | Texas_Instruments_INA185A1IDRLR:SOT-563_L1.6-W1.2-P0.50-LS1.6-BL | U2 | |
| 1 | AOS_AO3400A:SOT-23-3_L2.9-W1.3-P1.90-LS2.4-BR | Q2 | |
| 1 | 0-100mΩ | R_0R_0402:R0402 | R17 |
| 1 | 2.2-10µF | C_4u7_100V_1206:C1206 | C2 |
| 1 | 200-1000nF | C_470nF_0402:C0402 | C1 |
| 1 | 22µF ±20% | C_22uF_0603:C0603 | C11 |
| 1 | 5.1kΩ ±1% | R_5k1_0402:R0402 | R11 |
| 1 | L 10-100µH | L_22uH_5040:IND-SMD_L5.0-W5.0_H4.0 | L1 |
| 1 | {ℝ+}F | C_10uF_0805:C0805 | C8 |
| 1 | {ℝ+}Ω | R_120R_0402:R0402 | R14 |
| 1 | {ℝ+}Ω | R_27R_0402:R0402 | R3 |
| 1 | {ℝ+}Ω | R_52k3_0402:R0402 | R1 |
| 1 | {ℝ+}Ω | R_15k8_0402:R0402 | R2 |
| 1 | {ℝ+}Ω | R_5mR_2512:R2512 | R5 |
Similar boards
- 2 layers48 × 107 mm

- 2 layers85 × 115 mm

OSO BOOK B1
joeycastillo/The-Open-Book
For details on how to build, test and use Open Book, I've made documentation available here.
76 parts8.1kCC-BY-SA-4.0 - 2 layers77 × 97 mm

Rgb to hdmi
hoglet67/RGBtoHDMI
Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI
76 parts1kGPL-3.0 - 2 layers137.9 × 92.7 mm

ErgoTravel
jpconstantineau/ErgoTravel
A Portable Ergonomic Split Keyboard inspired from the ErgoDox, Let's Split and Minidox
76 parts284MIT - 2 layers60.6 × 24.1 mm

Blep audio
CRImier/MyKiCad
My KiCad boards. Can't be bothered uploading individually anymore, so here you go.
76 parts253GPL-3.0 - 2 layers49 × 49 mm

OSBMS Balancer Rev 0.9
Teslafly/Dead-OpenBMS-dead
A scalable, open source battery management system
76 parts248 - 2 layers79 × 75 mm

PortableTerminal
profdc9/RFBitBanger
A QRP digital transceiver created from readily available parts for off-the-grid maintenance
76 parts222 - 2 layers35.1 × 36.6 mm

BinNanoFOC
katbinaris/nanofoc_devkit
Compact All-In-One BLDC Controler featuiring ESP32-S3, TMC6300 and Magalpha sensors. Small 35x35mm footprint.
76 parts146
Questions
What parts does the Layouts use?
76 parts. 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 Layouts KiCad files?
From the m9h/ato-heater-pid repository on GitHub, at the commit this page was made from: the board is layouts/default/default.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the Layouts design in my own project?
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).