Show HN: Atopile – Design circuit boards with code

595 points by Timot05 ↗ HN
Hey HN! We are the founders of atopile. We’re building a tool to describe electronics with code. Here is a quick demo: https://youtu.be/7-Q0XVpfW3Y

Could you imagine the pain of building an entire software product using only assembly code? That’s about how we felt designing hardware. We don’t currently have good ways to describe what we need, reuse existing designs and compile that description down to a product.

We started atopile to fix this. atopile is an open-source language and toolchain to describe circuits with code. The compiler is here: https://github.com/atopile/atopile Docs are here: https://atopile.io/getting-started/ . For a detailed deep dive designing an ESP32 module, see this video: https://youtu.be/eMWRwZOajdQ

We realized this was a problem in our previous jobs. Narayan and I (Tim) had to manually, draw and export all our electronic circuit boards. This lasted until our friend Matt, a software engineer, showed us his development workflow. All his projects were built, tested, and merged automatically via GitHub. So we asked: Can we build the same for hardware?

We observed that the ability to abstract electronics effectively hinged on using a language to describe the requirements, so we came up with the “ato” language. In ato, you can break down circuits into modules, components and interfaces. You can nest and connect those blocks with each other. Here is an example with an RP2040 microcontroller:

  import RP2040Kit from "rp2040/RP2040Kit.ato"
  import LEDIndicatorBlue from "generics/leds.ato"
  import LDOReg3V3 from "regulators/regulators.ato"
  import USBCConn from "usb-connectors/usb-connectors.ato"

  module Blinky:
    micro_controller = new RP2040Kit
    led_indicator = new LEDIndicatorBlue
    voltage_regulator = new LDOReg3V3
    usb_c_connector = new USBCConn

    usb_c_connector.power ~ voltage_regulator.power_in
    voltage_regulator.power_out ~ micro_controller.power
    micro_controller.gpio13 ~ led_indicator.input
    micro_controller.power.gnd ~ led_indicator.gnd

    led_indicator.resistor.value = 100ohm +/- 10%

From there, the compiler produces a netlist that describes how the circuit is connected and selects jelly-bean components for you (https://atopile.io/blog/2024/01/31/cloud-components/). Our next focus will be to add layout reuse, mathematical relations between values and define circuits by traits (similar to Rusts’).

At the moment, atopile is intended to design all types of printed circuit boards (PCB) with low to medium complexity. The circuit complexity that the compiler can handle will steadily increase until it becomes suited for production usage. We often get asked if the compiler is meant for chip design rather than PCBs, but that is not the case. The language is exclusive to PCBs. At least for now..!

A big part of why the software community is so prolific is thanks to open source and open core technology. The ability to share software packages with each other and efficiently chain tools together has made the software world an awesome place for developers. As hardware engineers, we would love our field to benefit from this as well. That’s why we’ve made atopile’s core open source (Apache 2.0). We plan to generate revenue by selling entreprise targeted features, similar to GitLab.

We would love to have your thoughts on the compiler! What’s your story in electronics? What would you want us to build?

299 comments

[ 3.5 ms ] story [ 256 ms ] thread
Looks really useful! As a hardware designer I've had plenty of copy pasting bits of schematics to duplicate common functionality. Seems like this could be really helpful in preventing mistakes and increasing quality once used to it.

Have you got any plans for defined interfaces/modularity so devices using SPI, I²C, etc. can be chained together without manually defining pin connections? Also, will there be support for importing schematics from other formats?

We do have interfaces! They are super useful, I am very stoked that I dont have to remember which way around MISO/MOSI go any more.

Interfaces are just a collection of signals eg

  interface I2C:
    signal sda
    signal scl
    signal gnd
you can connect two together like so: micro.i2c ~ sensor.i2c

Importing schematics would be possible, but IMO not super valuable as all we could import would be the raw connectivity, a big benefit of our language is being able to add a layer of abstraction on that.

How does this handle connecting two microcontrollers with one being a SPI master and one being a slave? Or connecting UART between two devices?
Today, poorly. We just do a dumb matching of signal names. I imagine we will do something like add a property to the interfaces on each device.
Kicad allows you to keep a library of projects containing layouts and schematics of small circuits that you may wish to reuse in other circuits by just simply importing them to the current design. You can then modify as needed.
Indeed, Altium has similar features also. I think what has been missing is an effective way to collaborate on hardware projects as a community and be able to share them like you would packages on pypi or npm.
I love that this is human-readable plain text. Plain text is almost always the best format for anything.
Thank you! We've certainly been heavily inspired by python and Guido's insight that code is read more often than it is written.
Text puts the problem squarely into the sights of generative models.
Absolutely! With only a few dozen lines of context to pick up the syntax, copilot is already able to make useful contributions like configuring regulators and filters.
Maybe one day, but I’ve asked the various models basic EE interview questions, and it’s painfully obvious that while it can make a paragraph that has the right words, it’s incapable of reasoning spatially, or describing complex connections. My job is secure (for this year).
I have noticed a huge improvement in ChatGPTs coding abilities having an interpreter to check its work. I expect we will be able to bring a similar feedback loop to hardware once we can integrate things like simulation and equations. Also having modules that are tricky to configure incorrectly.
I’ve noticed the opposite with chatgpt.

To be fair, idk how much elixir code is in the training set.

yeah I have only really used it for simple python things, its pretty good at that.
The performance of ChatGPT (4) changes frequently. Lately it has been crazy good. I fed it a non-trivial but naïvely written (and thus slow) numerical algorithm written in Python yesterday. I then told it to vectorize, which worked and was both correct and several orders of magnitude faster. Then parallelize. Faster yet, and still correct. Pretty amazing.

Just an anecdote.

Worth noting afaik all kicad file formats were already sexprs, can't get much better than that.

In that vein, I'd imagine it would make lot of sense to build a lisp on top of that, macros and sexpr manipulation are very much the strong points of lisps.

Congratulations on the launch and good luck building a business around it! I remember running into you folks at OpenSauce last year and thinking just how useful it could be.
Thanks for the support! We will try get a booth at open sauce again this year. Hope to see you there :)
Very nice!

The state of electronics tooling has long been extremely bad - 99% of people who put a regulator into their schematic will want an appropriate input and output capacitor as the datasheet demands. 99% of people who put a microcontroller will want a crystal and a programming port and a reset pin pull-up. It's only because of closed source tools stuck in the stone age that the state of the art is to copy out of a PDF.

And multiple people working on the same design and merging their changes? Forget about it!

It'll be very exciting if we can move towards a more modular world, where designs can be composed.

For sure, we definitely subscribe to works out of the box / path most taken. We have been working on adding equations to our language so we can solve component values based on requirements like output current and ripple for a regulator to get cap values for example. I hope in the future our component models will capture a good fraction of the info you have to go to the datasheet for today.
Yeah, trying to learn KiCad is worse than learning Blender. If JLCPcb made a simple online editor that sourced from available parts and integrated directly with their store they'd be running out of banks to put their money into.
They do have this, its called EasyEDA. In my experience its not as good as kicad and definitely not as good as the 'professional' tools like cadence and altium. Our tool does basically do that though! We have a big library of kicad components that can be used in your designs as well as an import just about any JLC component just using its JLCPN. We love their service, would love to see that model proliferated to other companies also, so hard to beat having parts available and in stock.
Kicad is not that difficult to use. Sourcing parts can be though.
They do! EasyEDA, and have used it to make custom keyboard PCBs. It's pretty handy and I found the learning curve to be much easier than KiCAD, etc.
I learned kicad fairly quickly. I've tried several times to learn blender and failed. Then again I'm bad at art.
this resonates. i will share that i'm trying out and having luck with flux.ai. it's not perfect, but for a small hobby project and someone with little experience and not getting far quickly in kicad, it works. i have a pcb in-hand from jlcpcb right now and it works. it also introduces some of the shared features discussed above. (i don't work for them, just looking for something that would let me do a fairly fast PoC)
Oh now this one is interesting, I've given it a short try and the UX is just on another level compared to the usual, I might actually be able to get something done with it. This is what EasyEDA should've been, not the terrible KiCad web clone that it is.

For us hobbyists there's no point in investing years learning something proper like Altium because we won't ever be shipping to production or doing stupidly complex multilayer boards. We need the Tinkercad for PCBs, not Fusion360. Something that can be crude and oversimplified, but quick to use and also simple enough that even middle schoolers can learn it.

i've even figured out how to create a component that didn't exist in their library - a lot of the manufacturers/related appear to provide the symbol, footprint and 3d files to recreate it on flux. this is one for example - https://www.flux.ai/centplaids0u/oki-78sr-51p5-w36-c-1480 - a 12v to 5v voltage regulator. got files from here: https://www.snapeda.com/parts/OKI-78SR-5/1.5-W36-C/Murata%20.... Got it built into the board and it works! holy heck.

hope it works for you!

They did and there's even tools to import their component library into Altium or Eagle.
> Yeah, trying to learn KiCad is worse than learning Blender.

I dunno. I've used others, and KiCad was no harder to start with than the others (Horizon, LibrePCB, Lepton/gEDA, some others I forgot).

I asked for recommendations a week ago on HN for EDA products, and tried them all.

You know which one I eventually settled on? The one with the most components (symbols + footprints).

Turns out, features are nice (rules checker, etc) but not having to f*&^ing create my own symbols for a mass-produced part, then design the footprint for the same part is a huge timesaver.[1]

For many of us non-professionals designing a board, the UI just isn't as big of an issue as having to create our own components.

[1] At any reasonable hourly rate, having to create a library of just 1 component costs more than whatever you think you'll save with a slicker UI.

This. By FAR the most annoying thing of creating a simple PCB is dealing with symbols and footprints. Why the hell is this is not a solved problem.
Because every CAD, which has traditionally been dominated by commercial solutions invents their own file format for lockin.

On top of that semiconductor vendors don't want to hire people to draw symbols in every possible cad solution.

So you instead have them release symbols in some preferred tool, maybe they also outsource to third party services like UltraLibrarian. There problem with the third party services is they do the laziest conversions possible between format using scripting and often do a horrible job.

> Because every CAD, which has traditionally been dominated by commercial solutions invents their own file format for lockin.

This doesn't really explain why creators of new CAD programs (Horizon and LibrePCB are new) invent new data formats.

We've seen time and time again, in every digital domain ever invented, that the most important thing is the dataset.

It doesn't really matter how nice the library manager is if what it manages has limited availability - and no, asking for a community to pitch in and help with the duplicated work is not a solution.

The solution is to pick the largest library and use its format.

In our tool, just give it a part number and it will find and download the footprint and create an ato file for the component.

We currently support components on JLC, but eventually plan to build out a pretty substantial library. We will also capture a good fraction of information that you would currently need to go to the datasheet for.

I wanted to give your tool a good look before I responded, hence why I am responding so late.

Anyway, my 2c worth:

1.

> In our tool, just give it a part number and it will find and download the footprint and create an ato file for the component.

I don't think this is scalable (although, for my use, probably sufficient). There are just too many parts that are in existence, and the rate of new part creation is probably higher per day than your staff and/or community can handle.

It's fixable if you have plugins for each EDA tool's format (KiCad, Eagle, etc).

2. I'm very surprised at the language used - it's very unlike what is normally used (s-expressions) in EDA. Lisp-like languages tend to be highly used in CAD applications, so it would clear a lot up if you were to explain what the advantages ato are over a minimal Lisp-like language.

3. The dependency list (in terms of knowledge required) is a dealbreaker for me[1]. I need to know how to manage Python environments, the ato language and YAML?

Since all of the constructs in all of those languages are a subset of (or can be represented by) s-expressions, perhaps it would have been best if you switched to s-expressions only. Then a) there's only one language to learn, b) that language is already syntax-highlighted and c) it's flexible enough for any future features you want to add in (rules definition, rules-checkers, etc).

From what I can see here and now, the ato language would have to see significant changes if it needs to be used for some serious stuff.

Sorry for the negativity, but I wish you all the luck nevertheless.

[1] I looked for a download link, couldn't find one, read a few of the installation instructions, then gave up.

For sure, the way I see the component library is ability to capture progress. In the current paradigm how many times have schematics, symbols and footprints been drawn up for common ICs/circuits? I would expect 100s or in some cases many thousands of times. Our hope is by providing an open source and shareable format we can reduce this. If people really hate code and want to write a tool to convert to altium/kicad/cadence format, go for it! At the same time, I think the way we share component data is pretty dated, PDF datasheets do not adequately capture component information in a way that can be apples to apples compared in any automated fashion, best we have is something like a digikey search. In the future I would like to be able to have much more sophisticated requirements that automated search tools can use to help me find the best components for my use.

Not personally a fan of the readability of lisp, but that is just a personal preference. Our assumption is that python is going to be the most familiar language to our users and following a python like syntax will make picking it up easy. Our language is definately still quite immature and we are still figuring out exactly what it should look like.

There is definitely a little bit of a learning curve at the moment, we do have some getting started videos that walk you through the whole process. If there is anything missing or confusing, please point it out! We do want to make it as approachable as possible. It will only get better from here, I promise!

On the downloading, currently we have the package on pypi, which does make it pretty easy to install from a command line, but I can appreciate that will be new to alot of people. In the future we might do an executable download version.

We have a getting started video here: https://www.youtube.com/watch?v=7aeZLlA_VYA

We are very active on discord also if you get stuck or have any questions/feedback, hope to see you there! https://discord.gg/PBq4pS4K3p

For what it's worth I'm very happy you didn't go with lisp. I abhor s-expressions and think it shouldn't be used for anything except machine reading.
> It's only because of closed source tools stuck in the stone age that the state of the art is to copy out of a PDF.

Not really. KiCad is open-source and a very capable EDA suite, for example.

The problem is that it's a really hard problem for which no one-size-fits-all solution exists. There's basically an infinite number of properties which are important when designing electronics, many of which will have to be nudged depending on your design. Capturing all that in a data format is virtually impossible, and any attempt to do so is likely to degrade into something unusual quite quickly once you get past the trivial stuff.

In my experience reading it out of a PDF is usually not that big of a deal, once you get used to it. For things like schematics symbols and footprints there are data interchange formats available - and there's a pretty decent chance these days they'll be openly available for the part you are using. But they always contain mistakes, and I find it way faster to just roll my own from the PDF than to copy it ready-made from a 3rd party and fix the errors.

> The problem is that it's a really hard problem for which no one-size-fits-all solution exists.

Not really, IME.

Let's say I want a SMPS. Something basic, say 12-24v in 3.3v out at 1A. I can buy a module and solder it onto my PCB, or copy a reference design out of a PDF, or vendors like TI have tools like webbench to help me generate a custom design.

The vendor wants to hand me a proven design and have me buy their chips. I want to be handed a proven design and know my project's going to work right first time. But no, the likes of Altium have got to have their vendor lock-in by making copy-and-paste absolutely as difficult as possible.

There's no great skill or inventiveness in me drawing out the world's billionth SMPS design. I'm not "solving a hard problem" - it's drudgery.

> and there's a pretty decent chance these days they'll be openly available for the part you are using. But they always contain mistakes,

So you'd agree, then, that when a human copies from a PDF manually there's a substantial chance of them introducing errors?

Are you and I not equally vulnerable to making such mistakes? Frankly I find it absurdly wasteful that the industry has transistors in the same package but with different pinouts and the 'solution' to keeping this stuff in order is... senior engineers checking junior engineers' work against PDFs manually.

As an electronic design engineer, it just feels to me like these kind of things aren't really huge problems day-to-day...

In terms of decoupling designs etc., the reason nobody has come up with a better solution is firstly that it doesn't actually take up enough time in the scheme of things to bother, and secondly that you often have to deviate. For variable regulators for example, the output capacitor (and inductor if it's not included in the device) are chosen based on output voltage, the switching frequency you choose, and sometimes other variables. You often want to deviate from the recommended circuit in the application notes for various reasons.

I'd think of a circuit board production as more like putting together a magazine than working on a software codebase, where you'd have a bunch of people working on overlapping parts of the code.

I mean even for a lot of boards we do (even quite complex ones) we'll just have one design engineer and one layout engineer, but for things where multiple people work on the schematic we just have people work on their own sheets and then somebody brings them together into the final design - kind of like where you might have an overall designer/editor that pulls a magazine together but individual people having put together individual articles. But it's pretty common that it would still be mostly laid out by a single engineer unless you're doing something extremely complex...

We have some plans and atopile already supports some configuration regarding those deviations. There's a component selector which can choose resistors, caps, inductors etc... from a database of known components. Currently it's a free-for-all, but naturally we expect to be able to constrain this to a subset of components like "thing we already use at this company". That database means (once equations are also in) we'll be able to capture those requirements and change those output components depending on the scenario.
The Net-list stage of abstraction is the easy part, but auto-routing is not.

People have tried many times to build a universal router with physics awareness for decades. The issue is in the real world there are countless edge cases where the EE must make a decision on the layout.

For low speed digital design... routers have partially worked since the 90's, but for most other things the edge cases make it counter-productive to automate.

EEs are good people to have around, and some know how to build things reliably.

Have a wonderful day, and I really hope the project does well. =)

For sure, we are starting with the schematic/requirements side of things and will push in the layout direction soon. We have started with some simple layout snippet reuse that is available today. My experience with autorouters is they do not have a good understanding of the problem, we hope to improve that by being able to capture more information about the circuit, for example physical values like voltage and current are captured today.

Our goal generally is to automate tasks that are boring/repetitive like multi-day reviews of big schematics to see if anything accidentally changed. Definitely building a lever for EEs, not a replacement.

Thanks!

Agree, I wish them the best of luck — I’m not convinced a computer will ever beat me in the single-sided perf board niche, and I’m but an amateur, but I’d be happy if one did.
You might be right, dont think we will be tackling perf boards any time soon :D
Why ato over existing hardware description languages or things like SPICE (and it's many derivatives)?
Great question! Current HDLs tend to primarily be focussed on digital circuit design, while at the PCBA level, there's a lot more focus on the "fuzziness" of the physical world (eg. tolerances).

We also noticed that most EEs we've worked with were a bit put off by the syntax and preferred something a bit more terse, but more intuitive and easier to read.

There perhaps an analog here in software - where we started with assembly (~ SPICE), moved up through things like C and now languages like Python and JavaScript are prolific and accessible.

First off - best of luck to y'all. The HW EDA space is sorely in need of tooling improvements. I'm curious as to how your product differs from JITX. They claim the same sort of thing - code based PCB development. And they've been around for a few years now.
Thanks!!

The open source aspect was really important to us. We are hoping that ato modules can become a convenient language for the community to share modules with each other, in a similar fashion to python and pypi.

Having an open code base also makes it more convenient for our users to chain tools together. This is currently hard to achieve with the existing close source standards we are dealing with in hardware.

ato is also a markup language (like markdown or latex) more than an actual programming language. We think this makes it more readable and helps guide the user writing code that compiles.

Part of the magic here would be to get your team's hardware engineers to adopt a more software development style workflow.
Indeed, the ability to branch and merge is a pretty exciting concept for me as a hardware designer. Another simple one is building artifacts in CI and doing quality checks, I have make some silly manual errors that have been very expensive during export.
This is very cool and the concept is something I've been wishing on for a while. Unfortunately I work in an enterprise type of design team. I'm a software developer but our hardware team has standardized on Cadence tools and are pretty dug in on how they work, which is kind of opaque to us software guys.
The core compiler is open source so hopefully the stakes are low to start using it on non-production equipment like test fixtures, bed of nails, quick prototypes... Based on experience using the compiler on those project, it could be transitioned to higher stakes designs.
I was a designer at a big company in my last job. Many of my colleagues shared the sentiment that the tools were trash, I think people just need an exciting future to rally around. I think being able to link across disciplines is super exciting also, firmware and hardware can be versioned along side eachother, no more checking schematics for pinouts and meetings about which pin which signal should be on, just put up a PR, have both hardware and FW teams review.
> Another simple one is building artifacts in CI and doing quality checks, I have make some silly manual errors that have been very expensive during export.

I set up a CI pipeline for the hardware company I worked for. It automatically generated things like gerbers and board renders for each commit, and made them available as PNGs. I added a little tool which made it really easy to view the results side-by-side, and see both the front and the back. It definitely saved us from some really expensive mistakes a few times!

Could you please explain the difference between Atopile and Jitx (https://www.jitx.com/)? Both seem to provide software-defined hardware development.
We are taking the open-source route (eventually moving to open-core). We think a big part of moving the industry in this direction is building a community around it, much like the way Github started out.
Our language is also a markup language more than a programing language. The goal here is that we would want the code to become a description of what the circuit is, instead of how to obtain it. The obtaining part is the job of the compiler. Not the human.
Please forgive me if you know this already, but just in case: the terms Declarative and Imperative may be useful here.

Declarative: the code describes the desired result.

Imperative: the code describes the operations to take.

Most programming languages are Imperative, but some are Declarative, and some allow a mix of the two. More here: https://www.educative.io/blog/declarative-vs-imperative-prog...

Thanks for sharing the docs! Our language is mostly declarative at the moment. There are some features we discussed that would be imperative and we might introduce them in future versions of the compiler.
Hi Tim,

I'm just starting with electronics, following the Make Electronics book with my kid. And this seems super useful to understand circuits better (at least for people who code), do you have the plan to make a series of lessons for beginners with the app? Like going from the simple battery-led to complex things? Feel free to email.

Hey!

Really love that. My dad gave me a piece of wood with some basic components like LEDs, motors, resistors and light bulbs and a battery that I could connect those to and understand how they worked. Glad to see you are doing something similar :)

We do have a couple videos and certainly plan to make more: - Get started guide: https://youtu.be/7aeZLlA_VYA - ESP32 module: https://youtu.be/eMWRwZOajdQ - Logic gates kit: https://www.youtube.com/watch?v=hSeDv3QqRc0

We are also hoping for the package registry to become a place where you can get access to pre-designed modules to put together into a circuit: https://packages.atopile.io

Feel free to reach out per email or discord if you need help setting things up!

Yes yes yes! I love it when people make the things I think would be a good idea, and then stay on the hobby project idea list for years to come. (I'm struggling to make that not sound sarcastic - maybe it's just my British reading! - but I really am sincere.)

When I was thinking about it, a couple of further directions I had in mind were 1) ecosystem/library/sharing of modules, so something like the voltage divider example is not something you'd need to do (even once) for every project; if it really took off the pipedream would be that application notes examples were just provided as modules, so you could take whatever IC wnd just import the module if you were using it in a standard way; 2) if you did a similar thing for layout constraints, you could then have that as part of the same module, and when you compile the whole thing (in hand-wavey generalised theory if sufficiently constrained) you could generate the overall layout for a project with say a SMPS and also sensitive analogue circuitry in a way that makes sense without either of those modules having to know that the other is in use, just because they have rules like distance from transistor, bypass cap to IC could be fully constrained, so you always get exactly the same sensible-looking layout, etc.

Anyway, looks great, I look forward to trying it properly some time!

Specifically on the layout section, I have been thinking along the lines of start with sensible 'seed' layouts that users will contribute, then mutate the layouts with a physics driven solver. Imagine links between components as a spring and repulsion forces to model creepage/clearance distances, you could imagine the layout warping into a suitable shape for your board. I am pretty excited to get to this bit.
As someone who just taught themself Kicad to make a simple MIDI controller PCB usi an STM32F4, I was totally blown away, coming from software, how "manual" everything was, how abstruse and arcane.

It's quite difficult as a beginner to know that a design is "correct", or perhaps "correct enough", with respect to component placement and EMI.

It seems like even top EE who specialize in board design utilize rules of thumb rather than rely on simulation.

I was also blown away that the state of the art autorouter for traces seems to be from the early 2000's -- no recent AI magic going on here.

Where is my "autoplacer"? It seems like an AI trained on millions of schematic/pcb combos, even just gerber files via image ingestion, ought to be able to generate a pretty decent layout + routing given constraints.

Or perhaps I'm spoiled coming from software and web because it's so much further removed from physics. But it's still the case that there are a ton of modular components with "API's" that should have a templating language, so very much bravo to this project.

Thanks for the support!

For the autolayout part, one thing we realized is that it’s very hard for a computer to do a good job at it when there is a lot of implicit requirements that are not baked into the schematics. We are hoping that by capturing those through code, auto layout can be improved.

On the design check, we aren’t doing a lot there for the moment but the comment above also applies: if you have clear requirements in the code, it becomes easier to test if the solution fits those requirement.

Yes, it is like 90% rules of thumb and experience. The reason being simulation is expensive: not just in the software itself, but in the time it takes to learn how to use it, set it up for a particular design, and then run through it and understand if it's actually reflecting reality or not. I've been working on some projects where we really care deeply about noise performance, and even the super-expensive packages which exist (which we can't really afford) don't seem to actually be able to answer the questions we have about the design. Autorouting is similar, autoplacing is basically a disaster here.

I am confident a lot of this is an accessibility and UI issue: if you want to disrupt this you could focus on making simulation and auto-placement tools that are cheap and actually usable, and help inform the rules-of-thumb. But that's a very big investment and mostly orthogonal to making a different way to specify your netlist.

We share similar thoughts about the core of the auto-routing/placement/simulation issues being UX! We're a bit more bullish on code being able to fix that as well.

Noticing that these tools are infrequently even configured because it's simply too much of a pain to do so for every new design - we're hoping the expressive, reuse-focussed code-based-approach means people need to capture these things once and then everyone gets to reuse them.

This is all a while away, but after we're able to get design currently captured in schematics working smoothly we certainly plan to tackle auto-routing/layout as well

> It seems like even top EE who specialize in board design utilize rules of thumb rather than rely on simulation.

Yup, almost 100% this. Most parts of most boards are pretty trivial, and the design decisions you make don't really matter all that much. Unless you're working at a company the size of Apple, it really doesn't make sense to spend several hours of engineering time to figure out if that $0.001 decoupling capacitor is really needed.

And in the end it's often a lot easier to just build the thing and test if it works. We see the same in programming: it's technically possible to mathematically prove that some programs are correct, but in practice you can get 99% of the way there for all programs in a fraction of the time by just writing a bunch of unit tests.

Simulation is definitely done, but it's limited to the really hard stuff like antenna design or high-speed signalling.

Absolutely love to hear that!

100% agreed about the ecosystem too. We've already created a perhaps-too-scrappy package manager, but it works! https://packages.atopile.io/ We're pretty convinced that the awesomeness of the software ecosystem is a function of its openness and open-source and atopile largely came from working out how we could seed a similar shift in the hardware world. I can't wait for the day I can `ato install` SMPS, filters, radios and servo-drives with the confidence they'll just work!

I think you should do one thing really well, before expanding.

Import from public GitHub libraries could be fun.

Differential pairs.

Impedance controlled traces.

Going further, if I have one supplier's stack up with controlled impedance lines, and I need to switch to a different supplier's stack up, what netclasses would change?

I do agree. The package registry (https://packages.atopile.io) is an attempt at importing from existing GitHub/GitLab ato projects. This will need quite a bit more polish until it gets to the level Rust's crates.io or python's pypi.org

On the language side there are additional features we would like to work on like traits and types (types would include diff pairs and impedance).

It reminds me of the Akka Graph DSL[1]

[1] https://doc.akka.io/docs/akka/current/stream/stream-graphs.h...

Interesting! Haven't come across it before but those linked `~>` operators do indeed quite familiar. If you're familiar with GraphDSL do you have some elements we should look into?
I've only worked with Akka Graph DSL to build some data pipelines or protocol stacks. And I've loved working with it!

The equivalent of atopile signal would be port with Akka I think. A combination of ports gives us a shape. A source shape is just one OUT port. A flow shape is one IN and one OUT port, etc.

I'm very new to electronics so I don't know if it makes sense, but connecting all these ports with directional arrows was really helpful to understand the data flow.

By reading some code here https://github.com/Timot05/logic-card/blob/main/elec/src/log...

I wonder if with directional arrows, instead of writing "out ~ switch.in; switch.out ~ power.gnd", we could write "out ~> switch ~> power.gnd" instead?

But without distinction between in and out ports it may not be possible to check if connections are valid ones.

Anyway, this project really makes me want to learn electronics! Congrats!

You're absolutely right! We've been thinking very similar ways about "dipole" components and how to best do this; and I think you've nailed it. What about using dunder __in__ and __out__ attributes? Easy enough to implement for us and overload for folks in the future.
One thing that surprised me when moving from mechanical CAD to EDA programs is the lack of "relations." I have not used the more professional tools, just KiCad, but it surprised me that there are not more variables, relations, constraints, subassemblies, for things like buck converters and these types of things. KiCad has 'netclasses' which let you set trace widths, but it's all manual, same with the design rules checker. Each vendor seems to have their own design manual for these things, which is nice to have but so tedious -- I have to read a PDF to know what size decoupling cap goes with this IC? Why is that information not encoded in the footprint somehow?

I understand that auto-routing is not a solved problem by any means, but there should be more efficient tools to make it easier. I shudder to imagine laying out some big LED matrix without more advanced tooling.

For sure, its a big benefit of using language, it is comparatively very fast and easy to define custom relationships of component values, trace widths etc that would quickly become untenable in a point and click tool. We think the path forward is to be able to encode the governing equations that you would get in say a buck controllers data sheet directly into our source code. That way from a user perspective you can define your circuit simply by importing modules, defining them (for example input voltage, output voltage and current) we can then solve the component values and pick them from our component database for you. One of our early users wrote a plugin to do LED arrays in an afternoon. Our compiler is all open so its pretty easy to add on custom scripts for whatever you might be wanting to do.
look at OpenSCAD, it's a scripting language to generate models. I used this a lot to generate subpieces and build off of that. easy as saying Bolt("M5", 1.5) or something
Ya OpenSCAD is great for in/cross project re-usable components.

The only issues I've had is how it outputs circular things for cutting - it does a series of polygons (configurable number), rather than an arc/circular - places like send-cut-send won't accept it, claiming it causes issues with their machines.

Old issue, but annoying nonetheless. Less of a problem when outputting STL files (for printing) which only support polylines and not arcs/circles. Funnily enough, 3D printers nowadays support arcs natively in G-code, so some slicers support detecting rounded polylines and converting them back into circles or arcs.

Found a script[0] that does this for DXFs in a github issue[1].

[0]: https://github.com/nophead/Mendel90/blob/master/dxf.py [1]: https://github.com/openscad/openscad/issues/4605

I actually opened that issue - I'm ukd1 on github too. I looked at fixing it at some point, but it tbh didn't seem that easy or like they had time to help, I should probably revisit. The script I couldn't get working right last time I tried, but I should give it a re-look!
I have used it, I think its great. I am excited to see whole products defined in code.
I found OpenSCAD's 3d model representation to be very challenging for anything complicated. I used FreeCAD, which is scriptable, but also uses a brep representation instead of CSG, which IME works a jillion times better.
As a regular OpenSCAD user, I wouldn't bring it up as a good solution for anything. It exists, you can solve problems with it, but it isn't a good design. It should just be a library in a real language.
> It should just be a library in a real language

The last thing I want to worry about is having malware in an M5 bolt.

From a security perspective, it does help that ato is not executable!
I've found CadQuery to be a pretty good replacement for my purposes, but I haven't done anything complicated with it yet, just designing 3D printed/laser cut electronics enclosures.
I'd like to hear the opinion of Lady Ada on this - one of the industries greatest hardware designers.
So would we! I think we are trying to do much the same things, make hardware design faster and more accessible.
> one of the industries greatest hardware designers

Is this meant sarcastically?

>>Is this meant sarcastically?

No I don't mean it sarcastically, why do you ask? Do you not see Lady Ada as a shining light of the industry?

Lady Ada is one of the industry's greatest hardware designers and I would value her opinion on this.

If you don't know who she is, her name is Limor Fried and she founded AdaFruit.

I don't have current stats but from 2016: Revenue US$45 million (2016)[1] Number of employees 105

Front page of Make Magazine:

https://blog.adafruit.com/2017/05/08/limor-ladyada-fried-on-...

Front page of Wired:

https://www.wired.com/2011/03/wired-magazines-cover-features...

Front page of Smore magazine:

https://www.adafruit.com/product/3920

Front page of Hackspace:

https://www.flickr.com/photos/adafruit/40061387915

By "industry" you mean "electronics hobbyists"?
I oh see you are wanting to diminish her capabilities for some reason.

I'm not interested buddy, you can take your sneering elsewhere until you show me the multi million dollar company you have created, the hundreds of commercial quality boards you have designed and sold for real money, the driver software you wrote to make them usable and the industry accolades you have received - on merit.

She's a solid entrepreneur and a competent engineer.

Calling her "greatest" seems odd, for implementing breakout boards with datasheet circuits.

I agree. She's really great for hobbyists and for prototyping. She's done a ton to help beginners. And Adafruit is a very interesting company. I seriously admire her. But as to the original claim that she's "one of the industries greatest hardware designers", when you look at the electronics industry on a whole (an industry where people design incredibly complex things that are used by millions/billions of people), her _designs_ are nothing special.
> and sold for real money

"Lady Ada" and Adafruit certainly are good at price gouging. They often charge exorbitant prices for the same stuff we can get elsewhere at a fraction of the cost. No, providing datasheets and some instruction isn't enough, there's a thousand other sites with better instructions in most if not all cases.

As far as I can tell, Adafruit doesn't price gouge. More expensive than some other US places, sometimes, but usually not by much. Sometimes they're cheaper than similar US places.

The only places that sell same or similar items for drastically less than Adafruit are places like Aliexpress (or the same foreign sellers selling on Ebay), and there are many reasons why Adafruit is more expensive than those places...

Some of the stuff Adafruit sell is likely sourced from Aliexpress (or perhaps from Alibaba if they're buying in large enough quantity) and is indeed priced higher at Adafruit, but that's because if they price it the same or lower they make no money. So we know for those items, they must mark them up. But how much they need to be marked up is kind of complicated. Buying lots of things in order to resell them is more complicated than buying just one or two things for yourself, especially when the seller is on the other side of the world. Simply put: there's a lot more overhead when buying for resale that you don't have to worry about when buying low quantities for yourself. One big difference is that they need _reliable_ suppliers with large quantities consistently available, and those are rarely the same sellers selling things for pennies. (I could go into more differences, because there are many, but this reply is already getting pretty long. Ask me if you want to know more, or google for info about how to open and run a retail business.)

Also, bear in mind that some of that stuff that you can get elsewhere at a fraction of the cost than Adafruit are actually Adafruit's own designs being directly cloned, like a lot of their breakout boards. In those cases, you really can't blame Adafruit, since the reason those items are cheaper elsewhere is because someone's specifically trying to undercut them (often at the expense of overall quality and sometimes even at the expensive of authentic correctly-working parts).

>As far as I can tell, Adafruit doesn't price gouge.

They charge ridiculous prices for LED strips, the same strips you can get anywhere.

Here's one example:

https://www.adafruit.com/product/1461

Black LED strip. 60 LEDs/meter.

1 Meter = $24.95

4 Meters = $99.80

And they advertise 4 meters as a "full reel" when everywhere else 5 meters is considered a full reel. What jerks!

Same exact thing, except 5 Meters, $22.99:

https://www.amazon.com/LOAMLIN-WS2812B-Individually-Addressa...

So, let's calculate this price gouge.

Adafruit price per meter at 4 meters/roll = $24.95

LOAMLIN price per meter at 5 meters/roll = $4.60

Adafruit is charging 5.42 times the price.

And if I want to wait a few days more to get it delivered, Aliexpress has the same thing for $11.26 per 5 meter roll!

https://www.aliexpress.us/item/2255800689099192.html

Every LED Adafruit sells comes from China, they do not make their own LEDs. They just mark up the price to a ridiculous extent and they prey on well meaning but clueless electronics hobbyists. There are many other examples, but I think I've spent enough time on this topic.

As I noted "Buying lots of things in order to resell them is more complicated than buying just one or two things for yourself". Both of the links you provided to cheaper sellers are not set up for bulk sales. The one on Amazon has a link for buying in bulk, but that only goes up to 999, and if you put 999 in for the quantity in their bulk page, it won't let you because they only have less than 100 pcs available. And the aliexpress link has a hard limit of 1 per customer. These are not reliable wholesalers, and when you're sourcing for retail, you need reliable wholesalers. When you're sourcing wholesalers for retail, you need someone that you can buy from in bulk repeatedly. Often you also want a wholesaler who'll let you set up payment terms (net-60 is pretty common) so you don't have to pay for the inventory up front. I'm fairly confident that if you looked and found a bulk wholesaler for this item that offers terms, the per unit cost is going to be closer to the Adafruit price than to the Aliexpress price you quoted. And then Adafruit marks it up, not to "prey on well meaning but clueless electronics hobbyists" but to cover the costs of doing business, like any retailer. These costs include shipping-from-wholesaler, warehousing, preparing when the item purchased is not in the final sellable state, adding photos and copy to website, adding educational resources, etc etc. Some of the costs are one-time costs and some are ongoing costs or recurring costs. Running a retail business isn't cheap, especially in the US. Note that LOAMLIN and Xnbada (the two "companies" behind the links you provided) have zero web presence beyond storefronts on Amazon and/or Aliexpress. I can't even tell you where they're shipping from (though it's highly likely it's China or somewhere else where labor is very cheap), let alone who owns/runs them. There's no accountability whatsoever besides the comments on their listings, which doesn't mean much these days. There's no product support besides _maybe_ being able to return (to China?) for a refund. If you're OK with all of that, then yes, buying from them makes more sense for you. But that still doesn't mean that Adafruit is price gouging.
Nice goalpost move.

>I'm fairly confident that if you looked and found a bulk wholesaler for this item that offers terms, the per unit cost is going to be closer to the Adafruit price than to the Aliexpress price you quoted.

Confidently incorrect.

We're talking about Adafruit gouging hobbyists. Not wholesale bulk purchasing.

For the average person buying a few or a dozen rolls of LEDs, Adafruit is the worst possible choice of vendor. Paying ridiculous prices for the same exact product is insanity.

Your tome trying to justify it is just tl;dr; nonsense. I'm sorry but it just is.

>But that still doesn't mean that Adafruit is price gouging.

Yes, they definitely are price gouging, and your mental gymnastics don't change that at all.

We're really done here, you obviously have an agenda and no amount of obvious proof will convince you of anything that might shatter your nonsensical world view. I'm not interested in you moving goalposts anywhere you want to win pointless internet arguments. Have a nice night.

I'm not moving goalposts. For this entire time I've been trying to explain why a situation can arise like this one where Adafruit, a US company, ends up selling something for more money than some no-name Chinese sellers, and that it's not price gouging just because they're selling it for more money.

The only explanation I can think of for your strong opposition to what I'm explaining is that I think you might be working with a different definition of "price gouging" than is commonly accepted. Price gouging is when a seller raises prices unnecessarily due to an increase in demand or a decrease in supply (like when some places raised the price of toilet paper early during the covid pandemic). I've repeatedly tried explaining why that is not what's happening in Adafruit's case -- Adafruit's prices are a result of the fact that they're a very different business than no-name Chinese sellers on Aliexpress and the costs that they're getting goods for can be higher due to their needs (this is why I was talking about the wholesalers that Adafruit deals with). It's perfectly rational and not "mental gymnastics" -- this is common business. This is also why most stores that are not national chains have higher prices than national chains (and Amazon, for that matter, though that's messier since they also have third party sellers). Again, this isn't price gouging -- they just can't get the goods they sell for as cheap prices as national chains.

>and that it's not price gouging just because they're selling it for more money.

We're not talking a few cents or dollars more. We're talking about more than 5x more the price of what they actually should cost.

You can call it whatever you want, but Adafruit prices are ridiculous. I gave one example of many. Go ahead and throw your money away if you really want to, I don't care.

You absolutely are doing mental gymnastics to try to justify 5x price difference, when they get the LEDs from China. It's the same stuff.

Nothing you can do can explain this, so just give up. I'm done with this, you're wasting my time with your tl;dr;s

Adafruit breakouts, libraries, and other various components are often leveraged at early prototype stages in general industry.

That is unless all you do is high speed FPGA work and that's all you consider to be "industry".

I think a compiler for PCBs is a great idea!

Are you fully open source today? How has the community aspect been going?

I bet you do ;) We are fully opensource today, but we will eventually have some features we sell to enterprise. We have a small community of mostly friends at the moment, we are hoping to grow that very soon now that we have something we believe is worth sharing!
I've been doing a lot of selling to enterprise recently - mostly US based. Let me know if I can be of support!
For sure, would be awesome to have a chat some time!
Is this related to skidl https://github.com/devbisme/skidl ?
Hey,

We did use skidl for a little while as we were figuring things out (see a project here: https://gitlab.atopile.io/pew-pew-and-friends/sizzle-sack). But we later ended up moving away from it towards ato for mainly two reasons:

- Baking a description of a circuit into python describes how to obtain the circuit, but doesn't really describe what the circuit is. Skidl projects quickly become hard to read. The user is also not guided towards writing code that compiles since you need to deal with all the complexity of Python as well as the circuit itself. - Contributing to the project and adding features was non trivial

I'm curious if you have component checking - does the circuit overload the regulator? am I going to overvolt this capacitor? what is this LED's lifetime? - or if that's somewhere on the roadmap?

I'm also curious if you're able to use an autorouter to minimize board layers. Seems like it should be pretty straightforward to apply some graph theory to this and state the minimal number of layers for a given board, but this also might be NP-hard? I haven't kept up with the theory here.

We have some basic component parameters that we can define, like value, dielectric and voltage rating for capacitors. I think these become much more powerful once we add in equations to help relate these values and link them together. For example if I configure my powersupply for a 12V input, the tool should know that the capacitors need 12V * some safety factor of rating.

I think I see the entry point for auto routing to be taking advantage of the fact that layers have become pretty cheap (atleast for prototyping) and engineering time is the expensive bit. If the tool can help me layout a board in half the time, particularly for test hardware or the likes, that would be huge. Eventually I think we will get to a place where computers will do a better job of layout than most people, but thats a ways off.

Very neat, nice work.

I tooled around with a similar idea sometime back. There are clear advantages of code over graphical-schematics when it comes to automatic generation of component values / re-use of elements / speed of development / automatic SPICE testing / etc.

The primary issue I ran into was that: electronic circuits are inherently graph-structured and the traditional circuit schematic is well suited, optimal even, for displaying this kind of information. Trying to understand an analog circuit that is described as code seems awkward.

Yeah we did run into a similar issue. Someone designed a power supply and it wasn't immediately obvious how the elements of the circuit were hooked up in ato.

I think a viewer would be nice ultimately. But we haven't exactly figured out how the solution might look like. ideally something that allows you to create datasheet-like snapshots of part of your design?

A nebulous description of my ideal setup would be something like this:

Side-by-side schematic symbol view / code view that are actively synced to one-another in real-time. Schematic view allows basic arranging of parts, editing interconnects, triggering jump-to-reference within the code view, adding probe points for SPICE, displaying SPICE output graphs. Code side does all the heavy lifting like creating new parts, scripted behaviors, editing component values, all the cool shit that would be a nightmare to sort into a GUI.

Much easier said than done, of course.

Yeah the side by side thing makes sense. Especially for very low level or analog designs. But in some cases it wouldn't be desirable to show the whole circuit. Say you are dealing with a module that has been characterized and that you know works. In this case, using a language server or a linter that shows you available interfaces might be easier to use.

For the spice graphs, having a jupyter notebook-like interface would be great to document why your design looks the way it does.

If you have specific ideas or drawings of how this might look like, please send them over in our discord server :)

This has sooo much promise, I can't describe how excited I am and will definitely be contributing if I can.

This would make it easy to implement a fancy optimizer. Each component tends to have certain acceptable thresholds for their dependencies like input voltages, current limits, external resistor/capacitor/inductor values/ratings, etc.

Then, each component could have different implementations. You can have different manufacturers produce the exact same inductor/capacitor/resistor in different packages. You can link it up to your existing BOM or hook into vendor APIs to get pricing.

Imagine optimizing for cost, removing redundancy, simplifying footprints, and prioritizing in-stock inventory over new order components.

This could be a huge deal, looking forward to its progress

We have been working on an optimizer for solving components that we will put a post out about soon. But the gist is figuring out which constraints are expensive, for example a precision inductor might be quite expensive, but a precision resistor is comparatively cheap. We can look at where to shift precision in your components to get the desired output for the lowest total cost. We already do a few things like prioritize in stock parts with high availability. I am excited to add more constraints, like board area, multi-sourcing etc.
LOVE IT LOVE IT LOVE IT!!!

I'm doing a lot of home automation work, and I absolutely hate that I need to use breadboards, hunt for pre-assembled components, or to spend days designing a PCB for simple things like relay modules with customized IO.

E.g. I have ratgdo for my garage door opener, but its power supply is an ugly buck convertor taped to the box. I'd love to just re-make the ratgdo board, but with a built-in 12V-to-3V buck convertor.

I tried that, but PCB manufacturing with custom component placing requires just too much work.

Is there a way to donate to the project? I'd love to support it.

Forgot to reply to the support aspect:

Best way to support us right now is to try the project and give feedback on where you'd like to see this going. The project is open source so feel free to raise issues or contribute as well :)

This is a great start, well done!

Eventually it would be amazing to import (for example) a buck converter circuit with a wide voltage input, fixed output suitable for RF, and have it automatically check available components at JLCPCB and then lay it all out with, adhering to best practices (ground planes & capacitors right next to pins etc.) If the available components change, it can tweak the footprints and layout without having to start from scratch.

Good luck, I’ll be following closely!

For sure the goal! Our current component tool will find components that are available on JLC, in stock and to your spec, no more looking for resistor part numbers. The layout side is going to be exciting, we are just scratching the surface there.
Reminds me of openscad - https://openscad.org/ but for circuits instead of shapes. Turning complex wysiwyg editor operations into reusable code is such an improvement, especially with the advent of usable LLMs to help with boilerplate.
I do agree. Though it is interesting to try figure out why openscad (and similar projects) haven't become more prominent in the industry. It feels like some aspects about code to hardware have to be tweaked for it to become the standard way to design.
I think this is a wonderful idea and begins to create a foundation of data richness and interoperability for a very exciting new approach to PCB design, as I commented elsewhere in this thread

However I do want to mention that I think it might be necessary to be able to "cross-compile" to visual schematic format, and back. Or perhaps there is an open schematic tool that can be extended?

The issue is that I think electrical schematics are significantly more familiar to EE types, contain more legible information. Instead of reinventing the wheel there, it'd be nice to see a system that can switch back and forth between text and visual schematic.

How are schematics described as files currently? Is there an open standard? Can it be converted to atopile format, and back?

Yeah that’s an interesting aspect. We did implement a viewer very early on. And we then removed it from the project.

What we discovered is that:

- making a visual viewer is a non trivial endeavor. It takes a lot of time but the value add is marginal for an average viewer. - people tend to spend a lot of time making the viewer look good instead of improving the circuit

We think that in the long run, a viewer could be awesome to inspect what is going on or get a general understanding of the circuit. But it’ll be difficult to justify the time spent on it early on in the project.

Worth adding, we have found much higher returns building tools to solve the problems that a visualizer would normally help you with in other ways. For example ERC checking and modular abstraction of circuits. Working at a 'block diagram' level is much more intuitive than at the net level in my experience.

We also think that there might be better and more interesting ways to view your data, for example maybe you want to just see all the power paths through your circuit, or investigate how a signal travels from your input to your adc through filters, protection etc. Often on big designs these things might be strewn across multiple sheets and a bit hard to follow.

As a novice, a viewer would be really helpful to me to understand what it's actually doing. I did bookmark this for the next project I have in mind.
I am definitely curious for feedback from people after using it for a while. I felt the same in the beginning, but after writing a fair bit of it, I rarely find myself wanting it. I could imagine for more casual or new users it could be helpful at least for the transition.
I was thinking the same thing (I'm an EE by day). I think this idea is very cool, but since the dawn of time schematics and PCB layout have always been visual because you are actually building a physical thing. Its easy to see hardware bugs in schematics visually. However, it might be very hard to track it in code, unless the code is one day smart enough to find the bugs for you. You have to hold more context in your head that you cant export to your visual senses when its written as code. You cant see the actual circuit flow.

edit: just wanted to double down on this being very cool though. i dont mean to deflate this project and I'm about to design a pcb for a personal project - I might give this a go for fun. the promise is there and asthe project and feature set grows i can see it being the way forward.

We do agree. We built an early version of a viewer in the project but later moved away from it because it wasn't good enough to interact with. We might come back to it with something that is more targeted at inspecting only sections of the circuit or provide a block diagram level representation. But we don't think that just outputting a schematic the way they look today is the right solution.
You might find this a stumbling point for adoption. My first thought is this could be a good tool for me to use, but how can I send a design to someone else to get feedback on if I’m not going to expect them to also also learn how to use this or how can I get my design manufactured if the tools can’t export out the, normally very visual, layout files.
I do think that is fair. The reason that we don't have a visualizer is not that we don't want one, but rather that the value to effort ratio is quite low (and really because the effort is high, not because of low value). I'm sure we'll get there at some point. But at the moment there are more pressing issues for the people who are ok dealing with no visualization (like typing, language server, equations etc...).
I’d definitely consider not letting some basic visual schematic outputs fall too far down the priority list.

A lot of existing EE is basically just the visual diagrams and a lot of existing EE people will expect the tools to give them the visual diagrams they work with somehow… like even just including the compiled schematic as an SVG in with the compiled outputs of netlist, gerber, etc… something that other software can be used to convert to PDF without extra complexity in your tool and can be used to interoperable with the existing talent pool of EE people who have not just no idea how to use your tool… but know how to read typical style circuit diagrams.

I worked on this for a little while myself.

It wasn't so much "pc board by code" so much, but it was more a "pc board by CLI" approach.

And by that what my goal was, was to offer primitives and utility functions that would build the board up over time, but it was to be done incrementally in a Lisp REPL.

My use case scenario, was ancient AutoCAD.

Back in the day, while you could hook up a tablet or other pointing device (I'm talking pre-mouse here) to make AutoCAD drawings, a lot of it was done simply through typing in commands, in AutoLISP.

(lineto 100 100) kind of thing. And the drawing would appear on the screen over time, you'd save the data model, and manipulated with the REPL. If you wanted 10 lines:

    (dotimes (i 10) (let ((x (* i 10)) (y 100)) (line x y x (+ y 100)))
(HN does not have a paren matching editor, apologies...)

Where it broke down for me was coming up with a graphic rendition using CL.

If emacs had anything reasonable regarding graphic support (its SVG support is Not Good), I'd have done it there.

Rethinking it, it just occurred to me I could have probably gone a good way using ABCL in a Java GUI shell.

But the key point is that I think using a REPL for building up something like a circuit can actually work, actually be efficient for users, especially if it's extensible (i.e. (defun grid ...) ). Especially a hybrid (like clicking on a line pastes an identifier into the REPL).

My experiences with KiCAD drove me down that mad hole.

I have found taking a 'functional programming' like approach, where you build up your circuit from small blocks with specific functions that are easy to hold in your mind and then building up by combining those. For example instead of sticking a bunch of resistors and caps in your top level file, you can abstract them into their functions like a filter, resistor divider etc. Very curious to get your thoughts on using the tool!
I agree - also an EE - and I think it is similar to 'programming music' packages like Sonic Pi. If you are used to reading and writing standard music coding will be an odd and difficult change. Right now we have a comfort for seeing the layout and such physically, and since that is how we manufacture it this is going to be an output anyway, but there is some future world where it is all put together automatically within the requirements we specify and we have an entirely new way of designing circuit boards. Each component would come with not only a footprint but an array of basic design implementations that would mix and match with others.. autorouting on steroids of sorts.