Example footprint QFN-64 with exposed pad (Calculate land pattern from part dimensions)
As a second tutorial we make the footprint for ATmega165A-MU. A dimensioned drawing of the package is found in the datasheet on page 827.
You will notice that this datasheet does not include a suggested footprint layout. Now we are forced to develop one from the dimensions of the package alone.
Definition of terms
We will borrow a few terms from industry standards to discuss how to derive a footprint.
The first terms you will come across reading such a document are heel, toe and side solder fillets. These define the size increase of the pad compared to the lead contact area in their respective direction.
The lead contact area is calculated to fit most parts. (The contact area after production should agree with the calculated area with high statistical certainty.)
Calculating the lead contact area
The first step for determining the pad sizes and position is to find the lead contact area. Here it is helpful to use a cad program. Pencil and paper should also be enough.
From the datasheet drawings we get the following result. (Green are maximum values. Blue are minimum values. Note that we put the maximum lead size together with the minimum body size.)
However this picture is a bit overly cautious. It is very unlikely that the pads are at their maximum tolerance at the same time as the body is on its minimum. A more realistic calculation is shown below.
A rigorous calculation must consider manufacturing tolerances as well. (Placement tolerance and tolerances from PCB production.)
For the purpose of tutorial we ignore both shortcomings. (We use the above result as is. It is in this case remarkable close compared to a more detailed calculation.)
Improved calculation of Smin
For anybody interested i give an example of how Smin could be calculated more accurately. Lets start with how we have it now:
- Smax = Dmax - Lmin
- Smin = Smax - Sum(tolerances)
Where D is the body size and L the contact (lead) length.
As mentioned above simply summing up all tolerances is overly cautions. A better way is to sum up the squares of all tolerance. The error term is the square root of that sum.
- Smin(RMS) = Smax - √(Sum(tolerances²))
Calculation of the pad sizes
We use the following fillet sizes to calculate the needed pad sizes:
- heel = 0mm
- side = -0.04mm
- toe = 0.3mm
The source for these is this blog post. (They are from IPC-7351)
The two pads on top are shown to check if we have a problem using these measurements. Everything looks ok so we can go into kicad and start making our footprint.
Placing the pads in kicad
Create a new footprint as shown in the Connector Molex footprint tutorial above. (As a name something like QFN-64-1EP_9x9mm should do for now. A better name would include more information. The footprint naming convention of the KLC could be used as a guide.)
This time we will use the array function of the modern (opengl) canvas. Place the first pad at x=-4.425mm and y=-3.75mm; size x=0.85mm, y=0.22mm.
Right click on the pad and select create array [or shortcut ctrl+T].
In the array dialog set the vertical count to 16 and horizontal count to 1. Vertical spacing is set to 0.5.
For correct pad numbering set the initial number selection to “start number” and enter 1 as the start number.
We do the same with the bottom row. Place the leftmost pad and give it pad number 17. (coordinates are now y=4.425mm and x=-3.75mm)
Again start the array dialog. It should still have the same values as before. So we change the vertical count to 1 and the horizontal count to 16. Make sure horizontal spacing is 0.5 and that the start number is 17.
For the remaining two side repeat the same. Place the bottom left pin and start the array function from there. We use negative spacing to get the pads to increase their pin numbers in the right direction. (remember to update the start number)
Here shown the array setup for the top row starting from the top right pad:
In the end the footprint should look like this
The exposed pad
Footprints with a large exposed pad pose a number of interesting problems. They are nearly impossible to hand solder. To make live easy one could add a large through hole (large drill) to be able to solder it from below. In this tutorial we will however make a footprint such that it can be reflow soldered.
For reflow soldering of such parts we need to reduce the paste coverage of the exposed pad to somewhere between 50 to 80% by area. (Different sources give different ranges.) We will aim for 65% as this is in the middle of this range and should be a good compromise.
In addition to reducing the paste area it is suggested to split it into multiple small areas. This allows for better out-gassing. Another benefit is that squeegee deformation is limited as the openings in the stencil are smaller that way.
The pad size is not that critical. Most manufacturer datasheets seem to suggest the nominal lead size in their datasheets. In our footprint there is enough space between the exposed pad and the normal pads. I personally would therefore increase its size a bit. (I would use the IPC calculations with 0 or a small negative fillet.)
For this tutorial we simply use the maximum pad size (5.5x5.5mm)
Add a rectangular SMD pad with size 5.5x5.5mm at x=0 and y=0. Set the pad number to 65 (one higher than the maximum normal pad number). Deselect the paste layer as we want to have it controlled by separate pads.
Now we still need to add the paste layer. A good rule of thumb is that each paste pad should be around 1x1mm. In our case we would have the choice between an array of 4x4 or 5x5 paste pads. (As we make it by hand i chose to go with 4x4)
The side length for the paste pads is calculated as 5.5*√(0.65)/4 ≈ 1.1
Using that we can sketch the layout in a cad program (or do the math by hand) such that the paste pads are equally spaced. (I aim for the inner paste clearances to be double the outer ring.)
Using the array function is not really possible in this case as it does not allow us to assign no pad number to the resulting pads. So we fall back to using the grid and the duplication of an initial pad.
For the first paste pad the pad properties dialog should be:
After placing all paste pads it should look like this. (Note that you will need to set the F.Paste Layer as active to see the paste layout.)
Bonus: Adding thermal vias
Some footprints with exposed pads need vias to connect the pad to the bottom layer (Or an internal large copper zone). This allows for better thermal management. One can of course leave this for the board design but there it gets tedious. A lot easier is placing them while creating the footprint.
Introducing vias into the pad has some drawbacks. The most noticeable is that it will result in solder loss. There are multiple ways to combat that. The cheapest being to accept some loss and increase the amount of paste. Another option is bottom tenting. If you follow the tutorial exactly you will end up with bottom tented vias. (Talk to your manufacturing guys if this is a good idea for the process used in your project.)
The first step is to decide how many vias should be placed and where. I decided to go with a 5x5 array with the outermost ring touching the outer edge of the pad. As via size i chose 0.2mm drill with 0.15mm annular ring. (Resulting in 0.5mm pad size)
Using a CAD program i get the following layout:
We setup the grid again
- origin at any via. In this case a via is at the origin. (Meaning 0,0 is a good choice for our grid origin)
- Spacing is the via pitch we determined in the sketch.
Place a pad and change it to be a circular through hole pad. Pad number 65, size 0.5mm and drill 0.2mm. Remove the ticks for F.Mask and B.Mask. (F.Mask is removed because we want to control where mask is placed with other pads. Removing the tick for B.Mask results in bottom tented vias.)
Duplicate that pad again for every grid point. (As soon as you have created one row or column you can select all these vias and duplicate a full column at once.)
For even better thermal results you can add a large pad on the bottom side. If you plan on adding a heat sink activate B.Mask for it. If not then you can disable it (The thin solder-mask film has very little influence in the ability to transfer heat to the air.)
Improvements for the thermal via footprint
In the screenshot you can see that the paste pads do not really align with the same grid as the vias. (Some vias are covered more then others. This can create problems in manufacturing as this way the process is hard to control.)
In the screenshot i show a few options of how to improve that. The green option shows the result of moving around the current paste pads such that each of them is in the center of 4 vias.
The magenta options are designed such that they avoid the vias with 0.1mm clearance. The leftmost magenta option trades paste coverage for clearance.
A better result is using camfered pads (The next two magenta outlines.). Chamfered pads need to be created from custom (polygon) pads. An alternative would be using rounded rectangle pads.
The script used for creating such footprints for the official library does that automatically.
If you choose the first solution (same sized pads but arranged differently) the resulting footprint will look similar to this:
Finishing the footprint and possible improvements
Add an outline on the fab layer (including a chamfer on the top left corner to mark pin 1.)
Add lines on the silk screen around the corners. (Leave out the line nearest to pin 1 as the pin 1 mark)
And add a courtyard outline. (0.25mm clearance to the pads is suggested by IPC for nominal density.)
For details how this can be done look at the connector molex tutorial above.
As inspiration the script generated footprint for the same part:
It might also be a good idea to use rounded rectangle pads with 0.25% round radius ratio (maximum 0.25mm radius).
As a bonus exercise you can try to follow the Tutorial: How to check footprint correctness? tutorial to check if you made your footprint correctly.