ages 10+ rReEaAlL eelleeccttrroonniiccss.. EElleeccttrroonniiccss rReEaAlL eEaAsSyY.. EE ll f o r K i d s f o r K i d s ee Why do the lights in a house turn on when you Then, in Part 3, you’ll learn about digi- cc flip a switch? How does a remote-controlled car tal electronics—things like logic gates and move? And what makes lights on TVs and memory circuits—as you make a secret code tt Play with simple Circuits and microwaves blink? The technology around you checker and an electronic coin flipper. Finally, rr experiment with Electricity! may seem like magic, but most of it wouldn’t you’ll use everything you’ve learned to make run without electricity. the LED Reaction Game—test your reaction oo Electronics for Kids demystifies electricity time as you try to catch a blinking light! with a collection of awesome hands-on projects. With its clear explanations and assort- nn In Part 1, you’ll learn how current, voltage, ment of hands-on projects, Electronics for Ø y v i n d N y d a l D a h l and circuits work by making a battery out of Kids will have you building your own circuits ii cc a lemon, turning a metal bolt into an electro- in no time. magnet, and transforming a paper cup and ABOUT THE AUTHOR ss some magnets into a spinning motor. In Part 2, you’ll make even more cool stuff as you: Øyvind Nydal Dahl built his first circuit at 14 and has been passionate about electronics ever ff Solder a blinking LED circuit with since. He has a master’s degree in electronics resistors, capacitors, and relays oo from the University of Oslo, helps companies Turn a circuit into a touch sensor using develop new products, and travels the world rr your finger as a resistor while teaching electronics workshops. He also writes beginner-friendly tutorials at Build an alarm clock triggered by the http://www.build-electronic-circuits.com/. KK sunrise ii Create a musical instrument that makes dd sci-fi sounds ss THE FINEST IN GEEK ENTERTAINMENT™ N d www.nostarch.com y a $24.95 ($28.95 CDN) ELECTRONICSSHELVE IN: TECHNOLOGY & ENGINEERING/ hldal Electronics for Kids E l e c t r o n i c s fo r K i d s Play with Simple Circuits and Experiment with Electricity! By Øyvind Nydal Dahl San Francisco ElEctronics for Kids. Copyright © 2016 by Øyvind Nydal Dahl. All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. Printed in Canada First printing 20 19 18 17 16 1 2 3 4 5 6 7 8 9 ISBN-10: 1-59327-725-3 ISBN-13: 978-1-59327-725-3 Publisher: William Pollock Production Editor: Riley Hoffman Cover Illustration: Garry Booth Interior Design: Beth Middleworth Developmental Editor: Jennifer Griffith-Delgado Technical Reviewer: John Hewes Copyeditor: Julianne Jigour Compositor: Riley Hoffman Proofreader: Paula L. Fleming For information on distribution, translations, or bulk sales, please contact No Starch Press, Inc. directly: No Starch Press, Inc. 245 8th Street, San Francisco, CA 94103 phone: 415.863.9900; [email protected] www.nostarch.com Library of Congress Cataloging-in-Publication Data Names: Nydal Dahl, Øyvind, author. Title: Electronics for kids : play with simple circuits and experiment with electricity! / by Øyvind Nydal Dahl. Description: San Francisco : No Starch Press, [2016] | Audience: Ages 10+ | Includes index. Identifiers: LCCN 2015048986 (print) | LCCN 2016005706 (ebook) | ISBN 9781593277253 (pbk.) | ISBN 1593277253 (pbk.) | ISBN 9781593277475 (epub) | ISBN 1593277474 (epub) | ISBN 9781593277482 (mobi) | ISBN 1593277482 (mobi) Subjects: LCSH: Electronics--Juvenile literature. | Electronic circuits--Juvenile literature. Classification: LCC TK7820 .N93 2016 (print) | LCC TK7820 (ebook) | DDC 621.381--dc23 LC record available at http://lccn.loc.gov/2015048986 No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no inten- tion of infringement of the trademark. The information in this book is distributed on an “As Is” basis, without warranty. While every precau- tion has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it. About the Author Øyvind Nydal Dahl has been an electron- ics enthusiast since he was a kid—he’s always loved figuring out how things worked so he could try to build them for himself. He studied electronics and com- puter science at the University of Oslo, where he received a master’s degree after building his own microchip. He then co- founded the company Intelligent Agent to develop sensors that allow robots to see through walls. After a few years at Intelligent Agent, Øyvind set out on a mission to teach the world electronics. He gives workshops, develops courses, and writes about electronics and technol- ogy for a variety of outlets. He’s posted hundreds of articles, tutorials, and videos on his blog (http://www.build-electronic -circuits.com/) and maintains Ohmify (http://ohmify.com/), a membership site that makes learning electronics fun and easy. About the Technical Reviewer John Hewes began connecting electrical circuits at an early age, moving on to electronics projects as a teenager. He later earned a physics degree and continued to develop his interest in electronics, helping school students with their projects while working as a science technician. John has taught electronics and physics up to an advanced level in the United Kingdom and ran a school electronics club for children aged 11 to 18 years, setting up the website http:// www.electronicsclub.info/ to support the club. He believes that every one can enjoy building electronics projects, regard- less of their age or ability. BRiEf CoNTENTS Foreword by Joe Grand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii Part 1: Playing with Electricity Chapter 1: What Is Electricity? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 Chapter 2: Making Things Move with Electricity and Magnets . . . . . . . . .19 Chapter 3: How to Generate Electricity . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 Part 2: Building Circuits Chapter 4: Creating Light with LEDs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69 Chapter 5: Blinking a Light for the First Time. . . . . . . . . . . . . . . . . . . . . . .89 Chapter 6: Let’s Solder! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111 Chapter 7: Controlling Things with Electricity. . . . . . . . . . . . . . . . . . . . . .131 Chapter 8: Building a Musical Instrument. . . . . . . . . . . . . . . . . . . . . . . . .161 Part 3: The Digital World Chapter 9: How Circuits Understand Ones and Zeros. . . . . . . . . . . . . . . .187 Chapter 10: Circuits That Make Choices . . . . . . . . . . . . . . . . . . . . . . . . . .213 Chapter 11: Circuits That Remember Information. . . . . . . . . . . . . . . . . . .239 Chapter 12: Let’s Make a Game! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257 Handy Resources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .281 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .289