Design Rules, DRC and Design Verification
Set design rules from your fabricator's real capability and your own electrical requirements, then verify a board systematically so that DRC-clean actually means correct.
Two ways in. Work the material, or if you already know this, go straight to the project and prove it.
Where this sits
- Prerequisites
- Routing and Trace Design
How this skill is structured
- 1. Concepts — the ideas stated plainly, with the equations worth memorising.
- 2. Worked example — one real problem solved end to end, numbers included.
- 3. Tool demonstration — do the thing in a real open-source tool.
- 4. Resources — the specific free readings and videos, and what part of each to use.
- 5. Project — built alone, producing something a reviewer can check.
- 6. Competence checklist — what you must be able to do. This is also the audit rubric.
1. Concepts
Read these first. Tick each one when you could explain it to someone else without notes.
2. Worked example
Setting up rules for a 0.4 mm pitch QFN on a standard-tier fabrication process
ProblemYou are using a 0.4 mm pitch QFN. Your fabricator's standard capability is 0.127 mm trace/space, 0.2 mm minimum drill, 0.05 mm minimum annular ring, 0.1 mm minimum mask sliver, 0.05 mm mask expansion. Will it manufacture?
- 1Pad geometry: 0.4 mm pitch with a 0.2 mm pad width leaves 0.2 mm of space between adjacent pads.
- 2Mask sliver check: the mask openings are pad size plus 2 x expansion = 0.2 + 0.1 = 0.3 mm wide. The remaining mask between them is 0.4 - 0.3 = 0.1 mm. That exactly equals the minimum sliver of 0.1 mm. Marginal — a small registration error and the mask disappears.
- 3Mitigation: reduce the mask expansion to 0.025 mm for this footprint. Openings become 0.25 mm, slivers become 0.15 mm, with 50% margin. KiCad supports per-footprint and per-pad mask expansion overrides — set it on the footprint.
- 4Alternatively, request a mask-defined (rather than copper-defined) pad arrangement, or accept a single mask opening covering the whole row and rely on the paste stencil and surface tension. Both are legitimate but must be a deliberate choice communicated to the fab.
- 5Escape routing: can a 0.127 mm trace escape between two pads? The gap is 0.2 mm; a trace of 0.127 mm centred leaves 0.0365 mm clearance on each side. The fab's minimum space is 0.127 mm. FAILS.
- 6So you cannot route between adjacent 0.4 mm pitch QFN pads at standard capability. The escape must be by via-in-pad, or by escaping the outer ring on the same layer and dropping vias outside the package, or by upgrading to a finer capability tier.
- 7Practical answer for a QFN (as opposed to a BGA): all pads are on the perimeter, so route each pad outward radially and place its via outside the courtyard. No between-pad routing needed. The problem only becomes hard for BGAs with inner rows.
- 8Via and annular ring: choose a 0.3 mm drill with a 0.6 mm pad, giving an annular ring of (0.6 - 0.3)/2 = 0.15 mm, comfortably above the 0.05 mm minimum.
- 9Thermal pad vias: 0.3 mm drill vias in the thermal pad. Check drill-to-copper against the surrounding pads, and decide on tenting. Tent the bottom side to prevent solder wicking.
- 10Now encode all of this: in Board Setup > Design Rules, set the global minimums to the fab's standard capability. Add a custom rule constraining the QFN's local mask expansion. Add a net class for the QFN's signals if their width differs.
- 11Verify by generating gerbers and opening them in an independent viewer, zoomed in on the QFN, checking the mask openings and slivers visually at high magnification.
AnswerIt manufactures, but only with the mask expansion reduced to 0.025 mm for that footprint (default expansion produces a marginal 0.1 mm sliver) and with radial escape routing rather than routing between pads. Both constraints come from the fab's published table, and both are invisible unless you check.
3. Tool demonstration
Encode a real fabricator's capability as rules, write custom rules for your own requirements, and verify the outputs independently.
4. Resources
Free and, wherever possible, openly licensed. The note tells you which part to actually use — do not read them cover to cover.
5. Project — build this on your own
About 3 hours. This is the artifact that proves the skill. Work it without a walkthrough.
Produce a complete, documented verification package for your board: rules derived from a real fabricator, custom rules for your own requirements, and a multi-layer verification process with evidence at each stage.
Deliverables
Acceptance criteria — how you know it is good enough
If you want to push further
- Automate the whole verification in CI with KiBot: DRC, ERC, gerber generation, and a diff against the previous revision's outputs, failing the build on any error.
- Write a script that parses the gerber files and independently measures the minimum trace and space, and compare its answer to KiCad's DRC.
6. Competence checklist
Tick these honestly. If you are auditing this skill, this is your rubric — you should be able to demonstrate every line from the project you just built.