Lurker News
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?

Comments (292) 77 threads

Earlier comments
tgirod1 reply#
Nice project! Coming from computer science, I've been dabbling with electronics a bit. My path so far has been (sorry if I'm pointing the obvious):

0. computer science
1. arduino programming + very basic circuits
2. adding a few chips and talking to them through I2C/SPI: still in digital circuits territory, sending 1s and 0s
3. designing my frist PCBs with kiCAD: a huge learning step, and things start to get a bit messy (component tolerance, transmission delays ...)
4. looking at analog circuitry / alternative current / signal processing : a HUGE uncharted territory, full of promises and headaches.
This trajectory is probably quite common, and I'm sure atopile has a role to play there, when you start growing out of arduino. Making things a bit smoother, searchable, reusable, being able to learn from other people's design - what a wonderful tool it could be!

Timot05#
Thanks! And glad you are making your way towards electronics.

Yes, we hope for the packages.atopile.io to become a place where you can share your designs and explore what other people have built.

Timot05#
NetlistSVG is great yeah. We had a play with it. We had a visualizer in the compiler early on in the compiler implemented with JointJS. But it was a pain to maintain and difficult to get value out of.

I'm sure we will have some flavor of a visualizer in the compiler one day. But outputting a "normal" schematic doesn't seem like it's the right approach. We might actually end up with a bunch of different ways to "visualize" your circuit, each one optimized for a specific thing you are trying to achieve.

Timot05#
Hey everyone, if you want to see a complete project, please check out the Spin Servo Drive that Narayan designed: https://github.com/atopile/spin-servo-drive

It can be a good example of how to setup an ato project.

wildzzz1 reply#
Why ato over existing hardware description languages or things like SPICE (and it's many derivatives)?
mawildoer#
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.

Load more comments