← Back to context

Comment by Aurornis

6 months ago

The blog post isn’t clear: Did the LLM actually do the routing? The only screenshot showing connected traces comes after the author says they added ground fills and “tidied up the layout”

It’s amazing that this worked at all, but to be clear this layout is actually very bad. Just look at that minimum width trace used to carry power across the entire board and into the ESP32. Using min width traces and wrapping them and min clearance to components is a classic mistake of people (or LLMs?) that have zero understanding of PCB layout techniques beyond “draw lines until everything is connected”

It would be interesting to see if you could feed the file into an LLM and get it to produce the feedback.

I could be wrong, but that looks like autoroute to me just based on the aesthetics of it, autoroute has a bit of a "smell" that you can recognize if you pay attention. For example see the via and traces to the left of SW2. No human I know, even a total noob designing their first ever PCB, would do that.

Also, it certainly wasn't the LLM; atopile doesn't allow you to specify routing as far as I'm aware, their docs seem to tell you to route in KiCad.

  • > even a total noob designing their first ever PCB

    As said noob, do you have any resources for basic PCB design/routing? Along the lines of a simple list of things to look out for?

    I've only ever done one, and for routing I basically did the "make two ground pours, then keep clicking until everything is connected" process that others have described in this thread. Probably about the same as I'd imagine an autorouter would have. And it seems like it worked fine in the end. But I'm wondering what obvious things I probably missed, and what the consequences are to missing them? PCB layout articles online seem to quickly get into topics like differential pair length matching, high-frequency / RF circuits, optimizing current return paths, controlled impedance, and so on... none of which I imagine will ever be relevant to me as a hobbyist.

    • There are some absolute masters of PCB design on this site, I am far below that level, so take this all with a heap of salt. A lot of what follows is generally good advice but not everything is universally applicable.

      Basics: learn to use your EDA software, properly configure it with your board house's capabilities, get correct footprints, read and re-read and re-re-read the datasheets for everything you use. Study other similar designs and try to understand everything they're doing and _why_.

      - Place mounting holes and critical components first. Tiny boards and tiny components look bigger on-screen, zoom out to 1:1 real life scale as a sanity check!

      - Use as many of the largest decoupling caps you can get. You don’t need multiple caps in different sizes; this comes from the old days of leaded caps when parasitics would be bad

      - For power: use planes when possible; use a trace width calculator; always have a ground plane.

      - Generally speaking, use the widest traces you can.

      - There is a huge asterisk on this one, but most traces should be made as short as possible. Decoupling caps should be super close to where they're needed. This is one of the more common noob mistakes, but it can also lead you astray (making overly complex or compact PCBs on the first try.)

      - Do not put capacitors or inductors close to the edges of a board, they will fail because of flexing!

      - Check clearance between parts for pick and place and hand-soldered parts

      - Always run DRC checks (there are also secondary DRC check tool websites/downloads aside from the one in your EDA software)

      - Before sending it off, manually check for obvious common blunders (forgot the ground plane, no copper pour on ground plane, dead short, forgot to drill holes, wrong units, used the wrong footprints) - manually measure a few things on your design including footprints and pad sizes and cross reference this with an independent source. Check your files in different gerber viewers and hand-trace through the copper path from one component to the next. Visually preview the PCB and ensure you're not missing any copper anywhere.

      - Don’t make things as small as possible right away! Make it big, test points, connectors, break out sketchy features into daughterboards etc, then shrink when it works

      Beyond the basics:

      - Understand your components. There are countless types of resistors and capacitors, to say nothing of the other component types. Getting more advanced, try to understand the various types, their lifespans, failure modes, heat tolerance. Pay attention to physical component sizes, if some capacitors of type X and rating Y are one volume and the others are half the volume by being half the height... why?

      - Understand heat. For the most basic calculations: "With only natural convection (i.e. no airflow), and no heat sink, a typical two sided PCB with solid copper fills on both sides, needs at least 15.29 cm2/2.37 in2 of area to dissipate 1 watt of power for a 40°C rise in temperature. Adding airflow can typically reduce this size requirement by up to half. To reduce board area further a heat sink will be required." - from Thermal Design By Insight, Not Hindsight by Marc Davis-Marsh

      - Get a better understanding of electricity and RF in general. This really pays dividends in terms of understanding why the "rules" are what they are.

      For some interesting stuff beyond the basics, or to get yourself thinking, these links are great:

      https://resources.altium.com/p/2-the-extreme-importance-of-p... by Rick Hartley

      https://codeinsecurity.wordpress.com/2025/01/25/proper-decou... by Graham Sutherland

      The "PCB Review" threads on r/PrintedCircuitBoard are great places to learn as well.

      Beyond that... well, it's like any skill, learning the theory and best practices is great but the way to really improve is to get out there and look at (and design) tons of PCBs.

      2 replies →

  • Few other thoughts:

    - impressive that this worked so well with LLM-generated atopile, given that atopile is about a year old!

    - the hardest part of a PCB is still the routing and nonstandard parts of the design; what this did is basically "find a reference design, pick components that match the reference design, and put them on the correct nets" which is the easiest part of the process for people designing PCBs today

    - much like with code, 99% of PCBs designed are fairly basic boards implementing the reference design with some small tweaks, and then there is a tiny amount of envelope-pushing designs/crazy complex stuff. Obviously you can't design some fancy PCB with complex RF with this, but give it some time and I'd bet you can probably make a lot of the basic stuff...

    • > 99% of PCBs designed are fairly basic boards implementing the reference design with some small tweaks

      This may be true of hobbyists, but is very much not true in industry.

      Maybe all those millions of IoT devices skew the number of PCBs made that look a bit like an ESP32 plus a button and an LED, but most unique designs probably aren't those. Endless march of things like new super-dense PC/mobile motherboards and all the weird hyper-specific industrial electronics takes far more effort, say.

      And no one is sweating the few days to design and lay them out to meet the constraints for a simple ESP32 + a button. Primarily the size and shape and power usage. That's not the hard bit of slinging mass-market IoT trinkets, the software side is.

      3 replies →

The video seems more clear. The LLM generated the BOM and netlist using atopile, a tool for specifying the equivalent of a schematic in code. He did the placement and routing in KiCad in the usual way, presumably by hand.

ETA: Other commenters suspect a traditional autorouter based on the poor layout quality. I agree that's also possible, and nothing in the video excludes that. It definitely wasn't the LLM, though.

  • That makes more sense. Going from a highly detailed set of common parts and instructions to an incomplete net list seems within the realm of LLM tasks.

    I assumed the author was more experienced, I suppose this is more of an entry level hobbyist blog. There are some very fundamental problems with routing PCBs like this that are covered in introductory materials.

> Did the LLM actually do the routing?

Good question. KiCAD once had a router, built in, or sort of built in, but it was taken out for licensing reasons. So who's doing that?

  • Why would anyone want a router? Routing is by far the most fun and relaxing part of PCB design! I'd pay for a game that just had me route PCBs.

  • freerouting plugin is available as a standalone program. It's pretty good. You export DSN from kicad and use freerouting. Not as simple as button click though.

> It’s amazing that this worked at all, but to be clear this layout is actually very bad. Just look at that minimum width trace used to carry power across the entire board and into the ESP32. Using min width traces and wrapping them and min clearance to components is a classic mistake of people (or LLMs?) that have zero understanding of PCB layout techniques beyond “draw lines until everything is connected”

Is it really so implausible that these constraints could be built into the process/algorithm/agentic workflow?

  • No, but at that point, why even leverage a stochastic text generator? Placing hard constraints on a generative algorithm is just regular programming with more steps and greater instability.

    Edit: Also, one could just look to the world of decision tree and route-finding algorithms that could probably do this task better than a language model.

    • IDK, modeling, constraints, simulations and stochastic processes seem like a match made in heaven.

      It's like how pairing a coding agent that can run unit tests and iterate is way more powerful than code gen alone.

> It would be interesting to see if you could feed the file into an LLM and get it to produce the feedback.

I did something like that already and It works ok.

I'm just electonic amateur and it happened to me to incorrectly wire up MOSFET or using ptype incorrectly.

I basically send screenshot of schematic and ask for feedback or suggestions. it actually provide nice feedback and for someone not very experienced it's very reassuring to get green light from LLM.