kicad - mzandrew/idlab-documentation GitHub Wiki

schematic

${CURRENT_DATE} is useful in a text field to keep the "last touched" date accurate when making a pdf

make a pdf of the schematic by choosing the "plot" icon in the menubar

keyboard equivalents:

  • w for wire

symbol editor

To place a line above pin text, add curly brackets {} around the name, and prefix with the (~) character. In case of a pin name where only a part of it is active low, and hence, not all of it needs a bar above, e.g. ~{SPD_LED}/GPIO2.

layout

The board outline is on edge.cuts layer

Use the spacebar to set a second (temporary) origin

To move a part with custom local origin: special tools / move with reference

long-click to refine selection

keyboard equivalents:

  • m: move
  • x: start wire/track
  • 6: start diffpair
  • b: flood
  • ctrl-b: unflood
  • CTRL during drag: disable grid snapping (also forces placement even if it violates the design rules)
  • Shift during drag: disable object snapping
  • ctrl-shift-m: measure/ruler

hide net names: preferences/annotations/PCBeditor/DisplayOptions/netnames->do not show

ignore silkscreen clipping: File/board_setup/DesignRules/ViolationSeverity

switch layers with +/-

copper keepout: it's called "rule area"

heirarchical layout:

  • install 2 plugins: "place footprints" and "replicate layout" (from main kicad interface, not pcb or sch; tools->plugin manager->select 2 plugins->apply pending changes)
  • select 1 component from the sheet that's already placed in the correct spot; run "place footprints" on that with the x and y (or radial) spacing you want; feel free to customize the locations of some or all of the corresponding items before the next step; then * re-select that first item and run "replicate layout" on it; the sheets will be duplicated based on the current positions of the corresponding items
  • this serves as the "make_like_reuse" functionality from pads

once you have grouped entities, to adjust them individually, you must "enter group"

properties manager: View -> Show Properties Manager or the properties manager icon button on the left toolbar

kicad get a list of components: just generate a BOM csv

preferences -> prefereneces -> PCB editor -> display options -> trace and via clearances: show always (also show pad clearance)

there is a button on the left to show/hide the ratsnest

edit -> swap layers

change all nets in a netclass to some specific size (edit->edit track and via properties)

tented vias is a global option at gerber generation time

remove paste for certain pads: select pad and deselect checkbox for f.paste for each one that needs to not have a hole in the stencil

annular ring: https://forum.kicad.info/t/tutorial-creating-custom-annular-ring-shaped-smd-pads/52574 you have to draw an upper-arc polygon and copy/rotate that to be the lower half of the arc

you can change the relative opacities of zones, tracks, pads, vias in the appearance/objects tab

generate gerbers by choosing the "plot" icon in the menubar; some fab houses accept kicad_pcb files directly, so this step is often not necessary. Just make sure you reflood zones, check drc/lvs and (importantly) save the file again before uploading.

footprint editor

to affect multiple pads, adjust one, then copy pad properties (context-menu), then apply pad properties to multi-selected other pads

both schematic and layout

when box-selecting, use ctrl+shift to remove from the selection

start box-select from right means inclusive select and otherwise means exclusive

automatic numbering: https://forum.kicad.info/t/avoid-automatic-numbering/28681 solution is to use "Value" field and show it on silkscreen layer and hide actual reference designator

use a net tie object to bridge nets together

other helpful information

kicad design rules for 6/6 boards: design rule constraints: minimum clearance: 0.1524 (6 mils) minimum track width: 0.1524 (6 mils) minimum via diameter: 0.254 (10 mils) copper to edge clearance: 0.381 (15 mils) rule severity: clipping silkscreen on soldermask: ignore kicad plane parameters: 0.254

https://www.kicad.org/download/

https://github.com/mzandrew/kicad-library.git

pcbnew python scripting: https://docs.kicad.org/master/en/pcbnew/pcbnew.html#scripting https://docs.kicad.org/doxygen-python-6.0/namespacepcbnew.html#aaf7495d546c3f78093539810f5518c49 https://kicad.mmccoo.com/index.php/page/2/ https://forum.kicad.info/t/python-extension-to-pick-all-components-in-pcb-edit-from-the-same-original-schematic-hierarchical-sheet/22026 https://github.com/devbisme/PadPainter/blob/master/PadPainter.py import pcbnew pcbnew.Refresh() pcbnew.GetBoard()

kicad scripts to find/write: add stitching vias generate all output (gerber, drill, pdf) generate bom add remaining gates from this symbol

importing to kicad from altium or pads: https://www.eevblog.com/forum/kicad/importing-from-pads-to-kicad/

kicad footprint libraries: add nickname "kicad-mza" with path "c:\mza\PCB\libraries\kicad-library\kicad-mza.pretty"

kicad symbol libraries: add nickname "kicad-mza" with path "C:\mza\PCB\libraries\kicad-library\kicad-mza.symbol\kicad-mza-symbol.kicad_sym"

kicad backup zip file save error when saving pcb/sch or exiting project: the windows paths are too long (past 255 char) so make the dirnames shorter https://forum.kicad.info/t/error-when-saving-cant-open-file-file-directory/38009

""Project is missing or read-only" sometimes happens incorrectly" - close everything and reopen because there's a lock file that is a problem

reasons we like kicad over PADS:

  • "area effect" connections (not the dead center of the pad like PADS)
  • change all in netclass to this thickness
  • hierarchical stuff just works (except numbering)
  • picks up and drags things that are not already terminated or already have a corner

unsorted

pip3 install svg2mod svg2mod QRcode.dxf Parsing SVG... Unhandled exception (Exiting) ParseError: syntax error: line 1, column 0 apt-cyg install qrencode qrencode.exe https://www.phys.hawaii.edu/~mza/PCB/misc/photodiode-readout.revG.pdf -o QRcode.png QR code: go to footprint editor; start footprint wizard; 2D bar code; change contents to desired; change checkboxes for cu/silk/neg; have to make ref des and plaintext contents invisible in footprint editor as well as when back in pcbnew land /cygdrive/c/Users/mza/Documents/KiCad/6.0/scripting/plugins/qrcode_footprint_wizard_modified.py