CHAPTER 3

Images
Components and Libraries

Finding the right components for a project can be a time-consuming process. If you are using EAGLE, then a further complication is that you need to either use components that are already in the EAGLE libraries or download a library that includes the part or, as a final resort, create your own part and add it to a library. This chapter serves as a reference for the most common components that are used by hobbyists, as well as showing you where to find EAGLE models for components and even the components themselves.

Images

U.S. versus European Circuit Symbols

When you are choosing a component from a library to use in a schematic, the most important thing about it relates more to the board layout than to the schematic. If it does not have pads in the right places, then it will not be of any use. Another consideration is how the symbol is drawn on the schematic. Unfortunately, there is more than one standard for component symbols in use. The main divide is between symbols commonly used in the United States and those in use in Europe.

If you browse through the libraries, you will often find two versions of each component. For example, R-EU and R-US for European and U.S. resistor symbols. Figure 3-1 shows the symbols for resistors and capacitors.

Images


FIGURE 3-1   United States and European circuit symbols.

In this book, we will stick to the U.S. circuit symbols largely because the useful Adafruit and Sparkfun libraries are in this format. If you feel strongly about using the European-style symbols, then you can search out circuit symbols in that standard.

Images

Resistors

Resistors are probably the easiest components to find in a library. They are pretty standard in size, with relatively few different sizes to choose from, both in through-hole and surface-mount device (SMD) forms.

Through-Hole Resistors

For most though-hole designs, ¼-W metal-film resistors are fine. These normally will be mounted flat against the PCB with the leads bent at right angles at the ends of the resistor bodies. This usually requires a 0.3-in. separation. Figure 3-2 shows a selection of through-hole resistors. The resistor power ratings from front to back are 125 mW, ¼ W, and two 1-W resistors.

Images


FIGURE 3-2   Through-hole resistors.

Table 3-1 details common resistor sizes (from wattage ratings). These are taken from the Sparkfun library. You can find them in the library by searching using the search term “RESISTORPTH-*.”


TABLE 3-1   Through-Hole Resistors: Common Component Sizes

Images

The easiest way to identify any component is to keep it in a component box that labels exactly what it is. If, however, the components get mixed up, then through-hole resistors are identified by their color-coded stripes.

Each color has a value as follows:

Images

Besides representing the fractions 1/10 and 1/100, gold and silver are also used to indicate how accurate the resistor is, so gold is ±5 percent and silver is ±10 percent.

There generally will be three of these bands together starting at one end of the resistor, a gap, and then a single band at the other end of the resistor. The single band indicates the accuracy of the resistor value.

Figure 3-3 shows the arrangement of the colored bands. The resistor shown uses just the three bands. The first band is the first digit, the second band is the second digit, and the third “multiplier” band is how many zeros to put after the first two digits.

Images


FIGURE 3-3   Resistor color bands.

A 270-Ω resistor will have a first digit of 2 (red), a second digit of 7 (violet), and a multiplier digit of 1 (brown). Similarly, a 10-kΩ resistor will have bands of brown, black, and orange (1, 0, and 000).

Some resistors have four bands rather than three, in which case the first three stripes represent the value, and the last stripe is the multiplier. Thus a 10-kΩ resistor with four stripes would have stripes of brown, black, black, and red.

SMD Resistors

In general, through-hole devices are often of much higher power than necessary. Often ¼-W devices are used as a standard that will do for almost any application.

SMD resistors are available with a wide range of power ratings, and generally, lower-power SMD resistors are used rather than their through-hole counterparts. These devices start really small. In fact, generally, they are too small to solder by hand.

SMD devices (both resistors and many other two-legged devices) come in standard sizes, denoted by four digits, for example, 0402, 0805, and 1206. Figure 3-4 shows a selection of SMD resistors. From left to right, the two resistor sizes are 0805 and 1206. As you can see from the match head, theses are pretty tiny, and if you are soldering by hand, you should not consider devices smaller than 0805.

Images


FIGURE 3-4   SMD resistors.

The four digits of the package size actually specify the dimensions of the device. The first two digits are the length, and the second two are the width. In both cases, the measurements are in 1/1,000 of an inch. Thus a 0402 device has a length of 4/1,000 of an inch and a width of 2/1,000 of an inch.

Now is a good time to introduce the unit called the mil. A mil is not to be confused with a millimeter (mm). A mil is 1/1,000 of an inch and is still used widely in the electronics industry. Things get confusing because in electronics you will find some things in American measurements (mils and inches) and other things in metric units (e.g., 5-mm LEDs). When you come to laying out your board, you will use mils as the main unit, and most through-hole components have lead spacings in mils, often 100 mils (0.1 in.).

Table 3-2 shows the most common SMD resistor sizes.


TABLE 3-2   Common SMD Resistor Packages

Images

For higher powers than 1 W, through-hole resistors normally will be used for their better air circulation to allow heat to dissipate.

SMD resistors are generally marked with a four-digit code. This is rather like the color code used in through-hole resistors but just written as digits. Thus both the resistors in Figure 3-4 have the code 1001. This means three value digits 1, 0, and 0 and a number of zeros digit of 1. Thus the value is 1,000 Ω or 1 kΩ.

Images

Capacitors

If you are developing digital projects that use perhaps a microcontroller and a few extra components, then you will only be using a fairly small set of capacitors and using them in a pretty simple way—probably 100-nF decoupling capacitors close to ICs or perhaps 100-μF capacitors around a voltage regulator.

Through-Hole Capacitors

As decoupling capacitors placed close to ICs, tiny multilayer ceramic capacitors are ideal. These generally will be bead-shaped with leads on a 0.1-in. pitch. Electrolytics are larger and are available with axial leads (emerging from the ends of the tubes). It is more common to use devices with radial leads, where both leads emerge from the same end of the tube. For long, thin electrolytic capacitors, it is a good idea to allow them to bend over and lie flat against the PCB rather than stick up, where they could easily be damaged. Figure 3-5 shows a selection of through-hole capacitors.

Images


FIGURE 3-5   Through-hole capacitors.

Table 3-3 provides a list of some of the most commonly used through-hole capacitors and indicates where to find them in the EAGLE libraries.


TABLE 3-3   Common Through-Hole Capacitors

Images

Electrolytic capacitors usually have their capacitance and maximum voltage written on them. Ceramic and smaller through-hole capacitors are identified by a three-digit code. This is the capacitance in picofarads using a similar scheme to resistor code. The first two digits are the value, and the third digit is the number of zeros to add. Thus a capacitor marked as 104 is 1, 0, 0000, or 100,000 pF or 100 nF.

SMD Capacitors

Small nonpolarized SMD capacitors use the same common footprints as SMD resistors, that is, 0402, 0603, 0805, 1206, and 1210 being common sizes. When it comes to larger-value electrolytic capacitors, typically the devices have a square base with a cylindrical component on top. A commonly used standard for this was devised by Panasonic and is generally referred to as Panasonic B to E for the majority of electrolytic sizes.

Figure 3-6 shows a selection of SMD capacitors. The capacitor sizes are (left to right) 0201, 0805, 1206, and Panasonic D. All the capacitors are 100 nF. You may at first sight miss the 0201 capacitor. It really is minute. When selecting components for hand soldering, don’t attempt anything smaller than 0805.

Images


FIGURE 3-6   SMD capacitors.

Table 3-4 shows some of the most common SMD capacitors, their footprints, and where to find them in the EAGLE libraries. Small SMD capacitors are not usually labeled, so try not to mix them up.


TABLE 3-4   Common SMD Capacitors

Images

Images

Transistors and Diodes

Through-hole diodes have similar footprints to resistors. Transistors are a bit more complex, especially power transistors that need to dissipate some heat.

Through-Hole Transistors

By far the most commonly used package for through-hole transistors is the TO-92 package. Higher-power transistors generally will use a TO-220 package, although intermediate-sized packages are occasionally used, as well as occasionally large packages such as the TO-3 for very high-power devices. Figure 3-7 shows a selection of through-hole transistor packages. These are (left to right) TO-92, TO-126, TO-220, TO-264, and TO-3. Table 3-5 shows the two most commonly used packages and their footprints.

Images


FIGURE 3-7   Through-hole transistor packages.


TABLE 3-5   Through-Hole Transistor Packages

Images

Table 3-5 does not include library search terms because you will generally find the exact part in the library, for example, 2N2222, 2N700, or FQP33N10. Always search for the exact part first. If you cannot find the part in the libraries, then try looking on the manufacturer’s website and some of the part collections that can be found on the Internet. Generally, unless your part is really unusual, someone, somewhere will have an EAGLE library that includes it. As a last resort, you can always make your own part (see Chapter 11).

When using TO-220 parts, you will normally get the choice of vertically mounted or lying flat against the board.

SMD Transistors and Diodes

SMD transistors are mostly one of two SMD package sizes, which keeps things simple. Figure 3-8 shows the package types SOD323, SOT23, and SOT223 (from left to right). SOD stands for “small outline diode,” and SOT stands for “small outline transistor.” With care, all can be soldered by hand.

Images


FIGURE 3-8   SMD diode and transistor package types.

Table 3-6 shows some devices and their footprints.


TABLE 3-6   Diode and Transitor SMD Types

Images

Images

Integrated Circuits

ICs come in a huge array of different package types. Through-hole devices are much easier to use, generally being dual in-line (DIL) packages, unless they are three-pin devices, in which case they use transistor packages.

On the other hand, there are many standard sizes for SMD ICs. Many are too small to attempt hand soldering, however. We will just cover the devices with pin spacings large enough to solder by hand here.

When finding an IC to add to a schematic, you will often find that the same IC part number is available in a number of packages, both through-hole and SMD (Figure 3-9).

Images

Images


FIGURE 3-9   Package options for an ATTiny45 IC.

Through-Hole ICs (DIL)

Figure 3-9 shows a couple of DIL IC packages. These can have up to 40 pins, and the most common sizes are 8, 14, 16, 20, 24, 28, and 40 pins. Most have a gap of 0.3 in. between the two rows of pins, but some of the bigger devices have a 0.6-in. gap.

SMD ICs

There are a few major styles of SMD IC packages, as summarized in Table 3-7. All these packages have leads protruding from the side of the IC.


TABLE 3-7   SMD IC Package Types

Images

Other package types do not have leads in the conventional sense but rather pads underneath that match up with pads on the PCB. These packages are only really suitable for soldering using solder paste and an oven.

If you expect to be soldering your boards by hand, then you probably should stick to the SO package type. In Chapter 7 you will find some techniques that with practice will allow you to solder some really small pitch devices.

Images

Connectors

Any board that you design is likely to have connectors of some sort. These may be pin headers, JST (Japanese Standard Terminal) sockets, screw terminals, or just solder pads to which wires will be soldered. Figure 3-10 shows a selection of different connector types.

Images


FIGURE 3-10   Connectors.

Table 3-8 lists some of the more common connectors and where they can be found in the EAGLE libraries. You should find most of what you need in the Sparkfun Connectors library.


TABLE 3-8   Common Connectors

Images

For best structural rigidity, many connectors are through-hole so that they use the board to provide extra strength. Connectors may have mechanical pins that go through the board to provide extra strength. Surface-mount connectors are essentially only attached to the copper track on the surface of the board. This means that under stress, it is easy for the copper layer to lift away from the board.

Images

Other Components

The preceding sections detail the most common components. For other components, it just becomes a matter of finding the part in the library. If there are external components that are to be connected by wires to the PCB, then select one of the connector types and solder the wires directly to the pads.

Images

Buying Components

It may sound obvious, but always make sure that you can easily get hold of a part before you design something that uses it. If you are designing something that will become a product, then keeping the cost of the bill of materials (BOM) to a minimum will become important.

Always use common components except where there is a good reason to use something more exotic. Component suppliers that are particularly suited to the hobbyist include

       • Sparkfun: www.sparkfun.com

       • Adafruit: www.adafruit.com

       • Maplins (UK): www.maplins.com

       • RadioShack: www.radioshack.com

None of these has an exhaustive range of components, and they are not particularly cheap, but they combine component sales with modules and very good reference materials and tutorials.

Perhaps the next tier of supplier has component suppliers that have a much wider range, are happy to supply in small quantities, and do not always have a minimum order value. These include

       • Mouser: www.mouser.com

       • Digikey: www.digikey.com

The top tier of component suppliers can supply almost any part that is in production. They supply mostly to the electronics industry, and their prices often can be surprisingly competitive on some lines, especially if you are buying in quantity. The most prominent of these are

       • Farnell (worldwide): www.farnell.com

       • Newark (United States): www.newark.com (owned by Farnell)

       • CPC (United Kingdom): cpc.farnell.com

       • RadioSpares (worldwide): www.rs-components.com

A great web resource for tracking down parts is Octopart (www.octopart.com). This is a component search engine. You just type in the part name, and it will give you a list of suppliers selling the part and their prices.

Often the cheapest place to get components is using eBay. Large quantities of components such as LEDs can be bought directly from China for a very low price.

Images

Paper PCB

It is always difficult to know that the component you have in your hand will exactly fit a particular footprint. This is particularly the case for connectors and unusual components, especially if the components have been scavenged or found in your personal stock of components.

A good way to check that you have the right component is to print out a paper PCB from EAGLE so that you can hold the components against the paper to check the footprints. It is not much effort to go to and much better than having made a batch of useless PCBs.

Images

Summary

Now that you can find the components you need for your projects, we can return to the process of drawing the schematic. This time we will take a more thorough approach and look at some of the features of the Schematic Editor that we did not need to use in Chapter 2.