<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Typmax blog</title><link>https://typmax.com/blog/</link><description>How PCB tools route, check and verify boards, with diagrams and real numbers. From the team building Typmax.</description><language>en</language><atom:link href="https://typmax.com/blog/feed.xml" rel="self" type="application/rss+xml"/>
<item><title>Walkaround vs shove: what really happens when a PCB router hits an obstacle</title><link>https://typmax.com/blog/how-a-pcb-editor-routes</link><guid isPermaLink="true">https://typmax.com/blog/how-a-pcb-editor-routes</guid><pubDate>Wed, 25 Nov 2026 09:00:00 +0000</pubDate><dc:creator>Shubham</dc:creator><description>Complain, go around, push, or dive: four strategies routers combine to get a track through.</description><content:encoded><![CDATA[<p>Interactive PCB routing looks deceptively simple: move your cursor, and copper follows. But what happens when the path is blocked? The router has to decide whether to respect the copper already there, move it, or find another way. Those decisions say a lot about the algorithms running inside an EDA tool.</p>
<h2>Four ways past an obstacle</h2>
<p>Picture the moment. You&#39;re dragging a track across the board and there&#39;s a via in the way. What happens next?</p>
<p>Most interactive routers offer some mix of four strategies:</p>
<ol>
<li><strong>Complain.</strong> Draw the track and highlight the collision. You decide what to do about it.</li>
<li><strong>Go around.</strong> Bend the new track around existing copper. This is <em>walkaround</em>.</li>
<li><strong>Push.</strong> Move the conflicting copper out of the way. This is <em>shove</em>.</li>
<li><strong>Dive.</strong> Insert a via, change layers, and find another path.</li>
</ol>
<figure><img src="https://typmax.com/assets/blog/routing/7-four-strategies.png" alt="Four ways a router can deal with a via in the way: complain, go around, push, or dive to the other layer" width="760" height="568"><figcaption>Same start, same via, four answers</figcaption></figure>
<p>These aren&#39;t four mutually exclusive modes. They&#39;re strategies a router combines while it completes a connection. KiCad calls the first three Highlight Collisions, Walk Around and Shove; Altium&#39;s comparable modes include Ignore, Walkaround and Push. Names and implementations vary between tools.</p>
<p>The first three deal with obstacles on the current layer. The fourth changes the layer, and that opens a different set of questions.</p>
<h2>1. Complain: highlight collisions</h2>
<p>This is drawing by hand with a referee. The track follows your cursor wherever you point it, and anything that breaks the clearance rules lights up.</p>
<p>There&#39;s no path finding and no attempt to move anything. The editor checks your geometry against the copper nearby and reports conflicts. Whether you may commit a violation depends on the tool: KiCad only lets you with <em>Allow DRC violations</em> switched on, and the design check still flags it later.</p>
<p>It&#39;s cheap, instant and entirely yours. Use it for exact geometry: an odd angle, a tight pad entry, a one-millimetre fix. The trade-off is obvious. Every collision is yours to solve.</p>
<h2>2. Go around: walkaround</h2>
<p>Walkaround respects what&#39;s already there. Existing tracks and vias stay put; only the new track bends.</p>
<h3>The trick underneath: configuration space</h3>
<p>Routing a track that has width around obstacles is awkward. So turn it into an easier problem.</p>
<p>Shrink the track to a zero-width centreline, and grow every obstacle to make up for it. In the simplest case each obstacle grows by</p>
<p>r = c + w/2</p>
<p>where <em>c</em> is the required clearance and <em>w</em> is the track width. If the centreline stays outside every grown shape, the real track keeps its clearance. A problem about a fat track has become a problem about a point.</p>
<figure><img src="https://typmax.com/assets/blog/routing/8-config-space.png" alt="Growing each obstacle by the clearance plus half the track width lets the router treat the track as a zero-width line" width="760" height="316"><figcaption>Grow the obstacle, shrink the track to a line</figcaption></figure>
<p>Real editors do more than grow everything by one number. Clearance can depend on the object types, the nets, the net classes and the layer, so each pair of objects may need its own distance.</p>
<h3>Finding the way round</h3>
<p>One useful way to picture a walkaround implementation is a <em>hull walk</em>:</p>
<ol>
<li>Find where the straight line to the cursor hits a grown obstacle (its <em>hull</em>).</li>
<li>Explore round its edge in both directions.</li>
<li>Keep the candidate that reaches the cursor and best fits the router&#39;s preferences.</li>
</ol>
<figure><img src="https://typmax.com/assets/blog/routing/2-hull.png" alt="Walkaround follows the hull both ways and keeps the shorter walk" width="760" height="290"><figcaption>Two ways round, one kept</figcaption></figure>
<p>The shorter route isn&#39;t automatically the winner. Corner count, preferred angles and the copper nearby can all tip the choice.</p>
<p>And walkaround has a hard limit. When two hulls overlap, or leave a gap narrower than the track, that side is simply closed.</p>
<p>Walkaround is polite. It never touches your work, and in a tight spot that&#39;s exactly its problem.</p>
<p>It shines near finished or sensitive copper, like tuned lines or impedance-controlled nets. Expect longer, bendier routes.</p>
<h2>3. Push: shove</h2>
<p>Shove asks a different question: why go around when you can make room?</p>
<p>As the new track advances, the router displaces the copper in its way to open a legal corridor. The new track can stay straight. Pads, locked items and other fixed geometry limit how far anything can move. Some routers let you pull the cursor back and restore everything, so the whole operation feels reversible.</p>
<p>The movement isn&#39;t the interesting part. What happens to everything <em>connected</em> to the moved object is.</p>
<h3>The cascade problem</h3>
<p>Picture the new track pushing a via. That via is joined to a track, and the track branches into two more segments.</p>
<p>Moving the via can&#39;t mean sliding a circle across the board. Everything attached to it must stay attached and keep its clearance. If the moved track now hits a neighbour, the neighbour moves too. The push spreads outward.</p>
<p>That chain is a <em>cascade</em>.</p>
<figure><img src="https://typmax.com/assets/blog/routing/9-cascade.png" alt="A shove cascade: the new track pushes a via, the via drags its track and branch, they push a neighbour, and a fixed pad stops the chain" width="760" height="376"><figcaption>One push, three moves, stopped by a pad</figcaption></figure>
<p>So a shove router is juggling much more than local collisions:</p>
<ul>
<li><strong>Connectivity.</strong> A moved segment must never leave the net broken or a junction dangling.</li>
<li><strong>Clearance.</strong> Every displaced object must stay legal against copper, pads, holes and the board edge.</li>
<li><strong>Propagation.</strong> One push can set off several more, and each needs its own checks.</li>
<li><strong>Topology.</strong> A route isn&#39;t a pile of loose segments. Its shape changes; its relationships mustn&#39;t.</li>
<li><strong>Rollback.</strong> If the push can&#39;t be completed, the previous legal geometry has to come back.</li>
</ul>
<p>It also needs limits. A cascade that keeps spreading makes the cursor slow and the result unpredictable. Routers cap how far a push may travel, stop at fixed geometry, or give up on the shove and try something else. Many tidy up afterwards, smoothing out corners the pushing left behind. The exact rules vary between tools.</p>
<p>A small cursor movement can change copper you never touched.</p>
<p>That&#39;s shove&#39;s power and its risk. Lock the nets you care about, and look at what moved after a big shove.</p>
<h2>4. Dive: placing a via</h2>
<p>Sometimes the current layer has no path at all. Walking round fails, and pushing can&#39;t make enough room.</p>
<p>So change layers: drop through a via, route on another layer, and come back up if the connection needs to.</p>
<p>Interactively, you usually choose when and where. An automatic router has the harder job. It has to decide whether a layer change is worth it, and find a spot where the connection can actually be finished. That&#39;s three separate problems.</p>
<h3>Candidate generation</h3>
<p>First, propose some places a via could go. A simple method samples positions around the pad along a few directions, such as the eight compass points, at a few distances. That&#39;s one design choice, not a standard; others search the free space geometrically.</p>
<h3>Rule legality</h3>
<p>Next, throw out any candidate that breaks the design rules: via-to-pad and via-to-copper clearance, hole-to-hole and hole-to-copper clearance, board edge, keep-outs, and which via types and layers are allowed. Asking the rule checker first saves the router from wasting time on spots that could never be legal.</p>
<h3>Route feasibility</h3>
<p>Here&#39;s the distinction that matters: <strong>a legal via is not a routable connection.</strong></p>
<p>The track still has to escape the pad, reach the via, and then get to its destination on the other layer, which may be just as crowded.</p>
<figure><img src="https://typmax.com/assets/blog/routing/10-via-feasibility.png" alt="Three legal via spots around a pad; only one leads to a route that can continue on the other layer" width="760" height="380"><figcaption>Three legal vias, one connection that works</figcaption></figure>
<h3>Choosing between candidates</h3>
<p>A simple order of attack is: another shared layer with no via, then one via near either end, then two vias, one at each end. But rather than taking the first spot that passes, the router should score the ones that actually route. A typical cost is a weighted sum:</p>
<p>cost = a × length + b × vias + c × bends + d × layer penalty</p>
<p>The weights are design choices, not constants. Pick the cheapest feasible option within the search limits.</p>
<p>Even that is a simplification. High-speed work adds its own demands: impedance, return-current continuity and via stub length. Differential pairs need symmetric vias and matched transitions, usually with ground vias nearby. Blind, buried and micro vias change which layer jumps are even possible.</p>
<p>The goal isn&#39;t somewhere to put a via. It&#39;s a connection that works, electrically and physically.</p>
<h2>What about the big &quot;Route all&quot; button?</h2>
<p>Everything so far has been one connection, one cursor, one obstacle. Batch autorouting changes the problem entirely.</p>
<p>Imagine three unrouted connections and a wall with one narrow corridor through it. Only one track fits. Two of the nets could go round the end of the wall; one can&#39;t. If the router sends the wrong net through first, the net that truly needed the corridor is shut in.</p>
<figure><img src="https://typmax.com/assets/blog/routing/12-corridor.png" alt="Routing order matters: if net 1 takes the one-track corridor, net 2 is shut in; route net 2 first and all three fit" width="760" height="412"><figcaption>Same board, same nets, different order</figcaption></figure>
<p>Now the software must decide which connection goes first, which paths to reserve, when to rethink earlier routes, and how to share congested space. Four classic ideas help.</p>
<p><strong>Lee maze routing (1961).</strong> Lay a grid over the board and flood outward from the start, numbering each cell by its distance, until the flood reaches the target. Then trace back along falling numbers. It finds a path whenever the grid has one, and the shortest in grid steps, but on a big board it burns time and memory. (E. F. Moore described the same breadth-first idea for mazes in 1959.)</p>
<p><strong>A* (1968).</strong> Same search, but selective. It expands the cell with the lowest cost so far <em>plus</em> an estimate of the cost left. Give length, bends, vias and layer changes a price, and it heads for the target instead of flooding everywhere. As long as the estimate never overestimates, the route it returns is the cheapest under that cost model. Which isn&#39;t the same as electrically best.</p>
<figure><img src="https://typmax.com/assets/blog/routing/11-lee-vs-astar.png" alt="Same maze: Lee explores 62 cells, A star explores 21, and both find a shortest path" width="760" height="344"><figcaption>Same grid, same path length: 62 cells searched vs 21</figcaption></figure>
<p><strong>Rip-up and reroute.</strong> Sometimes an early decision is wrong. Pull up some routes already laid and try again in a different order. The negotiated-congestion variant, PathFinder, also makes contested areas more expensive on each pass, so nets learn to share instead of grabbing the first corridor they find.</p>
<p><strong>Topological routing.</strong> Decide first only which side of each obstacle every route passes. Turn that plan into exact copper afterwards. It avoids the grid&#39;s staircase tracks and can look more natural, though the exact geometry still has to pass the rules.</p>
<p>Real autorouters combine all of these. No single algorithm wins every board, and a fully routed board isn&#39;t necessarily a well-routed one.</p>
<figure><img src="https://typmax.com/assets/blog/routing/6-meme.png" alt="Every autorouter, ever: 100 percent routed, and the board to prove it" width="760" height="320"><figcaption>We&#39;ve all been here</figcaption></figure>
<h2>Two more features: pairs and tuning</h2>
<p>Some routing adds constraints on top of walkaround and shove.</p>
<p><strong>Differential pairs.</strong> The router has to keep two tracks in a relationship, not find two separate paths. It holds their width and spacing while controlling skew and uncoupled length. When an obstacle forces the pair apart, it has to bring them back together cleanly.</p>
<p><strong>Length tuning.</strong> This adds deliberate detours, serpentines in KiCad, accordions and trombones in Altium, to hit a target length or delay. Matching the two halves of a pair and matching signals across a bus are different targets. Tune once placement and main routing are stable, because later changes can undo it. And equal length isn&#39;t good signal integrity on its own: impedance, coupling and the return path still matter.</p>
<h2>So which strategy should you use?</h2>
<p>It depends on what you&#39;re willing to change.</p>
<div><table>
<thead>
<tr>
<th>If you want to…</th>
<th>Strategy</th>
<th>Trade-off</th>
</tr>
</thead>
<tbody><tr>
<td>Place a track exactly where you point</td>
<td>Highlight collisions</td>
<td>You resolve every conflict yourself</td>
</tr>
<tr>
<td>Route near finished or sensitive copper</td>
<td>Walkaround</td>
<td>Longer, bendier paths</td>
</tr>
<tr>
<td>Get through a crowded area</td>
<td>Shove</td>
<td>Moves copper you didn&#39;t touch</td>
</tr>
<tr>
<td>Get past a layer with no path</td>
<td>Via</td>
<td>Board space, a drill hit, a signal discontinuity</td>
</tr>
<tr>
<td>Route a whole board in one go</td>
<td>Batch autorouter</td>
<td>Order and congestion decide the result</td>
</tr>
</tbody></table></div>
<figure><img src="https://typmax.com/assets/blog/routing/13-meme-shove.png" alt="A joke: walkaround politely weaves past every via, shove barges straight through and squashes everyone aside" width="760" height="316"><figcaption>Know your router</figcaption></figure>
<p>There&#39;s no universally best strategy. The interesting part is deciding what the router is allowed to change: the new track, the existing copper, or the layer you&#39;re on. That trade-off sits behind almost every routing decision you make.</p>
<h2>Sources</h2>
<ul>
<li>C. Y. Lee, <a href="https://doi.org/10.1109/TEC.1961.5219222">An Algorithm for Path Connections and Its Applications</a>, 1961.</li>
<li>P. Hart, N. Nilsson, B. Raphael, <a href="https://doi.org/10.1109/TSSC.1968.300136">A Formal Basis for the Heuristic Determination of Minimum Cost Paths</a>, 1968.</li>
<li>L. McMurchie and C. Ebeling, <a href="https://doi.org/10.1145/201310.201328">PathFinder: A Negotiation-Based Performance-Driven Router for FPGAs</a>, 1995.</li>
<li>T. Hama and H. Etoh, <a href="https://doi.org/10.1109/43.743721">Topological Routing Path Search Algorithm with Incremental Routability Test</a>, IEEE Transactions on CAD, 1999.</li>
<li><a href="https://docs.kicad.org/10.0/en/pcbnew/pcbnew.html">KiCad PCB Editor documentation</a>: interactive router, tracks and vias.</li>
<li>Altium Designer documentation: <a href="https://www.altium.com/documentation/altium-designer/pcb/routing/interactive">Interactive Routing</a> and <a href="https://www.altium.com/documentation/altium-designer/pcb/high-speed-design/interactively-routing-differential-pairs">Differential Pair Routing</a>.</li>
</ul>

<p>More posts: <a href="https://typmax.com/blog/erc-clean-is-where-the-checks-start">ERC clean is where the checks start</a>, or <a href="https://typmax.com/blog/">all posts</a>.</p>
]]></content:encoded></item>
<item><title>ERC clean is where the checks start</title><link>https://typmax.com/blog/erc-clean-is-where-the-checks-start</link><guid isPermaLink="true">https://typmax.com/blog/erc-clean-is-where-the-checks-start</guid><pubDate>Thu, 15 Oct 2026 09:00:00 +0000</pubDate><dc:creator>Shubham</dc:creator><description>A desk robot whose USB rail is six times over budget. A radio whose chip select floats during boot. A board you can never flash. All three pass KiCad&#x27;s electrical rules check.</description><content:encoded><![CDATA[<p>A desk robot whose USB rail is six times over budget. A radio whose chip select floats during boot. A board you can never flash. All three pass KiCad's electrical rules check.</p>
<p>Two weeks ago I described a desk robot to the tool I'm building. Two servos, a round display, a microphone, a little speaker, an ESP32-S3 to run it, one USB-C port for power. Plain English, one paragraph. It picked the parts, wired them by rule, and the first line of the report was a FAIL.</p>

<p>I'd have ordered that board. I've ordered worse.</p>

<h2>The line ERC can't see</h2>

<p>The 5 V rail summed to 2,542 mA from the parts' own records. With the 1.3 margin the power rule applies, 3,305 mA. A laptop USB port promises 500 mA. Six and a half times over, before the first servo moves.</p>

<div><div><span>usb.sink_budget · rail VBUS_5V</span><span>Fail</span></div><div><h3>The 5 V rail asks for 3,305 mA. The port promises 500&nbsp;mA.</h3><div><div><span>peak draw summed from the records</span><span>2,542.074 mA</span></div><div><span>x 1.3 design margin</span><span>3,304.697 mA</span></div><div><span>USB 2.0 default sink contract</span><span>500 mA</span></div><div><span></span><span>EXCEEDS by 6.6x</span></div></div></div><div>source: USB 2.0 §7.2.1.3, held as data in the interface definition · unverified input: the SG90 stall figure</div></div>

<p>Here's the thing. That schematic passes ERC. Every pin is connected, every net has a source, no two outputs fight. KiCad's electrical rules check is a connectivity check and a good one, but it has never read a datasheet. It cannot know that a stalled SG90 can pull over 800 mA, or that a port is a port.</p>

<p>The part of that report I like most is the last line. It says which number nobody has verified yet: the servo's stall current, which no vendor sheet actually states. The record carries a spread of bench measurements and says so. If you doubt the finding, you know exactly where to look.</p>

<p>A check that hides its inputs is just another opinion.</p>

<h2>The board I keep breaking</h2>

<p>The field logger has been my test board since the summer. An ESP32-S3, a LoRa radio and a flash chip on one SPI bus, a buck regulator, a few sensors. It's on its sixth revision. It's the design I throw at every new rule, and it keeps paying out.</p>

<p>Two findings from it, both on a schematic with zero ERC violations.</p>

<p><strong>The radio's chip select floats during boot.</strong> NSS is wired to a GPIO. Connected, driven, fine. Except the MCU holds its pins high-impedance for the first stretch after reset, there's no pull-up on that net, and the radio's record says it has no internal pull either. So for a hundred milliseconds or so the radio can latch itself selected and clock whatever the boot ROM puts on MOSI into its own registers.</p>

<div><div><span>spi.cs_default_state · U5.NSS</span><span>Fail</span></div><div><h3>The radio's chip select floats while the MCU is in reset.</h3><div><div><span>pull-up resistor on the derived net</span><span>none</span></div><div><span>internal pull in the part's record</span><span>none</span></div><div><span>state during MCU reset and boot</span><span>floating</span></div><div><span>consequence</span><span>latches itself selected; the boot ROM's MOSI/SCK traffic lands in its registers</span></div></div></div><div>source: the part's record (no internal pull on NSS) · catalog/interfaces/spi.json, chip-select default state · derived netlist</div></div>

<p>On the drawing it's a wire from a pin to a pin. The bug is about what the pin does before firmware exists, which is a question about the part, not the wire. Nobody finds this one on the bench quickly either. It looks like a flaky radio driver.</p>

<p><strong>You can never flash it.</strong> Same board, same revision. The UART pins had been bound to the SPI bus, and neither boot strap reached a connector, a switch or a test point. Every pin connected. Nothing you could plug a programmer into.</p>

<div><div><span>mcu.programming_path · U1</span><span>Fail</span></div><div><h3>No programming path is complete. Firmware cannot be loaded onto this board as drawn.</h3><div><div><span>uart_bootloader</span><span>RXD0 bound to SPI0.miso, TXD0 bound to SPI0.mosi</span></div><div><span>usb_bootloader</span><span>GPIO19/GPIO20 on chip-select nets, no connector pin</span></div><div><span>boot strap</span><span>GPIO0 unreachable, GPIO46 unreachable (no connector, test point or switch on either)</span></div><div><span>fix_hint</span><span>apply_motif esp32_autoreset</span></div></div></div><div>source: the ESP32-S3 record's programming interfaces · catalog/interfaces/programming.json · reachability over the derived netlist</div></div>

<p>This is the one that embarrasses me, because it's not subtle. A reviewer with coffee would catch it. But the reviewer with coffee is the step everyone skips when the demo says "ERC clean" and the fab is a click away.</p>

<h2>The smaller ones</h2>

<p>Not every finding is a disaster. Two from the same files that I'd still want to know before ordering:</p>

<p>The buck regulator's catch diode is an SS14, rated 1 A average. The regulator's current limit is 3.6 A. A sustained short on the output and the protection part is the first thing to die.</p>

<p>A GPS module's RF_IN pin had nothing on it. The record marks it must-connect. No antenna path, no fix, just a module that would never get a lock and a long afternoon on the roof.</p>

<h2>What ERC said about the same file</h2>

<p>We ran KiCad's ERC on the same field logger file, to be fair to it. It reports 50 violations, and they're real: worth fixing, all of them. None is the chip select, and none is the programming path.</p>

<div>
<div><span>pin_not_connected</span><i></i><b>46</b></div>
<div><span>pin_not_driven</span><i></i><b>3</b></div>
<div><span>pin_to_pin</span><i></i><b>1</b></div>
<div><span>chip select floats</span><i></i><b>0</b></div>
<div><span>cannot be flashed</span><i></i><b>0</b></div>
</div>

<h2>You don't need a tool for this</h2>

<p>You need the rule and the numbers, and the discipline to do it every time. If you want to do it by hand before your next order:</p>

<ol>
<li><strong>Sum the rail.</strong> Every supply pin on it, the peak row from each datasheet, then compare to what the source actually delivers. For USB that's 500 mA unless you've done the CC negotiation.</li>
<li><strong>For every chip select, reset and enable,</strong> ask what state it's in before firmware runs. If the answer is "whatever the pull decides" and there's no pull, that's the bug.</li>
<li><strong>Trace the programming path with a finger.</strong> From the UART or USB pins of the MCU to something you can physically touch, plus the boot strap. If the finger doesn't arrive, you won't either.</li>
<li><strong>Any part described as protection:</strong> check its rating against the thing it's protecting against, not the normal load.</li>
</ol>

<p>That's most of what my tool does on these boards. It's not clever. It's a datasheet held open next to the netlist, every single time, without getting bored.</p>

<h2>What I'm building</h2>

<p>Typmax is that, as software. You describe the board in plain English. The model only proposes small edits. Deterministic code picks real parts, wires by rule and runs the checks, and every check prints the number it computed, the rule it applied and where the rule came from, usually a vendor app note we keep as data rather than code. The model never writes the KiCad file. The files are yours: schematic, project, netlist, BOM, a placed board.</p>

<div><p><strong>What it doesn't do yet</strong>, so you don't find out later.</p><p>It places parts; you route. No manufacturing files. One of 499 catalog records is human-verified; the rest are machine-read from datasheets and tagged that way, and every report names the inputs nobody has checked. Battery, motor and mains boards always end in human review, on purpose.</p></div>

<p>If you have a board that passed ERC and surprised you at bring-up, I'd like to hear about it: <a href="mailto:hello@typmax.com?subject=A%20board%20that%20passed%20ERC">hello@typmax.com</a>. And if you want yours checked this way, <a href="https://typmax.com/#waitlist">request early access</a>. The parts you name get verified first.</p>

]]></content:encoded></item>
</channel></rss>
