About the Author
Dr. Simon Monk (Preston, UK) has a degree in Cybernetics and Computer Science and a PhD in Software Engineering. Monk spent several years as an academic before he returned to industry, co-founding the mobile software company Momote Ltd. He has been an active electronics hobbyist since his early teens and is a full-time writer on hobby electronics and open-source hardware. Dr. Monk is the author of numerous electronics books, specializing in open-source hardware platforms, especially Arduino and Raspberry Pi. He is also co-author with Paul Scherz of Practical Electronics for Inventors, 3rd edition. You can follow Simon on Twitter, where he is @simonmonk2.
Hacking Electronics
An Illustrated DIY Guide for Makers and Hobbyists
Simon Monk
New York Chicago San Francisco Lisbon
London Madrid Mexico City Milan New Delhi
San Juan Seoul Singapore Sydney Toronto
Copyright 2013 by The McGraw-Hill Companies. All rights reserved. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher.
ISBN: 978-0-07-180237-6
MHID: 0-07-180237-1
The material in this e-book also appears in the print version of this title: ISBN: 978-0-07-180236-9,
MHID: 0-07-180236-3
McGraw-Hill e-books are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate training programs. To contact a representative please e-mail us at .
All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps.
Information has been obtained by McGraw-Hill from sources believed to be reliable. However, because of the possibility of human or mechanical error by our sources, McGraw-Hill, or others, McGraw-Hill does not guarantee the accuracy, adequacy, or completeness of any information and is not responsible for any errors or omissions or the results obtained from the use of such information.
TERMS OF USE
This is a copyrighted work and McGraw-Hill and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hills prior consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms.
THE WORK IS PROVIDED AS IS. THE McGRAW-HILL COMPANIES AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill has no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise.
To Roger, for making it possible for me to turn a hobby into an occupation.
Contents at a Glance
Contents
Acknowledgments
Many thanks to all those at McGraw-Hill Education who have done such a great job in producing this book. In particular, thanks to my editor Roger Stewart and to Vastavikta Sharma, Jody McKenzie, Mike McGee, and Claire Splan.
Special thanks are due to Duncan Amos, John Heath, and John Hutchinson for their technical review of the material and encouragement.
And last but not least, thanks once again to Linda, for her patience and generosity in giving me space to do this.
Introduction
This is a book about hacking electronics. It is not a formal, theory-based book about electronics. Its sole aim is to equip the reader with the skills he or she needs to use electronics to make something, whether its starting from scratch, connecting together modules, or adapting existing electronic devices for some new use.
You will learn how to experiment and get your ideas into some kind of order, so that what you make will work. Along the way, youll gain an appreciation for why things work and the limits of what they can do, and learn how to make prototypes on solderless breadboard, how to solder components directly to each other, and how to use stripboard.
You will also learn how to use the popular Arduino microcontroller board, which has become one of the most important tools available to the electronics hacker. There are over 20 examples of how to use an Arduino with electronics in this book.
Electronics has changed. This is a modern book that avoids theory you will likely never use and instead concentrates on how you can build things using readymade modules when they are available. There is, after all, no point in reinventing the wheel.
Some of the things explained and described in the book include
Using LEDs, including high-power Lumileds
Using LiPo battery packs and buck-boost power supply modules
Using sensors to measure light, temperature, vibration, acceleration, sound level, and color
Interfacing with Arduino microcontroller boards, including using Arduino shields such as the Ethernet and LCD display shields
Using servo and stepper motors
Some of the things described in the book that you can make along the way include
A noxious gas detector
An Internet-controlled hacked electric toy
A device for measuring color
An ultrasonic rangefinder
A remote control robotic rover
An accelerometer-based version of the egg and spoon race
A one-watt audio amplifier
A bug made from a hacked MP3 FM transmitter
Working brakes and head lights that can be added to a slot car
You Will Need
This is a very practical, hands-on type of book. You will therefore need some tools and components to get the most out of it.
As far as tools go, you will need little more than a multimeter and soldering equipment.