KiCad Symbols and Footprints: Creating a Custom Footprint From a Datasheet

Sooner or later you will use a part that is not in the KiCad libraries: a sensor module, an unusual connector, or a relay with an odd pin layout. You will then need to create its symbol, its footprint, or both. Getting this right is critical, because a footprint error is baked into copper and cannot be fixed with a firmware update.

This article explains how symbols and footprints relate, sets up a personal library, and walks through building a through-hole footprint for a 4-pin 6 mm tactile switch from its mechanical drawing.

Symbols vs Footprints

ItemLives inDescribesKey data
SymbolSchematic, .kicad_sym libraryElectrical functionPin names, pin numbers, electrical type
FootprintPCB, .pretty folder of .kicad_mod filesPhysical land patternPad numbers, size, position, drill, layers

The only link between the two is the number. Symbol pin 1 connects to footprint pad 1, pin 2 to pad 2, and so on. Pin names such as VCC or SDA are for humans. If a symbol uses pin number 3 for VCC but the footprint's VCC pad is numbered 4, KiCad will happily route the wrong signal. When you pair a symbol with a footprint, always compare the numbering against the datasheet.

Setting Up a Personal Library

  1. Open the Footprint Editor from the project manager.
  2. Choose File > New Library, select Project if the footprint belongs to one design or Global if you want it everywhere, and name it, for example my_footprints. KiCad creates a my_footprints.pretty folder.
  3. Do the same in the Symbol Editor for symbols; KiCad creates a .kicad_sym file.
  4. Keep personal libraries in your project folder or in a backed-up location, never inside the KiCad installation directory, which is replaced on upgrade.

Reading the Mechanical Drawing

The common 6 mm through-hole tactile switch has four legs arranged in a rectangle. Pins on the same side are internally connected in pairs, so electrically it is a two-terminal switch with two pins per terminal. A typical drawing gives the following land pattern; always confirm against the drawing for the exact switch you will buy.

Top view, pads drilled on a rectangle:

   1 o-------------o 2
     |             |      horizontal pitch: 6.5 mm
     |   6 x 6 mm  |      vertical pitch:   4.5 mm
     |    body     |      recommended hole: about 1.0 mm
   3 o-------------o 4

Pins 1-2 internally joined, pins 3-4 internally joined (check datasheet)

Note what the drawing gives you: pin positions relative to each other, hole diameter, body outline and orientation. If the drawing gives a hole size only for the lead, add clearance. A common rule is lead diameter plus about 0.2 to 0.3 mm for the finished hole, and pad diameter at least hole plus twice your fab's minimum annular ring.

Building the Footprint Step by Step

  1. In the Footprint Editor, select your library and choose File > New Footprint. Name it SW_Tactile_6x6_THT.
  2. Set the grid to 0.25 mm or 0.5 mm via the grid drop-down, and keep the footprint origin at the centre of the part. Centre origins make pick-and-place data and rotation predictable.
  3. Use Place > Add Pad. Open pad properties with E: type Through-hole, shape circular or oval, size 1.8 mm, hole 1.0 mm, number 1. Position it at X -3.25 mm, Y -2.25 mm.
  4. Add pads 2, 3 and 4 at (+3.25, -2.25), (-3.25, +2.25) and (+3.25, +2.25). Make pad 1 rectangular so the orientation is visible on the bare board.
  5. On F.Fab, draw the 6 x 6 mm body outline. This layer documents the real body for assembly drawings.
  6. On F.Silkscreen, draw an outline slightly outside the body, keeping it clear of the pads.
  7. On F.Courtyard, draw a rectangle enclosing body and pads with about 0.25 mm margin. DRC uses courtyards to detect overlapping parts.
  8. Open Footprint Properties and set the reference field on silkscreen and the value field on F.Fab. Optionally link a 3D model.
  9. Save, then run Inspect > Footprint Checker to catch overlapping pads or missing courtyards.
LayerWhat goes there
F.Cu / B.CuCopper pads (through-hole pads appear on both)
F.Mask / B.MaskMask openings, generated automatically from pads
F.PasteStencil openings, used for SMD pads only
F.SilkscreenVisible outline and pin 1 marker
F.FabTrue body outline and value text for documentation
F.CourtyardKeep-out boundary used by DRC

Verifying Before You Trust It

  • Print the board at 1:1 scale on paper (File > Print in the PCB Editor, scale 1) and press the real part through the paper at the pad locations.
  • Measure pad pitch with the Measure tool (Ctrl+Shift+M) and compare to the drawing.
  • Check that pad numbers match the symbol pin numbers, especially for parts where the drawing is a bottom view.
  • Confirm the footprint shows correctly in the 3D Viewer if you attached a model.
  • For SMD parts, confirm paste layer openings exist; without them the stencil will have no hole.

Summary

Symbols carry electrical meaning and footprints carry physical geometry, joined only by pin numbers. A good custom footprint starts from the datasheet drawing, uses a centred origin, correct pad and drill sizes, a clear pin 1 marker, and proper fab and courtyard layers. Verify every new footprint with a paper print or the real part before ordering boards, and store it in a personal library so you never have to draw it twice.