THE
ROBOT BUILDER’S
BONANZA
GORDON McCOMB
SECOND EDITION
McGraw-Hill
New York San Francisco Washington, D.C. Auckland Bogotá
Caracas Lisbon London Madrid Mexico City Milan
Montreal New Delhi San Juan Singapore
Sydney Tokyo Toronto
FM_McComb_Tab4 8/29/00 9:33 AM Page i
Copyright © 2001, 1987 by Gordon McCombs. All rights reserved. Manufactured in the United States of America.
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 permis-
sion of the publisher.
0-07-138671-8
The material in this eBook also appears in the print version of this title: 0-07-136296-7.
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.
McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales promotions, or for use
in corporate training programs. For more information, please contact George Hoare, Special Sales, at
or (212) 904-4069.
TERMS OF USE
This is a copyrighted work and The McGraw-Hill Companies, Inc. (“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 engi-
neer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sub-
Chapter 7 Programming Concepts: The Fundamentals 79
PART 2 Robot Construction
Chapter 8 Building a Plastic Robot Platform 101
Chapter 9 Building a Basic Wooden Platform 115
Chapter 10 Building a Metal Platform 123
Chapter 11 Constructing High Tech Robots from Toys 133
Chapter 12 Build Custom LEGO-based Robots 147
Chapter 13 Creating Functionoids with LEGO
Mindstorms Robotics Invention System 161
Chapter 14 Programming the LEGO Mindstorms RCX:
Advanced Methods 173
iii
FM_McComb_Tab4 8/29/00 9:33 AM Page iii
Copyright 2001 The McGraw-Hill Companies, Inc. Click Here for Terms of Use.
PART 3 Power, Motors, and Locomotion
Chapter 15 All About Batteries and Robot Power Supplies 189
Chapter 16 Robot Locomotion Principles 217
Chapter 17 Choosing the Right Motor for the Job 235
Chapter 18 Working with DC Motors 253
Chapter 19 Working with Stepper Motors 279
Chapter 20 Working with Servo Motors 295
PART 4 Practical Robotics Projects
Chapter 21 Build a Roverbot 321
Chapter 22 Build a Heavy-Duty Six-Legged Walking Robot 335
Chapter 23 Advanced Locomotion Systems 357
Chapter 24 An Overview of Arm Systems 371
Chapter 25 Build a Revolute Coordinate Arm 377
Chapter 26 Build a Polar Coordinate Arm 389
Chapter 27 Experimenting with Gripper Designs 403
PART 5 Computers and Electronic Control
ACKNOWLEDGMENTS
Only until you’ve climbed the mountain can you look behind you and see the vast
distance that you’ve covered, and remember those you’ve met along the way who
made your trek a little easier.
Now that this book is finally finished, after the many miles of weary travel, I
look back to those who helped me turn it into a reality and offer my heartfelt
thanks: To the gang on comp.robotics.misc, for the great ideas, wisdom, and sup-
port; to Scott Savage, designer of the OOPic; to Frank Manning and Jack Schoof
of NetMedia for their help with the BasicX; to Tony Ellis, a real-life “Q” if I ever
met one; to Scott Grillo and the editors at McGraw-Hill; to my agents Matt
Wagner and Bill Gladstone; and last and certainly not least, to my wife Jennifer.
FM_McComb_Tab4 8/29/00 9:33 AM Page viii
Copyright 2001 The McGraw-Hill Companies, Inc. Click Here for Terms of Use.
INTRODUCTION
The word robot is commonly defined as a mechanical device capable of per-
forming human tasks, or behaving in a human-like manner. No argument here.
The description certainly fits.
But to the robotics experimenter, “robot” has a completely different meaning.
A robot is a special brew of motors, solenoids, wires, and assorted electronic odds
and ends, a marriage of mechanical and electronic gizmos. Taken together, the
parts make a half-living but wholly personable creature that can vacuum the floor,
serve drinks, protect the family against intruders and fire, entertain, educate, and
lots more. In fact, there’s almost no limit to what a well-designed robot can do.
In just about any science, it is the independent experimenter who first estab-
lishes the pioneering ideas and technologies. Robert Goddard experimented with
liquid-fuel rockets during World War I; his discoveries paved the way for modern-
day space-flight. In the mid-1920s, John Logie Baird experimented with sending
pictures of objects over the airwaves. His original prototypes, which transmitted
nothing more than shadows of images, were a precursor to television and video.
Robotics—like rocketry, television, and countless other technology-based
About the Second Edition
This book is a completely revised edition of Robot Builder’s Bonanza, first pub-
lished in 1987. The first edition of this book has been a perennial bestseller, and
is one of the most widely read books ever published on hobby robotics.
This new edition provides timely updates on the latest technology and adds
many new projects. In the following pages you’ll find updated coverage on
exciting technologies such as robotic sensors, robot construction kits, and
advanced stepper and DC motor control. Plus, you’ll find new information on
microcontrollers such as the Basic Stamp, digital compasses, open- and closed-
loop feedback mechanisms, new and unique forms of “soft touch” sensors
including those using lasers and fiber optics, radio-controlled servo motors, and
much, much more.
Book Updates
Periodic updates to Robot Builder’s Bonanza can be found at ot-
oid.com. You’ll find new and updated links to Web sites and manufacturer
addresses, a robot product and parts finder, tutorials on robot construction, a
robot builder’s discussion board, and more.
What You Will Learn
In the more than three dozen chapters in this book you will learn about a sweeping
variety of technologies, all aimed at helping you learn robot design, construction,
and application. You’ll learn about:
■
Robot-building fundamentals. How a robot is put together using commonly
available parts such as plastic, wood, and aluminum.
■
Locomotion engineering. How motors, gears, wheels, and legs are used to pro-
pel your robot over the ground.
■
Constructing robotic arms and hands. How to use mechanical linkages to
grasp and pick up objects.
■
Practical Robotics Projects. Over a half-dozen step-by-step projects for build-
ing wheels and legged robot platforms; arm systems; gripper design.
■
Computers and Electronic Control. “Smart” electronics; robot control via a
computer or microcontroller; infrared remote control; radio links.
■
Sensors and Navigation. Speech synthesis and recognition; sound detection;
robot eyes; smoke, flame, and heat detection; collision detection and avoid-
ance; ultrasonic and infrared ranging; infrared beacon systems; track guidance
navigation.
Many chapters present one or more projects that you can duplicate for your
own robot creations. Whenever practical, I designed the components as dis-
crete building blocks, so that you can combine the blocks in just about any
configuration you desire. The robot you create will be uniquely yours, and
yours alone.
I prefer to think of Robot Builder’s Bonanza not as a textbook on how to
build robots but as a treasure map. The trails and paths provided between these
covers lead you on your way to building one or more complete and fully func-
tional robots. You decide how you want your robots to appear and what you
want your robots to do.
INTRODUCTION XI
FM_McComb_Tab4 8/29/00 9:33 AM Page xi
Expertise You Need
Robot Builder’s Bonanza doesn’t contain a lot of hard-to-decipher formulas, unre-
alistic assumptions about your level of electronic or mechanical expertise, or
complex designs that only a seasoned professional can tackle. This book was writ-
ten so that just about anyone can enjoy the thrill and excitement of building a
robot. Most of the projects can be duplicated without expensive lab equipment,
precision tools, or specialized materials, and at a cost that won’t contribute to the
IC# means an integrated circuit (IC).
■
R# means a resistor or potentiometer (variable resistor).
■
C# means a capacitor.
XII INTRODUCTION
FM_McComb_Tab4 8/29/00 9:33 AM Page xii
■
D# means a diode, a zener diode, and, sometimes a light-sensitive photodiode.
■
Q# means a transistor and, sometimes, a light-sensitive phototransistor.
■
LED# means a light-emitting diode (most any visible LED will do unless the
parts list specifically calls for an infrared or other special purpose LED).
■
XTAL# means a crystal or ceramic resonator.
■
Finally, S# means a switch; RL# means a relay; SPKR#, a speaker; TR#, a
transducer (usually ultrasonic); and MIC#, a microphone.
Enough talk. Turn the page and begin the journey. The treasure awaits you.
INTRODUCTION XIII
Input
Connected wires
Ground
Digital or computer signal;
TTL compatible
Output
Input
Unless otherwise indicated
Gate, op-amp,
outcast, a misfit who belongs neither to science nor fiction. He is the robot exper-
imenter, and all he wants to do is make a mechanical creature that serves drinks
at parties and wakes him up in the morning.
Okay, maybe this is a rather dark view of the present-day hobby robotics exper-
imenter. But though you may find a dash of the melodramatic in it, the picture is
not entirely unrealistic. It’s a view held by many outsiders to the robot-building
craft. It’s a view that’s over 100 years old, from the time when the prospects of
building a human-like machine first came within technology’s grasp. It’s a view
that will continue for another 100 years, perhaps beyond.
Like it or not, if you’re a robot experimenter, you are an oddball, an egghead,
and—yes, let’s get it all out—a little on the weird side!
As a robot experimenter, you’re not unlike Victor Frankenstein, the old-
world doctor from Mary Wollstonecraft Shelley’s immortal 1818 horror-
thriller. Instead of robbing graves in the still of night, you “rob” electronic
stores, flea markets, surplus outlets, and other specialty shops in your unre-
lenting quest—your thirst—for all kinds and sizes of motors, batteries, gears,
1
THE
ROBOT
EXPERIMENTER
3
Ch01_McComb 8/21/00 3:16 PM Page 3
Copyright 2001 The McGraw-Hill Companies, Inc. Click Here for Terms of Use.
wires, switches, and other odds and ends. Like Dr. Frankenstein, you galvanize life from
these “dead” parts.
If you have yet to build your first robot, you’re in for a wonderful experience.
Watching your creation scoot around the floor or table can be exhilarating. Those
around you may not immediately share your excitement, but you know that
you’ve built something—however humble—with your own hands and ingenuity.
If you’re one of the lucky few who has already assembled a working robot, then you
not absolutely necessary.
4 THE ROBOT EXPERIMENTER
Ch01_McComb 8/21/00 3:16 PM Page 4
All you really need to start yourself in the right direction as a robot experimenter is a
basic familiarity with electronic theory and mechanics (or time and interest to study the
craft). The rest you can learn as you go. If you feel that you’re lacking in either beginning
electronics or mechanics, pick up a book or two on these subjects at the bookstore or
library. See Appendix A, “Further Reading,” for a selected list of suggested books and
magazines. In addition, you may wish to read through the seven chapters in Part 1 of this
book to learn more about the fundamentals of electronics and computer programming.
ELECTRONICS BACKGROUND
Study analog and digital electronic theory, and learn the function of resistors, capacitors,
transistors, and other common electronic components. Your mastery of the subject need not
be extensive, just enough so that you can build and troubleshoot electronic circuits for your
robot. You’ll start out with simple circuits with a minimum of parts, and go from there. As
your skills increase, you’ll be able to design your own circuits from scratch, or at the very
least, customize existing circuits to match your needs.
Schematic diagrams are a kind of recipe for electronic circuits. The designs in this
book, as well as those in most any book that deals with electronics, are in schematic form.
You owe it to yourself to learn how to read a schematic. There are really only a few dozen
common schematic symbols, and memorizing them takes just one evening of concentrated
study. Several books have been written on how to read schematic diagrams, and the basics
are also covered in Chapter 5, “Common Electronic Components.” See also Appendix A
for a list of other suggested books on robotics.
THE BUILDING- BLOCK APPROACH 5
Obstacle
Detectors
Central Computer or
Control Circuitry
Drive Motors
include a multitude of sources that provide good, solid design equations and formulas.
THE WORKSHOP APTITUDE
To be a successful robot builder, you must be comfortable working with your hands and
thinking problems through from start to finish. You should know how to use common
shop tools, including all safety procedures, and have some basic familiarity with working
with wood, lightweight metals (mostly aluminum), and plastic. Once more, if you feel
your skills aren’t up to par, read up on the subject and try your hand at a simple project
or two first.
You’ll find construction tips and techniques throughout this book, but nothing beats
hands-on shop experience. With experience comes confidence, and with both comes more
professional results. Work at it long enough, and the robots you build may be indistin-
guishable from store-bought models (in appearance, not capability; yours will undoubtedly
be far more sophisticated!).
THE TWO MOST IMPORTANT SKILLS
So far, I’ve talked about basic skills that are desirable for the hobby robotics field. There
are others. Two important skills that you can’t develop from reading books are patience
and the willingness to learn. Both are absolutely essential if you want to build your own
working robots. Give yourself time to experiment with your projects. Don’t rush into
things because you are bound to make mistakes if you do. If a problem continues to nag at
you, put the project aside and let it sit for a few days. Keep a small notebook handy and
jot down your ideas so you won’t forget them.
If trouble persists, perhaps you need to bone up on the subject before you can ade-
quately tackle the problem. Take the time to study, to learn more about the various sciences
6 THE ROBOT EXPERIMENTER
Ch01_McComb 8/21/00 3:16 PM Page 6
and disciplines involved. While you are looking for ways to combat your current dilemma,
you are increasing your general robot-building knowledge. Research is never in vain.
Ready-Made, Kits, or Do It Yourself?
This is a wonderful time to be an amateur robot builder. Not only can you construct robots
“from scratch,” you can buy any of several dozen robot kits and assemble them using a
interface can be used to control a robot . . .
■
When taking a snapshot at a family gathering, it’s the robot experimenter who studies
the inner workings of the automatic focus system of the camera. The camera uses ultra-
sonic sound waves to measure distance and automatically adjusts its lens to keep things
in focus. The same system should be adaptable to a robot, enabling it to judge distances
and “see” with sound . . .
THE MIND OF THE ROBOT EXPERIMENTER 7
Ch01_McComb 8/21/00 3:16 PM Page 7
The list could go on and on. The point? All around us, from nature’s designs to the lat-
est electronic gadgets, are an infinite number of ways to make better and more sophisti-
cated robots. Uncovering these solutions requires extrapolation—figuring out how to
apply one design and make it work in another application, then experimenting with the
contraption until everything works.
From Here
To learn more about . . . Read
Fundamentals of electronics Chapter 5, Common Electronic Components
Basics on how to read a schematic
Electronics construction techniques Chapter 6, Electronic Construction Techniques
Computer programming fundamentals Chapter 7, Programming Concepts—The
Fundamentals
Robot construction using wood, plastic, Chapters 8-10
and metal
Making robots from old toys found in Chapter 11, Constructing High-tech Robots from
your closet Toys
What your robot should do Chapter 42, Tips, Tricks, and Tidbits for the
Robot Experimenter
Other sources about electronics and mechanics Appendix A, Further Reading
Appendix C, Robot Information on the Internet
8 THE ROBOT EXPERIMENTER
a completely self-contained, autonomous (self-governed) machine that needs only occa-
sional instructions from its master to set it about its various tasks. A self-contained robot
has its own power system, brain, wheels (or legs or tracks), and manipulating devices such
as claws or hands. This robot does not depend on any other mechanism or system to per-
form its tasks. It’s complete in and of itself.
The other side says that a robot is anything that moves under its own motor power for
the purpose of performing near-human tasks (this is, in fact, the definition of the word
robot in most dictionaries). The mechanism that does the actual task is the robot itself; the
support electronics or components may be separate. The link between the robot and its con-
trol components might be a wire, a beam of infrared light, or a radio signal.
In the experimental robot from 1969 shown in Fig. 2.1, for example, a man sat inside
the mechanism and operated it, almost as if driving a car. The purpose of the four-legged
“lorry” was not to create a self-contained robot but to further the development of cyber-
netic anthropomorphous machines. These were otherwise known as cyborgs, a concept
further popularized by writer Martin Caidin in his 1973 novel Cyborg (which served as the
inspiration for the 1970s television series, The Six Million Dollar Man).
We won’t argue the semantics of robot design here (this book is a treasure map after all,
not a textbook on theory), but it’s still necessary to establish some of the basic character-
istics of robots. What makes a robot a robot and just not another machine? For the pur-
poses of this book, let’s consider a robot as any device that—in one way or another—mim-
ics human or animal functions. The way the robot does this is of no concern; the fact that
it does it at all is enough.
The functions that are of interest to the robot builder run a wide gamut: from listening
to sounds and acting on them, to talking and walking or moving across the floor, to pick-
ing up objects and sensing special conditions such as heat, flames, or light. Therefore,
when we talk about a robot it could very well be a self-contained automaton that takes care
of itself, perhaps even programming its own brain and learning from its surroundings and
environment. Or it could be a small motorized cart operated by a strict set of predeter-
mined instructions that repeats the same task over and over again until its batteries wear
out. Or it could be a radio-controlled arm that you operate manually from a control panel.