Electronics All-in-One For Dummies. Doug Lowe
Chapter 6
Building Projects
IN THIS CHAPTER
Yogi Berra is alleged to have said, “In theory, there is no difference between theory and practice. But in practice, there is.”
Much of this book is theoretical — how electric current works, how individual electronic components like resistors, capacitors, and transistors work, how digital logic works, and so on.
But the heart of electronics is building things. The reason for learning all the theory is so that you can practice the art by actually building circuits and putting them to use.
Throughout this book, I back up theoretical explanations about how various types of electronic components work with simple construction projects you can build to demonstrate the theory in actual use. In this chapter, you learn the basic construction techniques needed to build these projects.
Specifically, you learn how to create a prototype of a circuit using a handy device called a solderless breadboard. Then, you learn several techniques for creating a more permanent version of the circuit, in which the components and all the circuit’s interconnections are soldered together on a circuit board. Finally, you learn how to enclose your circuit board in a project box or other enclosure.
In this chapter, I walk you through the process of building a fairly sophisticated electronics project. Although you’re welcome to do so if you wish, I don’t expect you to actually build the project as you read this chapter. Instead, I simply want you to gain an appreciation for the process of building a nontrivial project from start to finish.
Looking at the Process of Building an Electronic Project
Electronic projects such as the ones you learn about in this book typically follow this predictable sequence of general steps from start to finish:
1 Decide what you want to build.Before you can design or build an electronic project, you must have a solid idea in mind for what you expect the project to do, what you want it to look like, and how human beings will interact with it.
2 Design the circuit.After you’ve settled on what you want to build, you need to design an electronic circuit that gets the job done. The end result of this step is a schematic diagram.
3 Build a prototype.Before you invest the time and materials needed to build a permanent circuit, it’s a good idea to first build a prototype, which lets you quickly test the circuit to make sure it works. Usually, you build the prototype on a solderless breadboard.
4 Build a permanent circuit.When your prototype is working, you can build a permanent version of the circuit. Usually, you build the permanent version by soldering components onto a printed circuit board.
5 Finish the project.To finish the project, you mount the circuit board along with any other necessary components such as batteries, switches, or light-emitting diodes in a suitable enclosure.
The remaining sections in this chapter describe each of these steps in greater detail.
Envisioning Your Project
Before you get lost in the details of designing and building your project, you should step back and look at the big picture. First, you need to make sure you have a solid idea for your project. Why do you want to build it? What will it do, who will use it, and why?
For example, every year I like to build something to scare trick-or-treaters on Halloween. A few years ago, I built a giant jack-in-the-box that pops up and screams when people walk up to it. The box was made of plywood, and the pop-up mechanism that made the door open and the scary clown pop up was driven by compressed air. Figure 6-1 shows the finished contraption. Trust me; I scared a lot of kids and more than a few adults with it.
I knew right away that I’d need some type of electronic circuit to control the jack-in-the-box. At first, I wasn’t sure exactly what type of circuit I’d need, but I knew I needed a circuit of some kind.
FIGURE 6-1: One of my scarier electronics projects.
When you have a general idea for a project, you can flesh out the details. You’ll need to answer questions like these:
What will its user interface be? That is, how will a person work with the device to get it to do what it’s supposed to do?
Will it be a stand-alone device, or will it interact with other devices?
Will it be powered by batteries, or will it plug into a wall outlet to get its power? Or will it be solar powered?
How big will it be? Does it need to be small enough to hold in your hand or fit in your pocket? Or will it sit on a shelf?
The jack-in-the-box Halloween prop is a fairly complicated project — too complicated to use as an illustration this early in the book. So, here’s a simpler project: an electronic decision maker. Have you ever resorted to tossing a coin to make a difficult decision? For this project, you create an electronic version of a coin toss. Instead of flipping a coin into the air to see if it lands heads or tails, you build an electronic device that does the coin toss. That way, you can make decisions even when you’re penniless.
The specifications for the coin-toss project are as follows:
The device will have two LED indicators to indicate heads and tails.
It will also have two small metal contacts, which the user can touch with their finger. When the user touches both of the posts, the LEDs start flashing, alternating back and forth, much like a coin flips end over end when you toss it into the air.
When the user removes his finger from the two metal contacts, one of the two lights will stay lit, indicating whether the result of the coin toss is heads or tails. Which light stays lit will be essentially random.
To conserve battery life, the device will have an on/off push button. The user must depress the push button to make the device work; when the button is released, the device is turned off.
The device will be battery powered and contained in an enclosure small enough to hold in your hand.