Optimize KiCad Schematic to Facilitate PCB Routing

By Jeremy S. Cook

Freelance Tech Journalist / Technical Writer, Engineering Consultant

Jeremy Cook Consulting

May 12, 2022

Blog

A small sampling of my PCB scrap heap

As a PCB design becomes more involved, managing complexity becomes ever more important to the process. Last month’s article about using hierarchical sheets presents an excellent tool for organizing schematics. This is helpful, but at the end of the day these theoretical connections must be transferred to the PCB layout editor for on-screen routing, and ultimately physical manufacturing. To help simplify physical routing, consider how components will be arranged when designing your schematic.

Make Schematic Similar to Board Layout

In some cases, as long as each component’s data/analog/power pins connect appropriately, component positions can adjust as needed, and things just work. In the real world, boards are often subject to physical restrictions, and certain elements, like connection headers or indicator LEDs must be in a particular orientation. To keep routing straightforward, it can pay to lay out the schematic in a similar manner to how it will eventually look on the PCB. This becomes a sort of “rough draft” of how components are arranged before they are fixtured in place on the PCB editor.

For sequentially-connected components–e.g. addressable LEDs–this allows you to make the choice between routing a matrix in horizontal or vertical rows, or even applying your own unique pattern, early on in the design process. You can also decide where to place the input and/or outputs that link different groups of components, and how power and ground connections are set up.

Circuitous Schematic > Squirrely PCB

Consider the schematic design/PCB layout below. It’s nicely laid out, with the microcontroller symbol connected to a 20-pin header sequentially for output. Actually PCB routing, however, is more complicated:

Image Credit: Screencap

In the second image, the schematic was revised to take into account the physical PCB routing. Schematic lines cross at several points, and while it doesn’t look as neat, the PCB is significantly easier to route:

Image Credit: Screencap

Grouping With Hierarchical Sheets

If everything is laid out on a single schematic sheet, when you first apply this to a PCB, you’ll be presented with all components linked together with a to-be-connected ratsnest. It’s an appropriate name, as this jumble of parts can be quite intimidating. If the design is instead separated out into hierarchical sheets, each comes bundled as a mini-nest.

Consider the roughly equivalent designs below. The first is one mass of components and connections. The second was organized with hierarchical sheets, which pop components onto the PCB editor in smaller groups for easier routing.

Image Credit: Screencap

There Is No Perfect PCB

If you’re struggling to route a PCB, don’t be afraid to step back and re-evaluate how things are connected at the schematic level. Additionally, as noted in this KiCad layout tips article, you can reassign IO pins in software when convenient. If the choice is between making a design more complicated software-wise–i.e. schematic design and/or IO assignment–versus making the physical routing more involved, choose the inherently flexible software route.

Admittedly, I haven’t yet pulled the trigger on the PCB design featured in this article, and there will likely be a few changes before that happens. More broadly speaking, one has to always evaluate when it’s best to continue to improve and evaluate a design, and when it’s time to order a prototype and see what happens. It’s a balancing act, but one might argue that a revised board is better than no board at all–or something that’s irrelevant by the time you finally get it in production!

Jeremy Cook is a freelance tech journalist and engineering consultant with over 10 years of factory automation experience. An avid maker and experimenter, you can follow him on Twitter, or see his electromechanical exploits on the Jeremy Cook YouTube Channel!

Jeremy Cook is a freelance tech journalist and engineering consultant with over 10 years of factory automation experience. An avid maker and experimenter, you can follow him on Twitter, or see his electromechanical exploits on the Jeremy S. Cook YouTube Channel!

More from Jeremy

Tech News Roundup
MORE