Skip to the content
2 layers15 × 15 mmHairpin, the printed circuit board in 3D

Entirely vibecoded python KiCAD to EMS wrapper for validation of EM structures.

Size
15 × 15 mm
Copper layers
2
Thickness
0.28 mm
Parts
2
Nets
2
Pads
0
Tracks, vias
0, 0
Pours
1
Routed
Not yet
KiCad
KiCad 8.0 (file 20240108)
Created
9 Oct 2026
Updated
7 Nov 2026

Overview

Hairpin is an open-source printed circuit board by lowprocess, from the lowprocess/kicad2ems repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 15 × 15 mm with 2 parts on 2 nets.

README

README.md

kicad2ems

kicad2ems simulates KiCad boards. It reads the stackup, copper, vias and outline from a .kicad_pcb, takes ports from marker footprints and R/L/C parts from the components, and solves the board with one or more electromagnetic solvers. Each run writes Touchstone S-parameters, plots, a JSON summary and an HTML report that compares the solvers.

kicad2ems is the core: the board model, the line model, the settings, the runs and the results. The rest are packages of their own, each in its repository:

RepositoryWhat it isInstalled with
kicad2ems-guithe window: settings, runs, plots, fields, antennas, the Filter pagepip install '.[gui]'
kicad2ems-ipcthe KiCad plugin: the impedance map, and simulations set up from the PCB editorKiCad's Plugin and Content Manager
kicad2ems-fdtdthe FDTD solvers, openEMS and gfdtd, on one shared FDTD modelpip install '.[openems]', '.[gfdtd]'
mom25dthe 2.5D Method-of-Moments solver, with its kicad2ems pluginspip install '.[mom]'
gfdtda 3D FDTD engine for the GPU or the CPU (kicad2ems-fdtd runs it)pip install '.[gfdtd]'
dfsynthdistributed filter synthesis (the GUI's Filter page)pip install '.[filter]'
SolverNameBest forNeeds
openEMS (3D FDTD)openemsanything: planes, board edges, connectors, enclosures, antennasopenEMS, and the openems extra
mom25d (2.5D method of moments)momplanar circuits over a ground plane: filters, couplers, matching networks, patch antennasthe mom extra; a GPU optional
gfdtd (3D FDTD on the GPU)gfdtdopenEMS's model, 8–20x faster on a GPU, ~2x on the CPU, without conductor lossthe gfdtd extra; a GPU, or its compiled CPU core
Transmission-line modellinesa quick estimate: impedance steps, delays, layout mistakesscikit-rf or qucsator

By default kicad2ems picks the full-wave solver it expects to be fastest for your board and adds the line model (which solver).

Gallery

The KiCad plugin beside KiCad's PCB editor, set up to simulate an HDMI pair

The KiCad plugin beside KiCad 10's PCB editor with its CM5 Minima demo board: the HDMI D0 pair selected in KiCad, and the region and ports the plugin set up around it.

The impedance map filling in An HDMI section read on the map The pair's S-parameters against the line model

The impedance map of the board's 94 signal nets filling in; the HDMI pairs against their 100 ohm class, a section read out at the bottom; the D0 pair's mixed-mode S-parameters from gfdtd (solid) and the line model (dashed).

Differential E field of the HDMI pair

The same pair driven differentially from the module: its E field just inside the F.Cu and B.Cu dielectrics, in dB re the peak (30 dB range), from gfdtd's field dumps of the two legs' runs.

3D field of a patch antenna 3D field of a stub notch filter

The E field of a 2.45 GHz patch antenna (--dump E@volume+12@2.45) and of a stub notch filter at its 2.4 GHz notch, over one period: the GUI's 3D field view, translucent over the copper.

S-parameters of a hairpin filter from three solvers

A hairpin band-pass filter solved by gfdtd (FDTD), mom25d (MoM) and the line model (qucsator), overlaid in the GUI with a Smith chart.

Surface current standing wave Antenna panel

Left: mom25d's surface current on the stub notch at 2.4 GHz (--mom-dump 2.4 --dump-animate gif): the quarter-wave stub holds the standing wave and nothing passes it. Right: the patch in antenna mode: match, gain and efficiency over frequency, polar cuts.

mom25d's mesh in the GUI's plan view Transmission-line sections

The hairpin's mom25d mesh in the Viewer's plan (rings of thin cells along the copper's edges), and the line sections the line model finds. kicad2ems-gui's tools/readme_media.py makes these pictures again from the examples; the plugin's were recorded from KiCad 10, driven by a script.

Features

  • KiCad import (KiCad 5 to 10): stackup, tracks, arcs, zones, graphics, pads, vias and outline. Gerber files work too.
  • Ports from footprints with a Fab text P1, P2, …, including differential pairs (P1+ / P1-) and gap ports for antennas.
  • Lumped parts from two-pad R/L/C footprints.
  • Antenna mode: gain, efficiency and radiation patterns; phased arrays steered after the run.
  • Field dumps of E, H or current density: images, animations, and a 3D view.
  • GUI (kicad2ems-gui) for setup, preview, progress and results.
  • KiCad plugin (KiCad 9+, IPC API): the open board's trace impedances in the PCB editor, and a region with ports to simulate (KiCad plugin).
  • GPU acceleration for gfdtd and mom25d: any GPU through Vulkan, or CuPy on CUDA or ROCm.
  • Solver plugins: other solvers can be added as packages.

Install

Linux and macOS:

bash
git clone https://github.com/lowprocess/kicad2ems.git && cd kicad2ems
./setup.sh
source .venv/bin/activate

Windows (Python 3.10 or newer from python.org, and Git):

bat
git clone https://github.com/lowprocess/kicad2ems.git && cd kicad2ems
py install.py
.venv\Scripts\activate

The installer (install.py; ./setup.sh runs it) asks where to install (a venv in this checkout by default, or for your user, system-wide, or into the Python itself) and which optional parts you want: the GUI, the solvers and their compiled cores, a GPU package, openEMS, qucsator and a launcher entry. --yes takes the defaults. Getting started has the options and installing by hand. Without any full-wave solver, kicad2ems runs the line model alone; kicad2ems --check shows what your setup can run.

Quick start

bash
kicad2ems examples/rf_interdig.toml --preview            # model, mesh and line model only: seconds
kicad2ems examples/rf_interdig.toml --solvers mom,lines  # MoM and the line model: about a minute
kicad2ems examples/rf_interdig.toml --solvers all        # every solver, compared

Results go to examples/out/: filter_<solver>.s2p for each solver, plots, filter_run.json and filter_report.html. To simulate your own board, see Getting started.

Documentation

Start with Getting started, then Usage. The documentation index lists every page.

License

GPL-3.0-or-later (see LICENSE). kicad2ems uses openEMS (GPL-3.0-or-later) and CSXCAD (LGPL-3.0-or-later) as Python packages and runs qucsator (GPL-2.0-or-later) as a separate program. No third-party code is copied into the repository.

Parts

2
QtyValueFootprintReferences
2RF_Portkicad2openems:RF_PortTP1, TP2

More from lowprocess/kicad2ems

1
  • 4 layers30 × 14 mmSma launch, the printed circuit board in 3D

    Sma launch

    lowprocess/kicad2ems

    Entirely vibecoded python KiCAD to EMS wrapper for validation of EM structures.

    3 parts2GPL-3.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 Hairpin PCB?

It measures 15 × 15 mm and has 2 copper layers, 0.28 mm thick.

What parts does the Hairpin 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 Hairpin KiCad files?

From the lowprocess/kicad2ems repository on GitHub, at the commit this page was made from: the board is examples/hairpin.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Hairpin design in my own project?

Its repository publishes it under the GPL-3.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).