Robot Building For Dummies - Roger Arrick - E-Book

Robot Building For Dummies E-Book

Roger Arrick

0,0
19,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Always wanted to build a robot but didn't know where to start? This user-friendly guide shows what robots can do, how they work, and more Ready to enter the world of robotics? Then this book is for you! If you don't know much about electronics, high-tech tools, or computer programming, that's okay. If you can work with some basic tools (such as pliers, a screwdriver, and a cutting knife), have a computer and know your way around it, and want to make a robot, you're in the right place. Robot Building For Dummies walks you through building your very own little metal assistant from a kit, dressing it up, giving it a brain, programming it to do things, and even making it talk. In this hands-on guide that's illustrated with step-by-step instructions and written in plain English, you get an overview of robotics and the tools, technology, and skills you need to become a robot builder. You'll discover * The various approaches to robot building, such as building from scratch or starting with a kit * The mechanical parts of a robot and how they fit together * The components of an efficient workspace and how to set one up * Programming basics you need to enter and download commands into your robot * How to add a controller, which lets you download software programs to your robot * Using an editor program to connect to your robot * The importance of preparing the parts of a robot kit and then assembling the chassis, wheels, and sensor whiskers * The fun of making your robot functional by adding motion detection, light sensors, and more How to troubleshoot common problems and fix them to save your robot's life Along the way, you'll gather tidbits about robot history, enthusiasts' groups, a list of parts suppliers, and all-important safety tips. As an added bonus, Robot Building For Dummies comes with rebates for your robot building kit - no more waiting, grab your copy and start building your robot today.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 438

Veröffentlichungsjahr: 2011

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Robot Building For Dummies®

by Roger Arrick

Robot Building For Dummies®

Published byWiley Publishing, Inc.111 River St.Hoboken, NJ 07030-5774www.wiley.com

Copyright © 2003 by Wiley Publishing, Inc., Indianapolis, Indiana

Published by Wiley Publishing, Inc., Indianapolis, Indiana

Published simultaneously in Canada

No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8700. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4447, e-mail: [email protected].

Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates. BASIC Stamp is a registered trademark of Parallax, Inc. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book.

LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created or extended by sales representatives or written sales materials. The advice and strategies contained herein may not be suitable for your situation. You should consult with a professional where appropriate. Neither the publisher nor author shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages.

For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the U.S. at 800-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002.

Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.

Library of Congress Control Number: 2003105857

ISBN: 978-0-7645-4069-1

Manufactured in the United States of America

10 9 8 7 6 5 4

1O/RV/QY/QY/IN

About the Author

Roger Arrick is founder of Arrick Robotics (www.robotics.com), a small manufacturing firm based in Texas that designs and builds factory automation products along with mobile robots for use by hobbyists and educators. Roger is also past-president of the Dallas Personal Robotics Group (www.dprg.org), one of the largest and oldest robot special interest groups in the nation, and founder of the East Texas Robot Builders Group (www.etrb.org).

Author’s Acknowledgments

Like the rest of the text in this book, I struggled over the content of this section. Albeit small, it’s outside the grasp of certain editorial axing techniques, and I find that as liberating as running naked through a large wheat field with scissors in hand. The smile you might see on my face is likely from strange sensations, not joy.

The first person I’d like to offer thanks to is actually a fictional person named Homer Price who, through the writing of Robert McCloskey, showed me early in life that a little boy with enough energy and imagination could make more donuts than anyone could ever eat. Yes, gears were involved, and that short story helped set mine in motion.

I’d also like to thank the editors, especially Melody, who endured the whining of a would-be writer in over his head in more ways than one. Susan and Nancy also deserve a special thank you and a gift certificate to Vegas for six months. I can probably arrange one of those items.

Thanks are also due to my family, friends, and employees, who endured what seemed like decades of missing time, lost opportunities, and the senseless tossing of perfectly good computer monitors — all while providing a much needed sounding board for issues that professional writers have learned to endure with a grin.

Special thanks to Jim Brown for his writing, wit, and endurance. The secret robot builder’s handshake is in order.

And thanks to Midi for his unwavering companionship, often expressed by spasmodic jumping, 40-mile-per-hour dashes to nowhere, and freshly dug holes large enough to shelter a riding lawnmower. He seemed unfazed by this whole process, and that is what I appreciate him for.

And lastly, yet certainly firstly, to our Creator, who makes this all possible and provides all these opportunities for reasons I’ll never fully understand.

Publisher’s Acknowledgments

We’re proud of this book; please send us your comments through our online registration form located at www.dummies.com/register/.

Some of the people who helped bring this book to market include the following:

Acquisitions, Editorial, and Media Development

Project Editor: Susan Pink

Acquisitions Editor: Melody Layne

Technical Editor: Jesse Torres

Editorial Manager: Carol Sheehan

Permissions Editor: Laura Moss

Media Development Supervisor: Richard Graves

Editorial Assistant: Amanda Foxworth

Cartoons: Rich Tennant (www.the5thwave.com)

Production

Project Coordinator: Erin Smith

Layout and Graphics: Seth Conley, LeAndra Hosier, Stephanie D. Jumper, Mary Gillot Virgin, Shae Lynn Wilson

Proofreaders: John Greenough, Andy Hollandbeck, Carl William Pierce, Brian H. Walls, TECHBOOKS Production Services

Indexer: TECHBOOKS Production Services

Special Help: Laura Bowman

Publishing and Editorial for Technology Dummies

Richard Swadley, Vice President and Executive Group Publisher

Andy Cummings, Vice President and Publisher

Mary C. Corder, Editorial Director

Publishing for Consumer Dummies

Diane Graves Steele, Vice President and Publisher

Joyce Pepple, Acquisitions Director

Composition Services

Gerry Fahey, Vice President of Production Services

Debbie Stailey, Director of Composition Services

Contents

Title

Introduction

About This Book

Conventions Used in This Book

What You’re Not to Read

Foolish Assumptions

How This Book Is Organized

Icons Used in This Book

Where to Go from Here

Part I : Getting Started with Robotics

Chapter 1: So, You Want to Build a Robot?

The Robotics Revolution

Robot Uses

Chapter 2: Plotting a Path

Starting with a Kit

Selecting a Robot Kit

Moving Up to Robot Construction Sets

Building a Robot from Scratch

Economics and Time Considerations

Chapter 3: Building Your First Robot

Robot Kit to the Rescue

On Your Mark, Get Set . . .

Let the Building Begin

Testing and Troubleshooting

Soccer Jr. in Action

Learning Your Robot Chops

Baby Robot Steps

Part II : Programmable Robot Prep

Chapter 4: Setting Up Your Robot Workshop

Creating an Ideal Work Area

Getting Organized

Tool Time

How to Solder

Anti-Static Considerations: Can’t Touch This!

A Robot Library

Chapter 5: The Nuts and Bolts of Robot Building

Pieces and Parts

What’s It All Made Of?

Nuts and Bolts

Motors for Locomotion

Making Sense of Sensors

Electronics Primer

Power to the Robots

Chapter 6: A Programming Primer

Software and Computers

Anatomy of a Program

Useful Code Snippets

Useful Subroutines

Okay, I Programmed . . . Now What?

Part III : Building a Programmable Robot

Chapter 7: Preparing to Build a Programmable Robot

Robot Components Overview

Assembly Process Overview

Organizing and Prepping the Parts

To Paint or Not to Paint?

Chapter 8: From Whiskers to Wheels

Starting with Whiskers

Attaching the Drive Motor

Dealing with Wheels

Chapter 9: If I Only Had a Brain

Adding the Controller

Finishing Touches

Turning ARobot On

Chapter 10: Introducing Your Robot to Your Computer

Working with the Basic Stamp Editor

Running the Built-In Programs

Troubleshooting

Part IV : Augmenting Your Programmable Robot

Chapter 11: Expanding Your Robot’s Universe

Adding Rear Whiskers

Adding an Expansion Board

Building a Motorized Head

Accessorizing

Chapter 12: Making Your Robot See the Light

Making Sense of Light Sensors

Pulling Together the Light-Sensing Hardware

Writing the Software That Interprets the Hardware

Putting Your Sensor to Work: Real-World Applications

More Light Sensor Ideas

Chapter 13: Some Like It Hot

Sensational Temperature Sensors

Building the Temperature-Sensor System

The Brains of the Beast: The Software

Turning Up the Heat: Real-World Applications

Chapter 14: Halt! Who Goes There?

Detecting Motion: An Overview

Building the Motion-Detector System

The Brains of the Beast: The Software

Real-World Applications

Chapter 15: Yakety-Yak: Adding Speech to Your Robot

Straight Talk about Speech Technology

Building a Speech System

Creating Sound Software

Building Your Robot’s Vocabulary

Putting Speech to Work

Talking about Robots

Chapter 16: I See You

All about Video Systems

Pretesting

Mounting a Board Camera

Creating a Tethered Video System

Creating a Wireless Video System

Wireless Data Links

Camera Positioning

Applications Using the Video System

A Robot’s Vision

Chapter 17: Controlling Your Robot from Afar

All about Remote Control

The Lowdown on RC Systems

Purchasing an RC System

Installing an RC System

Half and Half: RC and Autonomous Behavior

Part V : The Part of Tens

Chapter 18: Ten Excellent Parts Suppliers

Tower Hobbies

Supercircuits

Mouser Electronics

Parallax

McMaster-Carr

Stock Drive Products

Radio Shack

80/20

Edmund Scientific

Parts Suppliers a la Carte

Chapter 19: Ten Safety Pointers

Cut Away from Your Body

Avoid the Pinch Points

Slipping Is Bad

Soldering Pitfalls

Hot Glue Follies

Super Glue on You

Dancing around the Drill

AC Stands for Are You Crazy!

Discharging Capacitors

Clipping Nippers

Introduction

M aybe your first exposure to robots was in an unmemorable 1950’s B movie titled something like Amazon Women on Mars. Maybe you played with remote-controlled cars as a kid and always loved having little mechanical things zipping around your house. Whatever the origin of your impulse, if you picked up this book you probably have the robot bug. The next logical step is to start building robots of your own.

Consider this your robot cookbook.

About This Book

This book is for the tinkerer, the dreamer, and the robot builder in us all. I know creative types like you don’t want to wade through stacks of books or jargon to get that first robot built, so I cut to the chase: You get just what you need in plain English to get your own robot production line up and running — and, most importantly, you’ll have fun doing it.

In this book you get an overview of robotics and the tools, technology, and skills you need to become a robot builder. You discover the various approaches to robot building, such as building from scratch or starting with a kit. You also explore the various mechanical parts of a robot and how they fit together, as well as programming basics you need to enter and download commands into your robot. Finally, you find out how to add functionality such as motion detection and light sensors to your robot.

Conventions Used in This Book

Book publishers have learned a thing or two about getting information across to readers in a logical fashion. That’s why you’ll find a variety of text formatting in this book:

Web addresses look like this:

www.robotics.com

When I use an unusual term for the first time, I italicize it.

Programming code looks like this:

‘------------------------------------------

‘testrw.bs2

‘This program tests the rear whisker.

‘When the whisker is activated, the red LED will

‘turn on.

testrw: if in2 = 0 then testr   ‘Check rear whisker

        high 10                 ‘LED off

        goto testrw             ‘Loop forever

testr:  low 10                  ‘LED on

        goto testrw             ‘Loop forever

What You’re Not to Read

Some information in this book you’ll probably have to read in order. For example, you should read about setting up your robot building workshop before you read about building the ARobot. You should read about building a robot before you read about programming the robot.

Then there’s information you can skip entirely, depending on what you already know. If you know all about computer programming, for example, you can skip the chapter on programming. If you know all about electronics, you can skip the sections on electronic basics.

After you build your robot, you can dip into the chapters in Part IV, which provide a variety of additional functionality to your robot, in any order you want. You can do a project from Part IV today, put the book aside, and come back a few months down the road and do another project. If you have no intention of ever adding a particular function, such as speech, don’t read that chapter. (But you’ll be missing out on something: Conversation with a robot can be very stimulating!)

Foolish Assumptions

If you’re a bit daunted by the idea of building a robot, you’ll be glad to hear that I haven’t assumed that you have a lot of knowledge about things such as electronics, high-tech tools, or computer programming. I assume that you can work with some basic tools such as pliers, a screwdriver, and a cutting knife without running to the hospital emergency room every few days.

I also assume that you have a computer and know your way around, even though you may never have written a computer program in your life. In many cases I refer you to online information or sources, so I hope you have access to the Internet. (Remember, you can always go to your local library for Internet access.)

You need some kind of workspace, even if it’s only your kitchen table or a space on your living room floor, and you should be able to keep small parts and sharp tools safe from younger members of your household and pets.

Other than that, all you need is enthusiasm, a bit of patience, and a little money to buy robot-building supplies.

Note: This book uses the ARobot kit to walk you through building and programming a robot. Much of the information and programming advice is applicable to other, similar kits. You will have to purchase such a kit to work through the chapters on robot building and programming. These types of kits and a controller will run you between $200 and $300. A smaller, more affordable, nonprogrammable robot called Soccer Jr. is also introduced in this book and costs less than $50.

How This Book Is Organized

Building anything suggests a logical progression, so in this book I’ve tried to help you by organizing chapters and parts of the book in a logical way. Essentially, you go from basic concepts, to a discussion of the tools, hardware, and software you’ll need to create and animate your robot, to hands-on projects for adding functionality to your robot.

Part I: Getting Started with Robotics

In Chapter 1, you read about the state of robotics today — where it started and how far we’ve come. You discover how robots are being used in the real world and what types of activities robot building involves.

In Chapter 2, I discuss various ways to build robots, from making one from scratch to using a predesigned kit. (These are the equivalent of gathering together flour and sugar and whatnot to bake a cake versus making the acquaintance of a lady named Betty Crocker and just adding water.)

In Chapter 3, I introduce an affordable, nonprogrammable robot. A small project like this will help you hone your building skills and acquaint you with robotic terms and ideas.

Part II: Programmable Robot Prep

Before you can run, you have to walk. Part II provides a stroll through the preparations involved in robot building.

Chapter 4 guides you through setting up a robotics workshop, including finding the right space, and assembling tools, storage, shelving, and even a library of information and parts catalogs.

Chapter 5 goes over the various hardware items you use in building robots, from nuts and bolts to motors and software.

Chapter 6 is a handy, dandy programming primer, giving you the basics you need to know to enter simple programs in an editor and download them to your robot.

Part III: Building a Programmable Robot

In Part III, you get down to assembling your first programmable robot. This can be an exciting time, but to get things right you need to proceed step by step.

In Chapter 7, you take the time to prepare yourself and your robot kit materials, trimming rough edges and sanding and painting the robot body.

Chapter 8 is where you assemble the chassis, wheels, and whisker sensors that make up ARobot.

Chapter 9 introduces you to the editor software you’ll use on your computer to enter programs for your robot.

Chapter 10 is where you’ll finally make the connection between computer and robot, stringing cables and downloading programs that will get your new robot buddy going.

Part IV: Augmenting Your Programmable Robot

Your favorite part of the book might be Part IV because this is where your new robot gets up and does stuff.

Chapter 11 sets the stage for the other chapters in this part by walking you through the process of adding an expansion board to your robot (an expansion board is where you attach all the sensors, cameras, and other stuff used to help your robot interact with its environment).

Chapter 12 is where your robot learns about light and dark as you mount a light sensor to it and download a program to measure light.

Chapter 13 takes you through the process of installing a temperature sensor on your robot. With this sensor in place, your robot can take temperature measurements in your basement, a live volcano, or wherever! (But I’d think twice about the live volcano part. . . .)

Chapter 14 opens your robot to the world of motion. By installing a motion detector and downloading various programs to your robot, it can alert you when intruders are present or just monitor the activities of your pet dog.

Chapter 15 explores speech technology and is where you can enable your robot to speak, whether it has something to say or not (like many humans I know).

Chapter 16 is where you add vision to your robot, allowing it to take images of its surroundings and send them to your monitor.

Chapter 17 covers remote-control technology that you can add to your robot to control it from afar.

Part V: The Part of Tens

The chapters in the Part of Tens give you quick hits of information on a variety of topics. In this case, Chapter 18 gives you the lowdown on some excellent robot parts suppliers (ten, of course). Chapter 19 covers ten important safety pointers for robot builders.

Icons Used in This Book

Icons are little graphic things sprinkled liberally around this book to grab your attention. Each one alerts you to a slightly different type of information.

The tip icon tells you that some extra tidbit of advice or wisdom is coming your way.

A remember icon is a reminder, suggesting something you may have discovered in another chapter or a point that’s well worth memorizing — it’s that important.

Hard as I try, occasionally I go into technical-speak. If you’re a techie, read it. If you’re not, you probably will do fine if you don’t.

Warnings are not optional reading material: These items alert you to potentially dangerous situations. When you’re working with electricity and sharp tools, as you do in robot building, you’d be wise to read each and every warning.

Where to Go from Here

It’s time to enter the brave new world of robots. I think you’ll be amused, amazed, and intrigued by what you can do with robotics with just a few tools, some parts, and a lot of imagination.

Enjoy the journey!

Part I

Getting Started with Robotics

In this part . . .

The longest journey begins with a single step, and your robot-building journey is about to begin. To become a bona fide robot builder, your first step is to understand a bit about the world of robotics and what options are available to you.

In this part you get a look at the state of robotics today — how robots are being designed, built, and used. I explain the options for building robots from scratch or from a variety of kits. Finally, you start your robot-building adventure by assembling a simple nonprogrammable robot. You can’t download computer programs to it. Instead, it performs a single, preprogrammed function.

Time to begin. Ready, set . . . go!

Chapter 1

So, You Want to Build a Robot?

In This Chapter

Introducing the robotics revolution

Finding out what a robot can do for you

E ver since the early days of science fiction, people have dreamed of little metal men running around doing our chores, alerting us to danger, performing the dirty jobs (such as going into deserted alien mine shafts on Mars to measure deadly radioactive rocks), and generally embodying technology in a quasi-human form.

How far have we come from these early fantasies? Quite a ways, but much progress is still to be made — maybe more than you think. Because our idea of robots comes mainly from the big screen, our view is skewed. Instead of robots doing our dishes and playing basketball with the kids, today’s robots are mainly used to automate repetitive and boring manufacturing tasks and in dangerous jobs, handling bombs or radioactive material.

The lack of movie-style robotic technology may make you think that the fun stuff is so far away that it’s not worth pursuing. Nothing could be further from the truth. In fact, now is the time to jump on the bandwagon and get involved — you’ll be able to tell your grandkids that you were one of the pioneers.

Robotic technology is in its infancy, just like personal computers were in the ’70s. Back then, computers were built by a few special people known as geeks, they cost a lot of money, and they could barely balance a checkbook. Robotics will be one of the next great technological revolutions, and you’re getting in on the ground floor!

In this chapter, you find out about the state of robotics today, elements you’ll encounter when working with robots, and some cool uses for robots. So come with me on a tour of robot world, and prepare to be amazed.

The Robotics Revolution

Welcome to the robotics revolution. You’re reading this book, so you’re already intrigued by robotics. But to really become a card-carrying revolutionary (robot builders unite!), you should understand a bit about where all this interest in robots comes from and where it’s going.

Where have we been?

Computers are used to program robots, so it’s not surprising that the growing interest in robotics is tied to the rapid advancement of computer technology.

It used to be that only the U.S. government, large corporations, or major colleges could afford to own a computer. Over time, computers got cheaper and smaller until finally even hobbyists could afford to own one. With all these cheap computers floating around, it wasn’t long until robotic kits began to appear. Kits such as Heathkit’s Hero robot kit brought robotics into the age where everyone could own and build their own autonomous personal robots, complete with real computer brains. And they could download programs to control their robots from their handy desktop PC.

That’s when robot clubs such as the Dallas Personal Robotics Group and the Seattle Robotics Society started popping up all across the country. Robot fever had begun. People with their new robot sidekicks wanted to talk to other people who had the same interests, and the availability of Internet newsgroups, discussion boards, and chats fueled the robot fire. Robotics groups grew in number and in size. Many robotics groups with huge member lists became modest organizations equipped with newsletters, Web sites, and e-mail lists. Nowadays, you can pretty much find a robotics group in every nook and cranny of the country. Bottom line: A lot of people want to build robots these days.

Are we there yet?

A robot is simply any mechanical unit that detects its surroundings, is capable of decision making based on input about those surroundings, and performs some operation based on those decisions. In many ways, we have arrived in a world where robots are a reality. We don’t have a humanoid-looking robot helper serving cocktails in every house yet, but robotic devices have been installed in many homes across the United States. You may have one lurking in your own house and not even know it.

For example, you might not think of motion detectors and electronic thermostats as household robots, but both devices sense their surroundings, make electronic decisions, and perform some action based on what they sense. Likewise, dishwashers and clothes washers look more like big white boxes than like robots, but their combination of electronic and mechanical operations make them at least distant cousins to robots. VCRs and DVD players have sensors that read media as well as computers that make decisions and adjustments many times a second to control motors and video output. Personal computers, phone answering machines, and clock radios could be considered robotic. Take a look around your house, and you may find other electronic devices that perform helpful robotic chores without your intervention.

But household appliances aren’t really where it’s at for those of us who live, eat, and breathe robots. Most people want to see a robot walk, talk, flash alarm lights, or roll around on its own. If you’re one of those people, you’ll be glad to know that several “real” robots are available today. For example:

Large robotic couriers prowl the corridors of many of our hospitals, ferrying blood samples to medical labs and intelligently avoiding objects in their paths.

A robot called Wisor lurks beneath the streets of New York City, repairing old steam pipes in places where people would just as soon not go.

A remote-controlled robot named Predator was used by the U.S. military for surveillance duties in Afghanistan.

Federal emergency teams have robots that can move between open spaces in rubble to help find trapped earthquake victims.

NASA uses the MER rovers Spirit and Opportunity to explore Mars.

Not all robots are developed by large corporations or the government. Many robotic devices begin as the daydream of a hobbyist, who then becomes an entrepreneur and goes on to create a company to make and sell robots. What was once a vacuum-cleaning robotics game is now a viable household appliance. What was once a robotic builder’s dream and a robotic group’s ongoing hypothetical discussion is now a robotic lawnmower. What was once a geek’s plaything is now a doctor’s telepresence in the form of a geriatric monitoring device.

Many companies offer marketable robot products including do-it-yourself kits for the robot enthusiast. Robots are beginning to make it into the mainstream, albeit slowly.

Where are we going?

In twenty years, people will look back at the movies of today and laugh at what we thought robots would be like in the future. We’ve all heard the promises of a robot in every house and flying cars zooming around with a robot at the wheel, a la George Jetson. We’re all waiting for the day when a robot will do all the household chores. But aren’t these just fantasies with no more foundation than rumors of Elvis’s latest sighting?

Actually, all these possibilities could come true in the not-too-distant future. With so many people getting involved in robotics and with robot parts and electronics getting cheaper day by day, you’re likely to see robot advancements in just about every area of life.

In the future, you could see humanoid robots doing all the work. But, who says robots have to look humanoid? Your car could have a computer brain installed and become the robot that drives — no, flies — you to work. Perhaps clothes could be a robotic exoskeleton that helps you lift heavy objects or helps the physically challenged to walk. The U.S. military, for example, is experimenting with specially enhanced robotic combat fatigues (as reported by robotic news sites such as www.robots.net).

In the future, whatever their form, robots will be around at your beck and call to assist you and serve you.

Robot Uses

The word robot first appeared in the English language in 1923, and comes from the Czech word, robata, meaning drudgery or servitude. Early robot enthusiasts clearly saw robots as mechanical servants meant to give us a life free from the more mundane tasks.

So if robots aren’t yet flying us to work or washing the dog, what are they doing? Today, robots are being used more and more for jobs that are too tedious or too dangerous for people to do, such as fitting parts on assembly lines or sensing landmines in war zones. Robots are also going to places that are too distant and dangerous for humans, such as the crushing depths at the bottom of the ocean, highly radioactive areas, and the hostile environments of Mars. In this section I take you on a tour of some intriguing robot activity.

Security

If Mr. Worf had had a robot to handle security, the Starship Enterprise would have been a different place. No Klingon angst. Just good, functional, robot security patrols.

Today, several types of robots can perform basic security functions. Robots roam the halls of museums and detect movement, humidity level, and fire. Robots handle entry management for secure buildings. Airports have robotic devices that scan luggage for bombs, and robotic cameras that can do retinal scans and perform face recognition analyses. Police departments use remotely-operated robots for disarming bombs and negotiating with potentially dangerous criminals (put down your gun . . . beep).

Because security involves both the tedious (endlessly walking the halls of buildings at night) and the dangerous (disarming bombs and drawing gunfire), robots and robotic devices are a vital part of today’s security force and will be even more so in the future.

Surveillance and exploration

Robots today go where no man has gone before, from the top of a volcano to the wreck of the Titanic in the depths of the ocean. Why are robots showing up in these odd spots? They go there to perform surveillance operations no one in their right mind would try to do.

NASA and other space agencies have found that it’s cheaper and smarter to use robots to explore our solar system. To keep an eye on our own planet from space, robotic spy satellites view and remotely monitor the earth’s surface from hundreds of miles above the earth. Spy bugs, as these satellites are called, have tiny legs (making them truly look like bugs) and use tiny color cameras to view their surroundings.

Contests

What’s the point of building a little robotic buddy if you can’t make a sport of it? More than thirty years ago, the first robot contest occurred in a hallway at MIT. The subject of a mechanical engineering class, this experiment was the precursor to today’s robot contest boom.

Most robotics groups hold contests that range from simple robotic navigational contests to robotic vacuum-cleaning contests and robotic fire-fighting contests. Robot contests are exciting and draw members into robotics clubs like flies to honey. Once hooked, members drag in friends and relatives and the sport just gets better as the number of participants grows.

National contests sponsored by those ranging from wealthy technology entrepreneurs to the U.S. government draw tens of thousands of enthusiasts, sometimes for large cash prizes. For example, in 2004, the military is sponsoring a robot race from Los Angeles to Las Vegas with a grand prize of one million dollars — all to inspire new ideas about how robot-controlled vehicles might navigate rough terrain in military operations.

Robotic contests serve useful purposes: They help to further the acceptance and growth of robotics, stimulate research into new robot technology, and educate students about technology in a fun and creative way.

Your own grocery store may monitor its parking lot with remote cameras that can pan in response to movement. Some home security systems can monitor the front doorstep or the back driveway and send alerts if a presence is detected.

In short, robots are great tools for observation, and robotic surveillance has become commonplace. As this robotic application becomes more prevalent, there could be some bumps along the way — namely, issues with human privacy.

Human helper

You probably won’t be surprised to hear that several robots are already ready and willing to help out with those pesky household chores. Currently, robots can vacuum your floors, mow your lawn, and more. Most of these robots are not humanoid at all, but rather resemble low-to-the-ground golf carts.

Because your average person likes a human face on a machine, much research is going on in the area of humanoid helper-type robots, from figuring out how to make a robot such as Honda’s Asimo walk, to giving robots human-like facial expressions. Mitsubishi’s Wakamaru, a home-caregiver robot now in development, is rumored to be capable of everything from sending e-mail to a family member in an emergency to giving its human charge a great big hug.

As robots and humans interact, various social, economic, and safety issues arise. Is the Sony Aibo dog a substitute for a real pet? Do robots make us lazy? How can robots help — or hinder — our humanity and human relationships? Robots haven’t advanced so far that we need to stay up nights worrying about their effects on us, but it’s a good idea to keep in mind Isaac Asimov’s Revised Laws of Robotics:

Zeroth Law: A robot may not injure humanity or, through inaction, allow humanity to come to harm.

First Law: A robot may not injure a human being or, through inaction, allow a human being to come to harm, unless this would violate the Zeroth Law of Robotics.

Second Law: A robot must obey orders given it by human beings, except where such orders would conflict with the Zeroth or First Law.

Third Law: A robot must protect its own existence as long as such protection does not conflict with the Zeroth, First, or Second Law.

Building robots introduces us to this brave new world.

Chapter 2

Plotting a Path

In This Chapter

Beginning your robot building with a kit

Selecting the right type of kit: programmable or nonprogrammable

Designing a robot with a robot construction kit

Advancing to a robot built from scratch

Considering the costs in time and money

E very learning experience is a kind of journey. Now you wouldn’t set out to travel from New York to Chicago without a map, would you? You shouldn’t set out on your robot knowledge quest clueless, either. So first, get a plan.

Some of you may want to jump right in and build a robot from scratch. That’s like inexperienced travelers choosing to travel to a war zone for their vacation, so I don’t recommend it. What I do recommend is that you start out simple with a few basic robotic kits. Then as you grow in skill and knowledge, you can advance to more complex robots and more complex construction techniques.

In this chapter, I show you some possible robot construction paths, help you choose your itinerary, and map out your journey.

Starting with a Kit

By now, you’re probably one of us — you know, the elite group of people who have been bitten by the robot bug. Although this particular bite doesn’t itch, it does give you a strong desire to be around robots, play with robots, and get one-on-one with robots. This means you’re ready to dig in and build your own, which is great. But exactly how to start is not so obvious.

Why not just build your own robot buddy out of scrap parts lying around the garage? After all, you have a vague idea about what’s inside a robot, and most of those things are rolling around in the bottom of your junk drawer or in a plastic bucket in the garage. Any parts you don’t have you could easily get from a hardware store or a mail-order supply house.

Trust me, building a robot from scratch is not the best place to start. To transform common household items into useful components that actually fit together usually requires a drill press, a milling machine, and a welder. And you’d still have to buy plenty of components that aren’t likely to be lying around the house. The process of building a robot from scratch requires a good design, a healthy dose of knowledge and skills, more time than most of us are willing to commit, and, frankly, a bucket full of money.

A better route is to use a robot kit. With a kit, some other poor soul gets to do the measuring, drilling, milling, and design. You get to have the fun of putting together a working robot. It might not be capable of exploring the surface of Mars, but it would be a good springboard for your next project. Putting together a kit also familiarizes you with robot terminology and components and gives you some ideas for making improvements when you build your next robot. After all, building robots is like the universe: constantly expanding.

Robotic kit companies try to reduce the complexity of building robots so that you don’t need a Masters in Electronic Engineering and a crew of Ph.D. buddies on hand. You’ll find that with many robotic kits, you can tackle building a robot all by yourself.

Even if you can build a kit by yourself, you may want to work with a friend or get input from folks in a robot club in your area if need a little help: Two heads are always better than one.

Selecting a Robot Kit

Now that I’ve made a compelling argument for crawling before sprinting, you have to select a robot kit. The first thing to consider when choosing your robot kit is whether you want to work with a nonprogrammable or programmable kit.

Of the many robot kits available to the hobbyist, most are designed to perform only one hardwired function, such as following a line or moving in response to a sound. This limited capability is mainly because inexpensive robot kits usually don’t have a computer controller that can be programmed, hence the term nonprogrammablerobot.

You can purchase nonprogrammable robot kits online, from catalogs, and even at toy stores and technology specialty shops. Prices range from $25 to $100. They’re usually made of plastic and run on normal household batteries. You begin your foray into robot building by assembling a nonprogrammable robot in Chapter 3.

Robot kits are great fun and helpful for the beginning robot builder, but don’t expect them to do much more than their predetermined task. It’s rare for a low-end robot kit to allow any expansion, but it’s common to see their components used to build more advanced, custom robots as the robot builder gains experience.

In Part II, you work with a programmable robot called ARobot. The benefit of a programmable robot is that you can — duh — program it. With programming, there’s no end to the stuff you can get your robot to do: make sounds, navigate around objects, flash lights, sense motion, record temperatures, and on and on.

It’s rare for a low-end robot kit to allow any expansion, but it is common to see their components scavenged to build more advanced, custom robots. You can scavenge a few parts yourself when you get more experienced.

Wait, these ROVs really are robots?

Just when you think you know what a robot is, someone throws a wrench into the works. There’s a difference between a robot that requires human interaction (an ROV) and one that ‘s autonomous. But then there are robots in-between that are a little of both. Some ROVs operate autonomously to some degree, and some robots require a little human intervention.

An ROV such as an RC helicopter, for example, maintains its balance autonomously while the operator tells it where to go. And the Mars Rover robot frequently had to wait for instructions from mission headquarters before continuing with its autonomous mission. It’s hard to say what is and isn’t a robot, so you’re better off not even trying.

Nonprogrammable kits

As mentioned, the most basic starter robotic kits are typically nonprogrammable robots. One good example of an easy-to-use nonprogrammable kit is the Soccer Jr. robot from OWI, Inc. (www.robotkitsdirect.com), which is shown in Figure 2-1. In fact, I like it so much that I chose it for the first robot-building project (see Chapter 3).

Figure 2-1: The nonpro-grammable Soccer Jr. robot.

The little plastic Soccer Jr. robot not only performs a task but also offers some human interaction and control. The kit comes with a wired controller that allows it to move in any direction and capture and shoot small soccer balls (well, they’re actually ping-pong balls). You can even enter it in certain robot competitions.

The Hyper Line Tracker, shown in Figure 2-2, is an intermediate-level non- programmable robotic kit from OWI Kit. Unlike Soccer Jr., The Hyper Line Tracker requires no constant human interaction. Instead, it performs one preprogrammed task: following a line. You get to draw the line, which might be more fun than you think. Line following is not a useless task; many industrial robots that manage warehouses use a similar concept to navigate.

When choosing a nonprogrammable robot kit, start with a simple robot that you’re sure you can tackle and then progress to more advanced robots as your confidence and knowledge increases.

You’ll know you’ve bitten off more than you can chew when you give up halfway through building a robot. In that case, step back and don’t be afraid to start over and build an easier robot and then come back to the more challenging robot when you’re ready.

With basic kits, assembling a robot is similar to assembling a model airplane: You just follow step-by-step instructions, putting the little plastic part A into part B and so on until, voila, you have a finished product. All you may have to do when the construction is complete is insert some batteries and turn the power on.

Don’t be deceived into thinking that these robots are just expensive toys. Many are sophisticated and introduce you to essential robotic building principles.

Figure 2-2: OWI Kit’s Hyper Line Tracker.

Although nonprogrammable kits are simple, they still require basic skills. You may be required to solder parts onto a circuit board, connect wires, and test connections. You may also be required to have some basic building skills such as assembling plastic gearboxes, gluing plastic parts, and bolting parts together.

Before you begin, you should review the kit and assembly instructions to be sure that the kit is something you can handle. If you plan to give kits to your kids, you should definitely review the instructions and perhaps even build the robot yourself first. In a few cases, you may find that even a nonprogrammable kit may be more complicated than you expected.

Remotely-operated vehicles

Most nonprogrammable robots fall into two categories: remotely-operated vehicles and preprogrammed robots. Essentially, remotely-operated vehicles(ROVs) require human intervention to operate them, and preprogrammed robots don’t.

The most basic nonprogrammable robot is the remotely-operated vehicle. The type of vehicle might be controlled by radio signals, a wired tether, or some other means of remote signaling. The Soccer Jr. robot, which you build in Chapter 3, is also an ROV.

An ROV such as a radio-controlled (referred to by people in the know as simply RC) car may be robotic in nature, but it is not autonomous (meaning it requires human interaction to do what it does). Because these types of vehicles can’t operate on their own, some robot aficionados are reluctant to call them robots at all and instead refer to them as parabots.

Some examples of ROVs follow:

Radio-controlled battle robots such as those seen on television shows such as Battlebots and Robot Wars

Unmanned subs such as those sent to search the Titanic at the bottom of the ocean

Surgical telepresence systems that enable doctors to direct surgery on patients thousands of miles away

Preprogrammed robots

The other type of nonprogrammable robot is the preprogrammed robot. Preprogrammed robots are usually autonomous; that is, they require little or no human interaction for them to perform a task.

Many preprogrammed robots have a one-track mind. You turn them on and they do one thing, such as responding to a sound or following a line. These robots have one simple task or behavior that they carry out through hard-wired electronic circuits or preloaded computer software. Basically, the designer of a preprogrammed robot makes a decision to not allow the user to modify the behavior of the robot. This decision simplifies the robot’s design, as with the Comet robot from OWI, shown in Figure 2-3, which simply responds to sounds that make it move. With other pre-programmed models, you are allowed to program limited additional functionality.

Simply be creative

The ARobot kit you’ll work with in Parts II and III is an example of a programmable kit robot. The sample code fragments you’ll find elsewhere in this book are provided to help you see the benefit of creating a modifiable robot. Although you don’t have to know programming to complete the projects in this book, I strongly recommend that you attempt to understand the essentials of Basic programming if you want to advance in robotics.

Figure 2-3: The pre-programmed Comet robot from OWI responds to sound.

Programmable kits

People seem to thrive on trying to change each other’s behavior. A salesperson tries to get a customer to make a purchase, an Army sergeant drills the troops to be obedient, one spouse tries to get the other to change his or her errant ways — we even train dogs to make them fetch the newspaper or sit up and beg.

If you’re one of those people who likes to play around with the behavior of others, you’ll be happy to know that you can easily change a robot’s behavior. In fact, the biggest thrill in building a robot may be getting it to do what you want it to. Unlike nonprogrammable kits that have only one static behavior, programmable kits give you the ability to modify or change behavior and create a sort of ever-changing life form. An example of a programmable kit robot is shown in Figure 2-4. The designers of programmable robots will never fully know what their robots are capable of because you can make endless variations by simply modifying the software.

Getting a program into your robot

As the saying goes, there’s more than one way to skin a cat — and more than one way to program a robot. With one simple programmable robotic kit, for example, you use a number two pencil to fill in dots on a data card that gives a list of commands (such as turn left, turn right, or go straight). Another robot kit allows you to enter a few commands into an onboard keypad.

Figure 2-4: The pro-grammable Parallax Toddler robot.

More sophisticated robots are tethered to a computer by cable or a radio link. With this kind of setup, a robot can receive commands in real time from the computer. Even more sophisticated programmable robots allow you to develop sophisticated software programs on a PC and download the programs to the robot’s onboard computer brain (called a controller) through a data cable. The data cable download method is the most common for today’s programmable robots.

Programming languages

The more sophisticated your computer, the more programming options you’re likely to have. Many simple microcontrollers allow you to use only one programming language, such as Basic or Assembly. On the other hand, some robot brains are like a PC computer on wheels.

A microcontroller, or controller, contains a program, memory, and input and outputs all in a one-chip package. Small personal robots mostly use microcontrollers such as 8051, HC11, or PIC for their robot brain. The ARobot uses a Basic Stamp, which utilizes a PIC microcontroller chip. A newer term is embedded, which loosely means a small computer board for small devices. Embedded systems are sometimes thought of as more powerful than just a simple microcontroller board and many can run operating systems such as DOS, Windows, or Linux. Many more sophisticated robots are beginning to use embedded system boards.

With a high-powered onboard computer, you may be able to program in quite a few software languages and interface with a few different operating systems. Such computer solutions are usually costly and complex and simply unnecessary for a basic robot. For most personal robots, a microcontroller that can run the Basic language, such as the Parallax Basic Stamp 2 controller shown in Figure 2-5, is usually sufficient to perform the common functions such as navigation and sensing the environment.

In Chapter 6, I explain some Basic language code fragments you can use with the Basic Stamp 2 controller used with the ARobot kit.

When you know how to program, you’ll be well on your way to making robots that do almost anything you want them to do. Great sources for programmable robot kits include Parallax, Inc. (www.parallaxinc.com) and the Robot Store (www.robotstore.com).

Demo and sample programs

Many programmable robots come complete with one or more sample programs. The manufacturer will often give you the source code so that you can simply copy the program into your program-editing software. Having the source code is a big advantage because you can simply make any needed modifications, rather than start from scratch.

When choosing a preprogrammed robot, look for a kit that has a few sample or demo programs to save you from having to develop the entire robot’s program from scratch.

Figure 2-5: Parallax Basic Stamp 2.

Moving Up to Robot Construction Sets

After you’ve built a few kits, you’re likely to get the urge to design your own robot. Before you attempt to build a robot from scratch, you might want to check out construction sets.

Construction sets are a great way to get started with building and design- ing your own robots. With a good construction set, you can start by building a robot in a standard way, thus preventing unexpected design problems, and then later go off in your own design direction when you’re ready to.

Anatomy of a robot construction set

You may be familiar with common hardware construction sets. The addition of a computer brain makes a construction set such as LEGO MindStorms a true robot construction set. To truly utilize this type of kit, you need to have a PC. The kit includes an integrated development environment (IDE), which you load into your PC to help you compose the robot’s software control program, as well as a download cable for downloading programs to your robot. The advantage of computer control adds a new dimension to construction sets and allows you to build a truly autonomous robot.

One advantage of construction sets is that if you don’t like the robot you’ve built, you can disassemble it and rebuild it another way. Of course, what can sometimes be an advantage can also be a disadvantage because the assembly isn’t permanent.

With some construction sets, parts may not stay assembled as you would like and the robot may fall apart at an inopportune time. To remedy this, you can tape, rubber band, bolt, or even glue your parts together to avoid the inevitable hardware breakdown. However, use glue only when you feel you won’t ever want to disassemble your robot.

With prefabricated sensor and actuator modules and a prefabricated programmable central robot brain, robot construction sets such as LEGO MindStorms (www.legomindstorms.com) and Fischertechnik (www.fischertechnik.de) have all the parts necessary to construct a robot.

Kits like these have proprietary connectors, so you can connect only their devices, such as motors, lights, and IR sensors. However, even though you’re limited as to what you can connect to the proprietary robot brain, a construction set does provide many great options. You can create a robot that can follow a line, detect and follow a wall, sort cards, or even compete in a robot contest.

Grow, grow, and outgrow!

I find most people who like robots are tinkerers, and therefore tend to play around and experiment with stuff. Although robot construction sets typically include hardware and software instructions, you’re not limited to one robot design. You can get started with these kits by building the sample robots, and then modifying the software or hardware to change the robot as you want.

Modifying a sample robot is a good way to try out new designs. Robot construction sets, unlike simple hardware construction sets, allow you to pro-totype the hardware, electronics, and software design of a robot. Hardware construction sets can also be useful to prototype a robot, but they usually don’t have electronic or software facilities to help with everything a robot needs to be a robot.