Chapter 12
IN THIS CHAPTER
Choosing the perfect type of wire
Powering up with batteries and solar cells
Controlling connections with switches
Triggering circuits with sensors
Turning electricity into light, sound, and motion
Although the individual components and integrated circuits discussed in Chapters 4 through 11 form the A-team when it comes to shaping the flow of electrons in electronic circuits, there are a bunch of other contributing parts that the A-team relies on to help get the job done.
Some of these other parts — such as wires, connectors, and batteries — are essential ingredients in any electronic circuit. After all, you’d be hard-pressed to build an electronic circuit without wires to connect things or a source of power to make things run. As for the other parts I discuss in this chapter, you may use them only now and then for certain circuits. For example, when you need to make some noise, a buzzer sure comes in handy — but you may not want to use one in every circuit you build.
In this chapter, I discuss a mixed bag of components, some of which you should keep in stock (just like toilet paper and toothpaste), while the others can be picked up whenever the spirit moves you.
Making a circuit requires that you connect components to allow electric current to flow between them. The following sections describe wires, cables, and connectors that allow you to do just that.
Wire that you use in electronics projects is just a long strand of metal, usually made of copper. The wire has only one job: to allow electrons to travel through it. However, you can find a few variations in the types of wire available to you. In the following sections, I give you the lowdown on which type of wire to choose for various situations.
Cut open the cord of any old household lamp (only after unplugging the lamp, of course), and you see two or three small bundles of very fine wires, each wrapped in insulation. This is called stranded wire. Another type of wire, known as solid wire, consists of a single (thicker) wire wrapped in insulation. You can see examples of stranded and solid wires in Figure 12-1.
Stranded wire is much more flexible that solid wire, and you use it in situations in which the wire will be moved or bent a lot (such as in line cords for lamps and the cables you hook up to your home entertainment system). You use solid wire in places where you don’t plan to move the wire around, and to connect components on breadboards (check out Chapter 15 for more on breadboards). It’s easy to insert solid wire into holes in the breadboard, but if you try to use a stranded wire, you have to twist the strands to get all of them into the hole, and you may break a strand or two in the process (trust me — it happens), which could short out the circuit.
You refer to the diameter of wire as the wire gauge. As luck would have it, the relationship between wire gauge and wire diameter in electronics is essentially backward: The smaller the wire gauge, the larger the wire diameter. You can see common wire gauges in Table 12-1.
TABLE 12-1 Wires Commonly Used in Electronics Projects
Wire Gauge |
Wire Diameter (inches) |
Uses |
16 |
0.051 |
Heavy-duty electronics applications |
18 |
0.040 |
Heavy-duty electronics applications |
20 |
0.032 |
Most electronics projects |
22 |
0.025 |
Most electronics projects |
30 |
0.01 |
Connections on small circuit board prototypes or wire-wrap connections |
For most electronics projects, including the ones in this book, you use 20- or 22-gauge wire. If you’re hooking up a motor to a power supply, you need to use 16- or 18-gauge wire. You may find smaller 28- or 30-gauge wire useful for making connections on small circuit board prototypes. 30-gauge wire was commonly used for connecting components on special circuit boards using a technique known as wire wrapping, which is rarely done anymore. (Refer to Chapter 15 for details on circuit construction.)
As with the colorful bands that unlock the secrets of resistor values, the colorful insulation around wire can help you keep track of connections in a circuit. When wiring a DC circuit (for example, when you work with a breadboard), using red wire for all connections to positive voltage (+V) and black wire for all connections to negative voltage (–V) or to ground is common practice. For AC circuits, use green wire for ground connections. Yellow or orange wire is often used for input signals, such as the signal from a microphone into a circuit. If you keep lots of different colors of wire handy, you can color-code your component connections so it’s easier to tell what’s going on in a circuit just by glancing at it (unless, of course, you’re colorblind).
Cables are groups of two or more wires protected by an outer layer of insulation. Line cords that bring AC power from a wall outlet to an electrical device such as a lamp are cables — so are the cords in the mishmash of connections in your home entertainment system. Cables differ from stranded wires because the wires used in cables are separated by insulation.
If you look at a cable — say, the one that goes from your set-top box to your TV— you see that it has metal or plastic doodads on each end. These doodads are called plugs, and they represent one kind of connector. There are also metal or plastic receptacles on your set-top box and TV that these cable ends fit into. These receptacles (sometimes called sockets or jacks) are another kind of connector. The various pins and holes in connectors connect the appropriate wire in the cable to the corresponding wire in the device.
Different types of connectors are used for various purposes. Among the connectors you’re likely to hook up with in your electronics adventures are these:
Electronics uses a wealth of connectors that you don’t have to delve into until you start doing more complex projects. If you want to find out more about the broad array of connectors, you can take a look at some of the catalogs or websites of electronics suppliers listed in Chapter 19. Most devote an entire category of products to connectors.
All the wires and connectors in the world won’t do you much good if you don’t have a power source. In Chapter 3, I discuss sources of electricity, including AC power from wall outlets and DC power from batteries and solar cells (also known as photovoltaic cells). Here I discuss how to choose a power source and how to feed its power into your circuits.
For most hobby electronics projects, cells or batteries — which are combinations of cells — are the way to go. The symbols used to represent a cell and a battery in a circuit diagram are shown in Figure 12-3.
Many schematics use the symbol for a cell to represent a battery. Cells are relatively lightweight and portable, and by combining multiple cells in series, you can create a variety of DC voltage sources. Everyday cells, such as garden-variety AAA-, AA-, C-, and D-cells, all produce about 1.5 volts each. A 9-volt battery (sometimes called a transistor battery or PP3 battery) is shaped like a 3-D rectangle and ordinarily contains six 1.5-volt cells. (Some cheap brands may contain only five 1.5-volt cells.) A lantern battery (a big boxy thing that can power a flashlight the size of a boom box) produces about 6 volts.
You use a 9-volt (PP3) battery clip (shown in Figure 12-4) to connect an individual 9-volt battery to a circuit. Battery clips snap onto the terminals of the battery (those snaps on the top of the battery are known as a PP3 connector); they contain black and red leads that you connect to your circuit. You strip the insulation from the ends of the black and red wires, and then connect the leads (the bare ends) to your circuit. You can connect the leads to terminals, insert them into holes in a breadboard, or solder them directly to components. I discuss all these techniques in Chapter 15.
When you connect the positive terminal of one battery to the negative terminal of another battery, the total voltage across this series connection is the sum of the individual battery voltages.
Battery holders make series connections between batteries for you while holding multiple batteries in place. Some battery holders provide red and black leads for access to the total voltage; others, such as the one in Figure 12-5, provide PP3 connector snaps so you can attach a battery clip and access the total voltage across the clip’s red and black leads.
Batteries are classified by the chemicals they contain, and the type of chemical determines whether a battery is rechargeable. The following types of batteries are readily available:
If you’re building a circuit designed to operate outside — or you just want to use a clean, green source of energy — you may want to purchase one or more solar panels. A solar panel consists of an array of solar cells (which are large diodes known as photodiodes) that generate current when exposed to a light source, such as the sun. (I discuss diodes in Chapter 9, and photodiodes in the section “Using Your Sensors,” later in this chapter.) A panel measuring about 5 x 5 inches may be able to generate 100 milliamps at 5 volts in bright sunlight. If you need 10 amps, you can certainly get it, but you may find the size of the panel problematic — and expensive — for a small or portable project.
Some solar panels contain output leads that you can connect into your circuit, much like the leads from a battery clip or battery holder. Other solar panels have no leads, so you have to solder your own leads to the two terminals.
Here are some criteria to consider to help you determine whether a solar panel is appropriate for your project:
Some projects need more DC current or higher DC voltages than batteries can easily provide. In those cases, you can use an AC adapter, such as the one shown in Figure 12-6, to convert AC to DC and get the higher current or voltage you need. All the working parts are self-contained in the wall transformer, so you aren't exposed to high AC currents.
AC adapters supply currents ranging from hundreds of milliamps to a few amps at voltages ranging from 5 volts DC to 20 volts DC. Some provide both a positive DC voltage and a negative DC voltage. Different models use different types of connectors to deliver power. If you purchase an AC adapter, be sure to read the specification sheet (specs) carefully to determine its power rating and how to connect it to your circuit.
Using your wire cutters, cut one of the two insulated wires so that it is at least an inch shorter than the other wire.
By making one wire shorter that the other, you prevent the two wires from accidentally coming into contact when the AC adapter is powered up, which would short out the adapter, rendering it useless.
Observe the voltage reading.
If the voltage reading is positive, your positive (usually red) multimeter lead is attached to the positive conductor of the AC adapter. If the voltage reading is negative, your negative (usually black) multimeter lead is attached to the positive conductor of the AC adapter. Label the positive conductor with a marker or by attaching a label.
Note that the magnitude of the voltage reading you get is likely significantly higher than the nominal voltage specified on the label or data sheet of the AC adapter. This discrepancy is normal and due to the fact that you are using an unregulated power supply and measuring the adapter’s output voltage under no-load conditions. Unregulated power supplies generate voltages that vary depending on the current drawn by the load, that is, the device receiving power. After you connect the adapter’s output leads to a circuit, the output voltage will come down. I measured 10.5 V on an AC adapter that was labeled 7.5 VDC (volts DC).
Congratulations! You now have a power supply for your electronics projects that can supply more current that batteries can provide.
When you want to trigger the operation of a circuit as a response to something physical happening (such as a change in temperature), you use electronic components known as sensors. Sensors take advantage of the fact that various forms of energy — including light, heat, and motion — can be converted into electrical energy. Sensors are a type of transducer, which is an electronic device that converts energy from one form to another. In this section, I describe some of the more common input transducers, or sensors, used in electronic circuits.
The circuit symbols for several types of sensors discussed in this section are shown in Figure 12-7.
Many electronic components behave differently depending on the light they are exposed to. Manufacturers make certain versions of components to exploit this light sensitivity, enclosing them in clear cases so you can use them as sensors in equipment such as burglar alarms, smoke detectors, automatic dusk-to-dawn lighting, and safety devices that stop your electrically controlled garage door from descending when a cat runs under it. You can also use them for communications between your remote control, which sends coded instructions via infrared light using a light-emitting diode (LED, which I discuss in Chapter 9), and your TV or DVD player, which contains a light-sensitive diode or transistor to receive the coded instructions.
Examples of light-sensitive devices used as sensors include the following:
Microphones are input transducers that convert acoustic energy (otherwise known as sound) into electrical energy. Most use a thin membrane, or diaphragm, that vibrates in response to air pressure changes from sound. The vibrations of the membrane are translated into an AC electrical signal in various ways, depending on the type of microphone:
A thermistor is a resistor whose resistance value changes with changes in temperature. Thermistors have two leads and no polarity, so you don’t need to worry about which way you insert a thermistor into your circuit.
Following are the two types of thermistors:
Suppliers’ catalogs typically list the resistance of thermistors as measured at 25 degrees Celsius (77° F). Measure the resistance of the thermistor yourself with a multimeter at a few different temperatures (see Chapter 16 for more about using multimeters). These measurements enable you to calibrate the thermistor, or get the exact relationship between temperature and resistance. If you’re not sure of a thermistor’s type, you can figure that out by identifying whether the value increases or decreases with a rise in temperature.
Many other types of input transducers are used in electronic circuits. Here are three common examples:
Transducers are often categorized by the type of energy conversion they perform, for instance, electroacoustic, electromagnetic, photoelectric, and electromechanical transducers. These amazing devices open up tremendous opportunities for electronic circuits to perform countless useful tasks.
Sensors, or input transducers, take one form of energy and convert it into electrical energy, which is fed into the input of an electronic circuit. Output transducers do the opposite: They take the electronic signal at the output of a circuit and convert it into another form of energy — for instance, sound, light, or motion (which is mechanical energy).
You may not realize it, but you’re probably familiar with many devices that really are output transducers. Light bulbs, LEDs, motors, speakers, liquid crystal displays (LCDs), and other electronic visual displays all convert electrical energy into some other form of energy. Without these puppies, you might create, shape, and send electrical signals around through wires and components all day long, and never reap the rich rewards of electronics. It’s only when you transform the electrical energy into a form of energy you can experience (and use) that you begin to enjoy the fruits of your labor.
The schematic symbols for three output transducers discussed in this section are shown in Figure 12-8.
Speakers convert electrical signals into sound energy. Most speakers consist simply of a permanent magnet, an electromagnet (which is a temporary, electrically controlled magnet), and a vibrating cone. Figure 12-9 shows how the components of a speaker are arranged.
The electromagnet, which consists of a coil wrapped around an iron core, is attached to the cone. As electrical current alternates back and forth through the coil, the electromagnet gets pulled toward and then pushed away from the permanent magnet. (Chapter 8 tells you more about the ups and downs of electromagnets.) The motion of the electromagnet causes the cone to vibrate, which creates sound waves.
Most speakers come with two leads that can be used interchangeably. For more serious projects, such as speakers in stereo systems, you must pay attention to the polarity markings on the speakers because of the way they are used in electronic circuits inside the stereo system.
Speakers are rated according to the following criteria:
Like speakers, buzzers generate sound — but unlike speakers, buzzers indiscriminately produce the same obnoxious sound no matter what voltage you apply (within reason). With speakers, “Mozart in” creates “Mozart out”; with buzzers, “Mozart in” creates nothin’ but noise.
One type of buzzer, a piezoelectric buzzer, contains a diaphragm attached to a piezoelectric crystal. When a voltage is applied to the crystal, the crystal expands or contracts (the piezoelectric effect); this effect, in turn, makes the diaphragm vibrate, generating sound waves. (Note that piezoelectric buzzers work in pretty much the opposite way a crystal microphone works, as described earlier in this chapter.)
Buzzers have two leads and come in a variety of packages. Figure 12-10 shows a typical buzzer. To connect the leads the correct way, remember that the red lead connects to a positive DC voltage.
When shopping for a buzzer, you should consider three specifications:
Have you ever wondered what causes your smartphone to vibrate? No, it’s not Mexican jumping beans: These devices normally use a DC motor, which changes electrical energy (such as the energy stored in a battery) into motion. That motion may involve turning the wheels of a robot that you built or shaking your smartphone. In fact, you can use a DC motor in any project in which you need motion.
Electromagnets make up an important part of DC motors because these motors consist of, essentially, an electromagnet on an axle rotating between two permanent magnets, as you can see in Figure 12-11.
The positive and negative terminals of the battery connect so that each end of the electromagnet has the same polarity as the permanent magnet next to it. Like poles of magnets repel each other. This repelling action moves the electromagnet and causes the axle to spin. As the axle spins, the positive and negative connections to the electromagnet swap places, so the magnets continue to push the axle around.
A simple mechanism — consisting of a commutator (a segmented wheel with each segment connected to a different end of the electromagnet) and brushes that touch the commutator — causes the connections to change. The commutator turns with the axle and the brushes are stationary, with one brush connected to the positive battery terminal and the other brush to the negative battery terminal. As the axle — and (therefore) the commutator — rotates, the segment in contact with each brush changes. This, in turn, changes which end of the electromagnet is connected to negative or positive voltage.
The axle in a DC motor rotates a few thousand times per minute — a bit fast for most applications. Suppliers sell DC motors with something called a gear head premounted; this device reduces the speed of the output shaft to under a hundred revolutions per minute (rpm). This technique is similar to the way that changing gears in your car changes the speed of the car.
Suppliers’ catalogs typically list several specifications for the motors they carry. When you shop for electric motors, consider these two key characteristics:
DC motors have two wires (or terminals that you solder wires to), one each for the positive and negative supply voltage. You run the motor by simply supplying a DC voltage that generates the speed that you want, and you switch off the voltage when you want the motor to stop. For many DC motors, changing the polarity of the supply voltage changes the direction of the axle rotation.
You can use a more efficient method of controlling the speed of the motor called pulse-width modulation. This method turns voltage on and off in quick pulses. The longer the on intervals, the faster the motor goes. If you’re building a kit for something motor controlled (such as a robot), this type of speed control should be included with the electronics for the kit.
18.191.223.123