logoalt Hacker News

liu3haoyesterday at 11:55 AM3 repliesview on HN

Hi HN, I am working on Circuitscript, a language based on python to describe electronic schematics: https://circuitscript.net/. A basic IDE (called the Bench) to try Circuitscript is available online: https://bench.circuitscript.net/

I have created a usb-uart converter board with the CH340 chip. The complete schematic was coded with Circuitscript and then imported as a netlist into kicad pcbnew to do the pcb layout. The design was produced with JLCPCB and after receiving the boards I tested them and they do work! The design files are here https://github.com/liu3hao/usb-uart-bridge. The circuitscript code file is here https://raw.githubusercontent.com/liu3hao/usb-uart-bridge/re... and the generated pdf from the circuitscript code is here: https://github.com/liu3hao/usb-uart-bridge/blob/main/usb_uar...

The motivation for creating Circuitscript is to describe schematics in terms of code rather than graphical UIs after using different CAD packages extensively (Allegro, Altium, KiCAD) for work in the past. I wanted to spend more time thinking about the schematic design itself rather than fiddling around with GUIs.

Please check it out and I look forward to your feedback, especially from electronics designers/hobbyists. Thanks!


Replies

bityardyesterday at 10:16 PM

Hey, this is neat. It's pretty much Turtle for circuits. You could have called it CircuitTurtle!

I don't do a lot of circuit design, but I'm more of a visual person so I feel like I would be more likely to draw this in something like KiCad and then want to export it to this format to make diffs simpler.

mikeaylesyesterday at 12:21 PM

This looks awesome, great job.

How effective at circuit generation are LLM's with the language? I tried similar, and could get syntactically correct files, but the content always had errors: https://www.mikeayles.com/#tokn

What are your thoughts on atopile and tscircuit?

indra_vartayesterday at 9:14 PM

This looks genuinely useful to my work. Is there a way to reach out for feedback?

show 1 reply