Code: The Hidden Language of Computer Hardware and Software, 2nd Edition, page 4
Some substances are significantly better than others for carrying electricity. The ability of an element to carry electricity is related to its subatomic structure. Electrons surround the nucleus in various levels, called shells. An atom that has just one electron in its outer shell can readily give up that electron, which is what’s necessary to carry electricity. These substances are conducive to carrying electricity and thus are said to be conductors. The best conductors are copper, silver, and gold. It’s no coincidence that these three elements are found in the same column of the periodic table. Copper is the most common substance for making wires.
The opposite of conductance is resistance. Some substances are more resistant to the passage of electricity than others, and these are known as resistors. If a substance has a very high resistance—meaning that it doesn’t conduct electricity much at all—it’s known as an insulator. Rubber and plastic are good insulators, which is why these substances are often used to coat wires. Cloth and wood are also good insulators, as is dry air. Just about anything will conduct electricity, however, if the voltage is high enough.
Copper has a very low resistance, but it still has some resistance. The longer a wire, the higher its resistance. If you tried wiring a flashlight with wires that were miles long, the resistance in the wires would be so high that the flashlight wouldn’t work.
The thicker a wire, the lower its resistance. This may be somewhat counterintuitive. You might imagine that a thick wire requires much more electricity to “fill it up.” But actually the thickness of the wire makes available many more electrons to move through the wire.
I’ve mentioned voltage but haven’t defined it. What does it mean when a battery has 1.5 volts? Actually, voltage—named after Count Alessandro Volta (1745–1827), who invented the first battery in 1800—is one of the more difficult concepts of elementary electricity. Voltage refers to a potential for doing work. Voltage exists whether or not something is hooked up to a battery.
Consider a brick. Sitting on the floor, the brick has very little potential. Held in your hand four feet above the floor, the brick has more potential. All you need do to realize this potential is drop the brick. Held in your hand at the top of a tall building, the brick has much more potential. In all three cases, you’re holding the brick and it’s not doing anything, but the potential is different.
A much easier concept in electricity is the notion of current. Current is related to the number of electrons actually zipping around the circuit. Current is measured in amperes, named after André-Marie Ampère (1775–1836), but often called just amps, as in “a 10-amp fuse.” To get one amp of current, you need over 6 quintillion electrons flowing past a particular point per second. That’s 6 followed by 18 zeros, or 6 billion billions.
The water-and-pipes analogy helps out here: Current is similar to the amount of water flowing through a pipe. Voltage is similar to the water pressure. Resistance is similar to the width of a pipe—the smaller the pipe, the greater the resistance. So the more water pressure you have, the more water that flows through the pipe. The smaller the pipe, the less water that flows through it. The amount of water flowing through a pipe (the current) is directly proportional to the water pressure (the voltage) and inversely proportional to the skinniness of the pipe (the resistance).
In electricity, you can calculate how much current is flowing through a circuit if you know the voltage and the resistance. Resistance—the tendency of a substance to impede the flow of electrons—is measured in ohms, named after Georg Simon Ohm (1789–1854), who also proposed the famous Ohm’s law. The law states
I=E/R
where I is traditionally used to represent current in amperes, E is used to represent voltage (it stands for electromotive force), and R is resistance.
For example, let’s look at a battery that’s just sitting around not connected to anything:
The voltage, E, is 1.5. That’s a potential for doing work. But because the positive and negative terminals are connected solely by air, the resistance (the symbol R) is very, very, very high, which means the current (I) equals 1.5 volts divided by a large number. This means that the current is just about zero.
Now let’s connect the positive and negative terminals with a short piece of copper wire (and from here on, the insulation on the wires won’t be shown):
This is known as a short circuit. The voltage is still 1.5, but the resistance is now very, very low. The current is 1.5 volts divided by a very small number. This means that the current will be very, very high. Lots and lots of electrons will be flowing through the wire. In reality, the actual current will be limited by the physical size of the battery. The battery will probably not be able to deliver such a high current, and the voltage will drop below 1.5 volts. If the battery is big enough, the wire will get hot because the electrical energy is being converted to heat. If the wire gets very hot, it will actually glow and might even melt.
Most circuits are somewhere between these two extremes. We can symbolize them like so:
The squiggly line is recognizable to electrical engineers as the symbol for a resistor. Here it means that the circuit has a resistance that is neither very low nor very high.
If a wire has a low resistance, it can get hot and start to glow. This is how an incandescent lightbulb works.
The filament commonly found in the incandescent bulbs in flashlights has a resistance of about 4 ohms. If the flashlight requires two batteries connected end to end, the current is 3 volts divided by 4 ohms, or 0.75 ampere, which can also be expressed as 750 milliamperes. This means that over 4.5 quintillion electrons are flowing through the lightbulb every second. The resistance of the filament causes the electrical energy to be converted into light and heat.
Another common measurement of electricity is the watt, named after James Watt (1736–1819), who is best known for his work on the steam engine. The watt is a measurement of power (P) and can be calculated as
P=E×I
The 3 volts and 0.75 amp of our flashlight indicate that we’re dealing with a 2.25-watt lightbulb. LEDs are generally replacing incandescent bulbs because they can deliver the same quantity of light with less heat and lower wattage. Electricity bills are based on watts, so lowering the wattage of lightbulbs saves both money and the environment.
We have now seemingly analyzed everything about the flashlight—the batteries, the wires, and the lightbulb. But we’ve forgotten the most important part!
Yes, the switch. The switch controls whether electricity is flowing in the circuit or not. When a switch allows electricity to flow, it is said to be on, or closed. An off, or open, switch doesn’t allow electricity to flow. (The way we use the words closed and open for switches is opposite to the way we use them for a door. A closed door prevents anything from passing through it; a closed switch allows electricity to flow.)
Either the switch is closed or it’s open. Either current flows or it doesn’t. Either the lightbulb lights up or it doesn’t.
Like the binary codes invented by Morse and Braille, this simple flashlight is either on or off. There’s no in-between. This similarity between binary codes and simple electrical circuits is going to prove very useful in the chapters ahead.
Chapter Five
Communicating Around Corners
You’re 12 years old. One horrible day your best friend’s family moves to another town. You email and text your friend now and then, but it’s just not quite as thrilling as those late-night sessions with the flashlights blinking out Morse code. Your second-best friend, who lives in the house next door to yours, eventually becomes your new best friend. It’s time to teach your new best friend some Morse code and get the late-night flashlights blinking again.
The problem is, your new best friend’s bedroom window doesn’t face your bedroom window. The houses are side by side, but the bedroom windows face the same direction. Unless you figure out a way to rig up a few mirrors outside, the flashlights are now inadequate for after-dark communication.
Or are they?
Maybe you have learned something about electricity by this time, so you decide to make your own flashlights out of batteries, lightbulbs, switches, and wires. In the first experiment, you wire up the batteries and switch in your bedroom. Two wires go out your window, hop across a fence, and go into your friend’s bedroom, where they’re connected to a lightbulb:
From here on, the circuits will be portrayed more symbolically than realistically. Although I’m showing only one battery, you might actually be using two. In this and future diagrams, this will be an off (or open) switch:
And this will be the switch when it’s on (or closed):
The flashlight in this chapter works the same way as the one illustrated in the previous chapter, except that the wires connecting the components are now a bit longer. When you close the switch at your end, the light goes on at your friend’s house:
Now you can send messages using Morse code.
Once you have one flashlight working, you can wire another long-distance flashlight so that your friend can send messages to you:
Congratulations! You have just rigged up a bidirectional telegraph system. You’ll notice that these are two identical circuits that are entirely independent of each other. In theory, you can be sending a message to your friend while your friend is sending a message to you, although it might be hard for your brain to read and send messages at the same time.
You also might be clever enough to discover that you don’t need as many wires spanning the distance between the two houses. You can eliminate one of the four wires by wiring the configuration this way:
In this book, wires that are connected to each other are symbolized by a little dot at the connection. This diagram has two such connections, one below the battery at your house and the other below the lightbulb at your friend’s house.
Notice that the negative terminals of the two batteries are now connected. The two circular circuits (battery to switch to bulb to battery) still operate independently, even though they’re now conjoined.
This connection between the two circuits is called a common. In this circuit the common extends between the two wire-connection dots, from the point where the leftmost lightbulb and battery are connected to the point where the rightmost lightbulb and battery are connected.
Let’s take a closer look to assure ourselves that nothing funny is going on. First, when you close the switch on your side, the bulb in your friend’s house lights up. The red wires show the flow of electricity in the circuit:
No electricity flows in the other part of the circuit because there’s no place for the electrons to go to complete a circuit.
When you’re not sending but your friend is sending, the switch in your friend’s house controls the lightbulb in your house. Once again, the red wires show how electricity flows in the circuit:
When you and your friend both try to send at the same time, sometimes both switches are open, sometimes one switch is closed but the other is open, and sometimes both switches are closed. When both switches are closed, the flow of electricity in the circuit looks like this:
Interestingly, no current flows through the common part of the circuit when both lightbulbs are lit.
By using a common to join two separate circuits into one circuit, we’ve reduced the electrical connection between the two houses from four wires to three wires and reduced our wire expenses by 25 percent.
If we had to string the wires for a very long distance, we might be tempted to reduce our wiring expenses even more by eliminating another wire. Unfortunately, this isn’t feasible with 1.5-volt D cells and small lightbulbs. But if we were dealing with 100-volt batteries and much larger lightbulbs, it could certainly be done.
Here’s the trick: Once you have established a common part of the circuit, you don’t have to use wire for it. You can replace the wire with something else. And what you can replace it with is a giant sphere approximately 7900 miles in diameter made up of metal, rock, water, and organic material, most of which is dead. This giant sphere is known to us as Earth.
When I described good conductors in the previous chapter, I mentioned silver, copper, and gold, but not gravel and mulch. In truth, the earth isn’t such a great conductor, although some kinds of earth (damp soil, for example) are better than others (such as dry sand). But one thing we learned about conductors is this: the larger the better. A very thick wire conducts much better than a very thin wire. That’s where the earth excels. It’s really, really, really big.
To use the earth as a conductor, you can’t merely stick a little wire into the ground next to the tomato plants. You have to use something that maintains a substantial contact with the earth, and by that I mean a conductor with a large surface area. One good solution is a copper pole at least 8 feet long and ½ inch in diameter. That provides 150 square inches of contact with the earth. You can bury the pole into the ground with a sledgehammer and then connect a wire to it. Or, if the cold-water pipes in your home are made of copper and originate in the ground outside the house, you can connect a wire to the pipe.
An electrical contact with the earth is called an earth in England and a ground in America. A bit of confusion surrounds the word ground because it’s also often used to refer to a part of a circuit we’ve been calling the common. In this chapter, and until I indicate otherwise, a ground is a physical connection with the earth.
When people draw electrical circuits, they use this symbol to represent a ground:
Electricians use this symbol because they don’t like to take the time to draw an 8-foot copper pole buried in the ground. A circuit connected to this is said to be “connected to ground” or “grounded” rather than the more verbose “connected to the ground.”
Let’s see how this works. We began this chapter by looking at a one-way configuration like this:
If you were using high-voltage batteries and lightbulbs, you would need only one wire between your house and your friend’s house because you could use the earth as one of the connectors:
When you turn the switch on, electricity flows like this:
The electrons come out of the earth at your friend’s house, go through the lightbulb and wire, pass through the switch at your house, and then go into the positive terminal of the battery. Electrons from the negative terminal of the battery go into the earth.
You might also want to visualize electrons leaping from the 8-foot copper pole buried in the backyard of your house into the earth and then scurrying through the earth to get to the 8-foot copper pole buried in the backyard of your friend’s house. But if you consider that the earth is performing this same function for many thousands of electrical circuits around the world, you might ask: How do the electrons know where to go? Well, obviously they don’t. A different image of the earth seems much more appropriate.
Yes, the earth is a massive conductor of electricity, but it can also be viewed as both a source of electrons and a repository for electrons. The earth is to electrons as an ocean is to drops of water. The earth is a virtually limitless source of electrons and also a giant sea of electrons.
The earth, however, does have some resistance. That’s why we can’t use the earth ground to reduce our wiring needs if we’re playing around with 1.5-volt D cells and flashlight bulbs. The earth simply has too much resistance for low-voltage batteries.
You’ll notice that the previous two diagrams include a battery with the negative terminal connected to the ground:
I’m not going to draw this battery connected to the ground anymore. Instead, I’m going to use a shape like a capital letter V, which stands for voltage. A wire extending from a capital V is the same as a wire connected to the positive terminal of a battery whose negative terminal is connected to ground. The one-way lightbulb telegraph now looks like this:
The V stands for voltage, but in a sense, it could also stand for vacuum. You can think of the V as an electron vacuum cleaner and think of the ground as an ocean of electrons. The electron vacuum pulls the electrons from the earth through the circuit, doing work along the way (such as lighting a lightbulb).
The ground is sometimes also known as the point of zero potential. This means that no voltage is present. A voltage—as I explained earlier—is a potential for doing work, much as a brick suspended in the air is a potential source of energy. Zero potential is like a brick sitting on the ground—there’s no place left for it to fall.
In Chapter 4, one of the first things we noticed was that circuits are circles. Our new circuit doesn’t look like a circle at all. It still is one, however. You could replace the V with a battery with the negative terminal connected to ground, and then you could draw a wire connecting all the places you see a ground symbol. You’d end up with the same diagram that we started with in this chapter.
So with the help of a couple of copper poles (or cold-water pipes), we can construct a two-way Morse code system with just two wires crossing the fence between your house and your friend’s:
This circuit is functionally the same as the configuration shown on pages 33 to 34, in which three wires crossed the fence between the houses, but it would only work with high-voltage batteries and lightbulbs.
In this chapter, we’ve taken an important step in the evolution of communications. Previously we had been able to communicate with Morse code but only in a straight line of sight and only as far as the beam from a flashlight would travel.
By using wires, not only have we constructed a system to communicate around corners beyond the line of sight, but we’ve freed ourselves of the limitation of distance. We can communicate over hundreds and thousands of miles just by stringing longer and longer wires.
Well, not exactly. Although copper is a very good conductor of electricity, it’s not perfect. The longer the wires, the more resistance they have. The more resistance, the less current that flows. The less current, the dimmer the lightbulbs.
