From two places. A fab publishes the smallest tracks, gaps, holes and edge clearances it can make, and DRC checks a board against them. Each part's maker adds rules for its part: a capacitor beside its pin, a switching loop kept short. PCB Agent's library holds 45 such rules, each citing its source.
The fab's design rules: what can be built
A fab's published capabilities set a floor under every board it makes: the narrowest track, the smallest gap and hole, how close copper may come to a hole or the board edge. PCB Agent runs DRC against a fab's published two-layer minimums, not KiCad's defaults: 0.10 mm for tracks and gaps, 0.20 mm from holes to copper. JLCPCB design rules in KiCad loads one fab's numbers into KiCad.
These rules know nothing of the parts. Can AI design a PCB? shows a board passing DRC with a Wi-Fi module's antenna mid-board.
The makers' layout guidelines: what each part needs
The second set comes from each part's maker, about that part alone: in the datasheet's layout section, in application notes, on a connector's drawing or in a hardware design guide. DRC knows none of it until someone enters it.
PCB Agent's library sorts these rules into four kinds:
- Edge: a side of a part on the board edge. Espressif's guidelines suggest a module's PCB antenna hang off the board, its feed point near the edge.
- Reach: two pads whose centres stay within a distance, such as a decoupling capacitor and its supply pin.
- Loop: a current path kept short, such as a regulator's input capacitor through the chip's input and ground pins.
- Keep-out: an area under or around a part kept free of tracks, vias or other parts.
A fifth group asks to keep one thing away from another, often with no distance.
The four kinds of layout rule and the keep-away, each marked on a generic board, with examples from Espressif's and Texas Instruments' guidance.
How to read a datasheet's layout section
- Find every place the maker writes about layout: the layout section and its figure, application notes, drawings.
- List each request with its page, in your own words.
- Give each a kind from the four above, or mark it keep-away.
- Study the layout example. It shows what the maker means by close, and is often the only number on offer.
- Write a limit beside each request, with where it came from.
How a guideline becomes a number
A check needs a limit in millimetres. Take it from the maker first: a figure it states, then a distance measured on its layout example and rounded up, and only then one you choose, marked as yours.
The easy case is a stated figure: GCT's drawing of its USB4105 USB-C receptacle marks the PCB edge on its recommended layout, to ±0.05 mm, and the library's rule keeps that tolerance.
A buck converter's input loop
Texas Instruments' TLV62569 datasheet asks for the capacitors and the inductor as close to the chip as possible, to keep the power traces short (section 10.1). It gives no distance, but its layout example, Figure 20, draws one. We measured the input capacitor's loop there, through the chip's input and ground pins and back: 11.35 mm, which our rule rounds up to 11.5 mm.
A protection array at the connector
ST asks for its USBLC6-2 ESD array "as close as possible to the disturbance source (generally the connector)" (section 2.3), and section 2.2 shows why. A track 10 mm long and 0.5 mm wide adds about 6 nH. A surge whose current climbs 24 A in its 1 ns rise then puts 144 V across each of the data and ground tracks, so the clamping voltage is 319.2 V instead of 31.2 V.
ST gives no distance, and its layout figure shows no connector to measure. Our rule takes the shortest the two footprints allow, the array right behind the connector: 3.09 mm from its data pin to the farthest contact on that line, rounded up to 4 mm.
A crystal and its tracks
Raspberry Pi's Hardware design with RP2040 does the arithmetic for a crystal (section 2.3). Its crystal needs a 10 pF load: two 15 pF capacitors in series give 7.5 pF, and the guide allows 3 pF for the tracks and the chip's pins. Track capacitance counts toward the load, so the guide asks for a layout as short as possible. On the 3D rendering of its minimal design, we measured the crystal's XIN pad 9.8 mm from the chip's XIN pin. A reading off a picture gains 0.3 mm before rounding up, so the limit is 10.5 mm.
When the maker gives no number
Many requests say only close, or short. If the maker draws a layout example, measure it. If not:
- For a decoupling or bypass capacitor, choose a limit and say that it is yours. PCB Agent's library uses 3 mm, centre to centre, up to 1 µF, and 10 mm above.
- For another part asked to be as close as possible, take the shortest the footprints allow and round up, as with the ESD array.
- For keep-away with no distance, invent none. TI asks for the feedback traces to stay away from the switch node and gives no figure. A number of yours would pass for the maker's. Write the request down, and check it by eye.
Where does IPC-2221 fit?
IPC-2221, IPC's generic standard on printed board design, holds rules that apply whatever the parts. KiCad's track width calculator, for one, takes its formulas from it.
It fills the gap between the other two: neither a fab nor a maker knows the currents on your board. Figures that depend on them, such as a track's width for its current, start from IPC-2221. PCB Agent's review uses it to hold each power rail's narrowest track to the rail's current at a 10 °C rise. Our PCB trace width calculator sizes a track for its current.
How PCB Agent keeps each rule
Every module in PCB Agent's library has had its makers' documents read for layout, each number taken in the order above. Where a maker asks for something, it becomes a rule of one of the four kinds: reach, edge, loop or keep-out; where a maker asks nothing of the layout, the module carries no rule. A part the library lacks is researched in the job, and each layout rule drafted for it is held to its maker's words.
Each rule is data, not a note. The buck converter's input loop is kept as:
- Kind: loop.
- Pads: the input capacitor's supply pin, the chip's input and ground pins, and the capacitor's ground pin.
- Limit: 11.5 mm.
- Reason: TI asks for the input capacitor as close as possible, and the loop is 11.35 mm in TI's layout example.
- Source: the TLV62569 datasheet and its address, sections 10.1 and 10.2, Figure 20.
If no spot keeps a rule, placement stops and names it. After routing, a review measures the edge, reach and loop rules, and a miss is an error; DRC holds the keep-outs. A request with no number stays in the module's notes, and no check holds it.
Limits
A maker's number belongs to its part and package: a loop measured on TI's example holds for the TLV62569, not for the next regulator. A distance is a stand-in, too: the review measures pads, not the path a current takes back through ground. Rules of these four kinds cannot express what high-speed signals or RF design need, nor the safety spacing of high voltage. This is not a layout guide for one kind of board: power supply PCB design and ESP32 PCB design each have their own. Nor does it test the rules that travel without a source, as 90-degree PCB trace corners does for one. And a checked layout is not a board in a hand: the roadmap says where PCB Agent's own boards stand.
Sources
- TLV62569 datasheet: layout guidelines and layout example, Texas Instruments
- USBLC6-2 datasheet: how to ensure good ESD protection, STMicroelectronics
- Hardware design with RP2040: crystal oscillator, Raspberry Pi
- ESP32-C3 hardware design guidelines: PCB layout design, Espressif
- USB4105 drawing: recommended PCB layout, GCT
- Calculator Tools: track width, KiCad 10.0 documentation


