Chapter 3

Assembling Your Electronics Arsenal

In This Chapter

bullet Gathering the right tools for the job

bullet Collecting electronic components to make projects run

bullet Finding what you need to build what surrounds your project

bullet Building circuits on breadboards

When you meet somebody who has had a hobby for a few years, he or she usually has a well-stocked arsenal of materials and tools for the task at hand. Knitters have drawers full of wool; stamp collectors have tweezers and scrapbooks; and electronics people have drawers full of switches, resistors, capacitors, integrated circuits, and transistors.

In this chapter, we walk you through the typical items that you need to work with for electronics projects. We introduce you to just about all the tools and components and building blocks that you use in the projects in this book. Whether you buy some now or wait until you need them, by the time you finish this chapter, you will be familiar with the most common tools of the electronics trade.

Tool Time

Many of the tools we want to first address are those that you find in the tool aisle of your hardware or home improvement store — everything from the somewhat specialized soldering iron to the ubiquitous screwdriver.

Soldering prerequisites

If you’ve ever used wax to seal an envelope, you understand the basic premise of soldering. Take a material (in this case, solder; pronounced sod-der) and heat it so that it melts onto items, such as two wires you have twisted together to make a physical connection. When the solder cools, you have a seal or joint that makes an electrical connection between the items.

Soldering requires that you get your hands on a few basic items:

bullet Soldering iron: See an example of one in Figure 3-1.

Tip

Get one rated at about 30 watts, preferably one for which you can buy different size tips so you can work on different types of projects. And make sure to get an iron with a three-prong plug so that it will be grounded.

bullet Tips: Large tips can be chisel-shaped and about 1/8" wide; small tips can have a cone shape with a radius at the tip of only 1/64". Most soldering irons don’t specify the tip sizes that are supplied with the iron. For most electronics work, we suggest you just find one described as a fine tip at a electronics supplier. If you’re ordering a replacement tip, a 3/64" cone shape is a good size for general use. If you’re soldering circuit boards, you might try a 1/64" cone-shaped tip. Figure 3-1 shows a soldering iron with a collection of different tip sizes and shapes.

Figure 3-1: A collection of tips, a soldering iron, and a stand.

Figure 3-1: A collection of tips, a soldering iron, and a stand.
AttentionShoppers

If you end up doing a lot of projects soldering components on circuit boards, you might decide to spend extra — sometimes quite a lot extra — to get a soldering iron with controls that allow you to change the wattage, or even one that senses the temperature of at the tip of the soldering iron and adjusts the power to keep the temperature stable.

bullet Stand: You need a device to hold the soldering iron. To ensure that it doesn’t tip over with a hot soldering iron in it, make sure that the stand’s base is heavy enough or that you can clamp it to your worktable.

bullet Damp sponge: You will use this constantly to clean the soldering tip between soldering jobs.

bullet Solder wick: This piece of flat, woven copper wire — also called a solder braid — soaks up solder when you need to rework a connection and need to remove a dab or two from a joint. Some folks use a desoldering pump to suck up solder, but we find that a wick is easier to use.

bullet Solder: Solder is a material that when heated and then cooled, holds wires and other metallic connectors together. The standard type used for electronics is referred to as 60/40 rosin core solder, which is 60 percent tin and 40 percent lead with flux at its core. This flux in the solder helps to clean the items you’re putting together as you solder. We suggest you use a 0.032" diameter solder, which is small enough to help you keep the solder where you want it to go.

bullet Tip cleaner paste: This paste is an option for keeping your soldering iron tip neat. Although using a damp sponge (see its earlier bullet) will keep the tip clean for a while, a good cleaning with tip cleaner paste now and then is a good idea.

You can read about soldering safety in Chapter 2.

Drills that come in handy

You will use drills for all kinds of tasks, from attaching wheels to the body of an electronically controlled kart to drilling holes in boxes to fit switches, lights, and much more.

Drills commonly come in 3/8" or 1/2" chuck sizes. (The chuck is the opening in the drill where you insert the drill bit.) This measurement tells you how large of a drill bit (its diameter) will fit in the chuck. For the projects in this book, a 3/8" drill is just fine. Drills come in cordless versions as well as the type you plug into a wall outlet. We prefer cordless drills such as the one you can see in Figure 3-2, along with an assortment of drill bits.

Figure 3-2: A 3/8" drill and an assortment of drill bits.

Figure 3-2: A 3/8" drill and an assortment of drill bits.
Tip

For the projects in this book, an assortment of drill bits that includes bits up to 1/2" in diameter (the shank of the 1/2" bit should be 3/8") and a cordless 3/8" drill are probably your best bet.

Hacking away with saws

From the magician who saws his assistant in half to the saw you use to cut off a dead tree branch, these tools are handy to trim off excess bits.

Here are the kinds of saws you might need when building electronics projects, especially to build the boxes or boards that contain the electronics brains or trim off little bits of plastic. See Figure 3-3 to view an assortment of saws:

bullet A coping saw allows you to cut openings in a sheet or box of plastic or wood. For example, you might use this saw to cut a hole in a box to insert a speaker.

bullet A hacksaw or a conventional hand saw can be used to make straight cuts in sheets of plastic or wood or to cut plastic pipes or wooden boards to the desired length.

bullet A mini hacksaw is useful when you don’t have enough room to work with a full-sized saw. This can be common with electronics projects.

Figure 3-3: Various hand saws.

Figure 3-3: Various hand saws.
AttentionShoppers

Hacksaws and coping saws have replaceable blades; you can find new blades at hardware stores. When you buy a new blade, check the package to see what material it is intended to cut. Manufactures make blades with different pitches (that is, spacing of the teeth) for cutting different materials, such as metal versus wood or plastic.

Warningbolt

Power saws go by names such as circular saws, chop saws, jigsaws, table saws, and band saws. You don’t need to go out and buy this type of equipment for the type of projects included in this book. However, if you’re dying to work with one of these higher-powered saws and someone offers to loan you one, please make sure you know how to operate it safely. It’s best to have all your fingers and toes accounted for to work on electronics!

Garden variety tools: Pliers, screwdrivers, wire strippers, and more

This is the category of tools that you’re most likely to have floating around your garage or household toolkit. Take an inventory of your toolkit. (We’ll wait.) If you’re missing any of the tools in this list, it’s probably worth going to your hardware store and picking them up.

bullet Precision screwdrivers: This includes both straight and Phillips head (the one with the cross shape at the tip).

bullet Mini or hobby needlenose pliers: These are useful for bending wires to various shapes for breadboarding; you also use them to insert wires and components in the holes of the boards.

bullet Standard sized needlenose pliers: These are useful for tasks where you need to apply more strength than mini needlenose pliers can handle. You can see both standard-sized needlenose pliers and the smaller version in Figure 3-4.

bullet A small pair of wire cutters: These are useful for clipping wires in close quarters, such as above a solder joint. The standard size of wire clippers you find at hardware stores is so large that you might have trouble clipping the wire with enough precision. You can see the smaller version in Figure 3-4.

Figure 3-4: Handy hand tools.

Figure 3-4: Handy hand tools.
AttentionShoppers

Although you should be able to find small wire cutters and small needlenose pliers at electronics stores such as RadioShack, you might also check out the tools available at hobby supply stores or jewelry-making/bead supply stores. Our local bead supply store carries a nice assortment of tools that work perfectly with small wire.

bullet Wire strippers: You use these to cut plastic insulation from the outside of a wire without harming the copper wire inside. The stripped wire can then be inserted into a breadboard or get soldered to a component to keep electricity flowing.

bullet A vise: Use this to hold components still while you drill, saw, sand, or whatever.

bullet A 3X magnifying glass: This helps you read part numbers on components and check your soldering joints to make sure they’re good. You can get handheld or table-mounted magnifying glasses.

bullet Safety glasses: Your eyes are one of your most important tools, so be sure to have a pair of safety glasses on hand to protect them. When using the tools in your workshop to drill, saw, clip wires, solder, and perform many other tasks, you need these special glasses to avoid injury from small pieces that could go flying.

Multimeter

A multimeter is essentially an electronics troubleshooting tool that you can’t do without. You could use it to hunt down the defective part of a circuit — for example, where the voltage is too low to get your circuit going. A multimeter is a combo type of testing tool in that it combines the functions of a few others meters (a voltmeter, an ammeter, and an ohmmeter) in one package.

By using a multimeter, you can take certain electrical measurements, such as

bullet Current: The flow of electrons through your circuit

bullet Voltage: The force your battery uses to push the electrons through your circuit

bullet Resistance: The amount of fight your circuit puts up when voltage pushes the electrons through your circuit

To use a multimeter to test these various measurements, you set a multi-position switch on the meter to have it measure the appropriate range of volts, amperage, or resistance.

Remember

Check out Chapter 4, where we tell you exactly how to use a multimeter for more about the various test types it offers and how it works.

Tip

Test leads that typically come with multimeters use simple cone-shaped tips. You can buy test clips that slip onto the cone-shaped tips to make it easier to clip them onto the leads of a component. This makes testing much easier, trust us.

Analog or digital multimeters?

Multimeters come in two main types: analog and digital. Think of the difference between a wristwatch that has hands that go around and one that has a numerical readout. For our money (and yours), a digital multimeter is the way to go because you have a smaller chance of making an error when reading the result; even the cheapest is just fine for testing simple projects.

All digital meters have a battery that powers the display. Because they use virtually no power from the circuit you’re testing, they’re not likely to affect the results.

Auto-ranging is another handy feature to look for in your multimeter if you’re willing to spend a little extra money. This sets the test range (see more about this in Chapter 4) automatically.

Components Primer

You use many of the tools discussed in the previous section to work with often teeny, tiny parts called components. These range from electrical doohickeys such as resistors and transistors to integrated circuits (chips), switches, and sensors.

Remember

Our projects tell you exactly the type and value of component to use (as do most published projects in books and on the Web), so don’t worry too much about calculating these values. If you decide to strike off on your own to build your own circuits, we recommend that you get another book, such as Electronics For Dummies, by Gordon McComb and Earl Boysen (Wiley) to find out all about understanding component values.

One important terminology point to make is that the terms pin and lead are almost always interchangeable. They essentially refer to a wire or stamped-out metal bar coming off a component used to connect it to a breadboard or other types of circuit boards. The only exception is pinout, which refers to the function of each lead; you never refer to that as a lead-out!

Running down discrete components: Resistors, capacitors, and transistors

Whereas discreet components should be good at keeping secrets, discrete components are so-named because they are one single, solitary thing, rather than a collection of components like those contained in an integrated chip (IC). (Read more about ICs later in this chapter.) Discrete components are single electrical items, typically resistors, capacitors, and transistors.

Tip

Diodes are also discrete components, but the only kind we use in this book are light emitting diodes (LEDs). See the later section, “Let there be light: Light emitting diodes,” for more about these.

Resistors

The job of a resistor is to restrict the flow of current, which is essentially the flow of electrons. The more electrons, the higher the current. For example, you might want to stop LEDs (which love to eat current) from burning themselves out, and so you would add a resistor to your circuit. You’ll find these little guys used all the time in electronics circuits. We measure resistance in ohms, which are so tiny that the measurement of them is usually given in thousands (kohms) or millions (megohms) of ohms. The value of a resistor is indicated by colored bands, with each band representing a number. However, rather than counting colored bands, just read the packaging your resistor comes in or test it with a multimeter.

One variation on a resistor is a variable resistor, also called a potentiometer. A variable resistor allows you to constantly adjust from 0 (zero) ohms to a maximum value. These can be mounted on the face of a gadget, where you adjust them with a knob; or, you can mount them on a circuit board, where you have to adjust them by using a screwdriver. A typical use of a potentiometer is to control the volume of an amplifier in a sound circuit.

Capacitors

A capacitor stores an electric charge. Quite often, you’ll see capacitors used hand in hand with a resistor — for example, in a circuit whose job is to set timing. Because it takes time for a capacitor to fill with a charge, you can set your watch by them (so to speak) if you use a resistor to control how fast the charge (that is, current) flows in. Also, they make good filters for DC signals because although AC passes through a capacitor with ease, DC signals are stopped in their tracks.

Capacitance is a measurement of a capacitor’s ability to store a charge. The larger the capacitance, the more charge is stored. You measure capacitance in farads (F). An F is pretty darn big, so you have to use prefixes to show lesser values. The prefixes used are micro- (millionth), nano- (thousand-millionth), and pico- (the ever-popular million-millionth).

Although you can find several kinds of capacitors — based on what material they are made of — three common types of capacitors you’ll run across in electronics projects are electrolytic, tantalum bead, and ceramic. Here’s are the basic characteristics of each:

bullet Electrolytic capacitors are typically made of some kind of foil material, and you’ll find them with values of 1 microfarad and up. The two types are

Axial: These have leads stuck on both ends.

Radial: These have all the leads attached to the same end.

We use the radial type for the projects in this book because they take less room on a breadboard. The value of this type of capacitor is printed on it along with a voltage rating and its capacitance.

Remember

Be careful to check the voltage rating required by your project and choose a capacitor accordingly.

bullet Tantalum (a metallic material) bead capacitors are available with values of 0.1 microfarad and higher. They cost more than the electrolytic capacitors but are useful if you have a circuit that requires more accuracy because tantalum capacitors have less variation in value than electrolytic capacitors.

bullet Ceramic capacitors are nonpolarized (see the sidebar, “Polarized counts”), and you can find them with values from 1 picofarad to 0.47 microfarad. Reading the value on these tiny components can be difficult. And to add to the confusion, because many of these capacitors are too small to write the value on in words and numbers, folks use a code. Table 3-1 helps you spot common capacitor values based on their markings.

Table 3-1 Capacitor Values
Marking Value
101 0.0001 µF
102 0.001 µF
103 0.01 µF
471 0.00047 µF
472 0.0047 µF
473 0.047 µF
474 0.47 µF
Tip

For much more detail about various types of capacitors and how to read capacitor values, we recommend that you go out and buy Electronics For Dummies, by Gordon McComb and our own Earl Boysen (Wiley).

A final capacitor distinction that we have to make is variable versus fixed. All the capacitors we talked about so far are fixed, meaning they have a set value you can’t adjust. However, variable capacitors can by adjusted by various methods. We use a variable capacitor, for example, in Chapter 8 for tuning a radio.

Polarized counts

Most electrolytic and tantalum capacitors are polarized, so you will see a polarity symbol on them. Typically, only one end is marked with either a plus or minus sign, so you can conclude that the other end is the opposite. With both types of capacitor, the longer lead is the positive one, which is probably the easiest way to identify it.

What’s important about being polarized? If a capacitor is polarized, you have to be absolutely sure to install it the right way around in your circuit. If you don’t, you will be left with one dead capacitor and possible damage to other components in the circuit.

Small-value capacitors, typically made of ceramic or mica, are nonpolarized so you can connect them any way you want.

Transistors

Transistors are the darlings of the electronics world. Transistors amplify a signal or voltage, or switch voltage on or off. The really amazing thing about transistors is how tiny they are: Before the advent of transistors, people used vacuum tubes to perform the same function, and a vacuum tube is huge in comparison. Transistors also use a lot less power.

Tip

When you shop for transistors, be sure to check the package type. You can use packages starting with TO, such as TO-92, TO-39, and TO-220 (as shown in Figure 3-5) in breadboards or manually soldered circuit boards. Packages starting with SOT or SOIC are meant to be used on huge assembly lines and don’t have the types of leads that you can use easily in hobbyist electronics projects.

Figure 3-5: Common transistor packages.

Figure 3-5: Common transistor packages.

Transistors come in

bullet NPN (negative/positive/negative): You turn on NPN transistors by applying positive voltage; they start to turn on when you apply about 0.7 volts.

Tip

We use NPN transistors throughout this book because it’s more straightforward to apply a positive voltage to get things working.

bullet PNP (positive/negative/positive): You turn off PNP transistors by applying positive voltage; they turn on when you apply negative voltages or voltages near ground.

Transistors have three leads: the emitter, base, and collector. In Chapter 4, we show you how to read schematics so you can figure out where to connect each pin. For each transistor you use, check the datasheet (which contains a drawing, called a pinout) to determine which pin is which.

ICs

Integrated circuits — commonly known as ICs — are like social directors for components: They gather lots of other components in a single location (shuffleboard optional). ICs typically contain a number of transistors, resistors, and capacitors connected on a silicon chip to make a functional circuit in one small package.

Tip

ICs, as well as some other electrical components, can be susceptible to electrostatic discharge (in other words, zapping). For that reason, be sure to also get yourself an anti-static wrist strap (as we discuss in Chapter 2) for your electronics workshop.

ICs come in many packages

Manufacturers make ICs in many types of packages or containers. (A whole valley in California is dedicated to this type of thing.) The type of package that you use either in a breadboard or a circuit board is a dual inline package (DIP). A DIP is made up of plastic that encapsulates a silicon chip, with a row of metal leads running on either side of the plastic. You insert these leads into the contact holes in a breadboard and connect components on the breadboard with the circuitry on the silicon chip. (See the later section, “Breadboard Basics,” for more about this process.)

DIP ICs are identified by the number of leads they have, such as 8-pin DIP, 14-pin DIP, 16-pin DIP, 18-pin DIP, and so on. Figure 3-6 shows a few common DIP ICs.

Figure 3-6: An assort- ment of DIP ICs (8-pin, 14-pin, and 28-pin).

Figure 3-6: An assort- ment of DIP ICs (8-pin, 14-pin, and 28-pin).
Warningbolt

When you order ICs, be careful to order an IC in a DIP package. If you obtain an IC in a non-DIP package, such as an SOIC (see the earlier section, “Transistors”), you can try forever, but you will never be able to insert the leads into a board. High-volume manufacturers use these other ICs with a technique called surface mounting. In this technique, the leads are soldered onto a contact on the surface of a circuit board, not inserted into a hole. If you really need to use an IC that comes only in a surface mount-type package, look for adapters to which you can solder the surface-mount IC and then insert the adapter into your board.

Because ICs are simply a collection of components (such as transistors, resistors, and capacitors) stuffed in miniature onto a silicon chip, each type of IC can perform a different function. That function depends on how many of each component is placed on the chip and how they are wired together. The next two sections provide an overview of two common ICs: operational amplifiers and audio amplifiers.

Opting for op amps

Operational amplifiers (affectionately known as op amps) are a type of IC that contains a series of transistors; each transistor amplifies the voltage of the signal just a bit more. You could build a multistage transistor amplifier that could do a similar job by using several transistors, capacitors, and resistors, but why bother? This setup would use about 50 times more space on your breadboard than a single 8-pin DIP op amp.

If you look in a catalog for op amps, you’ll probably see pages and pages of them — they’re that popular. The fact that we’re using 6 volt batteries to power our circuits narrows down the list considerably. Many op amps are designed to work with a positive supply voltage and a negative supply voltage, such as +6 volts and –6 volts. We use op amps in our projects that are designed to work with a 6 volt, or less, single-sided supply. An op amp that is designed to work with a single-sided supply needs only a positive supply voltage and ground.

Tip

Op amp ICs usually come in 8-pin DIPs; some of these have one op amp circuit, and some have two op amps (dual op amps). In a dual op amp, the pins that give access to one op amp are on the left side of the DIP, and the pins that give access to the other op amp are on the right side of the DIP. As you can see in the project in Chapter 7, this allows you to build one portion of your project circuit along the left side of the breadboard and a second portion along the right side of the breadboard, which can come in handy if things get overcrowded. Op amp ICs also come in 14-pin DIPs. These contain four separate op amps and are therefore called quad op amps.

Here are some common op amps used in electronics projects using low-voltage batteries:

bullet LM358: A dual op amp

bullet LM324: A quad op amp

bullet MC33171: A single op amp

bullet MC33172: A dual op amp

bullet MC33174: A quad op amp

Amplifying sound

Audio amplifiers are similar to op amps except that they are designed to provide more power; logically, being audio amps, they provide enough power to drive speakers.

The LM386 is a widely used audio amplifier. Different versions of the LM386 are designed to work with different supply voltages. For example, the LM386N-1, which we use in projects in Chapters 6 and 7, is designed to work with a 6 volt supply and can work with a supply voltage as low as 4 volts. The MC34119 is an audio amplifier that can work with a supply voltage as low as 2 volts.

Remember

ICs are available for many specialized uses; you can see some of them in action in the projects that we include in this book. The projects in Chapters 11 and 15, for example, use encoder/decoders ICs paired with motor driver ICs. The project in Chapter 10 uses a timer IC paired with a decade counter IC, and the project in Chapter 7 uses a speech synthesizer IC paired with an audio amplifier IC. The projects in Chapters 9 and 14 both use a voice recorder IC.

The switch is on

A switch seems simple enough: You flick it one way to go on and the other way to go off. However, understanding what’s happening behind that switch requires that we give you a bit of background.

bullet Open: A switch is in an open state when there is no electrical connection. When switch is open, there is very high resistance between a wire coming into a switch and the wire going out of the switch.

bullet Closed: A switch is closed when there is an electrical connection. When a switch is closed, there is very low resistance between a wire coming into a switch and the wire going out of the switch.

There are different kinds of switches, referred to as SPST, SPDT, and DPDT, as shown in Figure 3-7. Here’s what these catchy acronyms mean:

bullet SPST (single-pole, single-throw): This kind of switch has two lugs to which you can solder wires. When the switch is on, the two wires are connected; when the switch is off, the two wires are disconnected. We like SPST switches so much that we use them as on/off switches in every project in this book.

bullet SPDT (single-pole, double-throw): This kind of switch has three lugs to which you can solder wires: one for an incoming wire and two for outgoing wires. When the switch is in one position, the incoming wire is connected to the first of the outgoing wires. When the switch is in the other position, the incoming wire is connected to the second of the outgoing wires. (If you have a different need and this is the type of switch you happen to have in your parts bin, you can use just two lugs to make it work as an SPST.)

bullet DPDT (double-pole, double-throw): This kind of switch has six lugs to which you can solder wires. These lugs can be attached to two incoming wires and four outgoing wires. When you flip this switch, you simply switch each incoming wire between two of the outgoing wires. We use this type of switch in a relay in Chapter 13 to switch control of the motors from one type of sensor to another.

Figure 3-7: Three types of switches from left to right: SPST, SPDT, and DPDT.

Figure 3-7: Three types of switches from left to right: SPST, SPDT, and DPDT.

As if switches didn’t have enough names, they are also referred to by the method used to change their state from open to closed. See Figure 3-8 to see the different types.

bullet Toggle switch: This switch gets its name from the fact that you flip a lever to turn it on and flip it back to turn it off.

bullet Pushbutton on/off switch: Every time you push this button, it changes from on to off or vice versa.

bullet Momentary pushbutton switch: Pushing this switch is what changes its state, but only for the moment! These are also classified by whether they are normally open (NO) or normally closed (NC). For example, a momentary normally open switch is closed only while you hold the pushbutton down. When you release the button, it goes back to its normal — open — state.

bullet Tactile switch: This is a type of momentary pushbutton switch. Tactile switches are rated by the amount of force that is needed to push the button and are often flat so that they can be easily inserted somewhere without protruding (like how we insert them into the hands of a puppet in Chapter 7).

bullet Slide switch: Logically, this switch operates when you slide a knob to change it from on to off or vice versa.

bullet Relays: These switches are operated by a voltage rather than by pushing a switch. This makes them very useful for turning on or off a component, such as a light or motor, through a remote control or by voltage generated by a sensor. We control relays with both methods in Chapter 13.

Figure 3-8: A plethora of ways to flip a switch.

Figure 3-8: A plethora of ways to flip a switch.

Sensors

Sensors take energy in forms such as sound or light and transform that energy into a signal. By using a sensor, you can detect heat, light, and sound, for example. When a signal is sensed, to the sensor produces an electrical signal that is used by your circuit to control some activity. For example, an infrared detector can work in conjunction with an infrared remote control device to stop or start a little go-kart.

Here are a few types of sensors that we use in the projects in this book:

bullet IR detector: This converts infrared (IR) light into an electric signal. The version that we use in Chapters 11 and 9 contains a photodiode that detects infrared light and an integrated circuit that produces either +V or 0 volts on its output pin. In order to reduce noise from ambient IR light, this detector is designed to only respond to IR light that is pulsed at 38 kHz.

bullet Tilt/vibration sensor: This type of sensor (which we use in Chapter 14) detects motion or vibrations when the switch is mounted with the body of the sensor horizontal. When the sensor detects motion, it closes a switch, just like a toggle switch works.

Microphones

Technically speaking, a microphone is a kind of sensor. However, there’s a lot to say about these sound-sensing devices, so we give microphones their own section (because we’re the authors, and we can!).

How condenser (capacitor) microphones work

Capacitors are kind of like a voltage sandwich in that they have two plates, with a slab of voltage between them. A so-called condenser mike (also called a capacitor microphone) contains one plate made of a very light material that acts as a diaphragm. This plate vibrates when sound waves hit it. This moves the two plates apart, which changes capacitance (the ability to store electrons). Moving the plates farther apart decreases capacitance (discharging current), and moving them together increases capacitance (charging current).

Tip

Condenser microphones aren’t cheap, but they give high-quality sound, so they are often the best choice for an audio-intensive project.

A better mousetrap: Electret capacitor microphones

Today, the most popular type of condenser microphone is the electret microphone (which gets its name from the combination of electrostatic and magnet), invented in 1962. The electret material used in this type of microphone is made by embedding a permanent charge in a material called a dielectric. A charge is embedded in a dielectric by aligning the charges in the material — sort of like how you make a magnet by aligning the atoms in a piece of iron.

There is a preamplifier in an electret microphone, to which you provide a supply voltage. That’s why the projects in this book that use electret microphones have a connection through a resistor running between the plus (+) lead of the microphone and the +V bus to power the preamplifier. (The resistor reduces the voltage at the + lead of the microphone to the desired supply voltage.)

Size counts

When you order electret microphones, pay attention to the diameter and thickness because some can be hard to handle and solder. For most of our projects in this book, we use microphones with a diameter of about 3/8" and a thickness of about 2/10". A microphone cartridge with a diameter of about 1/4" and a thickness of about 1/10" turns out to be much harder to handle and solder to than a microphone cartridge of about 3/8" and a thickness of about 2/10". (Check out Chapter 6, where we bit the bullet and used a small microphone cartridge because that project needed some of the capabilities we couldn’t find in a larger microphone cartridge.)

Tip

Many microphone cartridge sizes are specified in millimeters. To help you translate this, typical diameters of microphone casings are 6 mm (about 1/4") and 9.7 mm (about 3/8").

Measuring sensitivity

Sensitivity is another issue that you should pay attention to with microphone cartridges. Sensitivity is measured in decibels (dB) — and just to confuse you, this measurement is given as a negative number. A microphone cartridge with a sensitivity of –40 dB, for example, is more sensitive (provides higher voltage at a given level of sound) than a microphone cartridge with a sensitivity of –60.

For example, for the project in Chapter 6 (which has to pick up very faint sounds as part of a parabolic microphone), you need a highly sensitive microphone cartridge. We use one with a sensitivity of –35 dB. In Chapter 14, in which you talk directly into the microphone to record a message, we use a less-sensitive microphone cartridge, rated at –64 dB.

Connecting your microphone cartridge to your project

To connect electret microphone cartridges to your project, you can get electret microphone cartridges with solder pads or with leads that you can insert into a breadboard. We use both in our projects.

Let there be light: Light emitting diodes

A diode sends out light when you pass an electric current through it. LEDs, which we use quite a bit in the projects in this book, are similar to the tiny, twinkly lights you use to decorate a Christmas tree, and they come in a variety of colors, such as red, orange, yellow, green, blue, and white. Blue and white LEDs are a lot more expensive, so you don’t see them used that often in this book. (We’re thrifty!)

Tip

LED color isn’t controlled by the plastic that surrounds the light. Rather, the semiconductor material used in the LED determines the color. The plastic surrounding the semiconductor material can be clear or treated so that it diffuses the light.

In addition, you can get LEDs in several sizes and shapes. The standard LED, which is a cylinder with a diameter of 5mm, is referred to as T-1 3/4.

If you don’t connect LEDs the right way, you could wait forever to see the light. Connect the longer of the two leads to the positive voltage and the shorter of the two leads to ground or the more negative voltage.

Speaking up about speakers

Everybody knows what a speaker is: There’s one on your DVD player, your computer, your iPod — you name it! Most speakers contain a permanent magnet, an electromagnet, and a cone-shaped device from which the sounds emerge (see Figure 3-9).

Figure 3-9: The parts that make up a speaker.

Figure 3-9: The parts that make up a speaker.

When current moves through the electromagnet, which is attached to the cone, it gets pushed toward or pulled away from the permanent magnet. This depends on which way the electric current is moving. This movement of the electromagnet is what makes the cone vibrate, and that produces sound waves.

Speakers come with a rated impedance (the degree to which a component resists electrical current): for example, 4 ohm, 8 ohm, 16 ohm, or 32 ohm. A speaker is often referred to by its impedance: for example, “I’m going out to buy an 8 ohm speaker.” When you use a speaker in a circuit, it should have an impedance rating that matches the minimum impedance rating that the amplifier hooked up to the speaker can drive. If you use a speaker with higher impedance than the amplifier can drive, you won’t get the maximum amount of sound; conversely, if you use a speaker with lower impedance than the amplifier can drive, you might overheat the amplifier. You can find this rating in the datasheet on your supplier’s Web site.

For example, in Chapter 8, we use an 8 ohm speaker because the LM386 amplifier can drive a speaker with impedance as low as 8 ohms. And in Chapter 14, we use a 16 ohm speaker because the ISD1110 voice record/ playback chip can drive a speaker with impedance as low as 16 ohms.

Speakers also come with a power rating, such as 0.2 watt, 1 watt, or 2 watt. Choose a speaker with at least as high of a power rating as the maximum output of the amplifier. Again, you can find this maximum output in the amplifier datasheet.

AttentionShoppers

When you buy a speaker for electronics projects, buy one that comes with convenient holes in the corners of metal or plastic flanges that you can slip screws through. These help you to easily attach the speaker to the box you’re putting the circuit in. See Chapter 4 for more about building and assembling projects.

Buzzers

If you have an annoying friend who plays practical jokes, you’ve probably been on the receiving end of the buzzer and handshake joke. A buzzer essentially generates a sound, which you can use in projects in a variety of ways. For example, a buzzer could be the horn on a remote controlled car or an alarm that goes off when a sensor detects motion.

In a buzzer, you apply voltage to a crystal (a piezoelectric crystal), which then expands or contracts. By attaching a diaphragm to the crystal, you cause the diaphragm to vibrate when you change the voltage. This vibration causes that bzzz sound. There are electromagnet buzzers, but the piezo buzzer works just fine for electronic projects, so we stick to using them in this book.

Most buzzers give off sound in the 2–4 kHz range. Buzzers aren’t very discriminating when it comes to voltage: Their ratings are approximate, meaning that a 12V buzzer is absolutely happy to work with a 9V power supply.

Remember

Buzzers have two leads, and you have to connect a buzzers the right way round. The red lead is always positive (+).

The Nuts and Bolts of Building Materials

A pure electronics project might just consist of a breadboard containing components and wires. In most cases, though, you’ll also want to create some sort of container or chassis to hold the project. For example, if you build a simple radio, you might put the guts of it in a box and drill holes to place the dials and speaker.

You can buy ready-made boxes or other containers and make them work for your project. You can also build your own out of various materials.

Plastic

ABS (please don’t ask what this acronym means; we could tell you, but you couldn’t pronounce it) plastic boxes are available from most electronics suppliers. These are lightweight, sturdy, waterproof, and handy for housing your gadgets. We use a plastic box in Chapter 11 to house a remote control.

The plus with plastic boxes is that components such as switches are designed to be mounted on boxes or panels with thin walls. Therefore, mounting these components on these plastic boxes is often easier than on wooden boxes.

The downside is that cutting clean openings in plastic is harder than in wood — for example, to insert speakers.

Wood

We like to use wooden boxes to house many of our projects because, well, they look nice. We found simple, unfinished wooden boxes at a national craft supply superstore (Michaels), but any craft store probably stocks them.

Wood is also easier to drill and cut than plastic; however, you’ll often find that the wall of the box is 1/4" thick, which makes mounting components such as switches more complicated. In Chapter 4, we provide some advice on how to handle mounting components on wood.

Build it yourself

If you don’t like to buy ready-made containers, you can make your own boxes from wood or plastic. You can easily find lots of books that tell you how to make all sorts of things from wood, so we don’t get into that. To start, you might check out the Woodbox.com Web site and click the Wooden Box Making link for a good overview.

Tip

If you want to make your own boxes or build fancier shapes out of plastic, such as a model car, to mount your electronics, check out

www.talkingelectronics.com/Projects/Boxes/BJones-BoxArticle.html

This article is a nice introduction to making custom plastic boxes for electronics projects.

For some projects, you will mount boxes on a base or sandwich them between two sheets of materials. We used sheets of PVC and plywood in our projects. Quarter-inch or 6 mm thickness is a good bet for a strong base. You can use thinner sheets — for example, 1/8" or 3 mm — when you don’t need structural strength. Rigid, expanded PVC is often used instead of other plastics because it resists the buildup of electric charges, which might cause electrostatic discharge, which can zap your electronics components.

AttentionShoppers

Robot supply houses, such as Solarbotics (www.solarbotics.com) or Budget Robotics (www.budgetrobotics.com), carry PVC sheeting. At Solarbotics, this material is sold under the product name Sintra. You can find plastics suppliers that sell rigid expanded PVC in 4' x 8' sheets, which is economical if you plan to use a lot of it.

Holding it all together

Sticking materials together to form boxes or whatever can be done in a few different ways.

You can attach many different types of materials together with glue. Look for a glue called contact cement. This can bind a wealth of materials, including metal, plastic, rubber, and wood.

To mount components such as speakers, you need screws and nuts. The parts lists in our project chapters tell you what size screws and nuts to get; we’re betting you have some of these in that leftover cake tin in your garage gathering dust, but you can buy what you need for pennies in any hardware store.

Tip

We find that 6-32 screws fit many mounting holes.

Holding down wires

Wire clips are very useful for organizing wires that you affix to your project container. These generally have an adhesive backing on the base that you use to attach them to a surface. Then you slip the wires into the clip, and they are nicely held in place. (We use RadioShack part #287-1668.)

Tip

Cable ties can also be useful when you want to run wires along something without a flat surface, like a wooden dowel.

Breadboard Basics

A breadboard is a rectangular plastic box filled with holes, which have contacts in which you can insert electronic components and wires. A breadboard is what you use to string together a temporary version of your circuit. You don’t have to solder wires or anything else; instead, you poke your components and wires into the little contact holes arranged in rows and connected by lines of metal; then you can connect your components together with wires to form your circuit.

The nice thing about breadboards is that you can change your mind and replace or rearrange components as you like. You typically create an electronics project on a breadboard to make sure that everything works. If it’s a project you wish to save, you can create a more permanent version. We use breadboarded versions of circuits exclusively in this book.

Tip

If you want to create a permanent version of your circuit, you need to create a soldered or printed circuit board; see the sidebar, “Printed circuit boards,” to find out how to go about that.

There are a few different sizes of breadboards, some of which are shown in Figure 3-10. You can link breadboards to make a larger circuit, like the one shown in Figure 3-11. See Chapter 4 for more about how to build a breadboard.

Figure 3-10: Two bread- boards, one with 830 contact holes and one with 400 contact holes.

Figure 3-10: Two bread- boards, one with 830 contact holes and one with 400 contact holes.

Figure 3-11: A large circuit built on multiple breadboards hooked together.

Figure 3-11: A large circuit built on multiple breadboards hooked together.

Printed circuit boards

If you create a circuit on a breadboard and decide that it’s worthy of immortality, you can make it permanent by soldering components in place on a printed circuit board. To do this, you have to get your hands on a universal printed circuit board. This is much like a breadboard except that you can solder all the connections you’ve made to keep them around.

A universal printed circuit board has rows of individual holes throughout the board with copper pads around each hole and metal lines connecting the holes in each row, like in a breadboard. You mount parts on the face of the board and then pass leads through holes to the components. You can solder the leads to the copper pads on the bottom of the board. Universal printed circuit boards are available in a variety of patterns of contact holes and metal lines. The figure here shows one we like because there are rows on either side that accommodate discrete components handily. This circuit board is made by One Pass, Inc. (www.onepassinc.com).

You can get custom printed circuit boards made for your circuit; this is typically done by submitting a drawing of your circuit to a printed circuit board company. These boards eliminate the need to solder jumper wires between components.

Wires pull it all together

When you place components in a breadboard, you don’t get much action until you connect those components with wire. Wire used in electronics is copper surrounded by a plastic insulator, usually called hookup wire. Hookup wire comes in various diameters referred to as a gauge. The standard gauge measurement used in the U.S. is American Wire Gauge, also referred to as AWG. We generally use 22 gauge or 20 gauge wire.

Someone decided at some point that the smaller the gauge, the larger the diameter of wire. For example, 20 gauge wire is 0.032" in diameter, and 22 gauge wire is 0.025" in diameter. Don’t ask us why — just memorize this fact!

We use 22 gauge solid wire for most of the projects in this book. (Okay, in two chapters, we use 20 gauge; and in one, we use 26 gauge, but you’ll find out why when you get to those projects.)

Remember

Use solid wire — never stranded wire — between components within a breadboard because stranded tends to separate when you try to insert it into the holes of a breadboard.

You can buy hookup wire in spools; we generally get spools containing 100 feet of wire. If you are starting with only a few projects, you can get smaller spools containing as little as 30 feet of wire.

Tip

The insulating plastic that surrounds wire is made in different colors. Pick up a spool of red and a spool of black. Using different colors helps you to identify the purpose of different wires in your project.

You might also consider buying an assortment of different lengths of prestripped and prebent 22 gauge wire jumpers. Jumper wires — which are used to connect components in a breadboard — save you a lot of time you might otherwise spend cutting small wires to length, stripping them, and bending the stripped wire when you’re building a breadboard.

Insulating those naked wires

You will also use various materials to insulate bare wires. You can use electrical tape, for example, to insulate solder joints that might touch each other and cause a short.

Heat shrink tubing is a tidy way to insulate the point where wires connect in a solder joint. Heat shrink tubing is simply a plastic tube. When you slip a short length of this tubing over a solder joint and apply heat, the plastic tube shrinks, providing an insulating layer around the wire. When working with 22 gauge wire, we use 3/32" heat shrink tubing.

Liquid electrical tape is also handy to insulate bare wire in situations where heat shrink tubing or conventional electrical tape doesn’t work very well. We use liquid electrical tape in Chapters 5 and 10, for example.

Connectors

Finally, terminal blocks are used to connect wires from components such as speakers, motors, and microphones to the breadboard. A terminal block is a small block of plastic that you mount on a breadboard. You insert the wires into the terminal block through a hole in the block and then tighten screws to hold the wire securely.

AttentionShoppers

When choosing terminal blocks, the diameter of the pin that inserts into the breadboard or circuit board is important. Some terminal blocks that work fine in circuit boards where the components are soldered in do not stay in place on breadboards. We have had the most success with RadioShack part #276-1388.