kicad-parts-placer

Generated PCB

New Tool: kicad-parts-placer

Manually positioning critical components for a design such as pogo pins for test fixtures can be tedious and error-prone. kicad-parts-placer simplifies this process by automating exact batch placement of parts in KiCad layouts using just a centroid files.

This Python tool groups components and moves them as a single unit, ensuring perfect alignment and maintaining fixed spacing. It’s ideal for creating bed-of-nails testers, aligning mounting holes, connectors, sensors, and preserving form factors across designs.

Try it out and contribute! repo: https://github.com/snhobbs/kicad-parts-placer.git

Edit

Also available as a plugin here and in the KiCad PCM.

Key Features

  • Place components exactly according to centroid position data
  • Group components to maintain relative positions during placement
  • Simplify mechanical alignment and form factor matching
  • Compatible with KiCad PCB files and simple CSV configuration files
  • Useful for:
    • Creating bed of nails tester
    • Positioning mechanically important parts
    • Maintaining a form factor across different designs

How It Works

  • Export centroid data from your existing KiCad design (or other CAD software)
  • Edit centroid CSV to include pogo pin footprints, mounting holes, connectors, and other mechanical components
  • Batch load parts into a KiCad schematic with matching reference designators
  • Update your PCB from the schematic (press F8 in KiCad)
  • Run kicad-parts-placer to move components to their exact positions on the PCB layout
kicad-parts-placer --pcb example-placement.kicad_pcb \
                   --config centroid-all-pos.csv \
                   --out example-placement_placed.kicad_pcb \
                   -x 117.5 -y 53

The result is a PCB layout with the selected parts perfectly positioned, ready for routing or fabrication.

Example Project

Check out the example placement project for a detailed walkthrough. It includes:

  • A centroid file edited for pogo pin placements
  • A schematic with matching references
  • Exported PCB before and after running the placement script

Config file from centroid

A schematic is drawn up with matching reference designators:

tester schematic

The schematic is exported to a PCB which will look like this:

Exported PCB

Generated PCB

Additional Notes

  • Connections between parts are handled via schematic netlists or can be manually updated after placement
  • Supports locking group positions to simplify footprint handling
  • Allows adding metadata for documentation or board outline integration
  • Useful for maintaining test fixture compatibility across multiple board revisions

Installation

PyPi

All you need to run is:

pip install kicad-parts-placer

Source

To install from source:

git clone https://github.com/snhobbs/kicad-parts-placer
cd kicad-parts-placer
pip install .

References