Skip to the content
2 layers14 × 9 mmGood project, the printed circuit board in 3D

A bunch of scripts to automate KiCad processes

Size
14 × 9 mm
Copper layers
2
Thickness
1.6 mm
Parts
2
Nets
3
Pads
4
Tracks, vias
2, 0
Pours
1
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
28 Mar 2018
Updated
22 Apr 2022

Overview

Good project is an open-source printed circuit board by productize, from the productize/kicad-automation-scripts repository on GitHub, published under the Apache-2.0 licence. It is a 2-layer board of 14 × 9 mm with 2 parts on 3 nets, routed with 2 tracks and 0 vias.

Its parts include 1 resistor and 1 diode.

README

README.md

KiCad automation scripts

A bunch of scripts to automate KiCad processes using a combination of the PCBNew Python library and UI automation with xdotool.

This work is based in big parts on Scott Bezek's scripts in his split-flap display project. For more info see his excellent blog posts.

Currently tested and working:

  • Exporting schematics to PDF and SVG
  • Exporting layouts to PDF and SVG
  • Running ERC on schematics
  • Running DRC on layouts

Versions

This repository has a branch per supported major KiCad version, prefixed with kicad-. Note that installation instructions and supported features can be different per version.

The master branch and latest Docker tag will always be the latest supported stable KiCad version.

Installation

Using Docker

Build and run the docker image:

text
docker build -t kicad-automation-scripts .
docker run --rm -it -v <path to a kicad project>:/kicad-project kicad-automation-scripts

Or fetch it from Dockerhub:

text
docker run --rm -it -v <path to a kicad project>:/kicad-project productize/kicad-automation-scripts

Installation on your own machine:

If you want to use these scripts directly on your system, you should be able to get it to work by installing the folowing dependencies:

This tool has the following dependencies:

  • KiCad
  • python
  • python-pip
  • xvfb
  • recordmydesktop
  • xdotool
  • xclip

The Python dependencies (excluding KiCad) are listed in [eeschema/requirements.txt][eeschema/requirements.txt] and can be installed with

text
pip install -r eeschema/requirements.txt

Installation on Ubuntu/Debian:

text
sudo apt-get install -y kicad python python-pip xvfb recordmydesktop xdotool xclip

Usage

In the Docker image or on a system with all required dependencies installed you can use the following commands:

Run schematic ERC:

text
python -m kicad-automation.eeschema.schematic run_erc /kicad-project/<some-schematic>.sch <build_dir>

Add the flag --warnings_as_errors to make all warnings also return an error code of 1.

Export a schematic to PDF or SVG

text
python -m kicad-automation.eeschema.schematic export /kicad-project/<some-schematic>.sch <build_dir> <svg or pdf> <all-pages (True or False)>

Run layout DRC:

text
python -m kicad-automation.pcbnew_automation.run_drc /kicad-project/<some-layout>.kicad_pcb <build_dir>

Generate a zip file with gerber files for PCB manufacuring:

text
python -m kicad-automation.pcbnew_automation.plot /kicad-project/<some-layout>.kicad_pcb <plot_dir> [<layers to plot>]

Generate a pdf with the layout layers and drill map file:

text
python -m kicad-automation.pcbnew_automation.plot -f pdf /kicad-project/<some-layout>.kicad_pcb <plot_dir> [<layers to plot>]

Hacking

If you want to test the scripts in this repository and run them inside a docker image, the base image can be used. This base image contains all the required dependencies and the required environment for the script to work.

To build and run the base image:

text
docker build -f Dockerfile-base -t kicad-automation-base .
docker run --rm -it -v <path to a kicad project>/kicad-project  -v `pwd`/src:/usr/lib/python2.7/dist-packages/kicad-automation kicad-automation-base

Or fetch it from Dockerhub:

text
docker run --rm -it -v <path to a kicad project>:/kicad-project -v `pwd`/src:/usr/lib/python2.7/dist-packages/kicad-automation productize/kicad-automation-base

The scripts can now be used the same way as in the main image, but changes on the host will automatically be reflected on the container (though note that Python does not autoreload libraries).

Parts

2
QtyValueFootprintReferences
1LEDDiode_SMD:D_0805_2012MetricD1
1RResistor_SMD:R_0603_1608MetricR1

More from productize/kicad-automation-scripts

1
  • 2 layers14 × 9 mmWarning project, the printed circuit board in 3D

    Warning project

    productize/kicad-automation-scripts

    A bunch of scripts to automate KiCad processes

    3 parts96Apache-2.0

Similar boards

  • 2 layers37 × 19 mmPassive rpi hub75-adapter, the printed circuit board in 3D

    Passive rpi hub75-adapter

    hzeller/rpi-rgb-led-matrix

    Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO

    2 parts4.4kGPL-2.0
  • 2 layersDiode template, the printed circuit board in 3D

    Diode template

    adamws/kicad-kbplacer

    KiCad plugin for automatic keyboard's key placement and routing

    2 parts547GPL-3.0
  • 2 layers20.3 × 15.2 mmL0 button, the printed circuit board in 3D

    L0 button

    Luos-io/luos_engine

    Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

    2 parts546MIT
  • 2 layers35.1 × 46.8 mmSDEX2M2 Breakout Board, the printed circuit board in 3D

    SDEX2M2 Breakout Board

    NVNTLabs/switch2-SDEX2M2

    Micro SD Express to M.2 NVME Adapter for Nintendo Switch 2

    2 parts542GPL-3.0
  • 2 layers59.3 × 36.6 mmExpansionBoardTemplate, the printed circuit board in 3D

    ExpansionBoardTemplate

    BlueSCSI/BlueSCSI-v2

    BlueSCSI v2/Ultra - an open source, open hardware, SCSI emulator using the Pi Pico PR2040 and Pico 2 RP2350

    2 parts459GPL-3.0
  • 2 layersAlpha.9mm.wire, the printed circuit board in 3D

    Alpha.9mm.wire

    ohmtech-rdi/eurorack-blocks

    Software to Hardware Prototyping for Eurorack using C++, Max/Gen~ or Faust

    2 parts410
  • 2 layers26.7 × 64 mmGpu power, the printed circuit board in 3D

    Gpu power

    dennisss/dacha

    Monorepo for awesome tools/projects/libraries

    2 parts397Apache-2.0

Questions

How big is the Good project PCB?

It measures 14 × 9 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Good project use?

2 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Good project KiCad files?

From the productize/kicad-automation-scripts repository on GitHub, at the commit this page was made from: the board is test-projects/good-project/good-project.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Good project design in my own project?

Its repository publishes it under the Apache-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).