This repo demonstrates designing PCBs with the Zener language (.zen
) and the open-source pcb
compiler. You describe parts and connectivity in .zen
, compose them into boards, and generate KiCad projects for layout/manufacturing.
To recreate this example step by step, visit the tutorial
For the most up to date information, visit our documentation at docs.pcb.new
The open source PCB compiler is available at github.com/diodeinc/pcb
- KiCad 9.0
- Required for PCB layout
- Download from KiCad website
.
├── README.md
├── components # Physical items on the PCB that usually don't have an existing generic
├── modules # Reusable pieces of Zener that can be composed of one or more components or other modules
├── boards # Board compositions (.zen)
└── pcb.toml # Workspace + dependencies
Component(...)
: Defines a part by symbol/footprint and pinsio(...)
: Declares typed ports/nets (e.g.,Net
,Ground
)Module("path")
: Reuses another.zen
module- Wiring: Connect modules/components by shared nets
Layout(...)
: Hints where to emit previews/outputs
See modules/Antenna.zen
, modules/SMAConnector.zen
, and the composed board boards/EX0001/EX0001.zen
for examples.
- Install the
pcb
compiler and KiCad 9 (see docs link above) - Explore modules in
modules/
and the board inboards/EX0001/EX0001.zen
- Run the compiler, targeting the board
.zen
, to generate outputs (KiCad project, previews, docs). Refer to the docs for exact commands on your platform - Open the generated KiCad project to place/route
Notes:
pcb.toml
declares the workspace and pulls the Zener stdlib- A spec is included at
boards/EX0001/docs/spec.md
- Model reusable hardware blocks in
.zen
- Compose modules into a complete board
- Produce KiCad files from a high-level Zener description