SKiDL: Script Your Circuits In Python

SKiDL is very, very cool. It’s a bit of Python code that outputs a circuit netlist for KiCAD.

Why is this cool? If you design a PCB in KiCAD, you go through three steps: draw the schematic, assign footprints to the symbolic parts, and then place them. The netlist ties all of these phases together: it’s a list of which parts are connected to which, the output of schematic capture and the input for layout. The ability to generate this programmatically should be useful.

For instance, you could write a filter circuit generator that would take the order, cutoff, and type of filter as inputs, and give you a spec’ed netlist as output. Bam! In your next design, when you need a different filter, you just change a couple of variables. Writing your circuits as code would make arranging the little sub-circuits modular and flexible, like functions in code.

At the very least, it’s an interesting alternative to the mouse, click, drag, click paradigm that currently dominates the schematic capture phase. Just as some of you like OpenSCAD for 3D modelling, some of you will like SKiDL for circuit design.

We’ve become so accustomed to the circuit diagram as the means of thinking about circuits that we’re not sure that we can ever give up the visual representation entirely. Maybe designing with SKiDL will be like sketching out block diagrams, where each block is a bit of Python code that generates a circuit module? Who knows? All we know is that it sounds potentially interesting, and that it’ll certainly be mind-expanding to give it a try.

Give it a shot and leave feedback down in the comments!

This EAGLE Script Gets Quotes For Your Boards

Weary of manually entering manufacturing parameters into PCBShopper’s web form, [Jeremy Ruhland] created an awesome shortcut: His ULP script lets you obtain quotes from 26 PCB manufacturers around the world directly from your EAGLE board layout.

The script extracts all relevant data from your layout, including board size, the layer count, minimum trace widths and hole diameters. It then let’s you specify a few more in a tidy dialogue before sending you to the PCB manufacturing price comparison site PCBShopper.com with a custom query for board quotes.

It works like a charm, and [Jeremy] also plans to add a shortcut button to the EAGLE layout editor’s toolbar. Since the script implements the entire PCBShopper API, for which [Jeremy] cooperates with PCBShopper.com owner [Bob Alexander], it’s also a great starting point for the development of scripts that work with other board layout tools.

Thanks to [Matthew Venn] for the title photo (via Flickr)!

StickerBOM For KiCad

When boards were larger and components mostly through hole, designers could put a lot of information on the silk legend – reference designator, values, additional text and so on. But with surface mount components becoming smaller and board real estate at a premium, modern boards do not have a lot of information marked on the silk layer. If you are building and distributing a short run of kits, perhaps for a round of beta testing, then [Adam Greig]’s StickerBOM python script for KiCad can be really handy. StickerBOM is a KiCad BOM exporter designed for people stuffing boards by hand. It generates a PDF for printable sticky labels, where each label reflects one BOM line from a supplier. You then stick these labels on the bags from your supplier, and they show you where the parts go.

The labels get printed with the reference designator, quantity, component value, package, vendor and part number. It also adds a drawing of the PCB with the relevant parts highlighted for easy location identification. To use it, schematic symbols must have the supplier field and part number added. The script can be run from the command line, or from the BOM manager in eeschema. The script is set up for Avery L7164 labels, but this setting can be changed. It’s still work in progress so there’s a couple of bugs to be aware of. It cannot process the bottom layer of the board, and the result is only as good as the data you provide. And if you have a large board with components spread all over, the resultant graphic printed on the label may not be ideal.

We are hoping this, and other scripts such as the Part generator and Cost spreadsheets or the script for mechanical CAD export, get added to future releases of KiCad. The KiCad version 5 Developer’s road map document already has some really nice feature additions in the works.