Source: https://fullstackelectronics.com/experiments/17-going-surface-mount

# Experiment 17: Going Surface-Mount

The fourth step from the breadboard to a printed circuit board. Choose a package for each part, give each symbol in KiCad its footprint, and check that no symbol is without one.

Experiment 16 showed that the KiCad schematic runs as a timer. The schematic still has no sizes. A symbol has pins, but no pads and no area on a board. The PCB Editor of Experiment 18 needs a [footprint](https://fullstackelectronics.com/reference/glossary.html.md#footprint) for each symbol: the pattern of copper pads that the part is soldered on. The footprint also sets how much of the board each part takes. The breadboard used through-hole parts, with leads that go through holes: transistors in the TO-92 package and resistors with wire leads. Their footprints take about three times the area of the surface-mount parts of the board. This experiment chooses surface-mount packages that you can solder by hand: SOT-23 transistors and 0805 resistors. Then it gives each of the 51 symbols its footprint and checks the result in a bill of materials.

### Resources

- [Bill of materials](https://fullstackelectronics.com/experiments/files/17-bill-of-materials.csv)CSV · 13 lines, 51 symbolsThe footprints of the board that was ordered, grouped by value and footprint, as KiCad writes them. Compare your bill of materials with it at the end.
- [KiCad schematic](https://fullstackelectronics.com/experiments/files/15-kicad-schematic.zip)ZIP · the project of Experiment 15The project that the boards were made from. Its symbols have the footprints of this experiment.

### You will need

- [ ] 1×A computer with KiCad 10 and your master project from Experiment 15. Leave the copy `555-sim` as it is.
- [ ] If you have them: one 0805 resistor and one SOT-23 transistor from the PCB components on the page [The Parts](https://fullstackelectronics.com/the-parts.html.md), to see their size
- [ ] *No power supply or oscilloscope. This experiment is on the computer.*

## Package and footprint

The lead used two words for the same part: package and footprint. The package is the body of the part, which you buy. SOT-23 is a standard package for small transistors, and 0805 is a standard size of resistor and capacitor. The footprint is the drawing of copper for one package, in KiCad's library. Experiment 15 showed how the two connect: KiCad puts pin 1 of the symbol on pad 1 of the footprint. That is why the board uses the MMBT3904 and MMBT3906 symbols, which number their pins as the SOT-23 package does.

The name of a KiCad footprint says what it is. The table reads the name of the resistor footprint of this board, `Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder`, part by part.

| Part of the name | Meaning |
|----|----|
| `Resistor_SMD` | The library: resistors for surface mounting. SMD means surface-mount device. The colon ends the name of the library. |
| `R` | A resistor |
| `0805` | The size code in inches: 0.08 by 0.05 inch |
| `2012Metric` | The same size code in millimetres: 2.0 by 1.2 mm |
| `Pad1.20x1.40mm` | Each pad is 1.20 mm by 1.40 mm |
| `HandSolder` | The pads are longer than the standard pads, for soldering with an iron |

Resistors and capacitors come in a series of sizes. The table gives four of them, with the body of the part as KiCad's footprints draw it.

| Size code, inches | Size code, millimetres | Body           |
|-------------------|------------------------|----------------|
| 1206              | 3216                   | 3.2 × 1.6 mm   |
| 0805              | 2012                   | 2.0 × 1.25 mm  |
| 0603              | 1608                   | 1.6 × 0.82 mm  |
| 0402              | 1005                   | 1.05 × 0.54 mm |

This board uses 0805. Experiment 20 solders each part by hand with an iron and tweezers. An 0805 is large enough to hold, see and turn on the board. A 1206 is easier to hold, but its hand-solder footprint takes 11 mm² against 7 mm² for the 0805.

Figure 17-1 shows the difference between the two 0805 footprints of the KiCad library. The body of the part is the same in both. The hand-solder pads are 1.20 mm long in place of 1.025 mm, so each pad reaches 0.175 mm further past the end of the part. The tip of the iron touches that copper, and the solder flows up the end of the part from there.

![Two resistor footprints, one above the other, to one scale. Each has two rounded copper pads, numbered 1 and 2, with a grey rectangle across them, the body of the part, marked body 2.0 mm. A dashed rectangle around each is the courtyard. Top, R_0805_2012Metric, pads 1.025 by 1.40 millimetres, 2.85 mm from the outer edge of one pad to the outer edge of the other. Bottom, the HandSolder version, pads 1.20 by 1.40 millimetres, 3.20 mm from edge to edge. The pads of the bottom footprint stick out further past the ends of the body.](https://fullstackelectronics.com/experiments/img/17-0805.svg)

**Figure 17-1:** The standard 0805 footprint and the hand-solder footprint of the board, drawn from the KiCad library files. The part is the same. The hand-solder pads are longer.

## Why surface-mount

The packages of the board are not those of the breadboard. Each footprint has a courtyard, the area around the part that no other part may enter. Figure 17-2 shows the through-hole footprints of the breadboard parts and the surface-mount footprints of the board, to one scale.

[![Four footprints to one scale, with a 5 millimetre scale bar. Left column, through-hole. The TO-92 footprint: three copper pads with holes in a row, inside a round-topped outline, 26 square millimetres. Below it, the footprint of a quarter-watt resistor with its leads 10.16 millimetres apart, labelled 1/4 W, leads 10.16 mm: two round pads with holes at the ends of a long rectangle, 37 square millimetres. Right column, surface-mount. The SOT-23 footprint: two pads on the left, numbered 1 and 2, and one on the right, numbered 3, 13 square millimetres. Below it, the 0805 hand-solder footprint, 7 square millimetres. A dashed courtyard surrounds each footprint.](https://fullstackelectronics.com/experiments/img/17-tht-smd.svg)](https://fullstackelectronics.com/experiments/img/17-tht-smd.svg)

**Figure 17-2:** The transistor and the resistor, through-hole and surface-mount, drawn from the KiCad library files. The number under each footprint is the area of its courtyard.

The board has 23 transistors and 21 resistors. In TO-92 and through-hole footprints, their courtyards take 1368 mm². In SOT-23 and 0805, they take 449 mm², about one third. The board is 46 mm by 56 mm, which is 2576 mm². So the through-hole courtyards alone would take 53 % of the board, before one track. A surface-mount part also needs no holes. It uses the copper on one side of the board only.

## The footprints of the board

Those are the reasons for the packages. The table gives the footprint for each symbol of the board. The column on the right shows which symbols arrive with a footprint from the KiCad library.

| Parts | Package | KiCad footprint | From the symbol |
|----|----|----|----|
| Q1 to Q23, 16 NPN and 7 PNP | SOT-23 | `Package_TO_SOT_SMD:SOT-23` | Yes |
| R1 to R21 | 0805 | `Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder` | No |
| C1 | 0805 | `Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder` | No |
| J1 | Pin header, through-hole | `Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_Vertical` | No |
| TP1 to TP5 | No part, a copper pad | `TestPoint:TestPoint_Pad_D1.0mm` | No |

The MMBT3904 and MMBT3906 symbols have SOT-23 as their default footprint, so the transistors got it in Experiment 15. The symbols `R` and `C` of the library `Device` are for any size of part, so they have no default. The same applies to the header and the test pad. That leaves 28 symbols to assign.

J1 is the only through-hole part. Its pins are the eight pins of the chip. They are standard header pins, which fit the sockets of the jumper leads to the breadboard. Each pad is 1.7 mm across with a 1.0 mm hole for a pin. The footprint puts the eight pads in one row, 2.54 mm apart. On the board of this course they stand four on each side, in the pin order of the NE555, and Experiment 18 places them. A test pad is a copper circle 1.0 mm across, with nothing soldered on it, for a probe.

The board carries the 555 only. RA, RB, the timing capacitor and the LED stay on the breadboard, as the test bench of Experiment 16 did. C1 is the one capacitor on the board, across the supply.

## Assign the footprints

The table gives the footprint for each symbol. KiCad has a tool that shows all the symbols and the footprint libraries in one window, the Footprint Assignment Tool. Use the master project. The copy `555-sim` does not go to the board.

1.  **Open the tool.** Open the project `555` and its Schematic Editor. Select Tools → Assign Footprints…. The left pane lists the footprint libraries, the middle pane lists the symbols, and the right pane lists footprints.
2.  **Check the transistors.** In the middle pane, Q1 to Q23 show `Package_TO_SOT_SMD:SOT-23`. If you started from the ZIP of Experiment 15, all 51 symbols already have their footprints. Then check each line against the table and continue at step 6.
3.  **Assign the resistors.** Select R1. In the left pane, select the library `Resistor_SMD`. In the right pane, double-click `R_0805_2012Metric_Pad1.20x1.40mm_HandSolder`. The tool gives R1 the footprint and selects the next symbol without one. Double-click the same footprint again for each resistor, to R21.
4.  **Assign C1 and J1.** Select C1, then the library `Capacitor_SMD`, and double-click `C_0805_2012Metric_Pad1.18x1.45mm_HandSolder`. Select J1, then the library `Connector_PinHeader_2.54mm`, and double-click `PinHeader_1x08_P2.54mm_Vertical`.
5.  **Assign the test pads.** Select TP1, then the library `TestPoint`, and double-click `TestPoint_Pad_D1.0mm` once for each of TP1 to TP5.
6.  **Look at a footprint.** Select a symbol and click the toolbar button for the footprint viewer. The viewer shows the pads. Its button Show 3D viewer shows the part on its pads.
7.  **Save.** Click OK. The tool writes each footprint in the Footprint field of its symbol. Save the schematic.

The filter buttons of the toolbar make the list of footprints shorter. One shows only the footprints that the filters of the symbol allow. Another shows only the footprints with the same number of pads as the symbol has pins. The KiCad library symbols have filters for this use. With both on, the list for R1 holds only resistor footprints with two pads.

## Check the assignments

The assignments are now in the schematic, and a bill of materials lists them. ERC does not report a symbol without a footprint. It reports a footprint name that is not in the library, for example “Footprint 'R_0805_Wrong' not found in library 'Resistor_SMD'”. A missing footprint shows only in the bill of materials.

1.  **Make the bill of materials.** Select Tools → Edit Symbol Fields…. In the tab Edit, select the preset Grouped By Value and Footprint. The table shows one line for each group of symbols with the same value and footprint.
2.  **Compare it with the table.** There are 13 lines for the 51 symbols: C1, J1, the NPN and the PNP transistors, the four resistor values and the five test pads. In this project the transistors have the value NPN or PNP. The page The Parts gives the part numbers, MMBT3904 and MMBT3906.
3.  **Look for an empty footprint.** A symbol without a footprint has a line of its own with an empty Footprint cell, as `"R1","4K7","","1"` in the CSV file. Assign a footprint to it and look again.
4.  **Export the file.** In the tab Export, click Export. Compare the file with the CSV in the box “Resources”. The two must have the same 13 lines.
5.  **Run ERC.** It reports zero errors and zero warnings, as at the end of Experiment 15.

#### The courtyard and the parts that come next

The courtyard of Figure 17-2 is in each footprint file, on a layer of its own. The design rules checker of the PCB Editor, in Experiment 19, reports footprints whose courtyards overlap. The body outline is on a further layer, for drawings of the assembly. Each footprint also names a 3D model of the part, so the 3D viewer of step 6 can show the part on its pads.

## Quick check

Three questions on this experiment. They ask what a footprint name says, why the pads are longer, and what finds a missing footprint.

1\. In `R_0805_2012Metric`, what is `2012Metric`?

The year of the standard for the pads

The size code 0805 in millimetres, 2.0 by 1.2 mm

The value of the resistor in a metric code

0805 is the size in hundredths of an inch, 0.08 by 0.05. 2012 is the same size in tenths of a millimetre, 2.0 by 1.2. Neither says the value of the resistor.

2\. Why does the board use the `HandSolder` footprints?

Their pads reach further past the ends of the part, so the tip of the iron can touch the copper

They are the only 0805 footprints in the KiCad library

Their pads are smaller, so the parts fit closer together

The body is the same in both footprints. The hand-solder pads are 1.20 mm long in place of 1.025 mm, so each pad shows 0.175 mm more copper past the end of the part.

3\. R7 has no footprint. What shows it?

ERC, with an error on R7

The simulation of Experiment 16

The bill of materials, with a line for R7 and an empty Footprint cell

ERC checks connections and footprint names that are not in the library. It does not report an empty Footprint field. The simulation does not use footprints. The bill of materials groups the symbols by value and footprint, so R7 gets a line of its own.

## Before moving on

Each of the 51 symbols has a footprint. The 23 transistors have SOT-23, the 21 resistors and C1 have 0805 with hand-solder pads, J1 has the 1×8 header, and each test pad has a 1.0 mm pad. The bill of materials has the 13 lines of the CSV in the box “Resources”. That is the fourth step from the breadboard to the board. The footprints have sizes, but no positions yet. [Experiment 18: The Board](https://fullstackelectronics.com/experiments/18-the-board.html.md) places them on a board outline and draws the copper between them.
