logoalt Hacker News

hot_iron_dustyesterday at 6:08 PM1 replyview on HN

Interesting! How did you make Claude "know" the PCB layout/schematic specifics? Is just giving it a "reference prompt" enough to produce any interesting results? One thing that comes to mind is to use LLMs understanding of SVG to build "spatial representation" of the board layout by presenting components and tracks as SVG primitives of different type etc. I imagine a practical "PCB Design Copilot" would come from specialized models, trained from the ground up on a large design dataset. There is no GitHub for free professional grade PCB design sources to scrape though.


Replies

akiselevyesterday at 6:36 PM

> How did you make Claude "know" the PCB layout/schematic specifics? Is just giving it a "reference prompt" enough to produce any interesting results?

I have a mini query language in the CLI that implements a lot of spatial queries, both structured and via prompts (another LLM translates the prompt to a structured query), against the Altium file format and an intermediate representation I keep. Most queries and editing commands use relative positioning ("to the left of"), units ("right edge minus 10mm"), and parameters (U1.P1.Top + MinSpacing * 5), etc. The LLM rarely needs to use concrete units because it's mostly parametrized by component clearances and design rules - I just choose some numbers at the beginning like board size and layer stackup (mostly set by the fab).

The CLI has over a hundred subcommands and I use Claude skills to split up the documentation, but the agent actively explores the schematic and PCB themselves. The Claude skills include instructions to use the measurement subcommands to sanity check after making a move or when doing a review at the end, although I'm in the process of implementing a GPU based design rule checker. My Solidworks interface works the same but there are many more "verbs" there for the LLM to manage.

At the end of the day it's mostly just orchestrating another tool which does most of the spatial logic and calculations. It's definitely easier with Altium than Solidworks so far.