Graham Sutherland's Script Provides Every JLCPCB Stackup File, for Altium and More

Clever script pulls out stackup files, in Altium XML and JSON formats, for "every layer count, board thickness, and copper weight option."

ghalfacree
about 1 month ago HW101 / Productivity

UPDATE (11/09/2024): Graham Sutherland's tool for extracting stackup files from JLCPCB's application programming interface (API) has been expanded — and now includes KiCad board files in addition to Altium XML and generic JSON files.

"My script for auto-generating stackup templates for all of JLCPCB's board stackups now outputs KiCad board templates as well as Altium stackup files," Sutherland explains. "Should hopefully save everyone some time and effort."

Original article continues below.

Maker Graham Sutherland has written a tool to extract layer stack files for JLCPCB's multi-layer PCBs in Altium XML and JSON format — making it easier to accurately design boards for production at JLCPCB in your favorite tool.

"I made a script that extracts multilayer board stackups from JLCPCB's API [Application Programming Interface], for every layer count, board thickness, and copper weight option," Sutherland explains. "It translates the raw API data into a clean normalized JSON format, and also into Altium stackup files. The normalized JSON should be easy to consume if you want to build stackups for other EDA [Electronic Design Automation] tools. Everything is pretty well documented, so it should be easy to modify and update to your needs."

If you're planning a four-or-more layer board for production at JLCPCB, a new collection of stackup files may come in handy. (📷: JLCPCB)

While it's entirely possible to design a printed circuit board that has only a single layer, it's more common for modern PCBs — especially those being sent away for professional production rather than being etched at home — to have multiple layers. How these layers are stacked varies from manufacturer to manufacturer and board to board, leading to the need to be able to define the stack in software — which, in Altium, means an XML-format stackup definition.

Sutherland's tool queries JLCPCB's API and automatically generates stackups for all supported board thicknesses, outer and inner copper weights, and layer variations from four all the way to 32 — a total, at the time of writing, of 313 stackup files. These are processed into two formats: Altium XML and normalized JSON, the latter of which can be further processed into formats expected by other EDA tools without having to re-run the extraction script.

The stackup files, and the script that generated them, have been published to GitHub; the script is provided under the permissive MIT license, while the normalized JSON files and XML files are provided under a public domain license. "The raw JSON files in the raw_json directory are the property of JLCPCB," Sutherland notes, "and are included here for reference only."

ghalfacree

Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.

Latest Articles