Loading files…
Merge two KiCad 8 projects into a single ready-to-open project — without breaking the schematic↔PCB link.
PCB fabricators typically require a minimum panel size (e.g. 50×50 mm). When two small prototype boards are panelised together, standard KiCad merge methods re-annotate reference designators, breaking the match between the physical silkscreen, schematic, BOM, and test procedures.
KiCad links PCB footprints to schematic symbols via a UUID stored in the
footprint's (path "/SYMBOL_UUID") field. Copy-pasting symbols in the
editor reassigns new UUIDs, breaking every footprint↔symbol link silently.
KiCad then falls back to reference-string matching and re-associates
footprints incorrectly, corrupting the merged design.
The primary use case is proto panelisation: two small boards merged onto one panel to meet a fabricator's minimum panel size requirement (typically 50×50 mm).
The guarantee the tool provides is:
Every reference designator on the physical silkscreen matches exactly what is in the merged schematic and BOM — with zero re-annotation.
This keeps test procedures, probe notes, and firmware pin maps consistent from the moment the panel arrives on the bench.
This tool merges entirely by text concatenation, preserving every UUID byte-for-byte. Only three fields change:
| Field | Change |
|---|---|
SCH (project "old") | → (project "merge") |
SCH (path "/old-sheet-uuid") | → (path "/new-uuid") |
PCB (sheetfile "old.kicad_sch") | → (sheetfile "merge.kicad_sch") |
python3 merge_projects.py Project1/ Project2/
Produces a single KiCad project folder beside the source projects:
Dry-run first to verify everything before writing:
python3 merge_projects.py Project1/ Project2/ --dry-run
Optional gap overrides:
python3 merge_projects.py Project1/ Project2/ --gap-sch 80 --gap-pcb 40
Stage 1 — Reference normalisation (kicad_ref_normalise.py)
(property "Reference") and
(instances/reference) disagree — a common artifact of prior partial operationsStage 2 — Schematic merge (kicad_sch_merge.py)
lib_symbols blocks (union, deduplicated by name)User W H paper size fitted to the merged contentStage 3 — PCB merge (kicad_pcb_merge.py)
All four scripts must be in the same directory.
Power nets and signal nets with identical names in both projects (e.g.
GND, +3V3, +1V8, +5V) are automatically renamed in the offset
project by adding a __ prefix:
| Original (same-project) | Renamed (offset-project) |
|---|---|
GND | __GND |
+3V3 | __+3V3 |
+1V8 | __+1V8 |
+5V | __+5V |
This renaming is applied consistently in three places:
(property "Value") of every
#PWR<n> symbol whose net name is shared. This is the field KiCad
uses to assign the net name to all pins connected to that power rail.(label), (global_label), or
(hierarchical_label) carrying a shared net name.(net ID "name") field,
as well as zone fill (net_name "name") references.The result is that the two boards are fully electrically independent
in the merged KiCad project. GND and __GND are separate nets with
no connection between them. KiCad will not show any inter-board ratsnest
or unrouted connections.
The physical boards share no copper — each board's ground plane is its own island on the panel. If you need the two boards to share a common ground during test, add a wire between their GND test points manually. This is the correct approach for an RF front-end panel where ground coupling between two sensitive circuits would be undesirable anyway.
The merged project is not plug-and-play. The following are expected and require manual attention:
MIT — free to use, modify, and distribute. Developed by Chandresh Sharma with Claude (Anthropic).
No comments yet. Be the first to ask about this board.