Skip to the content
2 layersLayouts, the printed circuit board in 3D

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.md

ato-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

text
                     ┌──────────────────────────────────────────────────────────┐
 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, see NOTICE), 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.py turns any LCSC part number into such a part with no account, and tools/fpconv.py converts 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

sh
uv tool install "atopile==0.15.9"
ato build

No 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:

sh
uv run tools/lcsc2ato.py C21988 Infineon_IRLR7843TRPBF --prefix Q --pin G=1 --pin S=3 --pin D=4

Check 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 pinFunctionNotes
GPIO10HEAT_PWMIRLR7843 gate via 27 Ω, 10 k pull-down
GPIO7SSRAO3400A gate, open-drain to SSR−
GPIO3RS485_DESP3485 DE and /RE tied
GPIO4INTERLOCKinput, 10 k pull-up, closed to GND = safe
GPIO0 / ADC1_0ISENSEINA185A1 out, 0.1 V/A
GPIO1 / ADC1_1NTC10 k pull-up divider
GPIO8LED_HEATactive low; strapping pin, idles high
GPIO2LED_FAULTactive low; strapping pin, idles high
GPIO5 / GPIO6I²C SDA / SCLMCP9601 at 0x60
GPIO20 / GPIO21UART0 RX / TXRS-485
GPIO18 / GPIO19USB 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:

text
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 fault

Flash 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
QtyValueFootprintReferences
6Kangnex_WJ500V_5_08_2P:CONN-TH_2P-P5.00_WJ500V-5.08-2PJ1, J2, J3, J4, J6, J7
5TestPoint_SMDPad_D1_5mm:TestPoint_SMDPad_D1.5mmTP2, TP4, TP6, TP8, TP10
510kΩ ±1%R_10k_0402:R0402R9, R10, R12, R18, R19
510µF ±20%C_10uF_50V_1206:C1206C3, C4, C5, C6, C7
4MountingHole_3_2_M3:MountingHole_3.2_M3H1, H2, H3, H4
4100nF ±20%C_100nF_0402:C0402C9, C15, C16, C17
4{ℝ+}ΩR_10k_0402:R0402R4, R6, R13, R16
3Guangdong_Hottech_1N5819WS:SOD-323_L1.8-W1.3-LS2.5-RDD1, D3, D4
3{ℝ+}ΩR_1k_0402:R0402R7, R8, R15
2Hubei_KENTO_Elec_KT_0603R:LED0603-RDLED1, LED2
2MDD_SS34:SMA_L4.3-W2.6-LS5.2-RDD2, D6
2ALPSALPINE_SKRPACE010:KEY-SMD_4P-L4.2-W3.2-P2.20-LS4.6SW1, SW2
2100nF ±10%C_100nF_0402:C0402C12, C18
2{ℝ+}FC_100nF_0402:C0402C10, C13
2{ℝ+}ΩR_5k1_0402:R0402R20, R21
1Espressif_Systems_ESP32_C3_MINI_1_N4:WIFIM-SMD_ESP32-C3-MINI-1U3
1STMicroelectronics_USBLC6_2SC6:SOT-23-6_L2.9-W1.6-P0.95-LS2.8-BLD7
1Kangnex_WJ300V_5_0_3P:CONN-TH_3P-P5.00_WJ300V-5.00-3PJ5
1Texas_Instruments_LV2842XLVDDCR:SOT-23-6_L2.9-W1.6-P0.95-LS2.8-BRU1
1SHOU_HAN_TYPE_C_16PIN_2MD_073:USB-C-SMD_TYPE-C-6PIN-2MD-073USB1
1BHFUSE_BSMD0805_050_15V:F0805F1
1MICROCHIP_TECHNOLOGY_MCP9601_E_MX:TQFN-20_L5.0-W5.0-P0.65-BL-EP3.3U5
1Infineon_IRLR7843TRPBF:TO-252-2_L6.5-W6.1-P4.58-LS10.0-TRQ1
1MaxLinear_SP3485EN_L_TR:SOIC-8_L5.0-W4.0-P1.27-LS6.0-BLU4
1Honor_RVT1V101M0607:CAP-SMD_BD6.3-L6.6-W6.6-FDC14
1Brightking_SMBJ33A:SMB_L4.6-W3.6-LS5.3-RDD5
1Texas_Instruments_INA185A1IDRLR:SOT-563_L1.6-W1.2-P0.50-LS1.6-BLU2
1AOS_AO3400A:SOT-23-3_L2.9-W1.3-P1.90-LS2.4-BRQ2
10-100mΩR_0R_0402:R0402R17
12.2-10µFC_4u7_100V_1206:C1206C2
1200-1000nFC_470nF_0402:C0402C1
122µF ±20%C_22uF_0603:C0603C11
15.1kΩ ±1%R_5k1_0402:R0402R11
1L 10-100µHL_22uH_5040:IND-SMD_L5.0-W5.0_H4.0L1
1{ℝ+}FC_10uF_0805:C0805C8
1{ℝ+}ΩR_120R_0402:R0402R14
1{ℝ+}ΩR_27R_0402:R0402R3
1{ℝ+}ΩR_52k3_0402:R0402R1
1{ℝ+}ΩR_15k8_0402:R0402R2
1{ℝ+}ΩR_5mR_2512:R2512R5

Similar boards

  • 2 layers48 × 107 mmTwin orbit, the printed circuit board in 3D

    Twin orbit

    earthtojake/text-to-cad

    Design physical products with AI

    76 parts26kMIT
  • 2 layers85 × 115 mmOSO BOOK B1, the printed circuit board in 3D

    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 mmRgb to hdmi, the printed circuit board in 3D

    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 mmErgoTravel, the printed circuit board in 3D

    ErgoTravel

    jpconstantineau/ErgoTravel

    A Portable Ergonomic Split Keyboard inspired from the ErgoDox, Let's Split and Minidox

    76 parts284MIT
  • 2 layers60.6 × 24.1 mmBlep audio, the printed circuit board in 3D

    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 mmOSBMS Balancer Rev 0.9, the printed circuit board in 3D

    OSBMS Balancer Rev 0.9

    Teslafly/Dead-OpenBMS-dead

    A scalable, open source battery management system

    76 parts248
  • 2 layers79 × 75 mmPortableTerminal, the printed circuit board in 3D

    PortableTerminal

    profdc9/RFBitBanger

    A QRP digital transceiver created from readily available parts for off-the-grid maintenance

    76 parts222
  • 2 layers35.1 × 36.6 mmBinNanoFOC, the printed circuit board in 3D

    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).