ESP32 PCB Layout and Routing
Overview
This tutorial builds a minimal ESP32 development board — the kind you would order from JLCPCB and actually flash with firmware. It covers the three layers of every microcontroller design: the radio module, the glue components (strapping buttons, decoupling capacitor, status LED), and the routing that connects them.
You will place a real ESP32-C3-WROOM-02 module, wire the boot and enable strapping buttons, attach an indicator LED through a series resistor, then route the board with tscircuit's built-in autorouter.
What You Will Learn
- Placing an ESP32 module fetched from the tscircuit registry
- The strapping pins (EN, IO0) every ESP32 bootloader needs
- Why decoupling capacitors have a placement rule (and how tscircuit enforces it)
- Choosing effort levels for hard autoroutes
- Reading the preview to confirm every net is routed
The Module
The heart of the board is the module. Instead of hand-drawing an ESP32
footprint, pull one from the registry — ESP32_C3_WROOM_02_N4 ships with
correct pads, castellated edges, the antenna keep-out, and named pins
(3V3, EN, IO0–IO9, GND, and more):
The antenna keep-out (marked on the module's silkscreen) must stay clear of copper — one more reason to use the registry module instead of a generic chip.
The Strapping Buttons
Two pins decide how an ESP32 boots:
- EN — system enable. Pull it low to reset the chip.
- IO0 — bootloader strap. Hold it low while releasing EN and the chip enters the serial bootloader.
Both are just tactile buttons wired to ground:
SW1 is "reset", SW2 is "boot". On a real board you would also add 10k pull-ups on EN and IO0 so the module boots normally without buttons pressed.
The Status LED
A classic debug heartbeat: a GPIO driving an LED through a current-limiting resistor. IO9 doubles as a boot-strap pin on the C3, which makes it the usual heartbeat choice:
The Decoupling Capacitor Rule
Every ESP32 module needs a bulk capacitor between 3V3 and GND. tscircuit enforces a real design rule here: when a capacitor sits in a power-to-ground topology, it inherits a 1 mm maximum trace length (a decoupling cap must sit next to the pins it decouples — a cap 20 mm away is decoration, not decoupling).
The placement error tells you when a route cannot satisfy that length. You fix it by moving the capacitor close, or by relaxing the rule for a bulk cap that intentionally sits farther away:
For a tight decoupling cap, delete the maxDecouplingTraceLength prop and
place the capacitor within 1 mm of the 3V3 pin.
The Whole Board
Everything together — module, two strapping buttons, LED with resistor, bulk capacitor — routed automatically:
Notice autorouterEffortLevel="10x" on the board: the module brings 27 pads
onto a small board and the router needs the extra compute to finish every
net. Use 1x while iterating on placement, then raise the effort for the
final route.
What You Learned
- ESP32 modules come from the registry with correct footprints and named pins — never draw a module footprint by hand.
- EN and IO0 are the strapping pins your bootloader buttons attach to.
- Decoupling capacitors carry a 1 mm placement rule that tscircuit enforces as a design rule; relax it explicitly (or move the cap) when it is a bulk cap.
autorouterEffortLeveltrades compute time for route completeness on dense boards.- Zero render errors + every net in the connectivity map = a board ready for the ordering step.
Ordering the PCB
Press the tscircuit "One-click order PCB" flow in the editor, or export gerbers for JLCPCB. The ESP32-C3-WROOM-02 module solders to the castellated pads by hand or with a stencil — no hot air required for a two-layer build.