Tutorial: How to check footprint correctness? (Pre Version 6 nightlies)

Creating a Dimensioned Drawing of a Footprint (in pcbnew)

While the inspection tools of the footprint editor are definitely enough for a quick check, they do not allow documenting any findings for later reference. In this section we will therefore look at the workflow used to document the verification of contributions to the official library.

Sadly the footprint editor does not have any tool that can fulfil this requirement as the inspection tool can always only show one dimension at a time. This is where the dimension tools of pcbnew come in handy.

The Goal

The workflow described in this section of the tutorial will end in a fully dimensioned drawing of all relevant features as present in the footprint to be verified. Wrong measurements will be clearly identifiable. Effort is made to make the process as fast and flexible as possible (to achieve this a bit of one time setup is required that allows future work to be more efficient).

Making the Dimensioned Drawing

In this section we will create a dimensioned drawing for the footprint given in the introduction.

Add Footprint to Pcbnew

The first step is to add this footprint to your project (my suggestion would be to make a new project to follow this tutorial and add the supplied footprint to a project local library). See How to get a downloaded symbol, footprint or full library into KiCad version 5?

Then just open pcbnew and use the add footprint tool (found in the “Place” menu or in the right toolbar) to get the footprint into the layout. In the dialog that opens navigate to the footprint to be dimensioned and double click its name. You can of course use the filter field to make finding it easier. Just place the footprint anywhere on the canvas.


The footprint added to the canvas.

Adding a Dimension

Now the fun can start. First lets check if the inside to inside dimension for pads in y direction is correct. Select the Orthogonal Dimension tool from the Place menu or by using the button in the right toolbar (to get to the orthogonal dimension tool in the right toolbar you need to hold left click on it which will open its submenu where you can select other dimension options than the aligned one)

Select for example User1 as the active layer to place your dimension.

Assuming snapping to pads is turned on (see setup below) you can move your mouse near the top right corner of pad 12 and the cursor should snap to it. While snapped, do a single left-click and then move the mouse to the bottom right corner of pad 6. As soon as you are snapped to that corner do another left-click and then move the mouse towards the right until the dimension is at a place where you like it. Finalize the placement with another left click.

For additional details about snapping see the Utiilizing snap to Objects section above.

Edit Dimension settings

As you might notice this dimension has a very large font size. It also has more significant digits than we need and it includes the unit specifier. We can change all of this in the dimensions property dialog. Select the dimension object and use the hotkey e (or right-click -> properties).
In the dialog that opens reduce the text size, select “remove trailing zeros” and change the unit format such that the specifier is not shown.

In addition, you could also reduce the size of the arrows as well as reducing the line width.
Of course doing this for every dimension becomes tedious. So i suggest to setup defaults as suggested in the setup section below. The rest of the tutorial will assume you have set your defaults to a more sensible size.

Dimension pad sizes

Dimensioning the SMD pads uses the same process as dimensioning the distance between them. We again use the snap feature and make a dimension for the horizontal as well as vertical size of for example pad 1.

Dimensioning the size of the non plated through holes is a bit trickier. KiCad does not come with a tool for dimensioning diameters (see list of known restrictions below). But we can again use the snap to object tool as it allows snapping to 4 points around the circumference of a circular pad. I just choose the points on top and bottom and then place the dimension to the left of the pad.


Pad sizes dimensioned. Note that there is no diameter tool so the normal orthogonal tool is used to dimension the NPTH diameter.

Dimensioning Remaining Pad Positions

Now we just need to dimension the center to center dimension for the NPTHs as well as the distance between these to the SMD pads. And of course the pitch between SMD pads (and/or) the distance between the leftmost pad and rightmost pad.

For these dimensions the only new thing is to realize that one can snap to the center of every pad as well as to the center of every side for a rectangular pad.

Move Dimension Position

While making a dimensioned drawing you might realize that you left too little space to cleanly add a new dimension. Luckily, one can simply move a dimension out of the way. For that click onto it to select it which will bring up filled rectangles as interaction points similar to any other graphical object in KiCad. Hold the left mouse button while on top of the square near the arrow of the dimension object. Now you can change its position by moving the mouse around. Letting go of the mouse button will fix it at the new position.

Body Outline

For the body outline we will add dimensions for the x and y dimension as well as the body position relative to the NPTHs in y direction.
In this case we will use the fact that the dimension tool snaps to the endpoints of lines.

So snap to the bottom right corner of the body out line and create a dimension from there to the top right corner. Repeat the same with the distance between the bottom right corner and the NPTH. If necessary move other dimensions out of the way.

Change Layer to Indicate Issues

When making the dimension for the x dimension start with it on the User1 layer as we have done so far. You will however notice that it does represent dimension A from the datasheet without the additional lip of 0.1mm to both sides. This means that the body is too small in this direction. We will want to indicate this by using a different color and therefore a different layer.

However, of course we only know that after we already made the dimension. We can easily switch the layer after adding the dimension. It stays selected after it is placed so all that is needed is to use the hotkey “e” and then change the layer to User2 in the dialog that opens.

Of course one now notices that the default layer colors are less then ideal. Which is why i have my own color profile for doing reviews as shown in the setup section. With my colors profile selected the final resulting drawing looks as follows.

Setup

Activate Snapping to Pad Features

Snapping to pads as well as to graphical elements in pcbnew can also be turned off like in the footprint editor. It is found in the preferences dialog under the editing options for the pcb editor. In this case it is no longer just a tick-box but a drop down menu with 3 options. We want it set to “Always” for both graphics and pads.

Dimension Tool Setup

First we create a new project specifically for verifying footprints. In this project we setup defaults for the dimension tools that allow it to be used for dimensioning small objects like typical footprints (the normal defaults better fit the needs to dimension a full PCB).

This setup is done in the board properties dialog: File -> Board Setup -> Text & Graphics -> Defaults


The settings dialog as used by me for investigating typically sized footprints. For simplicity here my KiCad project file with this setup PR_invest_v6.kicad_pro (5.2 KB)


Alternative setting for larger components. And again the KiCad pro file I setup for my use pr_invest_v6_large_parts.kicad_pro (5.2 KB)

Layer Colors to Identify Correct, Wrong and Note

There is no option to change the color of an object in pcbnew. The color is controlled by the layer color. For this reason i setup the colors of the user layers to fit my needs. In Version 6 one can even have different color profiles for different tasks, so this does not need to be in the way of your normal workflow.

I personally chose a bright red to indicate mistakes, bright green for a correct measurement. In addition to that i also have violet and bright yellow for important remarks as well as a pale blue for helper lines and non-important notes.

I left the colors for layers appearing in footprints at their default to make it easier for contributors to understand what i dimensioned.

Here for simplicity again my color setup (User1=Correct, User2=Error, User8 and User9 for important notes, User6 and User7 for helper lines and additional notes) FootprintReview.json (6.9 KB)

Hotkeys for the Dimension Tool

Dimensioning footprints mostly uses the orthogonal dimension tool. However by default this tool does not come with a hotkey. You can add one via Preferences -> Preferences -> Hotkeys. In the filter field enter the word “dimension” and set a footprint fitting your needs. One option would be to remove the hotkey for the aligned dimension and use it for the orthogonal one.

Known Restrictions

The dimension tools as present in version 6 have certain restrictions.

3 Likes