Make: Electronics Read online




  Make: Electronics

  Learning by Discovery

  Charles Platt

  with photographs and illustrations by the author

  Beijing • Cambridge • Farnham • Köln • Sebastopol • Taipei • Tokyo

  Make: Electronics

  by Charles Platt

  Copyright © Helpful Corporation. All rights reserved.

  Printed in Canada.

  Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.

  O’Reilly Media books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (my.safaribooksonline.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or [email protected].

  Editors: Dale Dougherty and Brian Jepson

  Development Editor: Gareth Branwyn

  Production Editor: Rachel Monaghan

  Technical Editor: Andrew “Bunnie” Huang

  Copyeditor: Nancy Kotary

  Proofreader: Nancy Reinhardt

  Indexer: Julie Hawks

  Cover Designer: Mark Paglietti

  Interior Designer: Ron Bilodeau

  Illustrator/Photographer: Charles Platt

  Cover Photographer: Marc de Vinck

  Print History:

  December 2009: First Edition.

  The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps.

  While every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.

  ISBN: 978-0-596-15374-8

  [TI]

  For my dearest Erico

  Preface

  How to Have Fun with This Book

  Everyone uses electronic devices, but most of us don’t really know what goes on inside them.

  Of course, you may feel that you don’t need to know. If you can drive a car without understanding the workings of an internal combustion engine, presumably you can use an iPod without knowing anything about integrated circuits. However, understanding some basics about electricity and electronics can be worthwhile for three reasons:

  By learning how technology works, you become better able to control your world instead of being controlled by it. When you run into problems, you can solve them instead of feeling frustrated by them.

  Learning about electronics can be fun—so long as you approach the process in the right way. The tools are relatively cheap, you can do all the work on a tabletop, and it doesn’t consume a lot of time (unless you want it to).

  Knowledge of electronics can enhance your value as an employee or perhaps even lead to a whole new career.

  Learning by Discovery

  Most introductory guides begin with definitions and facts, and gradually get to the point where you can follow instructions to build a simple circuit.

  This book works the other way around. I want you to start putting components together right away. After you see what happens, you’ll figure out what’s going on. I believe this process of learning by discovery creates a more powerful and lasting experience.

  Learning by discovery occurs in serious research, when scientists notice an unusual phenomenon that cannot be explained by current theory, and they start to investigate it in an effort to explain it. This may ultimately lead to a better understanding of the world.

  We’re going to be doing the same thing, although obviously on a much less ambitious level.

  Along the way, you will make some mistakes. This is good. Mistakes are the best of all learning processes. I want you to burn things out and mess things up, because this is how you learn the limits of components and materials. Since we’ll be using low voltages, there’ll be no chance of electrocution, and so long as you limit the flow of current in the ways I’ll describe, there will be no risk of burning your fingers or starting fires.

  Stay Within the Limits!

  Although I believe that everything suggested in this book is safe, I’m assuming that you will stay within the limits that I suggest. Please always follow the instructions and pay attention to the warnings, denoted by the icon you see here. If you go beyond the limits, you will expose yourself to unnecessary risks.

  Figure P-1. Learning by discovery allows you to start building simple circuits right away, using a handful of cheap components, a few batteries, and some alligator clips.

  How Hard Will It Be?

  I assume that you’re beginning with no prior knowledge of electronics. So, the first few experiments will be ultra-simple, and you won’t even use solder or prototyping boards to build a circuit. You’ll be holding wires together with alligator clips.

  Very quickly, though, you’ll be experimenting with transistors, and by the end of Chapter 2, you will have a working circuit that has useful applications.

  I don’t believe that hobby electronics has to be difficult to understand. Of course, if you want to study electronics more formally and do your own circuit design, this can be challenging. But in this book, the tools and supplies will be inexpensive, the objectives will be clearly defined, and the only math you’ll need will be addition, subtraction, multiplication, division, and the ability to move decimal points from one position to another.

  Moving Through This Book

  Basically there are two ways to present information in a book of this kind: in tutorials and in reference sections. I’m going to use both of these methods. You’ll find the tutorials in sections headed as follows:

  Shopping Lists

  Using Tools

  Experiments

  You’ll find reference sections under the following headings:

  Fundamentals

  Theory

  Background

  How you use the sections is up to you. You can skip many of the reference sections and come back to them later. But if you skip many of the tutorials, this book won’t be of much use to you. Learning by discovery means that you absolutely, positively have to do some hands-on work, and this in turn means that you have to buy some basic components and play with them. You will gain very little by merely imagining that you are doing this.

  It’s easy and inexpensive to buy what you need. In almost any urban or suburban area in the United States, chances are you live near a store that sells electronic components and some basic tools to work with them. I am referring, of course, to RadioShack franchises. Some Shacks have more components than others, but almost all of them have the basics that you’ll need.

  You can also visit auto supply stores such as AutoZone and Pep Boys for basics such as hookup wire, fuses, and switches, while stores such as Ace Hardware, Home Depot, and Lowe’s will sell you tools.

  If you prefer to buy via mail order, you can easily find everything you need by searching online. In each section of the book, I’ll include the URLs of the most popular supply sources, and you’ll find a complete list of URLs in the appendix.

  Fundamentals

  Mail-ordering components and tools

  Here are the primary mail-order sources that I use myself online:

  http://www.radioshack.com

  RadioShack, a.k.a. Th
e Shack. For tools and components. Not always the cheapest, but the site is easy and convenient, and some of the tools are exactly what you need.

  http://www.mouser.com

  Mouser Electronics.

  http://www.digikey.com

  Digi-Key Corporation.

  http://www.newark.com

  Newark.

  Mouser, Digi-Key, and Newark are all good sources for components, usually requiring no minimum quantities.

  http://www.allelectronics.com

  All Electronics Corporation. A narrower range of components, but specifically aimed at the hobbyist, with kits available.

  http://www.ebay.com

  You can find surplus parts and bargains here, but you may have to try several eBay Stores to get what you want. Those based in Hong Kong are often very cheap, and I’ve found that they are reliable.

  http://www.mcmaster.com

  McMaster-Carr. Especially useful for high-quality tools.

  Lowe’s and Home Depot also allow you to shop online.

  Figure P-2. You’ll find no shortage of parts, tools, kits, and gadgets online.

  Companion Kits

  Maker Shed (www.makershed.com) offers a number of Make: Electronics companion kits, both toolkits and bundles of the various components used in the book’s experiments. This is a simple, convenient, and cost-effective way of getting all the tools and materials you need to do the projects in this book.

  Comments and Questions

  Please address comments and questions concerning this book to the publisher:

  O’Reilly Media, Inc.

  1005 Gravenstein Highway North

  Sebastopol, CA 95472

  800-998-9938 (in the United States or Canada)

  707-829-0515 (international or local)

  707-829-0104 (fax)

  We have a web page for this book, where we list errata, examples, larger versions of the book’s figures, and any additional information. You can access this page at:

  http://oreilly.com/catalog/9780596153748

  To comment or ask technical questions about this book, send email to:

  [email protected]

  For more information about our books, conferences, Resource Centers, and the O’Reilly Network, see our website at:

  http://oreilly.com

  Safari® Books Online

  Safari Books Online is an on-demand digital library that lets you easily search over 7,500 technology and creative reference books and videos to find the answers you need quickly.

  With a subscription, you can read any page and watch any video from our library online. Read books on your cell phone and mobile devices. Access new titles before they are available for print, and get exclusive access to manuscripts in development and post feedback for the authors. Copy and paste code samples, organize your favorites, download chapters, bookmark key sections, create notes, print out pages, and benefit from tons of other time-saving features.

  O’Reilly Media has uploaded this book to the Safari Books Online service. To have full digital access to this book and others on similar topics from O’Reilly and other publishers, sign up for free at http://my.safaribooksonline.com.

  1. Experiencing Electricity

  I want you to get a taste for electricity—literally!—in the first experiment. This first chapter of the book will show you:

  How to understand and measure electricity and resistance

  How to handle and connect components without overloading, damaging, or destroying them

  Even if you have some prior knowledge of electronics, you should try these experiments before you venture on to the rest of the book.

  Shopping List: Experiments 1 Through 5

  If you want to limit your number of shopping trips or online purchases, look ahead in the book for additional shopping lists, and combine them to make one bulk purchase.

  In this first chapter, I will give you part numbers and sources for every tool and component that we’ll be using. Subsequently, I won’t expect you to need such specific information, because you will have gained experience searching for items on your own.

  Maker Shed (www.makershed.com) has put together a series of Make: Electronics companion kits. These include all of the tools and components used in book’s experiments. This is a quick, simple, and cost-effective way of getting everything you need to complete the projects in this book.

  Tools

  Small pliers

  RadioShack Kronus 4.5-inch, part number 64-2953 or Xcelite 4-inch mini long-nose pliers, model L4G.

  Or similar. See Figures 1-1 through 1-3. Look for these tools in hardware stores and the sources listed in the preface. The brand is unimportant. After you use them for a while, you’ll develop your own preferences. In particular, you have to decide whether you like spring-loaded handles. If you decide you don’t, you’ll need a second pair of pliers to pull the springs out of the first.

  Wire cutters

  RadioShack Kronus 4.5-inch, part number 64-2951, or Stanley 7-inch model 84-108.

  Or similar. Use them for cutting copper wire, not harder metals (Figure 1-4).

  Figure 1-1. Generic long-nosed pliers are your most fundamental tool for gripping, bending, and picking things up after you drop them.

  Figure 1-2. Longer-nosed pliers: these are useful for reaching into tiny spaces.

  Figure 1-3. Sharp-pointed pliers are designed for making jewelry, but are also useful for grabbing tiny components.

  Figure 1-4. Wire cutters, sometimes known as side cutters, are essential.

  Multimeter

  Extech model EX410 or BK Precision model 2704-B or Amprobe model 5XP-A.

  Or similar. Because electricity is invisible, we need a tool to visualize the pressure and flow, and a meter is the only way. A cheap meter will be sufficient for your initial experiments. If you buy online, try to check customer reviews, because reliability may be a problem for cheap meters. You can shop around for retailers offering the best price. Don’t forget to search on eBay.

  The meter must be digital—don’t get the old-fashioned analog kind with a needle that moves across a set of printed scales. This book assumes that you are looking at a digital display.

  I suggest that you do not buy an autoranging meter. “Autoranging” sounds useful—for example, when you want to check a 9-volt battery, the meter figures out for itself that you are not trying to measure hundreds of volts, nor fractions of a volt. The trouble is that this can trick you into making errors. What if the battery is almost dead? Then you may be measuring a fraction of a volt without realizing it. The only indication will be an easily overlooked “m” for “millivolts” beside the large numerals of the meter display.

  On a manual-ranging meter, you select the range, and if the source that you are measuring is outside of that range, the meter tells you that you made an error. I prefer this. I also get impatient with the time it takes for the autoranging feature to figure out the appropriate range each time I make a measurement. But it’s a matter of personal preference. See Figures 1-5 through 1-7 for some examples of multimeters.

  Figure 1-5. You can see by the wear and tear that this is my own favorite meter. It has all the necessary basic features and can also measure capacitance (the F section, for Farads). It can also check transistors. You have to choose the ranges manually.

  Figure 1-6. Mid-priced RadioShack meter, which has the basic features; however, the dual purpose for each dial position, selected with the SELECT button, may be confusing. This is an autoranging meter.

  Figure 1-7. An autoranging meter from Extech offers basic functions, plus a temperature probe, which may be useful to check whether components such as power supplies are running unduly hot.

  Supplies

  Batteri
es

  9-volt battery. Quantity: 1.

  AA batteries, 1.5 volts each. Quantity: 6.

  The batteries should be disposable alkaline, the cheapest available, because we may destroy some of them. You should absolutely not use rechargeable batteries in Experiments 1 and 2.

  Battery holders and connectors

  Snap connector for 9-volt battery, with wires attached (Figure 1-8). Quantity: 1. RadioShack part number 270-325 or similar. Any snap connector that has wires attached will do.

  Figure 1-8. Snap connector for a 9-volt battery.

  Battery holder for single AA cell, with wires attached (Figure 1-9). Quantity: 1. RadioShack part number 270-401 or Mouser.com catalog number 12BH311A-GR, or similar; any single-battery holder that has thin wires attached will do.

  Figure 1-9. Single AA-sized battery carrier with wires.

  Battery holder for four AA cells, with wires attached (Figure 1-10). Quantity: 1. All Electronics catalog number BH-342 or RadioShack part 270-391 or similar.

  Figure 1-10. Battery carrier for four AA cells, to be installed in series, delivering 6 volts.

  Alligator clips

  Vinyl-insulated. Quantity: at least 6. All Electronics catalog number ALG-28 or RadioShack part number 270-1545 or similar (Figure 1-11).

  Figure 1-11. Alligator clips inside vinyl sheaths, which reduce the chance of accidental short circuits.

  Components

  You may not know what some of these items are, or what they do. Just look for the part numbers and descriptions, and match them with the photographs shown here. Very quickly, in the learning by discovery process, all will be revealed.