Skip to main content
This guide builds an antenna signal path from three Zener elements:
  • Component() wrappers for the connector and antenna
  • a reusable matching-network module
  • a board that connects the complete RF path
The example uses the repository model defined in the language specification: the board calls Board(), reusable blocks live under modules/ and components/, and local modules use relative paths. Rendered antenna matching board

Repository layout

Create one package for each reusable block:
The root pcb.toml can be as small as:
Use pcb new board and pcb new package to create this structure. The component values below are examples. Select production values from the antenna data, finished PCB stackup, and vector network analyzer measurements.
Before writing Zener source, copy the KiCad symbol and footprint for each physical part into its package directory with the filenames shown above. Zener does not copy these assets from an installed KiCad library. Confirm that the symbol pin names match the wrapper’s pins mapping.

1. Wrap the physical endpoints

Use standard-library generics for common passives. Use a small custom module for the specific SMA connector and antenna. Each wrapper calls Component() once and exposes the required pins through io().

SMA connector

Chip antenna

Use raw Component() only when a standard-library generic does not represent the physical part. Standard-library generics provide maintained symbols, footprints, and BOM behavior for the matching components.
Hover over pins in the editor to inspect the pin names loaded from the symbol.

2. Build the matching module

The module reserves three tuning footprints: a series inductor, a shunt capacitor, and a final series resistor. Populate the resistor with a damping value or with 0ohm.
Use io() for parent connections and Net() for internal nodes such as MATCH_NODE.
The declared config() types convert parent-supplied strings such as "6.8nH", "1.5pF", and "0ohm" to physical quantities.

3. Compose the board

Instantiate the connector, matching network, and antenna in the board file:
The resulting RF path is:

4. Build and lay out the board

Run these commands from the repository root:
pcb build validates the design. pcb layout generates the KiCad board and opens it for placement and routing.
RF performance depends on placement and stackup. Place the matching components close to the antenna feed, route the RF trace for the required impedance, and leave access for component changes during bringup.

Optional mounting holes

Add mounting holes with the standard-library generic:
Run pcb layout again, then place the holes to satisfy the enclosure and copper keep-out requirements.

Design rationale

  • The antenna and connector packages contain only physical-part definitions.
  • The matching network owns the topology and tuning values.
  • The board file contains only board-level composition.
This separation permits changes to matching values, footprints, or the antenna package without changing board-level connectivity.