Create a custom footprint

In this chapter we will create a custom footprint for the nRF24 schematic component. If you haven’t done so already, close Cvpcb. Next, start the footprint editor.


From Eeschema, start the Footprint editor by clicking on the button with the IC and the pencil icon.

So click on the footprint editor button, and the blank canvas of the editor will come up.


The blank canvas of the new footprint editor.

You can also launch the footprint editor from the main Kicad window. To do this, go to the main Kicad window and click on the fourth button from the right. Notice that it contains the same icon as the one in Eeschema, with the IC and a pencil over it.


You can also start the Footprint editor from the main Kicad window.

Either way, you can reach the exact same footprint editor tool

We need to know as accurately as possible the dimensions of the pins of the NRF24. The circumference of each pin, the distance to the neighboring pins, clearances from the edges of the board, etcetera.

You can do this by looking at online documentation for the particular part or if you have the part, by using your own ruler. I have measured a 2.54 millimeter pitch, which is the distance between the pins. I measured the distance on my NRF24 with my ruler, and it looks exactly correct. The NRF24 has two rows of pins. Again, using my ruler, the distance between the rows looks to be exactly 2.54 millimeters.


If you can’t find the exact measurements of the pins and the part that you are modelling in the editor, use your ruler to find out.

The circumference of each pin is also measured at 0.64 millimeters. I have created a hand-drawn version of the schematic with the measurements as I worked them out. We will create something like this now in the footprint editor.


The new footprint button

In the footprint editor, we would like to create a new footprint so click on the new footprint button and give a new footprint name, like NRF24.


Name the new footprint

Click ok, and see how the canvas now contains the name of the footprint and a reference designator.


Creating the new footprint. We need to add boundaries and pins.

Move the two text labels so that there is enough space between them for the boundary. Use the M key for this, just like you moved components in Eeschema.

Let’s continue with the holes for the pins. We need eight holes. We need to select holes that are wide enough so that the pins of the actual component will fit through them and that the exact distance from the adjoining pins as we measured earlier. So, let’s start with a pitch. We know that the pitch (distance) between the pins is 2.54 millimeters, so to make it easy to space the pins at this exact distance, we’ll set the grid to be this size.


You can change the size of the grid by selecting a value from the grip drop-down menu.

The setting for the grid can be changed via the grid drop-down menu, in the left side of the tool bar. Click on the drop-down menu to open it, and select the grid to be exactly 2.54 millimeters. Now, we can start adding pins right on top of the grid dots and they will be spaced at exactly 2.54 millimeters apart.


The pad button allows you to add pads on the canvas.

Click on the pad button from the top of the right vertical tool bar. This allows you to drop pads on the canvas. We need two rows of four pins each. So, select the pad tool and then click on the canvas to drop eight pads in two rows of four each. In the end of the process, you should have something like this:


Our footprint now has eight pads.

Each one of these pads has properties that you can access by putting a mouse over the pad and hitting the E key (for edit).


To access the properties for a pad, put the mouse cursor over it and type “E”

You can also see the pad number, marked in the center of the pad. Kicad will automatically set a unique number for each pad, as you create it. This number is important because we’ll be using it later to connect the pins on the footprint with the pins as they appear in the schematic.

In the drill group of properties in the pad properties window, you can see the shape and size, x comma y boxes, and circular shape is good for most pads, for pins at the 0.64 millimeter region. For finer pads, you can go for oval drills. The oval shape in a smaller pad allows for enough solder to make a good connection between the pad and the pin, while allowing for smaller pitch (i.e. smaller space between the pads).

In our example, a circular drill hole is fine so we’re going to set the “Size X” setting to 0.762, slightly larger then the pin’s 0.64 millimetre circumference.  This ensures that the pin will fit in the hole.


The Size X setting controls the outer size of the pad.

In the left column on the pad properties window, look at the size x textbox. This controls the total size of the pad. So for example, if you enter a value larger than the current value, you’ll see that the pad size increases. If you have a pad that has larger pins like maybe a barrel power connector, then you want to have more area for the solder to attach onto, in order to support that larger part, and this is where you can make this change.

Lets close the properties window. I prefer to have consistent numbers on the pads between the KiCad footprint and my hand-drawn schematic. To do this, you can either move the pads around in order to put them in the correct order or edit the properties to update the numbers.

In this case, it is easier to shuffle the pins around. Use the M key to move the pads around, so that at the end of the process they are arranged like this:


The pins, rearranged.

If there are any artefacts in your canvas, like stray lines, you can refresh the page to make them go away.  To refresh the page, hit the F3 key on your keyboard.

The pins are now arranged as we want them to be. The next thing to do is to draw the silkscreen border so that we have the layout for the component and the footprint as it will appear on the PCB. To do that, first reduce the grid size to 1.27 so that we have finer control about where the markings for the silkscreen will go.


Use the polygon tool to draw the silkscreen shape that will indicate the border of the custom footprint.

Next, select the polygon tool from the right vertical tool bar. With the polygon selected, draw a box around the pins and try to match the layout of the real life component. The box can be approximately the size of the real part, but there is no need to be accurate about this. Double click to close the polygon.

If you want to have some more interesting shapes then you can choose a circle. You can have circular footprints, will be useful for something like a button battery for example or it can have arcs like that and it can then have multiple arcs and so on. The arc, circle and polygon tools allows you to create nice, interesting shapes for your footprints.


Use the text label tool to label the pins.

Next, we need to label the pads. To do this, we’ll use the text label tool. So I’ll add labels to each pad so that I can read the role just by looking at PCB. You may need to adjust the silkscreen border line if you need more space for the labels. Just delete the line than need adjusting and redraw it with the polygon tool.

With the text tool selected, click on the right side of the pin numbered “0”. This will be the Ground pin. When you click, the footprint text properties window will come up.


Type “GND” in the Text text field, and click “OK”.

Type “GND” in the Text text field. You can also adjust the size of the text by entering values in the Width, Height and Thickness text fields. Let’s make the text smaller than the default, so make the width a 0.5 millimeters and the height 0.5 millimeters as well. The thickness will be updated automatically by KiCad. Click OK. You should get a warning box telling you that the text thickness is too large and it will be clamped and that’s a good thing, so click “OK” again.


Kicad will adjust the thickness of the text based on the dimensions you chose.

This is what your footprint should look like now:


The current state of the footprint. The first text label is there.

You can see the GND text label next to pin 0. You may need to move it further to the right. Do do this, change the grid size to a smaller value, and use the M key to move the label. You can also rotate if you wish, by using the R key. Add the rest of the labels  in the same way. A quicker way to add the rest of the labels once you have the first one configured the way you want it, is to duplicate the first one seven times. Type “D” with your mouse cursor over the GND label, and this will create a copy. Repeat the process to create as many copies as you like, with the same height, width, thickness and orientation as the original. Then, place them on the canvas and edit their name. At the end of the process, the footprint should look like this:


The current state of the custom footprint. All the labels are in place.

You’ll may have noticed that there’s a few more things here that you can also control. For example, you can configure a text block to be invisible if you don’t think that it’s necessary to show it, especially if you’ve got a part with a lot of markings and you don’t want to have all the clutter showing. We’ll use its feature later again. You can also choose between different styles, like normal and italic, and choose the orientation.

We are finished with designing this custom footprint. KiCad will use the pin numbers in the schematic and footprint to figure out how the two are supposed to be connected. To make sure that the pins match, you should compare the pin numbers across the two versions of the same thing, so the schematic version and the footprint version against the real part.


This image show how the pin numbers in the schematic match the pin numbers in the footprint.

In this image, I use an arrow to show how pin 0, labeled GND in the schematic, corresponds to pin 0, labeled also GND in the footprint. Similarly, you should double check that all pairs have the same numbers and labels. I didn’t use arrows for all the pairs in order not to clutter the image here.

You should also triple check that the markings on the footprint match exactly with the pin out on the real part. So, having a double and triple check of all of these details, I think that the part that we’ve designed here is correct.


Click to reveal the footprint properties.

Another thing to do before we save the part and use it is to update the footprint properties. So, to do that, we’ll click on the footprint properties button, and this is going to give us a way to add some properties for the footprint.


The footprint properties window.

We should fill in the Doc field with something like “A footprint for the generic NRF24 module”. This text will appear in the library as you are searching around for parts.

Leave everything else with their default values, and click OK. We are not quite finished yet. We still need to save the new footprint, also referred to as a “module”, in a new library. We will do this in the next chapter.

Back to top
« « Associate components to footprints | Saving the new footprint » »