Table Of ContentTHIRD EDITIon
Robot Building for Beginners Technology in AcTion™
Robot Building for Beginners, Third Edition provides basic, Also available:
Robot
practical knowledge on getting started in amateur robotics. R
There is a mix of content: from serious reference tables and
o
descriptions to personal stories and humorous bits. The robot
b
described and built in this book is battery powered and about
the size of a lunch box. it is autonomous; that is, it isn’t remote o
controlled. t
The book is broken up into small chapters and the master
B
project is a simple, entertaining, line-following robot. The char-
Building
acteristics and purposes of each major component (resistor, u
transistor, wire, and motor) are described, followed by a hands-on
i
experiment to demonstrate. not only does this help the reader l
d
to understand a particular piece, but it also prepares them with
processes to learn new parts on their own. An appendix offers i
n
an introduction to 3D printing and parts of the robot can, as an
alternative, be “printed” using a 3D printer. g
This book is for adults who have dreamed of building robots
f
since they were kids and older kids who dream of building robots o
for Beginners
when they become adults. no background knowledge is neces- r
sary. Anyone with desire and intelligence should be comfortable B
e
with the tools, tricks, and parts to build.
g
i
n
n
e
r
s
THIRD
EDITIon
C
o
US $ 34.99 o
ISBN 978-1-4842-1360-5 k
53499 Shelve in: Computer Hardware | General
User level: Beginning–Intermediate
SOURCE CODE ONLINE David Cook
9781484213605 www.apress.com
Robot Building for
Beginners
Third Edition
David Cook
Robot Building for Beginners, Third Edition
Copyright © 2015 by David Cook
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed. Exempted from this legal reservation are brief excerpts in connection with
reviews or scholarly analysis or material supplied specifically for the purpose of being entered and executed
on a computer system, for exclusive use by the purchaser of the work. Duplication of this publication or
parts thereof is permitted only under the provisions of the Copyright Law of the Publisher’s location, in its
current version, and permission for use must always be obtained from Springer. Permissions for use may be
obtained through RightsLink at the Copyright Clearance Center. Violations are liable to prosecution under
the respective Copyright Law.
ISBN-13 (pbk): 978-1-4842-1360-5
ISBN-13 (electronic): 978-1-4842-1359-9
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol
with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in
an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of
the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are
not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director: Welmoed Spahr
Lead Editor: Michelle Lowman
Editorial Board: Steve Anglin, Mark Beckner, Gary Cornell, Louise Corrigan, James DeWolf,
Jonathan Gennick, Robert Hutchinson, Michelle Lowman, James Markham, Matthew Moodie,
Jeffrey Pepper, Douglas Pundick, Ben Renow-Clarke, Gwenan Spearing, Matt Wade, Steve Weiss
Coordinating Editor: Kevin Walter
Copy Editor: Kim Wimpsett
Compositor: SPi Global
Indexer: SPi Global
Artist: SPi Global
Cover Designer: Crest
Distributed to the book trade worldwide by Springer Science+Business Media New York,
233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail
orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC
and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc).
SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail rights@apress.com, or visit www.apress.com.
Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use.
eBook versions and licenses are also available for most titles. For more information, reference our Special
Bulk Sales–eBook Licensing web page at www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this text is available to
readers at www.apress.com. For detailed information about how to locate your book’s source code, go to
www.apress.com/source-code/.
This is dedicated to everyone, regardless of age, who chooses to learn about science.
You’re the reason I continue to write.
Contents at a Glance
About the Author ���������������������������������������������������������������������������������������������������xxv
Acknowledgments �����������������������������������������������������������������������������������������������xxvii
Introduction ����������������������������������������������������������������������������������������������������������xxix
■ Chapter 1: Welcome Robot Inventor! ���������������������������������������������������������������������1
■ Chapter 2: Where to Obtain Tools and Parts ��������������������������������������������������������15
■ Chapter 3: Safety �������������������������������������������������������������������������������������������������19
■ Chapter 4: Digital Multimeter ������������������������������������������������������������������������������31
■ Chapter 5: Numbers and Units �����������������������������������������������������������������������������51
■ Chapter 6: Robot Line-Following �������������������������������������������������������������������������61
■ Chapter 7: Nine-Volt Batteries �����������������������������������������������������������������������������77
■ Chapter 8: Clips and Test Leads ��������������������������������������������������������������������������91
■ Chapter 9: Resistors ��������������������������������������������������������������������������������������������99
■ Chapter 10: LEDs �����������������������������������������������������������������������������������������������109
■ Chapter 11: Power On! ��������������������������������������������������������������������������������������125
■ Chapter 12: Solderless Prototyping �������������������������������������������������������������������139
■ Chapter 13: Solderless Breadboard Setup ���������������������������������������������������������159
■ Chapter 14: Variable Resistors ��������������������������������������������������������������������������171
■ Chapter 15: Comparators ����������������������������������������������������������������������������������191
■ Chapter 16: Transistor Switches �����������������������������������������������������������������������207
■ Chapter 17: DC Motors ��������������������������������������������������������������������������������������223
v
■ Contents at a GlanCe
■ Chapter 18: Adding Gearhead Motors ���������������������������������������������������������������253
■ Chapter 19: Wheels��������������������������������������������������������������������������������������������263
■ Chapter 20: Coupler �������������������������������������������������������������������������������������������279
■ Chapter 21: Soldering Equipment ����������������������������������������������������������������������297
■ Chapter 22: Soldering and Connecting ��������������������������������������������������������������305
■ Chapter 23: The Motherboard ����������������������������������������������������������������������������329
■ Chapter 24: Body Building ���������������������������������������������������������������������������������347
■ Chapter 25: Launching the Line-Follower ����������������������������������������������������������373
■ Chapter 26: Smoother, Smaller, Cheaper �����������������������������������������������������������393
■ Chapter 27: Encore ��������������������������������������������������������������������������������������������403
■ Appendix A: Appendix A ������������������������������������������������������������������������������������427
■ Appendix B: Appendix B ������������������������������������������������������������������������������������435
Index ���������������������������������������������������������������������������������������������������������������������449
vi
Contents
About the Author ���������������������������������������������������������������������������������������������������xxv
Acknowledgments �����������������������������������������������������������������������������������������������xxvii
Introduction ����������������������������������������������������������������������������������������������������������xxix
■ Chapter 1: Welcome Robot Inventor! ���������������������������������������������������������������������1
Four Disciplines ����������������������������������������������������������������������������������������������������������������1
Anatomy of a Homemade Robot ���������������������������������������������������������������������������������������1
Brains �����������������������������������������������������������������������������������������������������������������������������������������������������2
Electrical Power ��������������������������������������������������������������������������������������������������������������������������������������3
Sensors ���������������������������������������������������������������������������������������������������������������������������������������������������6
Action and Feedback ������������������������������������������������������������������������������������������������������������������������������8
Miscellaneous Components ��������������������������������������������������������������������������������������������������������������������9
Body ������������������������������������������������������������������������������������������������������������������������������������������������������10
Building Up ���������������������������������������������������������������������������������������������������������������������11
Taking Small Bites ��������������������������������������������������������������������������������������������������������������������������������11
Making Modules �����������������������������������������������������������������������������������������������������������������������������������11
Keeping It Fun and Keeping It Light ������������������������������������������������������������������������������������������������������12
Finding Camaraderie and Support ��������������������������������������������������������������������������������������������������������13
Onward and Upward �������������������������������������������������������������������������������������������������������14
■ Chapter 2: Where to Obtain Tools and Parts ��������������������������������������������������������15
Ordering Free Information ����������������������������������������������������������������������������������������������15
Discovering Hidden Messages ���������������������������������������������������������������������������������������16
vii
■ Contents
Considering Columns ����������������������������������������������������������������������������������������������������������������������������16
Counting Parts ��������������������������������������������������������������������������������������������������������������������������������������17
Comparing Prices ���������������������������������������������������������������������������������������������������������������������������������17
Saving Money �����������������������������������������������������������������������������������������������������������������17
■ Chapter 3: Safety �������������������������������������������������������������������������������������������������19
Benefiting from Age and Experience ������������������������������������������������������������������������������19
Following Instructions ����������������������������������������������������������������������������������������������������19
Reading Chemical Labels ���������������������������������������������������������������������������������������������������������������������20
Donning Safety Glasses ��������������������������������������������������������������������������������������������������20
Hanging Glasses and Placing Them Face Up ����������������������������������������������������������������������������������������20
Wearing Other Safety Clothes ����������������������������������������������������������������������������������������21
Insuring Adequate Ventilation �����������������������������������������������������������������������������������������21
Storing Properly �������������������������������������������������������������������������������������������������������������22
Talking About Your Activities, Materials, and Tools �������������������������������������������������������������������������������22
Washing Before Eating ���������������������������������������������������������������������������������������������������22
Avoiding Nasty Elements ������������������������������������������������������������������������������������������������22
Lead ������������������������������������������������������������������������������������������������������������������������������������������������������23
Mercury ������������������������������������������������������������������������������������������������������������������������������������������������23
Cadmium ����������������������������������������������������������������������������������������������������������������������������������������������24
Purchasing Safer Parts Labeled RoHS ��������������������������������������������������������������������������������������������������24
Shocking ������������������������������������������������������������������������������������������������������������������������25
AC vs� DC ����������������������������������������������������������������������������������������������������������������������������������������������25
Using Rechargeable Batteries and Professional Transformers �������������������������������������������������������������25
Connecting Through Circuit Breakers and GFCI Outlets �����������������������������������������������������������������������26
Saving the Ground Prong ����������������������������������������������������������������������������������������������������������������������28
Disconnecting Power ����������������������������������������������������������������������������������������������������������������������������29
Steering Clear of Dangerous Robots ������������������������������������������������������������������������������29
Sizing Up Motors ������������������������������������������������������������������������������������������������������������29
Lighting Up ���������������������������������������������������������������������������������������������������������������������29
Staying Rested and Level-Headed ���������������������������������������������������������������������������������30
viii
■ Contents
■ Chapter 4: Digital Multimeter ������������������������������������������������������������������������������31
Must-Have Features �������������������������������������������������������������������������������������������������������31
Digital ���������������������������������������������������������������������������������������������������������������������������������������������������32
Digits ����������������������������������������������������������������������������������������������������������������������������������������������������33
DC Voltage ��������������������������������������������������������������������������������������������������������������������������������������������33
DC Current �������������������������������������������������������������������������������������������������������������������������������������������33
Resistance ��������������������������������������������������������������������������������������������������������������������������������������������33
Probes or Leads �����������������������������������������������������������������������������������������������������������������������������������33
Overload/Fuse Protection ���������������������������������������������������������������������������������������������������������������������34
Nice-To-Have Features ���������������������������������������������������������������������������������������������������34
Capacitance �����������������������������������������������������������������������������������������������������������������������������������������34
Diode ����������������������������������������������������������������������������������������������������������������������������������������������������34
Continuity ���������������������������������������������������������������������������������������������������������������������������������������������34
Frequency ���������������������������������������������������������������������������������������������������������������������������������������������34
Duty Cycle ���������������������������������������������������������������������������������������������������������������������������������������������35
Autoranging �����������������������������������������������������������������������������������������������������������������������������������������35
Auto Power Off ��������������������������������������������������������������������������������������������������������������������������������������36
Transistor ����������������������������������������������������������������������������������������������������������������������������������������������37
Dual Display ������������������������������������������������������������������������������������������������������������������������������������������38
Maximum ����������������������������������������������������������������������������������������������������������������������������������������������38
Minimum�����������������������������������������������������������������������������������������������������������������������������������������������38
Stand ����������������������������������������������������������������������������������������������������������������������������������������������������38
Optional Features �����������������������������������������������������������������������������������������������������������38
Inductance ��������������������������������������������������������������������������������������������������������������������������������������������38
Data Interface ���������������������������������������������������������������������������������������������������������������������������������������39
Scope ����������������������������������������������������������������������������������������������������������������������������������������������������39
Backlight �����������������������������������������������������������������������������������������������������������������������������������������������39
Stopwatch/Single Pulse Width ��������������������������������������������������������������������������������������������������������������39
Temperature �����������������������������������������������������������������������������������������������������������������������������������������40
Sound ���������������������������������������������������������������������������������������������������������������������������������������������������40
Count ����������������������������������������������������������������������������������������������������������������������������������������������������40
ix
■ Contents
Bar Graph ����������������������������������������������������������������������������������������������������������������������������������������������40
Data Hold ����������������������������������������������������������������������������������������������������������������������������������������������40
Data Auto ����������������������������������������������������������������������������������������������������������������������������������������������40
High/Low/Logic �������������������������������������������������������������������������������������������������������������������������������������40
Memory ������������������������������������������������������������������������������������������������������������������������������������������������41
Relative �������������������������������������������������������������������������������������������������������������������������������������������������41
Offset ����������������������������������������������������������������������������������������������������������������������������������������������������41
Limit Testing/Compare ��������������������������������������������������������������������������������������������������������������������������41
Holster or Rubber Boot �������������������������������������������������������������������������������������������������������������������������41
AC Features ��������������������������������������������������������������������������������������������������������������������42
AC Voltage ���������������������������������������������������������������������������������������������������������������������������������������������42
True RMS ����������������������������������������������������������������������������������������������������������������������������������������������42
AC Current ��������������������������������������������������������������������������������������������������������������������������������������������42
Obtaining Hook Probe Adaptors �������������������������������������������������������������������������������������42
Comparing Actual Multimeters ���������������������������������������������������������������������������������������43
Understanding the Features of a Low-End Multimeter �������������������������������������������������������������������������43
Understanding the Features of a Mid-Range Multimeter ���������������������������������������������������������������������45
Understanding the Features of a Higher-End Multimeter ���������������������������������������������������������������������46
Comparing Prices with Features ����������������������������������������������������������������������������������������������������������48
Examining Other Meters �����������������������������������������������������������������������������������������������������������������������49
Do Not Proceed Without a Meter ������������������������������������������������������������������������������������49
■ Chapter 5: Numbers and Units �����������������������������������������������������������������������������51
Choosing the Metric System ������������������������������������������������������������������������������������������51
Reducing Powers of a Thousand ������������������������������������������������������������������������������������51
M & m ���������������������������������������������������������������������������������������������������������������������������������������������������53
Alternative for Greek Micro �������������������������������������������������������������������������������������������������������������������54
Abbreviating Units ����������������������������������������������������������������������������������������������������������55
Too Little �������������������������������������������������������������������������������������������������������������������������55
Guessing Missing Units ������������������������������������������������������������������������������������������������������������������������56
Expanding from Three Digits ����������������������������������������������������������������������������������������������������������������57
x
Description:"I wrote this book because I love building robots. I want you to love building robots, too. It took me a while to learn about many of the tools and parts in amateur robotics. Perhaps by writing about my experiences, I can give you a head start."--David CookRobot Building for Beginners, Third Edition