Servo Magazine - 2007-01

92

description

Robotics

Transcript of Servo Magazine - 2007-01

Page 1: Servo Magazine - 2007-01

Get an HB-25 Two-pack (#29150) for only $79.95 and save $20! The Parallax HB-25 Motor Controller (#29144; $49.95) provides a simple and dependable motor control system for your motorized projects. With an efficiently integrated heat dissipation design, the HB-25 easily manages 12V motors drawing 25A of current! These are sizable motors, as shown in our two example robots which are both controlled by HB-25s.

Motor Size: 0.5 HP Max - No Minimum

Motor Supply: 6.0 vdc min - 16.0 vdc max

Load Current: 25 A Continuous 35 A Surge (13.8 V)

Standby Current: 50 mA @6 V 80 mA @13.8 V (fan on)

PWM Frequency: 9.2 kHz

Pulse Input: 1.0ms Full Reverse, 1.5ms Neutral (off), 2.0ms Full Forward

# of Motors: 1 (or 2 in same direction)

Protection Circuits: Over Voltage, Over Current, Over Temp.

Indicators: Power (green), Fault (red)

Cooling: Forced Air - Ball Bearing Fan

Terminals: Screw Post with 35 A Rating

Weight: 2.5 oz (71 grams)

Size: 1.6” x 1.6” x 1.9”

Mounting: (2) 6-32 screws on .800” centers

Included: (1) 25 A Fuse

Vol. 5 N

o. 1

SERV

OM

AG

AZIN

EV

INN

IE•

INTEL’S O

PEN CV

•D

IVID

ERS A

ND

TIMER

S•

SOU

ND

GIN

January 2007

Cover.qxd 12/7/2006 1:00 PM Page 84

Page 2: Servo Magazine - 2007-01

Perfect holiday gifts for kids of all ages!Perfect holiday gifts for kids of all ages!

WWW.ROBOTSTORE.COM/SRCI-800-374-5764

WWW.ROBOTSTORE.COM/SRCI-800-374-5764

Enthusiasts,Start Dreaming...

Gift Givers,Take Note...

Engineers,We’ve GotIt All!

Enthusiasts,Start Dreaming...

Gift Givers,Take Note...

Engineers,We’ve GotIt All!

Robotic Kits and Components...The World’s MostComplete Offering!

CATALOG I62

I-800-374-5764 WWW.ROBOTSTORE.COM

Call for your free catalog today!

robotic kits

chassis

servos

passives

optos

integrated circuits

semiconductors

muscle wires

connectors

motors

test equipment

software

books

Robotic Kits Components...Robotic Kits Components......there’s something for everyone!Robotic kits help you and your child to experience and learn about perception andcontrol using a variety of sensors and actuators. Challenge yourself with Jameco’sselection of fun and interactive kits! You or your child can assemble the kits andthen enjoy endless hours of discovery.

Check out our unique selection of robotic kits at www.RobotStore.com!. Robot Insects & Animals . Programmable Robots

. Solar Robots . Educational Kits

. Listening, Touching & Seeing Robots . Legged and Wheeled Platforms

. Hackable Robots . OctoBot Survivor Kit

At Jameco’s RobotStore you can get the world’s most complete robotic offering—

all in one place! You’ll find kits for all ages and experience levels, along with gear

boxes, servos and chassis, for those who are ready to take on the extreme.

CoverInside.qxd 12/6/2006 1:12 PM Page 2

Page 3: Servo Magazine - 2007-01

SERVO 01.2007 3

Full Page.qxd 12/6/2006 9:56 AM Page 3

Page 4: Servo Magazine - 2007-01

Columns Departments

SERVO Magazine (ISSN 1546-0592/CDN Pub Agree#40702530) is published monthly for $24.95 per year by T & L Publications, Inc.,430 Princeland Court, Corona, CA 92879. PERIODICALS POSTAGE PAID AT CORONA, CA AND AT ADDITIONAL ENTRY MAILINGOFFICES. POSTMASTER: Send address changes to SERVO Magazine, P.O. Box 15277, North Hollywood, CA 91615 orStation A, P.O. Box 54,Windsor ON N9A 6J5; [email protected]

06 Mind/Iron

07 Bio-Feedback

23 Robo-Links

24 New Products

67 Events Calendar

72 Robotics Showcase

73 Menagerie

80 SERVO Bookstore

90 Advertiser’s Index

08 Robytes by Jeff EckertStimulating Robot Tidbits

10 Twin Tweaksby Bryce and Evan WoolleyMighty Morphing Bioloid

16 Ask Mr. Roboto by Pete MilesYour Problems Solved Here

20 GeerHead by David GeerRoboGeddon It! Are You Getting It?

74 Programmable Logicby Gerard FonteDividers and Timers

82 Robotics Resources by Gordon McCombShopping the Electronics General Store

86 Appetizer by Lawrence FeirTake Me to Your Leader — Meet Robbie the Robot

87 Then and Now by Tom CarrollShuttle Remote Manipulator System/Canadarm

4 SERVO 01.2007

ENTER WITH CAUTION!26 The Combat Zone

TOC Jan07.qxd 12/7/2006 4:59 PM Page 4

Page 5: Servo Magazine - 2007-01

01.2007VOL. 5 NO. 1

SERVO 01.2007 5

34 Exploring Soundginby Gordon McCombRobotics and sound generation are natural playmates. Use this synthesizer to add life to your builds.

39 DARwInby Karl Muecke, Patrick Cox, and Dennis HongPart 2: Parts, wires, and motors.

44 Hacking Rogerby Monty ReedRoger Robot makes a perfect platform for beginning hackers.

52 Robot Safetyby Bryan BergeronA discussion of robot design, construction, and operating practicesthat can improve the survivability of your robots and minimize the safetyrisks to you and bystanders.

57 Beginner’s Robotics on$50 a Monthby Paul PawelskiPart 2: Building the CIRC bot.

62 Seeing With OpenCV by Robin HewittPart 1: An Introduction to OpenCV — Intel’s free, open-source computer vision library. Learn where to get it, how to set it up on your computer, and work with the OpenCV interfaces.

68 ROBOGames Prepby Dave CalkinsThis month: Tetsujin.

Features & Projects

Page 20

TOC Jan07.qxd 12/7/2006 5:05 PM Page 5

Page 6: Servo Magazine - 2007-01

Published Monthly By T & L Publications, Inc.

430 Princeland CourtCorona, CA 92879-1300

(951) 371-8497FAX (951) 371-3052

Product Order Line 1-800-783-4624www.servomagazine.com

SubscriptionsInside US 1-877-525-2539

Outside US 1-818-487-4545P.O. Box 15277

North Hollywood, CA 91615

PUBLISHERLarry Lemieux

[email protected]

ASSOCIATE PUBLISHER/VP OF SALES/MARKETING

Robin [email protected]

CONTRIBUTING EDITORSJeff Eckert Tom CarrollGordon McComb David GeerPete Miles Kevin BerryDave Calkins Bryan BergeronKarl Muecke Patrick CoxDennis Hong R. Steven RainwaterPaul Pawelski Robin HewittMonty Reed Lawrence FeirMichael Simpson Gerard FonteBryce Woolley Evan WoolleyAaron Taggart Brian BensonAdam Wrigley Bradley Hanstad

CIRCULATION DIRECTORTracy Kerley

[email protected]

WEB CONTENT/STOREMichael Kaudze

[email protected]

PRODUCTION/GRAPHICSShannon Lemieux

ADMINISTRATIVE ASSISTANTDebbie Stauffacher

Copyright 2007 by T & L Publications, Inc.

All Rights Reserved

All advertising is subject to publisher’s approval.We are not responsible for mistakes, misprints,or typographical errors. SERVO Magazineassumes no responsibility for the availability orcondition of advertised items or for the honestyof the advertiser.The publisher makes no claimsfor the legality of any item advertised in SERVO.This is the sole responsibility of the advertiser.Advertisers and their agencies agree toindemnify and protect the publisher from anyand all claims, action, or expense arising fromadvertising placed in SERVO. Please send alleditorial correspondence, UPS, overnight mail,and artwork to: 430 Princeland Court,Corona, CA 92879.

Last year, I built a walker robotfor the Robot Fest. I christened thisrobot “Face Walker.” It was featuredin the August, September, andOctober issues of SERVO Magazine.My goal was to create a robot thatwould catch the attention of thespectators and hold their interestwhile I gave my presentation. I had a nice little speech all planned.What I had not planned on was the“freak factor.”

What actually happened was thatthe spectators were so enthralled bythe look of Face Walker, that theydidn’t hear a word I said. Manyindividuals left only to return withfriends or family members. What is it that made the Face Walker so awe-inspiring? The Face Walker hadwhat I now call the freak factor.

I had a chance to review videosthat were taken of the spectatorswhile they were watching the FaceWalker in action. Almost all of themwere watching the face. The facewould animate and make noises asthe robot would move. Individualssaw this walker robot thingy thatlooked something like a spider, but asit turned to face them, it would winkor say something. Immediately theywould smile and point. It is when westart to add human characteristics tomachines that we start to evokeemotions, which can range fromamazement to outright fear.

So, I created a really cool robot,but what can it do? This is the kind of question I often get when showing walker robots. The powerrequirements for a fully articulatedwalker are massive. In many cases,you have 12-24 servos that are all

energized at once. The Face Walker always had to

have three legs in contact with theground at any one time to supportthe total weight of the robot. Evenwhen standing still, a walker will uselarge amounts of power. This is nottrue with a wheel-based robot.

The 7.2V 3,000 mAh batterypack would power the Face Walkerbase for about five minutes before itneeded an hour charge. On awheeled robot of the same weight,you get over an hour of run time onthe same battery. This makes walkersvery inefficient for most tasks.However, when it comes to educationor studying the human condition, youcan’t beat a walker.

In order to top last year’s RobotFest, I have started early on my nextrobot exhibit. This robot will be abiped walker with 19 servoscontrolling various limbs, as well asthe neck. Let’s call him Kronos.Kronos is still in the experimentalstage but while he is in the sitting position, I added a randommovement generator and createdsome routines to simulate breathing.The bot’s chest would simply move inrhythm and the head would turnslightly at random intervals.

This was freaky enough, but Iwanted to take it a step further andadded some random fidgetmovements. He started moving hisarms or would change the angle ofhis legs as though he was trying toget comfortable. Let me tell you, this even freaked me out. Is itmemories of Chucky or is it that we just are not used to humanattributes on a mechanical device?

Mind / Iron

by Michael Simpson

Mind/Iron Continued

6 SERVO 01.2007

Mind-FeedJan07.qxd 12/7/2006 2:31 PM Page 6

Page 7: Servo Magazine - 2007-01

Dear SERVO:Thank you for running Paul Pawelski's "Beginner's

Robotics on $50 a month." Sure, it's fun to lust after multi-jointed 'bots costing four figures, but robotics doesn't haveto be expensive. This series promises to be an excellent wayfor newcomers to become acquainted with the field orhobby without risking a lot of cash. Paul's article affirms thatSERVO Magazine continues to appeal to a broad range ofages and personal budgets.

K. BowerKamloops BC

It’s probably a little of both.

What is the Robot Fest?

Robot Fest is an annual event held each year inLinthicum, MD at the Historical Electronics Museum. Thenext Fest will be held on April 28, 2007. This is a freeevent that exposes many individuals — children and adults— to varying types of robots. Everything from the largeBattleBots to the smallest walker will be on exhibit. Be sure to check out the Robot Fest website atwww.robotfest.com.

Hope to see you there! SV

Did you know that if you’re a paid subscriberto SERVO Magazine, you can get the online

version for FREE?Go to www.servomagazine.com

SERVO 01.2007 7

Mind-FeedJan07.qxd 12/7/2006 2:31 PM Page 7

Page 8: Servo Magazine - 2007-01

8 SERVO 01.2007

Unmanned HelicopterTakes Off

Late last year, Boeing Co.(www.boeing.com) flew what isdubbed the A/MH-6X light-turbine helicopter for the first time. Underdevelopment since 2004, it is actuallya hybrid manned/unmanned aircraftthat combines the abilities of the existing A/MH-6M Mission EnhancedLittle Bird (MELB) with the unmannedaerial vehicle technologies of the Unmanned Little Bird (ULB)Demonstrator shown above. The latter is a modified MD 530F civil helicopter that is readily available from MD Helicopters, Inc. (www.mdhelicopters.com).

So far, the Demonstrator haslogged about 500 flight hours. In thelatest test, the A/MH-6X was flown for14 minutes as a piloted aircraft, butfuture testing will involve bothmanned and unmanned operations.Aircraft performance will be similar to

that of the Demonstrator, but with anadditional 1,000 lbs (increased to3,400+ lbs) of payload that can beused for increased range, endurance,or mission hardware. Interestingly,Boeing says that the unmanned hardware and paraphernalia devel-oped for this program can be adaptedto any helicopter.

Give ‘em the Chair

Like many things we encounterin life, the Robotic Chair, a creationof Cornell’s (www.cornell.edu)Prof. Raffaello D’Andrea and artistMax Dean, admittedly has no utilitar-ian value. And, like many people weencounter in life, its “brain” is locat-ed in its seat. But not everythingneeds to have a mundane purpose,and the chair — designed as art for

art’s sake — has only one function: tofall apart and reassemble itselfautonomously.

The chair’s operation involves 14 motors, two gearboxes, and various other mechanical parts, anda computer uses special algorithmsto tell the chair how to find missingcomponents and rebuild itself.Waxing philosophical, Dean notedthat its operation is “somewhat likewhat we do in our own lives. We fall apart and put ourselves backtogether.”

Maybe it has no utilitarian value,but it could have significant entertainment value if you place acouple of them at the dinner tableand invite the in-laws over. In anyevent, the chair will be exhibited in artshows and museums around theworld and eventually sold to a galleryor collector.

Bot Cleans Up After You

On a much more down-to-earthlevel is the latest creation of Prof.Andrew Ng’s Stanford ArtificialIntelligence Robot (STAIR) project.The dream here is to, within adecade, put a robot in every homeand office to take care of routine

Boeing’s ULB Demonstrator on itsfirst unmanned spin around the block.

Photo courtesy of Boeing.

A plate-grabbing robot, graduatestudents Ashutosh Saxena andMorgan Quigley, and Assistant

Professor Andrew Ng (L to R) — allpart of the STAIR project. Photocourtesy of Stanford University.

The robotic chair in different stagesof collapse and reassembly.

Photos by Raffaello D’Andrea,courtesy of Cornell University.

by Jeff EckertRobytes

Are you an avid Internet surferwho came across something

cool that we all need to see? Areyou on an interesting R&D groupand want to share what you’redeveloping? Then send me anemail! To submit related pressreleases and news items, pleasevisit www.jkeckert.com

— Jeff Eckert

Robytes.qxd 12/7/2006 1:30 PM Page 8

Page 9: Servo Magazine - 2007-01

jobs that you don’t really want to do,such as cleaning up after a party, taking out the trash, loading thedishwasher, sobering up Uncle Ralph,and so on. According to Ng, a practical maidbot will need to unite areas of artificial intelligence,including speech processing —navigation, manipulation, planning,reasoning, machine learning, andvision — into one package, whichposes a substantial challenge.

In the present stage of develop-ment, the team designed an algorithm that allowed STAIR to recognize familiar features in variousobjects and select the right grasp topick them up. The robot was trainedin a computer-generated environmentto pick up a cup, a pencil, a brick, abook, and a martini glass. The algorithm locates the best place forthe robot to grasp an object, such asa cup’s handle or a pencil’s midpoint.“The robot takes a few pictures, reasons about the 3-D shape of theobject based upon computing thelocation, and reaches out and graspsthe object,” Ng said.

In tests, the robotic arm pickedup items similar to those for which itwas trained, as well as unfamiliarobjects including keys, screwdrivers,and rolls of duct tape. Which bringsup the question of what STAIR willdo with the duct tape after picking itup. Is a Red Green robot in theworks?

Add YourNomination

Just a reminderthat the fourth annualinduction ceremonyfor the CarnegieMellon Robot Hall ofFame is scheduled forthis summer (date tobe announced) in

Pittsburgh. You are invited to nomi-nate your favorite robot at www.robothallof fame.org/nominate.php. Only one nomination is allowed per computer, and (duh!) previousinductees are not eligible.

One for the GripperIf your bot is having trouble

grasping things using rubber-clad fin-gers or other standard end effectors,maybe you should consider grippersthat are fitted with razor-sharp needles. Assuming you aren’t doing apick-and-place operation on hamsters,the operation could be improved withthe GRN needle grippers from SASAutomation (www.sasgripper.com).

The company recently upgradedthe product to incorporate titaniumneedles rather than the previous steelones, thus offering longer productionlife and lower overall replacementcosts. The needles extend from 3 to 5mm from the gripper body and arepneumatically activated. The grippersare compatible with the entire SAS end-of-arm tooling (EOAT) lineand come in both 14 and 20 mmmounting shaft sizes. Among theusual applications are gripping fabricor mesh, insert molding for floor matsand other automotive materials, and handling of lightweight porousmatting. SV

Robytes

The GRN grippers now feature titanium needles.Photo courtesy of SAS Automation.

SERVO 01.2007 9

AX2550

AX2850

Get the DC Motor Controllersthat are at the heart of many of today’sworld’s most demanding Industrial,Military and Research Robots, and otherinnovative Motion Control applications.

- RS232, RC, or Analog input- Speed or Position Mode- Dual channel output up to 140A- Optical Encoder Inputs- Intelligent Current Limiting- Thermally Protected- Field Upgradable Firmware- Enclosed and Board-Level versions- and many more advanced features ...

Model Amps Features PriceAX1500 2x30A B $275AX3500 2x60A O-R-B $395AX2550 2x120A A $495AX2550HE 2x140A A $645AX2850 2x120A O-A $620AX2850HE 2x140A O-A $770A=Aluminum Extrusion, B=Board-Level, O=Optical Encoder In,R= RC outputs. Qty1 price. Contact us for OEM Qty prices

www.roboteq.com

8180 E.Del Plomo Dr. Scottsdale AZ USA 85258

(602) 617-3931 - [email protected]

IndustrialStrength

Motor Controlfor All

AX3500

AX1500

Robytes.qxd 12/7/2006 1:30 PM Page 9

Page 10: Servo Magazine - 2007-01

10 SERVO 01.2007

Robots come in all shapes and sizes,and the Bioloid from the Koreancompany Robotis certainly takes

that to heart. When we first receivedthe Bioloid kit, we thought we wouldbe dealing with a robot that looked likethe one in the advertisements and onthe box itself — a bipedal servo walker.We were pleasantly surprised to discov-er that the Bioloid is much more thanjust a humanoid walker; it is quite literally whatever you want it to be.While many bipedal servo walkers usemodular design as a means for the endof achieving an anthropomorphic form,the Bioloid takes full advantage of themodular design and truly invites the tin-kerer to let their imagination run wild.

Gestalt AssaultThe specific kit that we received was

the “comprehensive” Bioloid kit, whichincluded the most structural pieces and18 Dynamixel servo modules. The Bioloidis also available in two other kits: thebeginner and intermediate. We thinkRobotis deserves a standing ovation forthis innovative marketing strategy,because we really feel it provides a viableeducational platform — the Bioloid is,after all, an educational robot kit.Apparently there is also an Expert kit thatincludes a canned curriculum, but wethink the distinctions of the Beginner,Intermediate, and Comprehensive kitscreate an effective naturally progressive

curriculum that will teach any roboticistabout the intricacies of modular robotics.

The Beginner Bioloid kit comes withjust the basics — the CM-5 (the mainbrain for the robot), some structuralbits, four Dynamixel servo modules, andone Dynamixel sensor module. Many ofthe robots detailed in the instructionmanual that can be built with the begin-ner kit are indeed rudimentary, the sim-plest being a “crossing gate” that acti-vates one servo module with the touchof a button. But don’t think that thebeginner kit is by any means boring — itis, in fact, the kit with the greatest variety of robots detailed by step-by-stepinstructions in the manual. Other possible robots include a crocodilemouth and an interactive duck, andevery different design teaches the userabout a new aspect of construction orprogramming, like how to utilize theexpansion PCB and the use of for loops.

The intermediate kit provides somemore complicated designs that use upto eight Dynamixel modules, includinga simple spider and a “battle droid.”The intermediate designs are generallymore interactive, and they usually makeuse of a sensor module that is part ofthe Bioloid kit. We think that the inclusion of a sensor module is a must

THISMONTH:

MightyMorphing

Bioloid

THE BIOLOID KIT. OOOOOOH,THE INSIDE!

TwinTweaks.qxd 12/7/2006 1:32 PM Page 10

Page 11: Servo Magazine - 2007-01

for an educational robot, because itallows the Bioloid to achieve true auton-omy and interact with its environment.

The comprehensive kit includesdesigns for four impressive robots withup to 18 joints. The four advanceddesigns are a puppy, a tyrannosaurusrex, the ultra-cool sounding King Spiderand, of course, the iconic humanoid.

Apart from all of the obviously coolstuff in the kit, there are some finaltouches that we really appreciated.Probably the biggest pleasant surprisewas that the Bioloid came with batter-ies included, a phrase practicallyunheard of nowadays. And if that wasn’t cool enough, the batteries arerechargeable, and the kit comes with acharger. We had been working with thekit for a while before we realized thatthe charger was made for AC outlets,but adapters are pretty easy to find.

Commanding theBioloid

The programming environment forthe Bioloid is an interesting beast, and,like the kit itself, comes in multipleforms. The main program editor for theBioloid looks like a Frankensteined version of Easy C and Visual Basic, withliteral blocks of code that encompassfamiliar commands like if, else, and forloops. Sometimes the written commands inside the blocks are accom-panied by curious pictures perhapsmeant to appeal to the more visual programmer, but often times we foundour selves scratching our heads and wish-ing for a Rosetta stone of programming.

The other programming environ-ment is the Motion Editor, somethingakin to what most other servo basedrobots have. Individual servo motorsare assigned valuesto move to certainpositions. The coolthing is that a seriesof commands inthe motion editorcan be saved in a block and implemented in thebehavior controleditor. Synergy is abeautiful thing.

Robots in Disguise ...As Other Robots

We decided that an effective wayto gauge the Bioloid’s effectiveness asan educational tool would be to followthe natural curriculum of the kit. Withthat in mind, we set out to build thesimplest model — a crossing gate. Whilethis might seem like an underwhelmingproject to build first out of such a coolkit, we appreciate the fact that Robotishas provided a simple way for novicetinkerers to get their feet wet. A curso-ry glance at the kit reveals some prettyintimidating stuff — tons of tiny fasten-ers, intricate frame pieces, lots of cablesof various lengths, and a whole mess ofDynamixel servo modules. With such adaunting kit on hand, a painfully simpledesign doesn’t look so painful after all.

The crossing gate did indeed usevery few parts, but it still provided anadequate introduction to the kit and itsunique attributes. One such attribute isa component of the Bioloid’s design,presumably intended to make construc-tion easier: on every servo module andthe CM-5, there are pockets that capturethe nuts. This sounds like a nice way tofree up some hands when building therobot, and it often is. Sometimes,though, we think the Bioloid kit falls vic-tim to a stack up of tolerances. Whenyou’re dealing with mass produced plas-tic parts that are already a tight fit, smallimperfections can stymie even the mosttenacious of efforts. Unfortunately, itseems like to us that this might sometimes be the case with the Bioloid.It could just be us, but it seems like onsome of the modules that we could onlyever get three of the requisite four nutscaptured in the pockets. Even so, thecrossing gate came together without

much difficulty. Most of the beginnerdesigns can be built in a matter of minutes, even for novice roboticists.

Next we tried our hand at an intermediate level robot — the spider. Wefound out that dealing with the pocketsbecomes somewhat easier with practice.A thin screwdriver is a handy way to pro-vide some extra leverage on the nuts, aslong as you’re careful not to screw up thethreads. Intermediate level bots take a bitlonger to build — more like a few hoursinstead of tens of minutes. But once thatspider was finished, it was really excitingto see that a ho-hum crossing gate couldmorph into something so cool.

After graduating from the interme-diate level designs, we felt confidentenough to tackle an advanced design.The puppy seemed like a good choice,because it would be interesting to seehow this modular robot dog comparedto other robots that were designed sole-ly with imitating man’s best friend inmind. The advanced designs take manyhours to complete, so it might be a goodidea for roboticists that cannot devotetheir undivided attention to the Bioloidto find a good stopping point in the mid-dle. Fortunately, that’s pretty easy to dowith the Bioloid puppy — the limbs arebuilt first, and then everything is connected to the body. The synthesis ofthe limbs into a complete bundle ofpuppy joy is by far the most difficult step,but the end result is wonderfully enter-taining. All it takes after construction is aquick download of a sample programfrom the CD, and the puppy is ready tobring smiles to the faces of young andold roboticists alike. The robotic puppycan scamper along at a brisk pace, perhaps not with the agility of other

SERVO 01.2007 11

Mighty Morphing Bioloid

YOU GUESSED IT ... THE CROSSING GATE!

THE BIOLOID SPIDER.

TwinTweaks.qxd 12/7/2006 1:32 PM Page 11

Page 12: Servo Magazine - 2007-01

12 SERVO 01.2007

Twin TTweaks ....

robot dogs, but it’s certainly quick andquirky enough to hold its own. The robotpuppy can sit, eat from your hand, andeven do head stands. And as a testa-ment to the Bioloid’s interchangeablenature, a few modifications to the snoutlater we had a passable robot cat, quiteeffective at mimicking the real thing. Allwe had to do was reassign some of thebehaviors in the program to buttons onthe CM-5 (we had removed the sensormodule to achieve a more cat-like face),and the new robot cat was capable ofthe behaviors characteristic of real cats;namely eating and sleeping. When oneof the cat’s ears fell off, we affectionate-ly nicknamed him Vinnie.

Vinnie’s ear problem actually alertedus to one of the pleasant aspects of theBioloid’s design. Apparently, all the cap-

tured nuts hullabaloo was worth some-thing — when the ear fell off, not a singlepiece was lost. The Bioloid, like manyother robotics kits, is afflicted with therobotic equivalent of the common cold —loose screws. It’s an inevitable maladyunless you use Loctite or Nylocks or someother preventative measure, all of whichare out of the question for modularrobots that are disassembled andreassembled repeatedly. While the folksat Robotis have not implemented a solu-tion for loose screws in the Bioloid, theirsomewhat frustrating design elements oflittle pockets and such will hold onto theloose pieces for dear life, at least cuttingdown on the frustration of trekking outto your local hobby store to find replace-ments for lost mini nuts and screws.

Modular MayhemOnce we were thoroughly

acquainted with the designsincluded in the Bioloid kit, wewere ready to branch out withour own creations. A classicguise taken by modular robots is that of a snake. The highlyarticulated nature of the slithery reptile is hard to replicate with

more traditional robotic designs, so modular robots are the perfect candidatesfor technological mimics. The snake wasliterally quite straightforward to build, butsince there was no example program onthe CD, we had to come up with our own.

An inchworm-like motion was perfectly suited to a synthesis of theBioloid’s motion editor and behaviorprogramming. The motion editor is reminiscent of the classic programmingenvironments for many multiple servobased robots. By hooking the CM-5 intoyour computer, you can dictate the motionof each individual servo, and you evenhave a cool 3D animation for feedback.

Programming a snake motion wasfairly easy — we just had to have our lineof servos give a passable imitation of asine wave. Our single pulse of snakemotion could then be saved and imple-mented in the behavior control program-mer. In many programming environ-ments, a repetitive motion like the onewe wanted for our slithering snake couldbest be achieved by the brute forcemethod of copy and paste. The Bioloid’ssoftware allowed for the much more elegant solution of a for loop or somesimilar command. We think this inclusionof “real” programming in the Bioloid kit isvery important for the Bioloid’s educa-tional goals, because programming in lan-guages like C is much more common thanthe gait tables proffered by most modularkits. Soon, we had a slithering snake thatwas no where near as smooth as the realthing, but it did indeed move.

Another advantage of modulardesign is the prospect of shape shiftingon the fly. Sure, we were able to turn acrossing gate into a spider into a puppyinto a snake, but each time we had to

SEE ANY RESEMBLANCE? THE CM-5. VINNIE!!

THE ALL-TOO-FAMILIAR ROBOT SNAKE.

SLITHERING ALONG ...

TwinTweaks.qxd 12/7/2006 1:33 PM Page 12

Page 13: Servo Magazine - 2007-01

completely disassemble and reassemblethe bot. What would truly be amazing isa robot that could take the shape of acrossing gate, spider, puppy, and snakeall without human intervention. That’sright. We’re talking about transformers.

Shape ShiftingSnake Eyes

If cool factor isn’t compellingenough of an argument, there are a multitude of practical reasons that shapeshifting robots are a popular questamong roboticists. Simply put, wheels aregreat for smooth terrain, but when thegoing gets rough, legs are more capable.So why not always use legs? Becausewheels are so much faster on smooth ter-rain. A conundrum — there seems to be atradeoff between speed, simplicity, andthe ability to grapple with uneven terrain.With shape shifting modular robotics,there doesn’t have to be a trade; you canhave it all. There is the possibility of hav-ing a snake to tackle uneven terrain turninto a wheel to race across flat ground.

That’s what we were aiming toachieve with our snake bot — a snakethat could curl up into wheel. It seems abit underwhelming, but it’s harder than itsounds. Real shape shifting modularrobots have ways of reconfiguring on thefly, something that the Bioloid lacks. Realshape shifting robots have ways of recon-necting and disconnecting modules with-out human intervention, either throughautonomous latches or some other fancybit of technology. The only way theBioloid modules are connected arethrough nuts and screws, so there reallywasn’t an easy way to reconfigure on the

fly. The best we could do was to add aclaw to the end of the snake’s tail andhope that would be enough to keep thewheel together. Unfortunately, wealready had a flat tire because we need-ed to include the not so sleek CM-5 in oursnake, and the shaky connection madefor a wheel that any unicyclist wouldavoid. Perhaps the time had come tomove onto something bigger and better.

The Derivative ofOptimus

Advertisements for the Bioloid andthe box of the bot itself are emblazonedwith the iconic form of the humanoidservo walker, so it seems appropriate thatthe humanoid bot is the final, and presumably most difficult, designdetailed in the instruction manual. Thehumanoid design is indeed a challenge,

as it consumes every Dynamixel moduleavailable in the kit. After assemblingbeginner and intermediate designs, constructing the limbs of the humanoidshould be a snap for any roboticist, butattaching everything to the body iswhere the real challenge begins. At timeswe were wishing for more than four collective hands, but eventually we wereable to complete the humanoid Bioloid.

The humanoid Bioloid is filled withpersonality. With the demo program,the Bioloid will fend off obstacles withkarate moves, dance, lay down, and ofcourse walk all over the place. Whileperhaps not as agile as other bipedalservo walkers that we have workedwith, none of those other servo walkerscould brag that they had been a puppymere hours earlier. But is the Bioloid theproverbial jack of all trades, and there-fore master of none? Perhaps the

Mighty Morphing Bioloid

SERVO 01.2007 13

SNAKE WHEEL! DYNAMIXEL SENSOR MODULE. DYNAMIXEL SERVO MODULE.

A PROGRAM!

TwinTweaks.qxd 12/7/2006 1:33 PM Page 13

Page 14: Servo Magazine - 2007-01

Bioloid cannot claim utter mastery inany of its more complex forms, but itsversatility is nothing short of impressive.

Never ones to be anthropomorph-centric, we realized that the Bioloidhumanoid might benefit from someshape shifting. Inspired by the roboticheroes on the television shows of ouryouth, we set out to give the Bioloidwheels. Not wheels to replace his feet,of course, but wheels that would allow the Bioloid to transform from ahumanoid into a car. Without the luxuryof reconfiguration on the fly, we had tocome up with a way for the Bioloid tofold up in order to become a car. That’sthe way the Transformers did it too, sowe were confident when we set aboutgiving the Bioloid a new set of arms.

We think that our final trans-

formed product looked kind of like asprint racecar, or if that was perhapstoo flattering maybe an old stylebuggy, the kind that supplanted horsedrawn carriages. Since one of the preprogrammed behaviors of thehumanoid Bioloid was to lay down, allwe had to do was modify that toinclude a very painful looking yogaposition and we had our buggy. Onlythe front two wheels were powered, soour buggy might have benefited from arobotic horse. If we had anotherBioloid kit, we would have made one.

Saving the World,One Robot at a Time

Overall, we are overwhelminglyimpressed with the Bioloid kit. It pro-vides a truly viable educational platformwhile being undeniably entertaining.And even if it can’t live up to the stan-dards of reconfigureability of real worldmodular robots, that is hardly a badthing. The folks at Robotis have createda kit that stimulates the imagination andeducates roboticists of all skill levels.

We really think the offering of theBioloid in three different kits in particu-lar is very conducive to the robot’s stat-ed goal of being educational. As anytype of robot, modular robots like theBioloid can be very intimidating and

confusing for novices. The beginner kitis, however, perfectly suited for begin-ners looking for something “closer toreal” robots (as per the Bioloid’s slogan)than something like LEGO Mindstorms.The Bioloid doesn’t come with an explic-it curriculum, but we really think thatgoing through and building the robotsdetailed in the manual provides a comprehensive walkthrough of the con-struction and programming for the kit.

Also, we think that to be an effectiveeducational tool, the kit has to be widelyaccessible. Any bipedal servo walker canteach a roboticist of any level somethingabout human motion and mechanicallimitations and adaptation, but kitsupwards of one thousand dollars simplyaren’t going to reach that many people.The Bioloid beginner kit will presumablyonly run a couple of hundred dollars,making it far more accessible to roboti-cists, particularly novices looking for a kitwith which to get involved in robotics.

Once new roboticists are hooked bythe beginner kit, the Bioloid kit tells youexactly what additional parts you needto be able to build the intermediate andadvanced robots. This step-by-step pro-gression that leads up to a bipedal servowalker is effective for not tossing novicesdown a mercilessly steep learning curveand also for providing motivation to con-tinue working and learning with the kit.

The great motivation that the Bioloidprovides is that the new designs keep getting cooler and cooler. Once a bud-ding roboticist has built the spider, ofcourse they’ll want to build the king spider next. And if just the idea of a coolnew robot isn’t motivation enough, theCD comes with videos demonstrating theabilities of every design detailed in the kit.

The Bioloid is a truly inspirational kit.Even though our first experiences build-ing with it were a bit tedious, we quicklygot past that to realize that the Bioloid isflat out cool. And when there’s an edu-cational robot kit with great potential foreffectiveness that is undeniably cool,everybody wins. And that’s how the realTransformers would have wanted it. SV

Twin TTweaks ....

14 SERVO 01.2007

Recommended WWebsiteFor more information on the

Bioloid, go to www.robotis.com

BIOLOID RACECAR ... ER ... BUGGY!?

HobbyEngineeringHobbyEngineeringHobbyEngineeringHobbyEngineeringThe technology builder's source for kits, components, supplies, tools, books and education.

Robot Kits For All Skill Levels

Motors, Frame Componentsand Scratch Builder Supplies.

ICs, Transistors, Project Kits

BEAM Kits and Components

Books andEducational K

Most orders ship the day received! World-wide shipping. Convenient payment options.

Order by Internet, phone, fax or mail.

www.HobbyEngineering.com

1-866-ROBOT-501-866-762-68501-650-552-9925

1-650-259-9590 (fax)[email protected]

180 El Camino RealMillbrae, CA 94030

Visit our store near SFO!

TwinTweaks.qxd 12/7/2006 1:34 PM Page 14

Page 15: Servo Magazine - 2007-01

tSSSS CSSS CC t ™

helping change the face of robotics

Interactive Cybernetics’ REX model uses 46 servos controlled exclusively by Yost Engineering’s ServoCenter 3.1 controller boards.

REX shows a few of its many expressions

“Unlike other servo controllers,the unique features of the YostEngineering ServoCenter 3.1controller allow us to producelifelike facial expressions andrealistic lip sync” says REX EXEXdeveloper Walter Buist.Buist.Buist.

Visit www.icrex.com for REX scheduled

icrex.commmcococrecre

The

servo motors.

The independent control of both servo

position and speed makes the ServoCenter

controllers especially us

applications such as robotics, animatronics,

motion control, automation, retail displays,

and other areas where independent or

www.YostEngineering.com

SERVO 01.2007 15

Full Page.qxd 12/6/2006 10:21 AM Page 15

Page 16: Servo Magazine - 2007-01

16 SERVO 01.2007

Q. I have an odd question foryou. I am thinking about buying a mini-lathe, but find it

hard to spend that much money on justone tool. Can you give some reasonswhy a hobbyist would want to buy onefor their own use?

— Troy AlexsonToronto, Canada

A. The first thing that needs to beconsidered is, if it is really need-ed. There are a lot of parts that

can be bought that would meet yourneeds. Sometimes they are not thebest fit, but they can be either modi-fied, or the rest of the project’s designaltered to fit the parts. Even if you havethe tools to make the parts yourself,many hobbyists still look for existingparts to use first before resorting tomaking them themselves. In mostcases, it is less expensive to purchase

parts than to build them yourself.But it is always nice to have your

own tools to make the exact parts thatyou want. Sometimes this is for func-tion, sometimes it is for appearance,and sometimes it is to save money.When people need a special or criticalpart they can’t buy off-the-shelf, theyare left with three choices: abandon theneed for it, have someone make it foryou, or make it yourselves. If you have afriend make the parts for you, you usually end up compensating them fortheir time. If you go to a machine shop,this will cost you more money than hav-ing a friend make it for you. Dependingon what the part is, a machine shopmay be the only practical option.

In my case, I bought a mini-lathe tosave money. Well, I always wanted one,anyway. I had a project where I neededsome special hubs to mount some R/Ctires to an axle and hold a sprocket to

the hub. I made up some drawings andsent them to local machine shops. Thequotes I got were around $600 for theset of hubs. Well, at that time, the mini-lathe I wanted cost a little lessthan $400. So I bought a lathe andabout $100 worth of tools to go withit, and made the hubs myself. In theend, I got the hubs made, saved a$100, and got a lathe for a bunch ofother projects. So buying the lathe canactually save you money.

For most people, making partswith their own hands is what bringsthem joy, and it is the main reason whythey buy the tools for their hobbies. It’sa really addicting passion, making pre-cision parts to make machines work.This is why the whole robotics hobbyexists, making things for yourself.

If you decide to get a lathe, Iwould recommend that you get a bigger lathe than you think you will

need (assuming you can affordit). Eventually, you will want tomake things bigger than thelathe you are currently looking atcan handle. The machines them-selves are usually the cheapestpart of the expense. All of thetooling that you get to use thelathe eventually costs muchmore than the lathe does. And ifyou end up getting a biggerlathe down the road, you mayfind out that all the tooling thatyou currently have no longerworks with the new lathe. So, tosave money in the long run, getthe bigger lathe up front.

Tap into the sum of all human knowledge and get your questions answered here!From software algorithms to material selection, Mr. Roboto strives to meet youwhere you are — and what more would you expect from a complex service droid?

byPete Miles

Our resident expert on all things robotic is merely an Email away.

[email protected]

Figure 1. Lynxmotion Wireless PS2 Controller. Figure 2. Lynxmotion PS2 Adapter Cable.

MrRoboto.qxd 12/7/2006 8:21 AM Page 16

Page 17: Servo Magazine - 2007-01

Q. I recently got a wireless PS2controller from eBay toremotely control one of my

robots. The problem I have is that Ican’t get it to work with my BASICStamp. I have tried using the exampleprograms that you showed in the July‘06 issue, but they don’t work. I knowthe controller works fine since it workson my Playstation. Do you have anyidea why your example program workswith a regular PS2 controller, but does-n’t work with a wireless PS2 controller?

— Mark MartinVia Ethernet

A. Thanks for pointing this out.When I wrote that article, Iassumed that a wireless controller

would work the same way as a regularPS2 controller. Since I didn’t have a wireless controller to test at that time, Imade this incorrect assumption. Thecode I presented was based on the codeby Aaron Dahlen on his PS2 controllerarticle controlling a five-axis Lynxmotion(www.lynxmotion.com) arm pub-lished in June ‘03 in Nuts & VoltsMagazine (www.nutsvolts.com), andJon Williams’ PS2 article that was published in September ‘03 in Nuts &Volts. These example programs all workwell with a regular wired PS2 controller.Lynxmotion has quite a few exampleprograms using the PS2 controller with

their robots. Most of the example programs from Lynxmotion use theBasic Atom microcontroller (www.basicmicro.com), which is fast andquite powerful.

In order to try to figure out why awireless controller doesn’t work thesame way as a regular wired PS2 controller, I obtained one of the newwireless controllers that Lynxmotionsells (model number RC-01); see Figure1. At $19.95, it is a pretty good dealfor a wireless controller, cheaper thanthe regular PS2 controller I have. As aside note, I like the feel of Lynxmotion’swireless controller in my hand becauseit is a little larger in size and is easier tohold. Lynxmotion also has a very handyadapter cable for the Playstation compatible controllers (Model NumberPS2C-01) that has the odd shaped con-nector that plugs into the controllerand has a set of regular 0.1 inch spacing connectors that easily interfacewith other electronics; see Figure 2.Their $4.95 price tag make this connec-tor cable a better choice than buyingand hacking the six foot extensioncable I mentioned in my July article.

When I got the controller, I hookedit up to the same test setupshown in my July article, and tomy surprise, it did not work.And just like you mentioned, itworked perfectly when I

plugged it into my Playstation gameconsole. This was very puzzling.

To try to figure out what is goingon, I tapped into the test circuit with myParallax USB Oscilloscope (www.parallax.com part number 28119) to analyzethe signals going between the controllerand the BASIC Stamp. I discovered something very different than what wasexpected (see http://sophiateam.undrgnd.free.fr/psx/index.html). Thespec says the data signal begins whenthe clock signal changes from high tolow (leading edge); see Figure 3. Butwith the wireless controller, the datasignal actually begins before the clocksignal, and changes state when theclock signal changes from low to high(trailing edge); see Figure 4. Figure 5shows a screen capture of the first twobytes of data, device ID $73 analogmode, and ready $5A.

With this bit of knowledge, itbecomes obvious that the previous pro-gram shouldn’t work with a wireless con-troller since the SHIFTIN function’s Modewas configured to use the LSBPOST(read the data Least Significant Bit firstafter sending the clock signal) mode.Since the data bits actually occur before

LSB MSB

CLOCK

DATA

$73 (11001110)

Figure 3. Standard (wired) PS2 Data Signal.

LSB MSB

CLOCK

DATA

$73 (11001110)

Figure 4. Wireless PS2 Data Signal.

Figure 5. Screen capture of the Parallax USB Oscilloscope. Blue line is the clock line, and the red line is the data line.

SERVO 01.2007 17

MrRoboto.qxd 12/7/2006 8:21 AM Page 17

Page 18: Servo Magazine - 2007-01

the clock signal, the SHIFTIN’s modeneeds to be changed to LSBPRE (readthe LSB before sending the clock signal).

The program shown in Listing 1includes these changes, and will work

with both wired andwireless controllers.Only one line ofcode needs to bechanged, depend-ing on whether youare using a wired orwireless controller.If you are using a regular wired controller, set theMode to 3, and setthe mode to 1 for awireless controller.Figure 6 shows the electrical wiring

for this circuit.This doesn’t answer the whole

question, however. The wireless con-troller has a much tighter timing require-ment than the regular PS2 controller. If

the Stamp takes toolong to process thedata to and from the controller, thewireless controllerwill time out for amoment and lose itswireless connectionwith the receiver,and only sporadicinformation is trans-mitted. I have triedthree different BASICStamps with this pro-gram. The BS2p24and the BS2px24 arefast enough to keepup with the commu-nications with thewireless controller,but the regular BS2Stamp doesn’t workbecause it is tooslow.

I am not theonly one that hasobserved all this.Read the discussionson the Parallaxforums (http://forums.parallax.com/forums/default.aspx?f=5&p=5&m=138508) aboutwhat other peoplehave learned. Itlooks like the

MadCatz (www.madcatz.com) andthe Lynxmotion controllers requirefaster speeds to keep up with the controllers, whereas the Pelican (www.pelicanper formance.com)and Thrustmaster (www.thrustmaster.com) have been shown towork with regular BS2 Stamps.Logitech (www.logitech.com) has awireless controller, but I haven’t heardof anyone successfully interfacing theircontroller with a microcontroller.

It is interesting how processor speedhas a significant effect on how well youcan interface a wireless controller andnot critical when interfacing with a regular wired PS2 controller. For exam-ple, a Basic Atom microcontroller doesn’tneed to read the data in before the clockpulse (LSBPRE mode), whereas theBASIC Stamp does. In fact, the BasicAtom will not even work if you try toread the data in before the clock pulse.It needs to use the LSBPOST mode in theShiftIn function to properly read in thedata. Measurements on the actual clocksignal from a Playstation console indicatethat its natural clock speed is about 125kHz. Since it is transmitting 21 bytes ofdata, the time required to read in thedata from both controller types is about0.3 ms. A Basic Atom will read in thedata in about 4.5 ms. This speed is prob-ably why the Atom syncs up well withthe controllers. A BS2px24 takes about13.8 ms to read in all the data from thecontroller. Though the Stamp still works,it requires reading in the data in a different format. A regular BS2 Stamp isabout six times slower, and does notsync up with the Lynxmotion wirelesscontroller. This indicates that the com-mon overlap time where both systemswork is not much slower than 14 ms.Figure 6 illustrates this. Slowing the clockspeed increases the common overlaptime, but longer clock times can result inthe wireless controllers timing out.

Interfacing a microcontroller to awireless controller is pretty straight-forward, but it should be done with thefaster microcontrollers such as a BS2px24,Basic Atom, or even the new Propellerchip from Parallax. This is kind-of a longdiscussion about wireless controllers ingeneral, I am hoping that it provides youenough information to get your controllerto work with your robot. SV

LSB MSB

CLOCK

STANDARDPS2 DATA

WIRELESSPS2 DATA

COMMON TIMEOVERLAP

Figure 6. Data signal comparisons between wired andwireless controllers with respect to the same clock signal.

‘{$STAMP BS2px}‘ {$PBASIC 2.5}‘ This demo program has been shown to work with‘ BS2p24 and BSpx24, and does not work with regular‘ BS2 Stamps with the Lynxmotion wireless controller.

clk PIN 7 ‘ Clock Lineatt PIN 6 ‘ Attention Linedat PIN 4 ‘ Data Linecmd PIN 5 ‘ Command Line

Mode CON 3 ‘ 1 = Wireless Controller = LSBPRE‘ 3 = Wired Controller = LSBPOST

Temp VAR Byte(8) ‘ Controller datai VAR Byte ‘ Loop Counter

‘ Main Wireless Controller loop

Main:GOSUB Wireless_PS2GOTO main

Wireless_PS2:‘ Read Controller mode $41=digital, $73=analogLOW attSHIFTOUT cmd, clk, LSBFIRST, [$01]SHIFTIN dat, clk, mode, [temp(1)]HIGH att‘ Read controllerrLOW attSHIFTOUT cmd, clk, LSBFIRST, [$01,$42,$00]FOR i = 2 TO 7

SHIFTIN dat, clk, mode, [temp(i)]NEXTHIGH att‘ Display ResultsDEBUG CRSRXY, 0, 2,”Mode: “,IHEX2 temp(1), “ “, CRDEBUG CRSRXY, 0, 3,BIN8 temp(2), “ “, BIN8 temp(3),

“ “, DEC3 temp(4), “ “, DEC3 temp(5), “ “,DEC3 temp(6), “ “, DEC3 temp(7), CR

RETURN

Listing 1

18 SERVO 01.2007

MrRoboto.qxd 12/7/2006 8:21 AM Page 18

Page 19: Servo Magazine - 2007-01

Full Page.qxd 12/6/2006 10:13 AM Page 19

Page 20: Servo Magazine - 2007-01

20 SERVO 01.2007

The “mobile or static, High OctaneRobotic Combat System” brings the

arena and ready-made battle botswherever an event or gathering hiresthe system and its operators/makers to come. Highly successful since 2004 when RoboGeddon debuted atLEGOLAND of Windsor (UK), the gamehas gone on to be a highly soughtattraction by amusement vendors andconsumers.

Part-speakRoboGeddon’s parts include the

Arena (either portable or “static” as

the creators like to say, meaning setpermanently in one place) and four 80kg robots. The robots can flip eachother over and get themselves uprightwhen fallen in battle (with player assistance by remote) by use of thesame, single flipper.

There is also a computerized gamecontrol system with music, a publicaddress system, and sound effects thatinteract with game play. Robots arecontrolled by radio transmissions.

RoboGeddon can be coin-operatedin “stand alone” mode (controlled bythe master computer control system),as in a large arcade attraction or be

operated by a live operator.During game play, you try to score

points by ramming your bot into theother player’s “bump goals,” behindwhich the respective players also control their robots. “The early prototype bumpers on the bots,” saysRoboGeddon representative AndrewCotterell, “were made of steel but wediscovered that a 80 kg robot travelingat 6 mph into another traveling at thesame speed tended to bend thebumpers — we now use plasticbumpers with shock mounts.”

A winner is decided by highestscore after a round of two minutes.

Contact the author at [email protected] David Geer

RoboGeddon It!Are You Getting It?

You could be getting into RoboGeddon — a good-sized scale versionof events like BattleBots or Robot Wars — without traveling very far.

The portable robot battle game comes to you via trailer at your local amusement park or event, as well as being available as a

permanent install at some attractions (mostly in the UK for now).

A RoboGeddon battle in progress, flippers a-flying! Fully inflated RoboDome surrounds RoboGeddonwhile crowds watch.

Geerhead.qxd 12/6/2006 11:48 AM Page 20

Page 21: Servo Magazine - 2007-01

GEERHEAD

People WatchingAssessmentsSurroundingRoboGeddon

In actual play, younger children generally defeat olderkids because they have a muchgreater mastery of the joystickcontrol and a familiarity with it,according to the RoboGeddonmaker (RobotsRUs) companyrepresentative Andrew Cotterell.

Likewise, girls generally beat theboys as they concentrate more on howto score points and figure that part outmore quickly. “All the boys want to dois flip and bash other bots,” saysCotterell (not surprising). Sometimes,players will find out they have beenwatching the wrong robot and wonderwhy it isn’t responding to the actionsthey take with the controls.

Back to the TangiblesThe mobile version of RoboGeddon

comes with a trailer system withhydraulically-operated sides that dropdown to form the actual gaming plat-form. The platform installs in about anhour and is quite sturdy and permanentlooking. This is an “all-weather” gamingsystem with a site space requirement of11 meters square.

The RoboGeddon makers hadthought that it would take longer toput up the mobile system in badweather, but it actually takes less timeas the crew works harder to get it upand get out of the rain.

The trailer system is complete untoitself with a foldout “crowd barrier system.” Ask the company about additional add-on features. In additionto coin-operated and human-operatedgame play, RoboGeddon can be set upfor free play if you are providing itgratis for your family or guests. Gameplay is computer assisted.

The system is appropriate for indoorand outdoor attractions and anywhereguests or customers may congregateincluding theme parks, family entertain-ment centers, hotels, resorts, confer-

ence centers, fair grounds, trade shows,malls, museums, and go-kart tracks.

RoboGeddon’s gaming arena is 36square meters, topped by an inflatableRoboDome. Four Cyber Raptor robotscome with each setup and can bemanipulated to flip other robots over orout of the way or to put themselvesupright again once they have beenflipped. The flipping and repositioninghelps your robot to successfully get toan opposing robot’s corner to score.

Each robot is powered by a rapidrecharge cell that can be recharged inthe charge control system in about 45minutes. There are four spare cells sothat the robots don’t ever have to bewithout power.

The system also comes with instal-lation and maintenance manuals, aswell as training manuals for operation.Outside maintenance contracts areavailable from the company, as well as aphone number for expert consultation.

Static Install StatisticsA permanently installed

RoboGeddon can be had cheaperbecause the cost of the trailer system —which is not required — is subtractedfrom the total cost. Installs of the static system are highly customizable —including the size of the arena itself —to suit your permanent location.

This system is suitable for venuessimilar to those for the mobile systemand includes piers, zoos, campgrounds,and other locations. Multiple game formats are available for “programmedcomputer-assisted” play.

Systems also come with four player controls/consoles with coinoperation mechanisms, score panels,and bump goals. Remote score panelsare also available.

RoboGeddon cost around 900,000GBPs (about US $1.7 million) to buildfrom initial research to today’s product

RoboGeddon Raptor robot close-up.Player console close-up with lots

of colors and buttons.

SERVO 01.2007 21

RoboSoccer involves four playersand four robots in soccer play in aspace of about 7.5 by 5 meters.

This rugged system is designed tobe used constantly, so it is protected byimpact-resistant barriers and surround-ed by a crowd-retaining barrier.

Its integrated goal system and play-er control system are each fitted at bothends of the playing field, where playersstand and manipulate the controls for agame of soccer that can last up to fourminutes. The game system and equip-ment can be set up in three hours.

The system comes with four robotcombat vehicles for soccer play that can

maneuver the soccer ball and otherplayers around the playing field. Theactual area that is available for play is 24feet by 16 feet. There are two goal stations, two player stations, and eachstation controls two robots. The game isoperated by a computer system that isprogrammed to control cash paymentsto play or free play, as well as the soundsystem for effects and background musicand the robots. The robots operate onfour batteries/power cells — one each —and there are four spare cells, as well.

You can see RoboSoccer in the UKand via video clip (provided in theResources).

ROBOSOCCER — UNDER THE MICROSCOPE

Geerhead.qxd 12/6/2006 11:48 AM Page 21

Page 22: Servo Magazine - 2007-01

22 SERVO 01.2007

over a three-year span.

UpgradesInitially, the game format was

extremely complex, too much so forthe general public to easily use andappreciate. Much of the engineeringand upgrades went into resolving thisproblem. The initial system was onlystatic, for example, which was tooexpensive a system to succeed com-mercially. This led to the mobile system.

The mobile system worked well forevents but theme parks and ongoingvenues required the static systems.

The robots themselves have beenimproved upon many times for reliability.Improvements to the four robots haveincluded improved drive belts, motorcontrol, lifter mechanisms, bumper sys-tems, crash absorption devices, powerhandling, heat control, sound use, playa-bility, and the ability to use add-ons.

Further planned upgrades includerobot feedback to the control systemso it knows how much power therobots have left. The system will soonbe able to tell for certain which robotsdo the actual flipping over. Right now,it only knows when points have beenscored. The game currently factorswho has won by the number of pointsgiven up by other opponents.

Rock ‘em, Sock ‘em,RoboSoccer andRoboDerby

RoboSoccer has just beenlaunched. This robot game uses the

same basic robot builds but no flippers.The game is played on a soccer fieldinside the game arena by two blue andtwo red robots. Players win by usingthe robots to score soccer goals.

The included soccer ball is 14 lbs.This is a coin-operated game for themeparks and similar venues. The robotsrun all day with no recharge.

RoboDerby is a soon-to-be-releasedrobotic horse that can carry an adult.RobotsRUs — the company behindRoboGeddon, RoboSoccer, andRoboDerby — plans to sell sets of fourrobot horses so the new owners cantransport them by trailer to events andrun the horses as robot race horses. By pulling the tail of the horse in frontof you, you can slow it down by 25 percent and gain the lead on it.

US AvailabilityRobotsRUs is in talks with many

domestic event promoters who haveexpressed an interest in involving themselves in bringing theRoboGeddon system to the UnitedStates. Stay tuned! SV

GEERHEAD

Trailer arena close-up with robots. Circuitry.RoboGeddon trailer, arena open

with dome, close-up.

www.robogeddon.com/index.aspRoboGeddon site

www.Robosoccer.co.ukRoboSoccer site

www.robogeddon.com/movies/Robosoccer_streamer.rm

RoboSoccer Streaming Video

www.robogeddon.com/links.aspRoboGeddon permanent install

locations and entertainment providers

RESOURCES

RoboGeddon is the first commer-cially sold, mobile robot combat system for game play, available in theUK for almost three years now.

The most unique design problemwas giving the robots the ability toreposition themselves upright fromwhatever laying position they hadbeen flipped in. Other challengesincluded keeping the system fun whilealso affordable.

The actual robots, according toRobotsRUs representative AndrewCotterell, are a cross between a BatMobile and a Humvee. They’re fast yet maneuverable, since they weredesigned by world champion robotbattlers and engineers, Team Razer.Those who have followed Robot Warsand BattleBots may know of TeamRazer, the Razer fighting robot, and IanLewis, designer and owner of Razer.

ROBOGEDDON FUN FACTSTeam Razer robot.

Geerhead.qxd 12/6/2006 11:49 AM Page 22

Page 23: Servo Magazine - 2007-01

Electronic Parts & Supplies Since 1967

For the finest in robots, parts, and services, go to www.servomagazine.com and click on Robo-Links.

SERVO 01.2007 23

RobolinksJan07.qxd 12/7/2006 9:17 PM Page 23

Page 24: Servo Magazine - 2007-01

Brushless Motor RPM Sensor

Eagle Tree Systems announces their innovative newBrushless Electric Motor RPM Sensor/Tachometer. The

brushless RPM sensor makes it easy to measure RPM.To measure RPM on a brushless electric plane, heli,

car, or boat, just tap one wire from the tiny new sensorinto one motor lead, enter motor parameters to the soft-ware, and you are ready to go. The brushless RPM sensoris compatible with Eagle Tree’s MicroPower, PowerPanel,Seagull, and Data Recorder products. Using the BrushlessRPM Sensor with Eagle Tree’s Seagull and Data Recorderproducts requires firmware level 4.XX or higher, which hasbeen shipping since approximately August 2005.

For further information, please contact:

All New SoundPlexer8000

The SoundPlexer8000 unit from GBInnovations will allow you to

record/playback sounds and routethem to any of the eight speaker out-puts, in any combination (for example,sound track 1 can be heard out ofspeakers 2, 5, and 7 or sound track 7can be routed to all eight speakerssimultaneously). The SoundPlexer8000 can also be config-ured to trigger these sounds via simple switches or PIRsensors (for example, sound track 2 can be sent to speak-ers 2, 6, and 8 when input 2 is triggered). Any combina-tion of speakers/inputs/outputs can be programmedthrough the intuitive menu system via the built-in LCD dis-play. The SoundPlexer8000 makes adding sound to anyenvironment/project easy.

What Can the SoundPlexer8000 Do?

Imagine the sound of a ghost following someonedown a hallway, or a haunted room with different soundscoming from different objects around the room. Or, howabout a model train layout with different sound effects

throughout the entire landscape, yet specific sounds atspecific locations when the train arrives or passes by.Perhaps you want to add different sounds to every roomof a dollhouse. Or, add sounds to your robot or animatron-ics character. All this is possible with the SoundPlexer8000.

SoundPlexer8000 features include:

• Records up to eight one-minute tracks.

• Built-in LCD display screen with an intuitive menu systemfor quick and simple programming, recording, and play-back. No computer or host system needed.

• Record from either the built-in microphone or line infrom any sound source line out.

• Playback any track through one or all eight speakerssimultaneously.

• Each output is capable of driving an eight-ohm speakerwith one watt of continuous and up to two watts of peakpower.

• Master volume control.

• Eight selectable inputs which are edge triggered. Eitherlow or high going sensor pulses will trigger the input.

• Programmable delays which will delay the track fromplaying after an input has been triggered.

• Program any switch input to trigger any track (sound)out of any of the eight speakers via the user programma-ble “Play list.” Play lists are stored in EEPROM for dataretention.

• Built-in +-5V supply, via phoenix-style connectors for allsensors/switches.

• PIR sensor compatibility.

SoundPlexer8000s are being distributed through BluePoint Engineering and can be ordered directly from BluePoint Engineering’s website.

For further information, please contact:

New Products

SENSORS

SOUND PROCESSING

Tel: 631•891•8034Email: [email protected]

Website: www.bpesolutions.com/asoundeuipspecial.html

GB Innovations

24 SERVO 01.2007

NNEEWW PPRROODDUUCCTTSS

4957 Lakemont Blvd. SE, Ste. C-4, PMB 235Bellevue, WA 98006

Email: [email protected]: www.eagletreesystems.com

Eagle TreeSystems

Jan07NewProd.qxd 12/7/2006 7:55 PM Page 24

Page 25: Servo Magazine - 2007-01

SERVO 01.2007 25MaximumRobotics.com

1-800-979-9130

Wiring Robot Controller· 43 Digital I/O Pins· 8 Analog Inputs· 8 External Interupts· 6 PWM Channels· 2 Serial Ports includingBi-Directional USB

· 128k Memory· The Wiring Programming Language

The Wiring language provides a simplifiedsubset of C or C++ that hides more advancedconcepts like classes, objects, pointers (while stillmaking them accessible for advanced users). You getthe power of C or C++ with the ease of a language likeBasic. Programs written in Wiring are translated andthen run as C++ programs on the Wiring I/O board.

*Use code servo0107. Offer expires 2/28/2007

GrandOpening Sale!15% off yourfirst order!*

$69.95 Only $59.46 after discount!

Page 25.qxd 12/7/2006 7:49 PM Page 25

Page 26: Servo Magazine - 2007-01

Featured This MonthParticipation26 First Aid for Bot Builders

by Kevin Berry

27 Entering Combat Robotics ata Young Age by Aaron Taggart

Feature28 Gone Postal: The Building of

a 12 lb Robot by Brian Benson

Events29 Results — Oct. 14 - Nov. 1332 Upcoming — Jan. and Feb.

Technical Knowledge30 Four Bar Lifters in Combat

Robotics by Adam Wrigley

Product Review32 Astroflight 109 Charger

by Bradley Hanstad

Bot builders are famous for getting minor “dings” when

building bots, both at home andin the pits. Every builder shouldhave a minimal first aid kit around,with bandages, peroxide, antibiot-ic ointment, and aloe vera (forminor burns). The other thingbuilders should have in their kits isa sense of their own vulnerability.Some injuries can be safely treatedat home, some require medicalassistance. A few need immediate9-1-1 calls!

I’ve seen a builder, in theabsence of proper supplies, pokehimself in the knuckle with apower drill, staunch the bleed-ing with a dirty paper towel,and slap a strip of duct tapeover the whole enchilada.Two days later, after finish-ing the bot and competingin the event (I won, by theway), this mystery manfinally treated the woundwith proper supplies, and

amazingly didn’t get bloodpoisoning. I, er I mean, he,

seemed to think germs had the same priorities he did — that is,finishing the bot counted morethan treating wounds.

Some things, such as bleedingpuncture wounds, chest pains, dizzi-ness, and double vision, need imme-diate medical attention. A dead botbuilder is good to no one, and bythe way, can’t compete in events (atleast in most of them, anyway.) Sobuild safe, and judge well when itcomes to injuries and illnesses. Tomangle an expression, “the builderwho has himself for a doctor has anidiot for a patient.” SV

26 SERVO 01.2007

PARTICIPATI NFirst Aid for Bot Builders

● by Kevin Berry

CombatZone.qxd 12/6/2006 11:39 AM Page 26

Page 27: Servo Magazine - 2007-01

SERVO 01.2007 27

So, you may have seen the showBattlebots on TV, or heard about

the Robot Fighting League (RFL) orthe North East Robotics Club (NERC)in the local news or on the Internetand liked what you saw. If you werelike me, you probably thought toyourself “Hey, that looks like fun, Icould do that!”

The first time I saw Battlebots onTV I was 11 years old and flippingthrough the channels one day when Iwas bored. I became hooked on theshow, and followed it from then onuntil its final season on Comedy Centralin 2002. Around 2000-2001, I startedto get more interested, looked aroundonline for more information, and foundthe Battlebots Forum on Delphi. Ilurked around for a while beforebecoming a member in late 2001. Icasually chatted with other builders inthe chat room, who were very helpful.

Around 2002 I discovered theNorth East Robotics Club, which wascomposed of smaller events primarilybased around the Pennsylvania–NewJersey area with weight classes ranging from 1 lb to 30 lbs. In June of2003 when I was 13, I went to my firstevent, 12 lbs of Pain, hosted by Poundof Pain and the NERC in Concord, NH.I went to watch, and to see whatgoing to an event in person was like,since I had only seen videos onlineand Battlebots on TV. The fights weregreat and the builders — some ofwhich I had talked to previously online— were friendly. I then competed atmy first event in August of the sameyear, in Syracuse, NY that was hosted

by Team Infinity, the builders of theSuper Heavy Weight robot “FinalDestiny,” who had appeared on TVon Battlebots. I did pretty well for myfirst time, placing 3rd with three winsand two losses, losing to the 1st and2nd place robots.

Since then, I have competed at20 events and attended 23. Therehave been times when I was frustratedenough to think about taking a breakfor a while after doing poorly at anevent, but then I bounced back anddid well for the next few. As of thiswriting, I have the #1 ranked active 12-lber, according to Botrank (anonline robot ranking service), and the3rd ranked 12-lber historically. There isno limit to what you can do if youapply yourself and are willing to learn.

The best advice I can give toyoung people is to look around. Lookat people’s websites, read buildreports, and watch fight videos. Thiswill help you get an idea of what isgoing on, and also give you someideas of your own. Be prepared tolearn a lot. There are a lot of tricksyou can pick up by watching whatothers do. There are no real “tricks towinning,” but there are plenty ofways not to lose. If you find an eventgoing on near you, go check it out.You will have a good time, you willget to see the robots in person, andyou will meet the builders. Do yourbest to make some friends in thecommunity, which will help youimmensely in the future; a goodfriend goes a long way. I would notbe nearly as successful now if it

weren’t for the advice given to me byfriends Jr. of Team Mad Cow, Jon ofTeam Anarchy, and James Arluck.

With their advice, tricks, andgeneral knowledge I was able tolearn a lot of things I would neverhave thought of on my own. Thebest part of going to an event is thatyou can see first hand what worksand what doesn’t. There isn’t reallyanything to be taught in a classroomabout this, as it is more of anacquired skill/understanding. Youwill pick up many skills that can beuseful later in life if you decide to pursue a career in engineering, man-ufacturing, or machine work, and italso looks good for college applica-tions as an extra-curricular activity.

One important thing to remem-ber is if you come off as a jerk, people will generally react in anaccording manner. (Don’t be the per-son who gets ribbed on all the time,you want to be with the in-crowdwho does the ribbing.) The easiestway to get on the nerves of buildersis by asking questions that haveanswers that are easy to find. Whenonline, poor spelling turns off a lot ofpeople — so use some kind of a spellchecker. When you go to your firstevent as a competitor, remember to

Entering Combat Robotics at a Young Age● by Aaron Taggart

Author at House of NERC 2006 working onRants Pants. Photo taken by Jon Durand.

From left to right: Brad Handstad, Chad New,Darci Trousdale, Aaron Taggart, Jon Durand.

Photo is from 2005 RFL Nationals in San Francisco, CA.

Author and Vadim Chernyak setting upthe arena at the House of Slackers event.

Photo taken by Ray Barsa.

ResourcesRFL — www.botleague.net

NERC — www.nerc.us

Botrank — www.botrank.com

BuildersDB — www.buildersdb.com

CombatZone.qxd 12/6/2006 11:39 AM Page 27

Page 28: Servo Magazine - 2007-01

28 SERVO 01.2007

bring all of your parts and tools youwill need. It is always important tohave spares, as well as tools andother necessities such as a power-strip so that you don’t constantly

have to go hunting for tools fromothers. However, do note that manybuilders will be more than willing tolend you a tool or plug into theirpower strip, but remember to bring

back what you borrow. There is avast amount of information availableon the Internet, and the best way toget ahead and off on the right foot isto use it to your advantage. SV

There are many different tech-niques and approaches to building

12 pound combat robots. They rangefrom the extreme of designing theentire robot on the computer, to thegathering of a pile of parts and put-ting it together whatever way looksbest. For builders that are just begin-ning, the second method is a greatway to get a robot built, have somefun, and gain some experience. I hadonly two weeks to build Gone Postal,so this technique worked out well.

I decided I was going to build a12 lb robot because many of theparts I had would fit easily into arobot that size, and I could cost-effectively use cordless drill motorsand batteries. My first step was deter-mining what type of weapon therobot would have. After consideringa variety of designs, I concluded thata hammer robot would be the bestchoice. It would allow for the driveand weapon motors to be the same,it would be easy to build, and notmany hammer robots were around soit would be a little different.

Components

My first choice before buildingthe robot was picking the mechanical

components and the materials tobuild the frame out of. For themechanical and electrical compo-nents, I choose: two IFI Victor 833speed controllers because I alreadyhad them on hand; three 12 voltHarbor Freight cordless drill motors;batteries from the drill for power; aTeam Delta Bigger Dual Ended Switch(Part #RCE225) to control the hammermotor; a PCM receiver; and 4” Colsonwheels. For building materials, I want-ed something durable, lightweight,and easy to work with. I chose 1/2inch thick UHMW (ultra high molecu-lar weight polyethylene) for the sides,1/8-inch thick 6061 aluminum for thebase plate, and .09-inch thick surpluscarbon fiber sheet for the top plate.With my pile of parts gathered, I couldbegin on the robot!

Organized Pile of Parts

I began by assembling the batter-ies; building two 12 volt packs usingthe cells that had come with the drills.Now that I had the basic compo-nents, I played with different layoutsuntil I found one that I was happywith based on how well it would driveand perform and how compactly it fittogether. I then weighed everything

in order to get a basic idea of howwell I would meet the 12 lb maximumrequirement, shown in Figure 1.

The Frame

With the components chosen, Iwas able to determine the basic framesize and begin. I cut the 1/2” UHMWouter frame with a wood saw and thealuminum base plate using a plasmacutter, although a jigsaw would havealso been a fine substitute for theplasma cutter for those without one.Figure 2 shows the frame membersand base plate laid out.

Drive Train

Now that I had a frame, I neededto start on the drive train. I used off-the-shelf wheel hubs made specificallyfor attaching Colsons to drill motors. Imodified the drills to lock the clutchand used more of the 1/2” UHMW forthe motor mounts. I cut out the cen-ter holes with a hole saw on the drillpress and a scroll saw for the secondsquare shaped hole. Figure 3 shows

FIGURE 1. Weighing the components. FIGURE 2. Test-fitting the frame pieces.

FIGURE 3. Motor mounts cut out and ready to go.

GONE P STALTHE BUILDING OF A 12 POUND ROBOT

● by Brian Benson

CombatZone.qxd 12/6/2006 11:40 AM Page 28

Page 29: Servo Magazine - 2007-01

SERVO 01.2007 29

the finished mounts ready for use.

Finishing Touches

With the motor mounts com-plete and sides cut out, all I had leftto do on the base plate was to cutout the holes for the wheels, which Idid using a plasma cutter. With eachsubcomponent complete, it was timeto combine them. I decided to use10-24 size screws to fasten it togeth-er. The motors were mounted, thesides were attached to the baseplate, and the electronics shockmounted. Shock mounting is alwayscritical for electrical components. Asyou can see in Figure 6, the speedcontrollers and relay board wereshock mounted to an 1/8” sheet ofpolycarbonate, which was then shockmounted to the frame. The batteriesmust always be easily accessible; tomeet this requirement, I chose to useVelcro straps to secure them.

At this point, as you can see inFigure 4 the robot was missing thefront half. For this, I chose a wedgeto allow me to gain control of otherrobots to help me use my hammer toits full effect. After choosing anangle, I made the wedge andattached it using the same methodsas the rest of the frame. Figure 5

shows the robot nearly done!Everything was complete except

for the top armor, the hammer, and thewiring. I made the top armor out of .09inch carbon fiber sheet for its strengthand minimal weight. For this, I used adiamond wet saw, the key word beingwet. Carbon fiber dust can be extreme-ly harmful and should not be breathedin under any circumstances.

Through a combination of hav-ing water constantly pumping ontothe cutting edge to eliminate dustand a respirator, I was able to easilyand safely cut the top plate. The ham-mer was more fun, for this I found apiece of 1/8” steel and used the plasma cutter to create the hammershape I was looking for. To attach thehammer to the drill, I took advantageof the threaded shaft, clamping thehammer arm between the shoulderof the shaft and a tightened nut. Thenut and threaded shaft then had an1/8” hole that a pin went into tokeep the nut from backing off. Witheverything mounted and ready to go,I wired the robot up using primarily14 gauge wire. Figure 6 shows GonePostal at the event ready for battle.

Conclusion

Overall, Gone Postal has under-

gone four iterations since it was firstbuilt, gaining spring steel armor overthe side UHMW and a titaniumwedge and hammer arm. In eachiteration, it has become a little smaller and a little tougher, but thesame core building techniques havebeen used each time.

Figure 7 shows Gone Postal in itsprime. It is ranked historically in 30thplace out of over 250 robots, rackingup a 35 fight record and known tomany as the bot that just won’t die. Ithas proved to be one of the most funbots I have built and competed with,being cheap, effective, and different.Further details on Gone Postal includ-ing photos and videos can be foundat www.robotic-hobbies.com. SV

FIGURE 4. Everything is nearly mounted.

FIGURE 6. GonePostal prepped and

ready for battle!

FIGURE 7. Gone Postalversion four with its 1/2”

diameter titanium armand spring steel skin.

FIGURE 5. The wedge is completedand attached.

House of NERC2006 — This

event was held on10/14/2006, in

Wichendon, MA. Results are as follows:

• Antweights — 1st: “Absolutely Naut VDD,” spinner,Anarchy Robotics; 2nd: “Disctruction 2.0”; 3rd “Almost

EVENTSRESULTS — October 14 - November 13

CombatZone.qxd 12/6/2006 11:41 AM Page 29

Page 30: Servo Magazine - 2007-01

30 SERVO 01.2007

There,” Wedge, Small Bots.

• Hobbyweights — 1st “Rants Pants(of Doom),” Wedge, Not So-BoringRobots (Botrank #1); 2nd: “Igoo,”spinner, Mad Scientist; 3rd: “ShakeAppeal,” spinner, EMF.

• Featherweight — 1st: “GnomePortal,” lifter, Robotic Hobbies; 2nd:“Mangi,” spinner, Half FastAstronaut; 3rd: “Power of Metal,”beater, EMF.

HORD Fall 2006 — This event washeld on 10/21/2006 in Omsted

Falls, OH. Results are as follows:

• Fleaweights — 1st: “Mr.Bigglesworth,” saw, Udanis, 2nd:“Low Lift.”

• Antweights — 1st: “Hit or Miss,”saw, AC/DC; 2nd: “Fred FredBurger,” wedge, Udanis.

• Beetleweights — 1st: “D2,” drum,D2; 2nd: “Chop Chop.”

Halloween Robot Terror — Thisevent was held on 10/28/2006

in Gilroy, CA. Results are as

follows:

• Fleaweights— 1st:“Change ofHeart,” wedge, Misfit; 2nd: “AtomBomb.”

• Antweights — 1st: “Fire Eagle,”wedge, Missfit; 2nd: “Stumpy,” wedge,DMV; 3rd: “Pooky,” wedge, ICE.

• Beetleweights — 1st: “Toe Poke,”lifter, Kick-Me; 2nd: “UnknownAvenger,” flipper, ICE; 3rd: “Itsa,”spinner, Bad Bot. SV

When it comes to flipping and lifting weapons, four bar mecha-

nisms are the crème of the crop. You’veseen them on TV or at your local combat robot competition, and nowyou want to know more about them. Ifyou’ve never seen one, take a look atFigure 3 on the next page. The largestbenefit of the four bar design lies in itsability to have any tip trajectory youdesire. You can lift an opponent nearlystraight up, or out and up, as seen inFigure 1. The “out and up” motion iswhat most people tend to use, andallows you to actually tip over theopposing robot. Simple lifters as seenin Figure 2 tend to lift up and away,causing the other robot to fall off thetip before full extension is reached.

How Are They Powered?

There are a huge number of

different methods for powering afour bar lifter. Electric motors can beused along with several stages ofgear reduction to power either thefront or rear bar through torsion.Linear actuators can be geared usinga rack and pinion method to accomplish the same end result.Other mechanisms include linearactuators to nearly any part of anybar or joint in the mechanism, or toany bar through a pin/slot technique. There really is no simpleway to explain the system. In fact,there are entire college courses andtextbooks devoted solely to analyz-ing four bar mechanisms. To keepthis article shorter than a 400 pagetextbook, I’ll simply concentrate onfour bar systems powered by torsion.Torsion power is the simplestmethod of powering a four bar, bothin construction and analysis.

Finding Input Torque

Now, we are looking at a fourbar mechanism with torque beingapplied to either the front or rearbar. What do we do now? We couldget an equation for the trajectorybased on the powered bar angleinput, do a force balance, and adynamic analysis. We could do that.However, that isn’t really necessary.The simplest way to solve this prob-lem is to look at it as a work balance.The work you put in the system willequal the work you get out of thesystem. The work you put into thesystem is equal to:

Work = Torque * Angle

With angle being in radians (radians = degrees * pi/180) andequal to total angle traveled by the

input bar. The work output is:

Work = Weight * Height

where weight is the weightof the opposing robot andheight is in the same units asyour torque (if you used ft-lbs for torque, use ft for

Four Bar Lifters in Combat RoboticsTECHNICAL KN WLEDGE

● by Adam Wrigley

FIGURE 2

FIGURE 1

CombatZone.qxd 12/6/2006 11:42 AM Page 30

Page 31: Servo Magazine - 2007-01

SERVO 01.2007 31

height). Drawing out your four barsystem to scale in fully collapsed andfully extended forms will allow youto measure the height differenceand angle difference from start tofinish. This will allow you to figureout the average torque you willneed to lift the opposing robot bysetting the previous two equationsequal to each other and using theresult:

Average Torque = (Weight *Height)/Angle

Average torque can be useful,however, you will probably want tofind the maximum torque. To findthe maximum, you would need todraw many scale drawings of the system at many different locationsthrough the trajectory, and do thisprocedure for each set of two drawings. After doing this, youwould be able to plot a torque vs.angle graph. It would also beextremely time consuming. Luckilyfor you, I’ve made a program thatdoes all of this work without youneeding to draw anything.

Go to www.totalinsanity.net/tut/mechanical/4barfrontbar.php.This page has the download link, aswell as a description of how to runthe program. The program currentlyonly solves systems powered by thefront bar, but you will most likelywant to use a front bar poweredsystem, anyway. It will output agraph showing the trajectory of thetip, as well as a Torque vs. Anglegraph. The graph can then be usedto find a relative maximum torqueto use in calculating your gearratios.

Binding

Binding is a problem thatoccurs when any of the joints in thesystem gets close to 180° or 0°. Thesystem simply gets stuck, and theforces go through the roof whenthis happens. If no force is appliedto the system and the front bar isrotated, then whenever any angle

in the system gets close to thesevalues, there will be binding.Powering the front bar leveragesthe other robot in such a way that binding rarely occurs duringextension of the arm.

It is important, however, tomake sure that your mechanismdoes not fully extend, and youshould have a mechanical stop toprevent this. If your mechanism fullyextends, then it could have problemscollapsing because of binding. Afront bar powered system onlyavoids binding in extension, notretraction.

Using the Graphfor Design

When using the program I mentioned earlier, it will show someforms of binding on the graph. Ifyou see a spike, then your system isbinding. Make sure to have yourmechanical stop kick in before thespike in the graph. The spike shouldbe at the end of the motion of thearm. If it is not, then you shouldchange your design. When trying toread off a torque for your design calculations, there are also someother concerns that need to betaken into account.

Normally, the highest torque isat the start of the motion of thearm. There is a spike seen at the endof the Torque vs. Angle graph inmost systems, but this value shouldnot be used, since your mechanicalstop will kick in before this. Alsoimportant to remember is that thetorques shown with this program —or calculated by hand using thesame method — are the torquesneeded to hold the opposing robot.You will want a larger torque valuethan this if you want to lift the opponent withsome speed. Onelast mistake that iscommonly made isusing the stalltorque of yourmotor when calcu-lating your gear

ratio. A conservative calculation forfiguring out your gear ratio is this:

Gear Ratio = 4 * (Torque read fromgraph)/(Stall torque of motor)

The gear ratio you use shouldbe read as Gear Ratio:1 and is theratio going from the motor to thefront arm. Using this equation, youcan also look at the RPM of themotor and try to figure out howfast you will extend your arm. Asimple equation for time is listedbelow:

Time = 60*{(Angle/360)/[(RPM/2)/(Gear Ratio)]}

Time will be in seconds. RPM isthe no load RPM of the motor, andAngle is the total angle differencefrom start to finish of the front arm.This equation won’t be exact, but itwill give you a good approximationof the time needed.

Final Design Ideas

You can start typing values intothe program I mentioned earlier, butit is always best to start with goodvalues at your first iteration. The rearbar of the four bar mechanismshould always be the shortest. Thebottom bar, which is normally part ofthe chassis, should be the largest.The top bar, which is part of the arm,should be the second longest, andthe front bar should be the secondshortest.

This is pretty much all you needto know to design your first four barmechanism using an electric motorto power the front bar. If there isenough interest, I can provide a similar explanation for different fourbar systems in future issues. SV

FIGURE 3

CombatZone.qxd 12/6/2006 11:42 AM Page 31

Page 32: Servo Magazine - 2007-01

The heart and soul of a combatrobot comes down to the batter-

ies you use, but one thing that mostpeople never consider is the chargerneeded for said batteries. I haveused several chargers over the years,and as times change, so do batter-ies. The shift to lithium-polymer, lithi-um-ion, and even lithium-manganesehas evolved combat robots in thesmaller classes. As the technologiesever expand and grow, bigger andhigher capacity cells are being made.This meant I had to find a charger tosupport the batteries I wanted to usefor a 12 pound combat robot.

Most would assume the Tritonas a natural choice for charging as ithas excellent flexibility (charges mul-tiple types of batteries), as well as itstwo new forms (Triton 2 and TritonJr.), but I have found my new favoritecharger to be the Astroflight 109(www.astroflight.com) lithiumcharger. The Triton is only so flexible,as it is limited to four cells in series(14.4V) and only five amps max cell

capacity. The scheduled 12 pounderwas going to have up to a 22.2Vpack for the weapon setup. Therewas an obvious need for a newcharger to handle the higher voltage.

I searched for a charger to handle over four cells, but manysimply don’t, until I found theAstroflight 109. I bought it and tested it right away on a smallerantweight robot t. It’s simple it is touse, and gives tons of information.

Just plug your battery pack inbefore giving the charger power,and it will begin discharging thepack, but not into the all-so-criticaldead voltage range. It automaticallysenses the number of cells, andwon’t damage them thanks to itslow voltage cut-off. After discharg-ing is done, unplug the pack and itautomatically goes into chargemode. Adjust the knob to thedesired AH rating of the pack, andplug it back in. It couldn’t be simpler.

The Astroflight charger uses a

three-phase charging sequence,which will act like a trickle charge atthe end of phase 3 to make sure thepack is fully charged before damagecan be done by over-charging. TheAstroflight 109 can charge up tonine cells in series, which is a 33.3volt pack! It can also charge at arate of 50 mA to nine amps!

This is an awesome all-aroundlithium charger that will be usedheavily in all of my robots that uselithium technology. I am so thankfulto the kind people at Astroflight formaking this available to people likeme, so I can get my dreams of bigger and more destructive bots tobe a realization! SV

PRODUCT REVIEW — Astroflight 109 Charger● by Bradley Hanstad

Kilobots X — Thisevent will take

place on 1/20/2007at Cameco Spectrum2007 at theUniversity of Saskatchewan.

The Saskatoon Combat RoboticsClub is having its 10th Kilobots eventJanuary 20-21, 2007. The venue isthe largest student-run engineeringexhibition in North America! Go towww.kilobots.com for furtherinformation on this event.

Bay Area Robot Fights — This eventwill take place on 1/27/2007

in St. Petersburg, FL. It is the fourth

event inthis annualseries; aconvention-al insectbattle run by some very unconven-tional people. Fun for the wholefamily. This event data is tentative attime of publication.

ComBots Cup 2007 — This eventtakes place on 2/9/2007-

2/10/2007 in Oakland, CA. Go towww.robogames.net for furtherinformation. $10,000 Heavyweightprize, $3,000 Middleweight prize.Venue and schedule dates are tenta-

tive at time of publication.

Motorama 2007 — This eventtakes place on 2/16/2007-

2/18/2007 in Harrisburg, PA. Go towww.nerc.us for further informa-tion. 150g-30lb Combat Event. Antsfight in 8’ box, Fairies fight in the 5x 5 insert. Beetles-Featherweightsfight in 16 x 16 box. All completedforms and entry fees must bereceived by 1/15/07. This is goingto be another awesome event atthe Farm Show Complex! SV

EVENTSUPCOMING — January and February

32 SERVO 01.2007

CombatZone.qxd 12/6/2006 11:42 AM Page 32

Page 33: Servo Magazine - 2007-01

February 9-10, 2007 in Oakland, CA

33 SERVO 01.2007

Full Page.qxd 12/7/2006 8:11 AM Page 33

Page 34: Servo Magazine - 2007-01

Robotics and sound generation arenatural playmates. They go togeth-

er like R2D2 and C3PO. Yet curiously,few of the robots you see demonstrat-ed at clubs or on the Internet have asound feature, even a simple one likechirping when an obstacle is detected.Nearly every toy robot includes soundeffects, and our custom designsshould, too. The reasoning is the same:Sound effects are an effective userinterface. R2D2-like “bio sounds” are auseful diagnostic tool. Music and voicehelp to humanize a robot. And thesounds can aid the entertainmentvalue of the bot.

However, simply wanting to add a sound effects module to a robot is different than actually doing it. Mostsound circuits are analog; the typicalrobot controller is digital, so there areextra interfacing steps to take. Whilemany of the popular microcontrollershave sound-related functions, they are limited to simple notes or DTMFtelephone tones. “Music” is simplistic,and voice synthesis is impossible.

A new product just introducedaims to change all of this. TheSoundgin, from Savage Innovations, isa six voice synthesizer that is capable ofreproducing complex sound effects,

music, and even speech. The Soundgin— which also goes by its more formalname of SSG01 Sound Coprocessor —is available as a standalone DIP or SOICsurface mount chip that you can inte-grate in your own designs. It is alsoavailable in a prototyping board thatincludes its own built-in amplifier,power regulator, and optional RS-232serial converter — the latter if you wishto connect it to a PC. Probably themore common connection scheme is towire it directly to a serial port on a microcontroller. The Soundgin is compatible with the OOPic (also madeby Savage Innovations), Parallax BASICStamp, and many others.

Let’s take a closer look at theSoundgin: what’s inside, how it works,and ways you can use it to add coolsound, music, and speech effects toyour robot.

Six Voice Sound/Music/Speech Synthesizer

My first fascination with electronics was sound-making gizmos —

sirens, warblers, choo-choo train effects — you name it, I built it!

When the venerable 555 timer IC was introduced, it seemed that

every other issue of the electronics magazines had a project using

this chip to make noise. I made each one, of course.

b y G o r d o n M c C o m b

ExploringSOUNDGIN

Figure 1. The Soundgin prototypingboard includes the Soundgin chip, anintegrated audio amplifier (with volumecontrol), and an optional RS-232 levelshifter with DB-9 serial connector. Thelatter is used if you want to operate theSoundgin from a PC.

34 SERVO 01.2007

McComb.qxd 12/7/2006 8:24 AM Page 34

Page 35: Servo Magazine - 2007-01

From Oscillators toMixers to Sound

In order to better understand theSoundgin — or any sound-generatingdevice — it’s handy to know a littleabout sound in general. Sound is waves that travel through some type of medium, like air or water. The size ofthe waves determines its amplitude, orvolume, and how close the waves arefrom one another determines its frequency. The farther apart the waves,the lower the frequency, and vice versa.

When humans speak, a curious lit-tle doodad in the throat called a larynxvibrates, and as air from the lungs passes by the larynx, sound waves areproduced. These waves travel throughthe air, and anyone nearby hears uswhen the waves enter their ears. A similar process is involved in makingsound from a guitar string (the stringvibrates, disturbing the air around it) ora saxophone (a wooden reed vibratesas air is blown over it).

The Soundgin doesn’t use a larynx,string, or reed. But it does use the samegeneral principles of making waves.Sound production begins in one of its sixoscillators. These oscillators are akin to alarynx, except the Soundgin has six ofthem. As such, it is said to be a six voicesound synthesizer. The oscillators aregrouped in two sets of three; each set isrouted to its own mixer, so that the signals from the oscillators can furtherbe controlled. More about this in a bit.

Finally, the outputs of the two mixers are combined into a final audiooutput. This output is connected to anamplifier to increase the level of the signal produced by the Soundgin chip.Most any audio amplifier will do. The Soundgin prototyping board usesthe LM386 sound amplifier, which isinexpensive, easy to use, and requiresfew external parts.

The proto board, shown in Figure1, can be powered by a nine volt bat-tery, and has connections for a DB9 seri-al cable, power, and speaker terminals.

From the amplifier, the signal is sentto a speaker. Until now, the “sound”from the Soundgin has just been electri-cal impulses. The speaker turns thoseimpulses into physical vibrations thatmove air. Our ears pick up that air move-ment and perceive it as sound.

A Closer Look atSoundgin’s Oscillators

The heart of any sound-makingmodule is its oscillators, and theSoundgin is no exception. As notedabove, Soundgin consists of six inde-pendent oscillators. Each oscillator is aseparate sound synthesizer, or voice.Any voice can be used by itself, thoughit is common to use them in combina-tion to produce more elaborate sounds.For example, the output of one oscilla-tor can feed into another to produce aslow rising and falling siren effect.

Each voice consists of a frequencygenerator, an amplitude modulator, anenvelope generator, and a ramping/target console.

The frequency generator controlsthe pitch of the sound. The lower thefrequency, the lower the pitch. If youpicture a piano keyboard, the keys tothe left have a decreasing frequency,so they have a lower pitch. The keys tothe right have an increasing frequency,so they have a higher pitch.

Not all sounds are at the same volume level, and any sound-makingdevice needs a way to control the over-all level of any oscillation. Each ofSoundgin’s oscillators contains anamplitude (volume) control that can bevaried from 0% — which is no signaloutput at all — to 100%.

Sound is often characterized bythe shape of the waves that produce it,not just the frequency of those waves.The shape of the wave affects the har-monics of the sound — harmonics canbe said to be the interaction of thewave with itself and other sound wavesbeing produced at the same time.Soundgin produces eight types of waveshapes, including sine wave, squarewave, and saw tooth.

The envelope generator is a kind ofdynamic volume control that changesover time. The envelope is character-ized by four distinct phases: Attack,decay, sustain, and release — oftenreferred to simply as ADSR. These phas-es are graphically shown as a series oframps. Attack indicates how fast theoscillation comes to full volume. Decayis how fast the oscillation ceases.Sustain is a constant volume of thesound after the decay until the note isreleased; and release is how quickly the

sound fades out. These parameters —along with the wave shape — define thetimbre of the sound. It’s what helpsmakes the oscillation sound like something familiar to us — a piano or a violin, for instance. Each of these instru-ments has a peculiar ADSR envelope.

Soundgin provides further sophisti-cation in the sounds it produces byusing separate ramp and target con-trols for each oscillator. These controlshave a similar function to the ADSRenvelope, but are more robust — andtrickier to use. When the oscillator’samplitude target is set, the amplitudeof the oscillator will move towards thetarget at the rate determined by a special transition value, until the oscilla-tor’s amplitude has reached the target.One use of this feature is to make various rising and falling sound effects,like phaser guns or alien bio sounds.

Mixing and Matching

You can create a multitude ofsounds simply by setting Soundgin’s sixoscillators to some frequency, adjustingthe amplitude and wave shape, andhaving them run completely independ-ently. Whether such a mix would soundpleasant is another matter! And it miss-es a lot of potential of Soundgin as acomplex sound and effects generator.

As noted above, Soundgin allowsyou to control one oscillator with anoth-er. In music synthesis, this patching tech-nique is used to produce an infinitely richflavor of sounds. On the average analogsynthesizer, any oscillator can be patchedto any other oscillator. The Soundgin chipdoes not provide for unlimited inputs andoutput patching, but rather it predefinesthe patching between specific oscillators.This technique greatly simplifies the programming you’ll need, yet you are stillable to produce a wide variety of soundand music effects.

Recall the Soundgin has six oscilla-tors, and that these oscillators are sepa-rated into two sets of three each. Theoscillators for the first set are labeled A1through A3; the oscillators for the sec-ond set are labeled B1 through B3. Thefunctionality for both sets are identical.Oscillator 2 (A2 or B2) can control theamplitude modulation of Oscillator 1 (A1or B1). Similarly, Oscillator 3 (A3 or B3)can control the frequency of Oscillator 1.

SERVO 01.2007 35

McComb.qxd 12/7/2006 8:24 AM Page 35

Page 36: Servo Magazine - 2007-01

Example of amplitude patching:Oscillator 1 produces a steady 1,000 Hztone. Oscillator 2 produces a slow 1 Hztone, which would ordinarily be belowthe range of human hearing. By patching the output of Oscillator 2 intoOscillator 1, the output changes in vol-ume once a second. It creates a phas-ing effect that sounds like somethingout of an old science fiction movie.

Example of frequency patching:Oscillator 1 again produces a standard1,000 Hz tone. Oscillator 2 produces aslow 1 Hz tone, and is patched into thefrequency modulator of Oscillator 1.Rather than alter the volume (amplitude)in this patching, Oscillator 3 changes thefrequency of Oscillator 1, producing arise-and-fall wailing siren effect.

Soundgin provides additional mix-ing and patching options that greatlyincrease the variations in the sounds itcan produce. The options are toonumerous to mention here, but arereviewed in the product documenta-tion. And remember that Soundgin hastwo fully independent mixers that feedinto one final output. The A and B setsof oscillators can each produce theirown sounds, and can be mixed togeth-er to make overlay effects: a siren ontop of a warbler, for instance.

Using the SoundginWindows Control Panel

Perhaps the best way to play with

the sound making features of theSoundgin is to use its program controlpanel, which runs under the WindowsPC environment (see Figure 2). Thesoftware can be downloaded from theSoundgin website — see the Sourcesbox for additional information. Theconsole graphically depicts Soundgin’ssix oscillators, and shows how the oscillators can be patched together.You also see the ADSR envelopes andother controls by which you can modify the sound effects.

For a great introduction toSoundgin and its capabilities, click onthe Presets button in the lower-rightcorner. You will see a collection of 31preset sound effects, as shown inFigure 3, such as Space Drive, Wow,Chopper, and Blip Chatter. Click eachone to hear what they’re like. As theeffect plays on the Soundgin, note theaction of the oscillators. (If any sound istoo loud, you can adjust the volume byscaling down the Master VolumeControl.)

Now try combining two soundeffects together. Click Mix A beside thePresets list, and choose a sound effect.Click Mix B, and choose a differentsound effect. Both sounds are nowcombined into the final output of theSoundgin. Play with different combina-tions by selecting Mix A or Mix B, andclicking on a new sound. You can quietany mix by selecting preset number 32,which is silence.

Music GenerationMusic is little more than sound

that has certain qualities that wehumans find aurally pleasant. By linkingone tone to another, a musical score isproduced. Soundgin generates musicby setting its oscillators to frequency,wave shape, and ADSR envelopes tomake piano, organ, and other instru-ment sounds.

As with general sound production,the Soundgin Windows control panel canbe used to experiment with music synthe-sis. In the console window click theKeyboard icon, and a 49-key keyboardappears. Use the mouse to click any ofthe keys, and its corresponding note isplayed through the Soundgin chip.

Note that the keyboard uses justone oscillator to produce the sound,and you can select which oscillator touse. This allows you to readily experi-ment with different effects. Play aroundwith the ADSR ramps, for example, andyou change the timber characteristicsof the notes. The sound wave buttonssimilarly change the color of the tones.Notice, for instance, that a saw toothwave makes the sound a lot more“reedy,” like that from a saxophone.

By combining two or more oscilla-tors to produce separate voices you cancreate a kind of musical ensemble. TheSoundgin Windows control panel canonly play one note at a time throughone oscillator at a time, but theSoundgin itself is capable of playingmultiple notes through multiple oscilla-tors, giving you a polyphonic soundand music synthesizer.

“I Am Tobor, YourRobot!”

Perhaps the most remarkable feature of Soundgin is its ability to pro-duced synthesized voice. Again, it’s alldone by cleverly combining the chip’soscillators to produce the elements ofspeech. When these elements — calledphonemes — are strung together, thesound is recognized as speech. This allappears simple enough, but in realityit’s quite difficult to achieve completely

36 SERVO 01.2007

Figure 2. The Soundgin Windows control panel provides a graphical interface for programming and experimenting with the Soundgin chip.

McComb.qxd 12/7/2006 8:25 AM Page 36

Page 37: Servo Magazine - 2007-01

synthesized speech, and still have the speech be recognizable. Soundgindoes a remarkable job, and themechanical voice that it makes is perfect for the average robot.

The Soundgin Windows controlpanel is the easiest way to experimentwith, and develop, speech synthesis foryour robot. Click the Speaker icon inthe lower right, then click the PhraseEditor button right above. A PhraseEditor window appears, shown inFigure 4, where you enter the textand/or phonemes you want theSoundgin chip to speak.

For example, to have the chip say“hello,” you merely type hello into theSay Data box, and click the Say It button. Soundgin responds by sayingthe word. The default voice — with itsmale-like pitch — is automatically select-ed for you. But you can change thepitch by clicking on one of the MusicalScale buttons on the left-hand side.

As noted previously, Soundginworks with parts of speech known asphonemes. These phonemes are displayed in the Phrase Editor dialogbox. They include the th of “this,” orthe wuh (w) in “water.” You can playwith the various phonemes sounds justby clicking on their corresponding buttons. The sound continues until you click another phoneme, or hit theShut Up button.

When you enter an English phrasesuch as “hello,” the Phrase Editor actually does a lookup to see whatphonemes are contained in that word.The dictionary lookup table is stored ina simple text file in Windows INI format. This dictionary file, namedSGWords.txt, is found in the Soundgindirectory on your PC. Lookingup the definition for “hello,” yousee the phonemes that make itup are:

.he .e .le .le .oe

The leading periods indicateto Soundgin that these arephonemes, and not English

words. You can enter these samephonemes into the Phrase Editor andSoundgin will speak them. This is agood way to experiment with phoneme-based speech synthesis. You can try substituting different phonemes tomake different sounding words. In all,the SGWords.txt file contains severalhundred word definitions, and you canadd your own, as well as modify exist-ing ones. You can also load new wordsinto the dictionary file by entering theminto the Phrase Editor, but I found manually editing the file to be easier.

Programming theSoundgin

So far, we’ve looked at operatingthe Soundgin from its Windows controlpanel. This is a good way to learnabout the capabilities of the chip, but itis not a practical means of program-ming sounds for your mobile robot.

Communicating with the Soundginis relatively straightforward. It uses astandard serial interface that is sup-ported by the PC and most microcon-trollers. Soundgin supports data ratesof 2400 or 9600 bits per second.

When used with the PC, you needa Maxim MAX323 interface chip, orsomething similar, in order to convertthe five volt TTL signals required by theSoundgin to RS-232 levels needed bythe PC. Note that the Soundgin prototyping board is available with anoptional RS-232 level shifter chip and DB9 connector for hooking up astandard serial cable.

Soundgin is programmed by setting its various internal registers. It’snot a particularly easy process, but pro-

grams like the Soundgin Windows con-trol panel, and others to come, promiseto make programming the chip easier.To send data to the Soundgin, yousend a series of bytes that always beginwith the Escape character (decimal 27or 1B hexadecimal). Program state-ments then consist of one or morebytes, until all the data has been sent.

Soundgin supports hardware flowcontrol so that the chip requests dataas it needs it. The Soundgin togglesone of its pins — the CTS line — whenits buffer is half empty. In this waythere is no interruption in sound playback, as long as your PC or controller is keeping a watch on theCTS line. Soundgin regulates the playback speed, so your robot’s micro-controller can send the data at therequired baud rate, then continue withits other chores. In the event of a seriesof programming commands, such as acontinuous song, the microcontrollermust listen on the CTS line to see whenit toggles, and feed data to Soundginbefore its buffer runs out.

Even the voice synthesis feature ofSoundgin is programmed by sendingserial bytes to the chip. After setting upthe chip’s registers for voice synthesis,the phonemes are sent one per byte. Forexample, to say “hello,” the chip receivesthe sequence 212, 206, 221, 221, 228.

Maximizing the SoundOutput

All sound-making devices are limited by the mechanism that turns

SERVO 01.2007 37

Figure 3. There are 31 soundeffect presets built into theWindows control panel. Try themalone or in combination (one forMix A, the other for Mix B) to seewhat the Soundgin can do.

Figure 4. Use the Speech Phrase Editor window to produce intelligible speechoutput from the Soundgin.

McComb.qxd 12/7/2006 8:25 AM Page 37

Page 38: Servo Magazine - 2007-01

vibrations into air movement. With theSoundgin, that’s a speaker of somekind. The rule is pretty simple: the bet-ter the speaker, the better the sound.You will find your Soundgin-based projects are greatly enhanced by using

good quality speakers, preferably onealready in an enclosure. The enclosuremaximizes the air movement andincreases volume, and it makes thesound richer. There are a number ofsmall and inexpensive unpoweredspeakers you can use. Unless yourdesign absolutely requires it because ofsize, weight, or both, avoid the use ofsmall piezo speakers, or dynamicspeakers that are not in an enclosure.

Though the Soundgin has its ownamplifier, you may opt for a poweredspeaker. These have their own amplifierbuilt in. I use an old pair of speakersdesigned to connect to a sound card in aPC. Soundgin is monaural only, so I usejust one of the speakers, and leave theother one disconnected. The speakeruses a nine volt external power adapter,but I found that internally it requires only5 VDC. This makes it easier to adapt thespeaker for use on a mobile robot.

Learning More AboutSoundgin

I’ve only been able to scratch the

surface of this remarkable workhorse.Savage Innovations provides a lengthydocumentation file on understandingand using the Soundgin chip. It’s inAdobe Acrobat format, and is availablefor free download on the Soundginwebsite. Also provided are schematicsfor the available prototyping board, aswell as a rundown of the registers usedin the chip.

Learning by example is perhapsthe best way to master any new technology. The Soundgin Windowsconsole download includes two sample files, named Sound1.sgs andSound2.sgs. These are in Windows INItext format, and contain nothingmore than register settings used toreproduce the sound. Try modifyingthese sound effects, or any of the presets, and saving them to a new sgs (Soundgin Sound) file. Open the resulting file in a text editor for review.

With all the options available withthe Soundgin, make it a New Year’sresolution to add some life to all your2007 projects! SV

38 SERVO 01.2007

Soundgin integrated circuit (in SOICand DIP packages), information

and dealer contacts

Savage Innovationswww.soundgin.com

RESOURCES

Gordon McComb is the author of thebest-selling Robot Builder’s Bonanza,Robot Builder’s Sourcebook, andConstructing Robot Bases — all fromTab/McGraw-Hill. In addition to writing books, he operates a smallmanufacturing company dedicated tolow-cost amateur robotics (www.budgetrobotics.com). He can be reachedat [email protected].

ABOUT THE AUTHOR

McComb.qxd 12/7/2006 8:26 AM Page 38

Page 39: Servo Magazine - 2007-01

Last month, we introduced DARwIn (DynamicAnthropomorphic Robot with Intelligence) — ahumanoid robot capable of bipedal walking

and performing human-like motions. This month, wewill show you how we built DARwIn, including detailson motors, wiring, parts, force sensors, and the fabricationprocess. Developed at the Robotics & Mechanisms Laboratory(RoMeLa) at Virginia Tech, DARwIn is a research platform forstudying robot locomotion and also the base platform forVirginia Tech’s first entry to the 2007 Robocup competition. Thisarticle should give you enough information to build your own DARwInbiped!

Design Considerations

There are a few items to keep in mind when designing a bipedalrobot. You want to design the structure to be rigid and strong so your linksand joints don’t break or flex too much. An easy solution to make yourrobot rigid would be to design it all out of steel, but this would be a tremendous amount of weight that your motors probably could not handle. The goal is to design a robot that is both lightweight and rigid.

Depending on what you want your robot to do, you need to decidewhat kind of range of motion you need for each joint. If the biped is always walking and never has to stand up, you can relax your requirements for range of motion in certain areas. If you’re trying tomake your robot as human as possible, you will need a large range of motion in many of the joints. This leads to one more design consideration: human factors. There are certain proportions that dictate the distance between joints and the overall height ina human being. If you scale down your robot from a person, you need to make sure that all the links and jointsare proportional. David Winter’s Biomechanics and MotorControl of Human Movement is an excellent resource forhuman proportions.

PART 2:Parts, Wires,and Motors

by: Karl Muecke, PatrickCox, and Dennis Hong

RoMeLa (Robotics & MechanismsLab) at Virginia Tech;

www.me.vt.edu/romela

Hong2.qxd 12/6/2006 2:34 PM Page 39

Page 40: Servo Magazine - 2007-01

40 SERVO 01.2007

Select Your MotorOne of the biggest decisions you

have to make when building your bipedalrobot is what kind of actuators to use.We used Robtis’ Dynamixel servo motors,model DX-117; and will upgrade to theRX-64 for the next version of DARwIn(Figures 2 and 3). The DX-117 has a max-imum torque of 39 kg-cm and the RX-64

has a maximum torque of 64 kg-cm(Table 2). Both have built-in position andspeed controllers. All user control is donewith RS-485 serial communication.

If you are on a tight budget, regularR/C servo motors are fairly inexpensive,but since you get what you pay for, theperformance may be unacceptable. Youcan also use miniature DC motors, butyou need to design your own positionfeedback controller or purchase onesuch as the “allmotion” boards, whichcan be expensive. Different actuatorshave different torque properties andmass properties; so if keeping yourrobot lightweight is a must, you maywant to put the stronger, heavier motorsin the joints that see the greatest load.

Kinematic DesignOnce you pick your actuators, you

need to decide on your kinematic struc-ture — this is one of the most impor-tant things to do in the design process!You can make your own or use ours(Figure 4). Your kinematic model willdetermine how you design your jointsand how you attach the actuators.

Where to Put StuffNext, decide on

a location for yourextra hardware: CPU,batteries, sensors,etc. We decided tohouse everythingexcept for the forcesensors in the chestfor simplicity (Figure5). One issue withplacing everythingthis high is it createsa larger torque onthe motors in the

legs. It is possible to house hardware inother cavities in the robot, some suchcavities may be in the leg or foot(depending on the design). Though thebatteries are in the chest for the currentdesign, next year, we plan on placing thebatteries in the feet of the robot. Thisplacement will make room for our newPC/104 board computer, IEEE 1394 PCboard camera, rate gyro, DC-DC convert-er, and protection circuits.

Let’s Be Honest:Materials andMachining

Finally, before you start designingthe links and joints, determine whatmaterials you can afford to buy andwhat machining tools you have access to (milling machines, weldingequipment, etc.). This will dictate howornate (or how simple) your robot’sdesign can be. If you have access to afour-axis CNC mill and large amountsof bar stock aluminum, you have muchmore freedom in your design than ifyou only use sheet aluminum.

For DARwIn, time constraints andavailability led us to use sheet alu-minum for almost the entire structure.With some experience under our belt,we’re designing and building DARwIn2.0 in half the time and using a four-axis CNC mill to create most of ourparts. Figure 6 shows a CAD drawingof our new hip design. We recommendusing aluminum for the structure of therobot because of its price, weight,strength, and the ease of machining it.If you have the funds, using rapid pro-totyping would be an excellent option.

DesignNow that you’ve nailed down

the essentials, you’re ready to startdesigning the links and joints of yourrobot. You can get as creative as yourimagination lets you, but if you need astarting point, here are some tips andexamples from DARwIn.

Start Simple — The ElbowA good place to start design is

coming up with a simple elbow/knee

SPECSCPU PC/104 (Planned)

Height 600 mm

Mass 4 kg

Degree of Freedom 21

Power 2 Li-poly @ 7.4V

Sensors Rate gyro, forcesensors

< FIGURE 1/TABLE 1. Here is a photo andstatistics table for DARwIn.

∨ FIGURE 3. DX-117 motor.∨ FIGURE 2. RX-64 motor.

∨ TABLE 2. Table of specifications forRobotis’ Dynamixel DX-117 servo motor.

DYNAMIXEL DX-117Mass 66 g

Resolution 0.35°

Angle Range 300°

Voltage 12V-16V

Torque 29 kg-cm — 39 kg-cm

Hong2.qxd 12/6/2006 2:34 PM Page 40

Page 41: Servo Magazine - 2007-01

joint. They are the simplest joints in theentire robot since they are only onedegree of freedom (DOF). Figure 7shows a simple way of designing abracket for the elbow joint.

Kinematically Spherical JointDesign — The Easy One

In our opinion, the next “easy”joint to design is the kinematicallyspherical joint at the shoulder. Youhave a lot of freedom when placing themotors and mounting them for theshoulders since the shoulders are natu-rally broad. In order to create a kine-matically spherical joint, all three axesof rotation must intersect at the samepoint (Figure 8). This is fairly simple inconcept, but getting configuration anddimensions correct for the design canbe tricky. Figure 7 shows how we used

a series of brackets to create kinemati-cally spherical joints for the shoulders.

A Step Up — The AnkleIf you are comfortable with design-

ing the arms and knees, try designing

SERVO 01.2007 41

> FIGURE 8. Photo with lines showingspherical joints on DARwIn.

∧ FIGURE 5. Exploded view of chest.

∧ FIGURE 7. Exploded view of arm.

∧ FIGURE 6. New hip design that willuse a CNC mill.

> FIGURE 4. Kinematicdiagram of DARwIn.

Hong2.qxd 12/6/2006 2:35 PM Page 41

Page 42: Servo Magazine - 2007-01

the ankle joint next. A deceptively trickyjoint, the ankle’s design challenge comesin allowing for a large range of motionwhile keeping a lower pivot. The anklefrom our design has two DOF. Both axes of rotation intersect to more closelyimitate a human’s ankle and make the kinematic and dynamic equationssimpler for control of the robot. Figure 9shows how we made our ankle and feet. Notice how it can be challenging tofigure out how to support your links. We used ball bearings in most cases to reduce the bending moment where

the servo motor attaches to the link.

The Hard Part — HipsEven if you can handle the design of

the rest of the body, the hips can stopyou in your tracks. Creating kinematicallyspherical joints with human proportions(optional), good range of motion, andgood structural stability is very difficult —especially if you have a waist motor in thearea. Figure 10 shows how we made ourhip joints. Two of the motors are joinedtogether in the hip to reduce the spacerequirements of each motor. If you havetrouble fitting all of the motors togetherin the hips, moving the waist motor intothe chest can free up some space.

LinksOnce you design the joints, you’re

about halfway done. Next, decide howyou want to join each link together.There is a careful design balancebetween structural rigidity and range of

motion. You’ll notice that as you startconnecting joints together, your linksstart to interfere with each other andlimit your range of motion. Figure 11shows how we designed the link goingfrom the knee to the ankle. We put abend in the link to add structural rigidi-ty and to increase the range of motion.You may also notice that the rendereddrawings are a little different from ourfinal design. In our final design, weremoved material from the knees,shins, and forearms to decrease weight.

This is also a good point in time toconsider how you want to mount themotors to your joints and links. Whatkind of screws and nuts do you need?What kind of holes (threaded or not)and hole placement do you need?Deciding on a standard screw pitchand size greatly helps in assembly.

Link design is also an appropriatetime to start considering wiring issues.How are you going to get power/communications to your actuators?How are you going to connect yoursensors, CPU, and power source?

We created many of our own wiringconnections since we wanted to reduceany excess weight or volume. Robotis pro-vides male and female connectors so youcan create wires to your desired lengthfor wiring up your servo motors (Figure12). Figure 13 shows a picture of one ofour custom-made wiring connections.

Force SensorsObviously an optional feature for

your robot — but important enough forconsideration during physical design —force sensors can be used to give infor-mation to your CPU to help stabilizethe walking motion of the robot. Thenumber and placement of the forcesensors can be tricky. We recommendusing four for each foot: one placed ateach corner. Once you place the force

Thanks to the 2005-2006 seniordesign team members that built DARwIn1.0 (Patrick Cox, Joo Gil, Chris Greenway,Jeff Kanetzky, Karl Muecke, Patrick Mulliken,Raghav Sampath, Daniel Zokaites) and toour advisor Prof. Dennis Hong.

Thank Yous

42 SERVO 01.2007

< FIGURE 9. Exploded view of the feet.

∨ FIGURE 10. Exploded view of the hip. ∨ FIGURE 11. Exploded view of the legs.

Hong2.qxd 12/6/2006 2:36 PM Page 42

Page 43: Servo Magazine - 2007-01

sensors, you need a way to connect tothem since they are on the bottom ofthe foot. We cut out slots for eachforce sensor to slide through.

There are many different types offorce sensors you can use. Tekscanmakes FlexiForce sensors which are verythin piezoresistive force sensors (Figure14; www.tekscan.com). When using

a resistor to measure force, you usuallyneed to construct a calibration circuit toget the greatest sensitivity and range ofload detection. After calibration, youalso need an Analog-to-Digital convert-er to convert the signal to a digital signal that the computer can read.

Next Month ...We showed you the physical

aspects of DARwIn and how you couldmake your own. Next month, the last part of this series will detail someof the software used to controlDARwIn, as well as a peek of nextyear’s design. SV

∧ FIGURE 12. Photo of how to make custom wiring (www.robotis.com).

∧ FIGURE 14. Photo of FlexiForce forcesensor (www.tekscan.com).

∧ FIGURE 13. Photo of custom wiring.

SERVO 01.2007 43

Hong2.qxd 12/6/2006 2:36 PM Page 43

Page 44: Servo Magazine - 2007-01

The room has been in the control ofstudents for three decades, as far asany of the old timers who work infacilities can remember. It’s great forthe students because there is freedomto work on projects without beinggraded. For many students, the Lab isa refuge allowing a few hours to relaxand work on robots or electronics proj-ects, or just have a cup of coffee. Forothers, it is a place to ask for help on an electronics project, math, orcomputer programming. All studentsare welcome. Occasionally, studentsor visitors from the community drop injust to see what the others are up to.

We were looking for an afford-

able, simple project anyone could do.North Seattle Robotics Group (Theofficial Robotics Club at North SeattleCommunity College) is always lookingfor inexpensive toys to hack into robotprojects. Roger Robot (Figure 1) fromBig Lots (www.biglots.com) was$19.95. It is currently available fromwww.eBay.com or other resellers.The price is right for students and justabout anyone who wants to learnabout robotics and have fun doing it.“When considering buying a toy tohack, look for one with a tethered orwired controller. This way you are notpaying for the wireless capability,”advises Doug Bell, a VolunteerCommunity Advisor to North SeattleCommunity College Robotics Clubsince the Fall of 2001. He comes to

the lab twice a weekto volunteer, helping students with theirprojects. Many of

these projects just could not be donewithout his advice and help.

We have several microcontrollersin the lab to choose from and plentyof support from advisors, faculty, andstaff. The Parallax BASIC Stamp™microcontroller (see Figure 2) is usedin classes at NSCC and is a popularchoice among students. There is a lotof tech support, documentation, andinformation available. Most of myexperience has been with the BASICStamp, so that was my choice to use.

For this project, I wanted to do aslittle hacking as possible to make therobot controlled by a microcontrollerand I wanted to also be able to continue to use it as a tethered remotecontrol, so I planned for a 25-pin connector to be placed in line with thetether from the controller. This way,the microcontroller or the handheldremote could be plugged in. To makethis more sophisticated, you could add a switch instead of plugging and unplugging the remote or themicrocontroller. Also for this project,we will not install a switch.

In the basement of North Seattle

Community College (in Seattle,

Washington), there is a Robotics

Club. Members meet in a room

called the “TECHTRONS LAB” that

resembles a weird science laboratory

from a sci-fi movie. “It is a little

cramped, but it is ours!” says one of

the students as they squeeze into the

room to work on robotics projects.

44 SERVO 01.2007

b y M o n t y R e e d

Hacking ROGER

FIGURE 1. Roger Robot just out ofthe box before dissection begins.

FIGURE 2. Parallaxmicrocontrollerwith the Board of Education™.

NOTE: All codes/programs areavailable on the SERVO website at

www.servomagazine.com.

Reed.qxd 12/7/2006 8:05 PM Page 44

Page 45: Servo Magazine - 2007-01

Another goal for this project wasto learn about subroutines and to getsome experience using them with theBASIC Stamp. This became part of thepseudocode (programming outline) forthe programs that would run RogerRobot and give him new life.

You can do this project even if youdo not have much experience.

First things first — check your partsand be sure you have everything youneed for the project before you begin(see Parts List 1). Nothing is more frus-trating than being at a crucial point inyour project at 2:00 am and realizingyou are missing a part and cannot goon. You have consumed all the coffeeand pizza needed to finish the project,but a single component keeps youfrom success. Do not let this happen toyou or your crew. Be prepared bychecking your parts before you begin.

Be sure you also have all the toolsyou need before you begin (see Figure3 and Parts List 2).

It’s a good idea to have a cleanworkbench or workspace when youstart a project like this. A friend of minehas a roll of butcher paper mounted onone end of his workbench in a dis-penser. It is the width of his workbenchand whenever the paper on the workbench gets dirty or he begins a newproject he clears the bench, pulls a newsheet of paper the length of the bench,and tapes it down. The clean whitepaper makes it easy to find small parts.

To help you in reassembly, you maywant to grab your digital camera andtake some pictures as you build, just tobe sure you know were everythinggoes.

Next, take Roger Robot out of thepackage, follow the instructions to putin his batteries, and power him up.Become familiar with his controls.Roger Robot has tank-style steering,which is very desirable for robotics. Arobot can have tank steering withouthaving tank treads — Roger Robot happens to come with treads. Tanksteering is when a robot has a left andright propulsion device that can be controlled independently or in concert.This allows for a full range of steeringcontrols. All Ahead Full uses bothdrives in a forward motion. Reverse isdriving them both backwards. Turn Leftcan be accomplished by driving the

right forward orthe left back. Fora Spin Left theleft side drivesreverse and theright side drives forward. This typeof steering is much easier for arobot to use and easier for us, as humans, to program the robots movements. The treads are desirable because it is easier for therobot to navigate rugged terrain.

Become familiar with RogerRobot’s controls. Drive him forwardand back, make him spin in place,and operate his arms. RogerRobot’s arms open and close forgrasping things and the arms go upand down for picking things up andsetting them down. For simplicity,my goal was to pick up a cup, back up, turn around, and driveaway. The next step in future programming could include pickingup and placing the cup in a specificlocation, moving other items, etc.Roger Robot also has “light-up” eyes.We decided to not use this function inthis project because we wanted to savethe batteries. We will explore this in afuture project. If you like what you seein this project and want more info, go to www.theyshallwalk.org andwatch the pages of SERVO Magazinefor future projects.

Open Controller toTrace Wires

Remove the screws that hold thecontroller together. Place them into asecure tray or zip lock bag to ensureyou have all the pieces so you can putRoger Robot back together again. Istrongly recommend the zip lock bagapproach, especially if you have multiple projects like I do. Mark thebag with the name of your projectand the date you began it, as wellas the contents of the bag. Usuallyin a “Disassembly Project,” I willhave a series of snack, sandwich,and gallon size bags placed insideof each other. The zip lock bagapproach is also very important if you share a workbench spacewith others. Boxes or trays can tipover and the contents becomemixed or lost.

After thecontroller is open, examine the wiresand where the wires are connected.The idea is to determine what eachwire does by looking at the color thatgoes to each individual switch andwhat happens when that switch is indifferent positions. Look at the frontcover (see Figure 4) and compare it to the inside wire locations (see Figure 5a).

To start with, look for the blackand red wires. These should be groundand power, respectively, but there is noguarantee — especially when it comesto low-cost toys.

We discovered in our version ofRoger Robot that there was a red wireconnected to the majority of theswitches. After we verified that the redwire was power, we traced the colored

wire connected to theother part of the switch

SERVO 01.2007 45

FIGURE 3. Tools andthe robot layed out on aclean workbench withthe remote opened up.

FIGURE 4. Remotewith cover.

FIGURE 5a.Remote with

cover removed.

Reed.qxd 12/7/2006 8:05 PM Page 45

Page 46: Servo Magazine - 2007-01

to determine what component eachswitch controlled. Our results are listedin Figure 6.

This version of the robot has sev-eral reverse switches (see Figure 5b) init. These are the push button type.When they are not being pushed, thewires are connected in one way andwhen they are pushed, the wires areconnected in another way.

Tether Disassembly

The next few steps will take somefo re though tand planning.

Read through these stepsand think about how each component interrelatesbefore proceeding to cut,bend, attach, mutilate, orglue!

Before you cut any wire,take some time to thinkabout wire placement. At theME Lab at the University ofWashington, you will be

constantly reminded by Russ Noe to“measure twice and cut once.” Thisapplies to anything you are cutting.It’s much easier to shorten somethingthan to lengthen it.

Measure the placement of theproject box and decide where you willput it. I put mine on the back and tothe left a little. The project box makesit look like the bot has a little backpackon (see Figure 7).

We will be mounting a 25-pin connector on the robot. You have a parts option of purchasing 25-pinconnectors or hacking a 25-pin cable.Either way, the solderable side of the

connector will be attached to the orig-inal wires inside the robot that lead tothe various components. The pin sidewill be connected either to the originalcontroller or the cable coming out ofthe project box that is connected tothe microcontroller. Mine is mountedon the back and to the right a little.However, it can be mounted anywhereyou prefer. Make sure that you choosethe location for your connector at thisstep because you need to connect therobot wires (noted in the followingsteps) before you attach it to the robot frame.

Determine where to cut theaccess holes in the project box for thecable coming from the microcon-troller; keep in mind this cable needsto reach your 25-pin connector.

If you are not sure how to decidefor yourself, you can just cut the tether in the same way we did.Measure from Roger Robot 12 inchesand make the cut with wire cutters.

For a cheap way to get the connectors, check your local thriftstore for a standard parallel extensioncable. The common use is as an extension cable for printers and otherperipherals. I have seen them pricedfrom $1-$3. Look for the cable thathas a female and a male connector.

Disassemble the cable forthe parts.

You may chooseto mount the 25-pinconnector in anyother location.Decide where youare going to mount

the connector before cuttingthe tether.

Slice open the insulationcarefully for the robot side ofthe tether with an Exacto™knife (see Figure 8) or razorblade. Be careful not to cutor damage the insulation onthe smaller wires inside.Remove enough of the outerinsulation so that all of thewires can be seen. Usuallytwo inches is enough, if youprefer, you can cut less.

Using wire strippers,

46 SERVO 01.2007

Red = 9 VDC power Black = Ground

Gray + Red = Lights up Robot’s Eyes

Brown + Black +Purple + Red = Arms Down

Purple + Black +Brown + Red = Arms Up

Green + Black +Orange + Red = Arms In

Orange + Black +Green + Red = Arms Out

White + Black +Blue + Red = Right Tracks Forward

Blue + Black +White + Red = Right Tracks Backward

Pink + Black +Yellow + Red = Left Tracks Forward

Yellow + Black +Pink + Red = Left Tracks Backward

FIGURE 5b. Drawing of Reverseswitch; top toggle type reverseswitch, (bottom) push button

type reverse switch.

FIGURE 6. TetherWire Results Chart.

FIGURE 7. Backof Roger Robot

showing the project box

and the 25-pin connector.

FIGURE 8. Tether being slicedopen with an Exacto™ knife.

Toggle

Reverse Switches

PushButton

Reed.qxd 12/7/2006 9:31 PM Page 46

Page 47: Servo Magazine - 2007-01

strip a quarterinch of the insula-tion off of each ofthe wires from thetether (see Figure 9). Repeatopening and stripping the tether for its controller side.

Solder the wires from therobot tether to the male 25-pinconnector and the wires fromthe controller tether to thefemale 25-pin connector. Whensoldering a lot of wires to aconnector, it is handy to have anotherperson hold the wires in place whileyou solder so you can move quicklyfrom wire to wire. If you do not have ahelper available, I recommend theHelping Hands soldering tool fromHarbor Freight. It has a weighted baseand a couple of alligator clips to holdthe wire being soldered and the connector you are soldering to. Solderthe wires to the 25-pin connector, asshown in Figure 10.

As long as the wire color codesyou found in your robot’s controllermatch the table in Figure 6, the orderin Figure 11 should be followed in soldering the wires to the connectors.If your wire color codes are different,you will need to create your own chart.

After you have completed solder-ing your male connector, mount it tothe spot you previously selected (seeFigure 12).

Plug in the controller tether andtest to see that all of the switches do allof the same functions they did beforeyou cut the tether. If there are prob-lems, troubleshoot now. Refer to thechart of functions and wires (Figures 6and 11) to see where you may havegone wrong. When this test is success-ful, continue.

Mounting theProject Box

In this phase, you will attach theproject box on the back of the robot. Itwill look like a backpack. Four screwswill be enough to hold it securely inplace. You may choose to use SuperGlue instead. I like to use screws forthis so that I can remove the box laterif I choose to for aesthetics, repairs, ormodifications. If your Roger Robot hasa bracket for the tethered remote on

the back, remove it by loosening thescrews. Later, we will install it on theback of the project box so you can stilluse the remote mounting bracket.

When drilling pilot holes for self-tapping screws in plastic, I like to testthe size of the drill bit and the screwson scrap plastic. Find a local plasticssupplier and purchase some scraps bythe pound. These will come in handyfor all kinds of other projects, as well.

Hold the box on the back of RogerRobot and see where the box toucheshis back. Pick a spot near each of thecorners inside the box to place yourscrews. If you have a box like ours, youmay choose to place your screwswhere we did. Measure one-quarterinch from the corner and mark thehole. You can do this with a witeout™ type marking pen if you areusing a black box. You can use aSharpie marker if your box is anyother color. Alternatively, you couldplace masking tape over the areanear the corner, then measure forthe cut.

I prefer to drill through the boxinto the robot at the same time.Some people prefer to measureand drill the hole in the box first,then hold the box onthe robot and markthe robot through theholes in the box, thendrill the holes in therobot. It is best to tapethe box in place on therobot and then drillyour holes.

After the holeshave been drilled,drive the self-tappingscrews into the robotthrough the projectbox. Use the appropri-

ate screwdriver (philips or standard).Mount the remote control bracket onthe back of the project box (see Figure20). You can use the screws that camewith it or some of the self-tappingscrews.

Placing and CuttingAccess Holes

Your project box may come withpre-cut holesfor the cables.If this is thecase, use them.

Pin # Wire Color Action/Purpose1 Red (9 VDC)2 White (Right Tracks Backward)3 Blue (Right Tracks Forward)4 Pink (Left Tracks Backward)5 Yellow (Left Tracks Forward)6 Brown (Arms Up)7 Purple (Arms Down)8 Green (Arms Out)9 Orange (Arms In)10 Gray (The first step of the project )11 empty12 empty13 Black (Ground)14-25 Available for future development.

FIGURE 9. Tetherwith individuallystripped wires.

FIGURE 11.25-Pin

ConnectorWiring Chart.

FIGURE 10. Wire and 25-pin connectorbeing held by the Helping Hands toolwhile the solder and soldering iron is

being held by the author.

FIGURE 12. 25-Pinconnector in placeshowing the male

on the left and thefemale on the right.

SERVO 01.2007 47

Reed.qxd 12/7/2006 8:06 PM Page 47

Page 48: Servo Magazine - 2007-01

If you do nothave precutholes or you

want to run cables in a different way,follow the hole cutting procedure outlined here. Measure and mark thehole on the bottom of the box. Besure to make the cut big enough forthe connector to pass through.

You will want a hole cut for theribbon cable, DB9 connector, and twoswitches. I decided to cut the hole forthe ribbon cable on the bottom of thebox, the hole for the DB9 on the side,and one on the top and the other onthe side for the switches.

I used a standard cabinet hingefor the project box. I like to use ahinge because I know I will return tothe robot to hack and hack again. Ifyou are planning on very little

modifications,you can usethe standardscrews to closethe box and

leave it that way.The best way to cut holes in

plastic that I have found is a Dremel™type hand tool with a metal striatedbit. With the bit spinning at highspeed, the friction heats the plastic upand it cuts like a hot knife through butter (see Figures 13 and 14).

Mount the BASICStamp and ParallaxBoard of Education

Place the Board of Education(BOE; see Figure 2) or your microcon-troller board of choice into the projectbox. Make sure it will fit before youstart drilling holes. It is best to markthe holes inside the project box so youknow were to drill before you start.Doublecheck to be sure all of the holesmatch up, then start drilling. Use a bitthat is smaller than the self-tapingscrews so the screws will have something to grab onto when youtighten them. Place the stand-off

spacers on the holes, place the BOE on the spacers, and drive thescrews through the BOE and spacerto secure it to the inside of the project box.

Inside the box, I mounted astandard breadboard on the robot’sright side and a terminal block on

the robot’s left. Iused self-tappingscrews and some hotglue to hold themboth in place. The

BOE was mounted inside thehinged lid opposite of the robot’sback (see Figure 15).

Breadboard Layout

Place both of the L293Dmotor driver chips (quadruple half H drivers). Place the 74HCT164 shiftregister chip.

Starting at the top of the bread-board, place the first L293D centeredon the breadboard. The top of theL293D (pin 1) should be in the fourthrow, and be sure the other chips havethree holes (rows) between them.Place the 74HCT164 shift register last(see Figure 16). Follow the schematicand photos in Figures 15-17 for detailsof component placement.

Terminal Block andBreadboard Layout

Pick a terminal block that you likeand be sure it will fit inside of yourproject box. In Figure 18, I used theone in the upper right hand corner.Number the terminal block 1-15.Solder the ribbon cable wires to theterminal block according to the CablePin Connection Chart in Figure 11. Onthe other side of the terminal blockattach the lead wires for the bread-board in the order in Figure 19. Usewire markers or masking tape and apen to number the wires near the endthat plugs into the breadboard. Mybreadboard came with two columns,then a space, five columns, a gap, fivemore columns, a space, and two more

columns. I used the first two forthe Ground buss (G1 and G2).For this chart, “G” stands forground and on the breadboardit is the first and second column. I numbered the next10 columns 1-10. The last twocolumns are numbered P1 and

48 SERVO 01.2007

FIGURE 13. Projectbox with Dremel™cutting the plastic

like a hot knifethrough butter.

FIGURE 15. Back ofRoger showing theterminal block on

the upper left,breadboard upper

right, and BOElower center.

FIGURE 16. Breadboard inside ofRoger Robot’s backpack. Two L293Dchips at the top and the 74HCT164

shift register at the bottom.

FIGURE 14.Project boxafter cutting

large hole for cable.

Reed.qxd 12/7/2006 8:06 PM Page 48

Page 49: Servo Magazine - 2007-01

P2. “P” stands forpower. These lasttwo columns arethe power buss.Note: Some bread-boards need a leadwire to connect thecolumns at the midpoint and some donot. It is alwaysbest to check itwith an ohmmeterto be sure whetheror not it is connect-ed throughout. Thebreadboard I usedfor this project doesnot connect all theway through so Ihad to add jumperlead wires from rowG25 to row G26 incolumns 1 and 2 —the first twocolumns. I addedjumpers on P25 and P26, as well.

Cabinet Hinge

Mount the cabinet hinge on thebottom of the project box (see Figure14) if you have a project box that doesnot come with hinges. Close the boxand place the hinge centered betweenthe top and the bottom. Mark theholes and then drill making sure the bitis small enough for the self-tappingscrews to hold the hinge in place.

Kill Switch andPower Switch

I mounted akill switch on topof the project box(see Figure 20). I like to use a toggle switchwith a one-inch orlonger toggle andI feel it is impor-tant to put it on

top of the robot so if something goeswrong, it is easy to “kill” the programor power. Place the switch so that flip-ping it backwards puts it in the kill posi-tion. This way, when the robot is tryingto run away, you can hit the switch andshut down the system. Hold the switchup to the box where you want tomount it and look to be sure it will fitand that you can get the wires con-nected. Use the Dremel to cut a holefor the switch in the top of the box asdescribed earlier. After cutting thehole, place the switch in it and tightenthe mounting nut.

The kill switchwill be wired

between ground and the “enable resistor” (EN on the schematic). The ENis connected to the five-volt DC powersupply buss. On the schematic, thereare connections from the L293Dsmarked “EN.” These will all be wired to row 58, column 1-4. In the “Go”position, the H-bridges can drive the motors. In the kill position, theycannot.

Repeat this procedure for thepower switch on the side. You canmount it in a differentlocation but be sure it

FIGURE 18.Terminal blocks.

SERVO 01.2007 49

Terminal Block - BreadboardFrom 1 to Row 1 Column 6From 2 to Row 6 Column 3From 3 to Row 9 Column 4From 4 to Row 9 Column 7From 5 to Row 6 Column 7From 6 to Row 17 Column 3From 7 to Row 20 Column 3From 8 to Row 20 Column 10From 9 to Row 17 Column 10From 10 to Row 40 Column 1 (Use later)From 11 to Row G1 Column G3From 12 to Row G1 Column G2From 13 to Row G1 Column G1From 14 to Row ColumnFrom 15 to Row Column

FIGURE 19.Terminal

block leadwires chart.

FIGURE 17. Schematic ofthe shift registers andQuad Half H Bridges.

Reed.qxd 12/7/2006 8:07 PM Page 49

Page 50: Servo Magazine - 2007-01

is not near the killswitch. The power

switch is in line with the main powerfrom the battery box in the base ofthe robot.

The power switch will be wiredbetween the incoming power wirefrom the terminal block (wire number1) and the power buss. From thepower switch, one wire will plug into

row 1, column 8 and theother will plug into row P1,column P2.

Connect theMicrocontroller

Be sure the switches are in the killand off positions. Disconnect thewired remote at the 25-pin connectorand plug in the microcontroller ribboncable. Using nine-inch lead wires,make a connection from “P0” on theBOE to row 32, column 8, from P1 onthe BOE to row 26, column 2. ConnectVdd from the BOE to the power bussrow P1 column P41 (see Figure 15).

Write theProgram orCopy and PasteFrom SERVOWebsite

Start by loading astandard blinking LED or“Hello World” program tobe sure the BASIC Stampis connected properly.These standard programscan be downloaded fromthe Parallax™ website.

Once you know all iswell with the BASIC Stampand your connections, I rec-ommend you try loadingthe GoForward program.Both left and right trackswill move forward. Run itand then if all is well, loadthe “Pick Up Cup” program.

Since we have notadded any sensors to RogerRobot yet, he is blind andhe cannot find a cup andpick it up so you will needto experiment with the

50 SERVO 01.2007

Parts List 1Qty. Item Supplier1 Roger Robot Big Lots — www.biglotswholesale.com1 BASIC Stamp II Parallax — www.parallax.com1 Board of Education Parallax — www.parallax.com2 L293D motor driver chip Texas Instruments — www.ti.com1 74HCT164 shift register chip www.semiconductors.philips.com1 Breadboard Electronics Goldmine — www.goldmine-elec.com1 Jumper wire assortment All Electronics — www.allelectronics.com1 Ribbon cable 25-conductor All Electronics — www.allelectronics.com

18 inches2 Toggle switch CAT# MTS-5 All Electronics — www.allelectronics.com1 22 position terminal strip All Electronics — www.allelectronics.com

CAT# TER-2202 Resistor 10K ohm RadioShack — www.radioshack.com1 Spool of 28-gauge pre-tinned RadioShack — www.radioshack.com

insulated wire1 Project box 7x5x3” 270-1807 RadioShack — www.radioshack.com1 Machine screws RadioShack — www.radioshack.com

#4-40. Pack of 42.#64-30111 Self-tapping screws RadioShack — www.radioshack.com8 Stand-off Spacers RadioShack — www.radioshack.com10 Ceramic capacitor RadioShack — www.radioshack.com

Catalog #: 272-134. If you are going to do more projects, we recommend you buy the 272-801 set of 100 disc capacitors for $4.95 instead of the ones above.

1 Cabinet hinge Home Depot — www.homedepot.comAdditional items www.eBay.com;

http://stores.eBay.com/They-Shall-Walk-Foundation

(Be sure you can solder to these)2 25-pin parallel extension cable with male and female connectors or2 25-pin female connector DB251 25-pin male connector DB25

Note: You can purchase the machine screws and self-tapping screws at Home Depot or HarborFreight (www.harborfreight.com) if it is more convenient or a better deal.

Project Box — We used a spare one that was sitting around the lab. The one from RadioShack hasan aluminum lid and a plastic lid included, and has partial cutouts for both DB-9 or HD-15 comput-er connectors and DB-25 connector. This will work better and require less fabrication.

Thank YousA special thank you to the NSCC faculty members who havebeen very helpful: FrankJump, Lynda Wilkinson,Chris Saunders, TracyHeinlein, and DeborahBedford. Thank you toDoug and Cecelia for allyou do.

FIGURE 20.Kill switch onproject box.

FIGURE 21. Robotgrasping the cup

and lifting it.

Reed.qxd 12/7/2006 8:07 PM Page 50

Page 51: Servo Magazine - 2007-01

location of the cup. Sensors will be added in a future article.For the program “Pick Up Cup” to work, you will need

a paper or plastic cup (plastic is better in case the robotcrushes it by squeezing too hard). Place the cup 12 inches infront of the robot. Turn on the power and push the reset button so the program will start. Since I did not add any sensors, this robot is running blind and requires you to set upthe environment in a way that the program will function correctly. Watch how the robot and the program work. If thecup is too far to the left or right, or too far forward or back,move it so the robot will be able to pick it up.

You can move the cup until you find the right distancefor placement every time. With my robot on my floor, the cupplaced 12 inches in front and centered works perfectly.

I then modified the program so the cup could be placedtwo feet directly in front of the robot.

When the program is launched, the robot moves forward while the arms go up and out. Then the robot stops,the arms go down around the cup, the arms close graspingthe cup, the arms go up lifting the cup (see Figure 21), therobot turns 180 degrees and, moves forward taking the cup.

Have fun changing the program to change the directionsRoger Robot will go and the amount of time he will run.

Troubleshooting

Capacitors and resistors have been included in the PartsList in case you have a problem with electronic noise from thelow-cost parts of this robot. I wrote the program in a way thatthe noise should not bother the function of the robot. Thesymptom of the electronic noise shows up when you run aprogram that operates any of the onboard motors. When theprogram tells a motor to move one direction is when theproblem may show its ugly head. Symptom: motor moves alittle, stops, then moves in a random direction and moves forrandom amounts of time. Also, other motors may randomlymove different directions and for different times. I will go intothe placement of filter components in a future article. SV

Parts List 2• Dremel• Dremel bits• Drill• Drill bits• Exacto or razor knife• Electrical tape• Helping Hands (to help with soldering)• Multimeter• Needle nose pliers• Pliers• Screwdriver philips and standard• Soldering Iron• Solder• Vise• Wire cutters• Wire markers (or tape you can write on)• Wire stripers• Wite Out™ Marking Pen (or white paint or correction

fluid)

SERVO 01.2007 51

Extreme Robot Speed Control!

OSMC - Monster Power H-bridge6

6

6

6

6

14V - 50V and3.15“ x 4.5” x 1.5”Control with Stamp or other Micro3 wire interfaceR/C interface available

160A 400Aover peak!

www.robotpower.comPhone: 253-843-2504 [email protected]

$199

Scorpion HX

6 Only 22g

6

6

6

6

6

6

Dual (6A pk) H-bridgesfwd-only channel

5V - 18V1.6“ x 1.6” x 0.5”Four R/C inputsMixing, Flipped Bot Input

2.5A12APlus

$79.99

Scorpion Mini6

6

6

6

6

6

2.5A (6A pk) H-bridge5V - 18V1.25“ x 0.5” x 0.25”Control like a servoOptional screw term.Only 5.5g

$119.99

Scorpion XL

6 Only 28g

6

6

6

6

6

Dual H-bridge5V - 24V2.7“ x 1.6” x 0.5”Three R/C inputs - serial optionMixing, Flipped Bot Input

13A 45A Peak!

6

6

6

6

6

6

6

6

6

6

14V - 50VDual H-bridges 150Adjustable current limitingAdjustable speed slew rateTemperature limitingThree R/C inputs - serial optionMany mixing optionsFlipped Bot InputRugged extruded Aluminum case4.25" x 3.23" x 1.1” - Only 365g

80A A+ Peak!

$29.99

$399

Also from Robot Power

Kits, parts, schematicsPlanetary gearmotors

All Robot Power electronicproducts are proudly

Introducing DalfAdvanced dual motordrive with closed-loopcontrol functions

Embedded Electronics, LLC along with our exclusive reseller Robot Power areproud to introduce a feature rich, customizable Dual Motor Controller:Designed to work out of the box or to host your application specific code; Dalfmakes it simple to create a complete turn-key “brain” for your application withfull-closed-loop motion control. Just take a look at these features!

Dalf.

Only $250

MADE IN

THE USA

Motion Control Functions

Closed-Loop Features6

6

6

6

6

6

6

6

6

6

6

6

Closed-loop control of two motorsFull PID position loopTrapezoidal path generatorAdjustable slew rate for smooth transitionsNon-volatile storage of PID parametersStep-Response PID motor tuning supportQuadrature encoder support for each motor

Drives all sign-magnitude brushed DC motor

drives such as the OSMC

Terminal mode for interactive tuning and

debuggingWindows GUI under development

Two R/C command modes (3 input

channels)Two open-loop pot control modesInteractive terminal control of motorsAdjustable slew rate

6

Open-Loop Features

I/O Connections6

6

6

6

6

6

6

6

Two RS-232 serial ports36 GPIOI2C master and slave ports (2 ports)Two motor drive outputsTwo quadrature encoder inputsTwo Hall-effect current sensors inputsSix 10-bit A/DTwo channels of cooling fan control

6 Standard ICD connector

Application Support

6

6

6

6

6

6

6

6

6

60k+ FLASH availableSerial bootloader, no programmer neededSerial command/monitor in both terminal

and high-speed binary API modeI2C slave command interfaceFirmware implented in C andASMC source for main loop and utility routines

provided freeLinkable device driver function library

provided for building custom applicationsExtensive documentation with Owner’s

Manual and Getting Started Manual

provided on CDCustom code development services

available (contact EE)

6 PIC18F6722 CPU running at 40MHz

For more information visitwww.embeddedelectronics.net

Dalf

Reed.qxd 12/7/2006 8:07 PM Page 51

Page 52: Servo Magazine - 2007-01

When Iapplied powerto the servos, the joints abruptly hyper-extended, flinging a hot soldering ironagainst a wall. Then, when I appliedpower to the servo controller, theuncalibrated servo chain contracted,digging the gripper into the work-bench. The unsecured arm flipped ontoits side, knocking over a hot glue gunin the process. Fortunately, the gunand iron landed harmlessly on the shopfloor and the arm was undamaged.

Robotics presents a real-word testof AI, computer vision, and sensortechnologies. Moreover, becauserobotics involves physical, as well as

computational challenges,the dangers associatedwith building and operat-

ing robots extend beyondkeyboard-induced carpal tunnel

syndrome. This is especially true withthe current trend toward heavier,faster, and more complex robots.Following is a discussion of robotdesign, construction, and operatingpractices that can improve the surviv-ability of your robots and minimize thesafety risks to you and bystanders.

DesignSafety should be explicitly

designed into a robot, as opposed toan add-on made in response to a injuryor robot failure. Appropriate platformlayout, the use of safety subroutines,as well as physical sensors, intuitive

state indicators, energy manage-ment hardware and software, andkill switches all contribute to acomprehensive safety design.

Platform LayoutIn designing a robot platform

layout, the primary goal is to pro-vide a stable support for sensorsand associated electronics within astructure capable of withstandingthe mechanical stress of motion.In addition, the platform shouldbe configured in a way that

protects onboard electronics and minimizes damage to anything or anyone unfortunate enough to be hitby the robot body or effectors.

For example, in designing acrawler, consider using rubber cushionsto provide hard limits on the range ofleg motion so that the legs don’t clashinto the body while you experimentwith various gaits. This safety precau-tion can limit damage to the robotbody and servos, and minimize pinchpoints that can entangle your fingers.

Similarly, avoid sharp edges andprotruding corners on fast-movingwheeled robots over a few pounds,which have a way of colliding with furniture legs and shins. I have severalrobots based on the Traxxas e-Maxxtruck chassis — a popular platform for robot development. Because the e-Maxx drive system is capable of speeds in excess of 30 mph, thepotential for damage to both personand robot is significant.

If you’re working with a high-speed platform, consider a roll bar andsturdy frame to protect electronics anda bumper system that will minimizedamage to human and furniture legs.I’ve found a pair of calf-high bootshandy when debugging high-speedrobots capable of sudden and unex-pected acceleration.

Safety SubroutinesSafety subroutines can be the

easiest safety measures to implement –if you do your homework in selecting

ROBOT SAFETYby Bryan Bergeron

My first robotic arm kit — a six DOF, all-metal model with high-speed, heavy-duty servos, and ample power supply —taught me not to be lulled into the apparent plug-and-play world of hobbyrobots.

52 SERVO 01.2007

FIGURE 1. Physical tilt sensor basedon mercury switches.

Bergeron.qxd 12/7/2006 7:51 PM Page 52

Page 53: Servo Magazine - 2007-01

components and microcontrollers. Oneof my favorite processor boards —the ATMega128-based Mavric-IIB —features a watchdog timer. This independent timer can be used to resetthe microcontroller if the program executing on the controller hangs.Using the watchdog timer, you canassure that the microcontroller resetsin a controlled manner following apower glitch, robot impact with something in the environment, or avariety of other causes.

The less powerful but easier to useParallax BS2 and related chips don’tprovide this independent watchdogtimer function. However, safety rou-tines needn’t reside exclusively in themicrocontroller. Consider the ParallaxHB-25 motor controller, which has acommunications timeout function thatstops motor activity if it doesn’t receivea refresh pulse every four seconds orless. With the timeout functionenabled, the HB-25 will render therobot immobile following an accidentor component failure that results in theloss of refresh pulses.

Although several motor controllerssupport a timeout feature, most components require custom safety subroutines to automatically disableautonomous functions. The basis ofoperation can be a specified time ofinactivity or sensor data, such as a tiltreading from an onboard accelerometer.

Physical SensorsSoftware subroutines assume

functional sensor-microcontroller communications, but this assumptionfrequently doesn’t hold following amishap. For this reason, it’s a goodidea to supplement soft safety subroutines with hard wired physicalsensors that are independent of

microprocessor operation.I like to install a hard tilt switch

across the control input of solid-staterelays that control motor current. Thephysical tilt switch cluster shown inFigure 1 is composed of four mercuryswitches, each accompanied by a 1Kseries resistor. When the tilt of therobot platform is greater than theangle defined by the position of themercury switch on a given axis, themicrocontroller control signal is shunted to ground, thereby openingthe relay output circuit.

A more compact circuit can beconstructed with an accelerometer, butit can be rendered useless if the microcontroller is damaged or runs into

FIGURE 2. An LCD screen and multi-stateLEDs provide internal state information— in this case, low motor voltage (redLED, left, and LCD), but adequate mainvoltage (blue LED, right). Control buttonsare not shown.

FIGURE 3. Schematic of an optically-isolated analog voltage sensor thatdrives LED indicators, as well as thedigital input of a microcontroller.

SERVO 01.2007 53

Bergeron.qxd 12/7/2006 7:51 PM Page 53

Page 54: Servo Magazine - 2007-01

a software glitch. Space permitting,the best approach is to use both amicrocontroller-accelerometer circuitand a physical tilt switch. An advantage of this dual configuration iscertainty that that robot motion will behalted and the ability to use the eventto modify robot behavior.

State IndicatorsOnce a semi-autonomous robot is

programmed and set free, it’s difficult to foresee and respond toproblems without a real-time indicationof internal state. It’s a good safety practice to use LEDs and other indicators to communicateautonomous behaviors, such as backing up after sensing an objectahead, as well as system function, such

as the status of the controllingcommunications link.

In addition to general statusinformation provided by singleand multi-state LEDs, backlit LCDscan provide a rich source of robot state information. Figure 2 illustrates a robot interface composed of both LEDs and abacklit LCD panel indicating ade-quate main power but low motorbattery voltage. Not visible in thefigure is the blinking of the LCDpanel and the audible alarm froma piezo buzzer that accompanythe error state.

The state indicators in Figure2 illustrate a parallel or layeredsafety system. The low motor

voltage indicator LED functions inde-pendently of the LCD panel and of thedriving microcontroller. Battery voltage— in this case, from two separate 14.4VNiMH packs — is fed to two LM386 op-amps that are used to drive red LEDswhen the voltage of the correspondingbattery pack drops below 11V, as set bythe 25K potentiometers (see Figure 3).

You can respond to the LEDs bypowering down the robot, replacingthe battery packs, and rebooting therobot operating system. In addition,because the output of each op-amp isfed through a 4N35 optocoupler to theinput of a microcontroller, a softwareroutine running on the microcontrollercan respond to the battery voltage.This response can take the form of anLCD message, the sounding of a piezo

buzzer, and activation of system shutdown routines that minimizerisk of robot damage.

Energy ManagementHardware andSoftware

Good energy man-agement safety beginswith a physical mainpower switch that over-

rides programmatic control systemsbased on soft switching through relaysor transistors. Appropriate capacitystandard or self-healing fuses on thebattery circuit and power supply output can save microcontrollers, sensors, and battery packs. Mini bladefuses, such as the five amp modelshown in Figure 4, are inexpensive andreadily available in a range of currentratings down to 1A. Voltage rating isnormally not a concern because of thelow voltage battery and component circuitry typically used in robots.

The most appropriate current rating and fuse type depends on thetime-varying amplitude of the expectedcurrent. For example, a slow-blow fuseis appropriate to protect motors andcomponents with a momentary highinitial current, such as laser rangefind-ers. Fast-blow fuses are suitable formicrocontroller boards and sensorswith relatively constant initial and oper-ational current. The most appropriatefuse rating is as near to the full load cur-rent of the circuit as possible. An excel-lent on-line resource for fuse selection isthe Surge Protection Device Handbook,listed in the Resources section.

Solid-state relays are useful in secondary power switching becausethey enable a microcontroller to direct-ly control high currents in response tosensor readings and remote control sig-nals. For example, one of the Crydom10A solid-state relays in Figure 4 is usedto switch on and off a bank of powersupply modules, including those shownin the lower half of the figure.

The second relay controls currentto a single-board PC with a built-in voltage regulator. Solid-state relayswith input requirements of only a fewmilliamps and output ratings to 60Aand above are available from Crydomand other manufacturers. On large,complex robots, I devote a processor tosequencing solid-state relays, poweringservos and controllers, monitoring current, and other aspects of safe energy management.

Kill SwitchFlipping the physical main power

switch to avoid an impending disasterisn’t always convenient, especially if therobot is moving, there are multiple,active robots, or if the robot is out of

FIGURE 4. Energy management withsolid-state relays (upper right) andblade fuse (upper left).

FIGURE 5. An RF on-offswitch and transmitter fob reconfigured as a remotekill switch.

54 SERVO 01.2007

Bergeron.qxd 12/7/2006 7:52 PM Page 54

Page 55: Servo Magazine - 2007-01

reach. The simplest solution to stop-ping a robot in an emergency is toinstall a wireless kill switch that disablesmotor drive circuitry when activated.

An inexpensive kill switch system isavailable from All Electronics Corp., inthe form of a keychain remote controlshown in Figure 5. The $19 system —which includes a pair of 27 MHz wire-less key fobs — is designed to supply12V to a remote device. However, themain board can be reconfigured sothat the contacts of the mechanicalrelay are available for direct or indirectcontrol of the robot motor system. Ipurchased several of these units andmodified the solder pads on the boardsand remotes so that any fob can con-trol any and all robots with a kill switch– an especially handy feature whenworking with multiple, fast-movingrobots. Line-of-sight range is about 100feet, and about half of that indoors.

A major limitation of using a killswitch as a remote safety device is thatit requires you to recognize somethingis wrong and then press the “off” button to deactivate a robot. An alternative approach is to use a deadman switch, which is roughly equiva-lent to a watchdog timer in that anactive signal is required to keep therobot energized. If the onboard receiv-er doesn’t detect a signal because youreleased a momentary-contact switchon the remote, the receiver is out ofrange, the battery is dead, or any number of other reasons, the robotcan be configured to shut down.

Although it’s hard to beat the formfactor of the fob shown in Figure 5, theParallax 433 MHz transmitter andmatched receiver can be used to createa relatively compact dead man switch.As with most Parallax devices, setup isquick and painless. Other than supplying each device with 5V at 5 mA,installation is a simple matter of interpreting the analog received signal strength value with an onboardprocessor or using it to directly controla solid-state relay. Line-of-sight range isabout 500 feet.

ConstructionThe process of creating a robot,

whether from a kit or sheet of alu-minum and plastic, poses a potential

threat to eyes, ears, and extremities.The simple act of trimming a solderjoint with a pair of diagonal cutters canlaunch a wire with enough velocity toembed it in an eye.

Unfortunately, not all constructionsafety techniques can be gleaned fromcommon sense. If you’re unsure howto do something, then get help.Someone skilled in cutting and bend-ing aluminum sheet can show you safetechniques that could take years tomaster. Given this caveat, some basicsthat apply to all robot constructionprojects include:

• Wear eye protection when usingpower tools and when cutting wire,plastic, or metal with hand tools.

• Wear ear protection when workingwith power tools to prevent hearingloss. The high-pitched whine of aDremel can be muffled with in-earplugs available at most hardwarestores. In-ear plugs, while not as com-fortable as over-ear protection, offersuperior sound reduction and protec-tion from potential hearing loss.

• Wear short sleeves when workingwith power tools. Similarly, avoid loosejewelry and anything else that mightbecome caught in a power tool.

• Use clamps with a drill press to avoida trip to the emergency room to reattach your fingers. Clamps are especially important when step bits areused, because they are more likely tobind than straight bits (See Figure 6).

• Use a lubricant when drilling to mini-mize binding and reduce noise. I like touse a few drops ofrubbing alcoholwhen drilling alu-minum sheeting.

• Smooth freshlycut edges with afile.

• Equip your work

area with a fire extinguisher rated forclass A (common combustibles), B(electrical), and C (flammable liquids)fires. An ABC extinguisher based onHalotron is ideal for robotics workbecause the hydrochlorofluorocarbonis an electrical insulator that doesn’tleave a residue.

• Ventilate your work area when soldering or using adhesives. Avoidbreathing flux vapors, which can causepermanent respiratory problems.

• Use leadless solder and components,and wash your hands after handlingsolder. Children are especially suscepti-ble to lead poisoning.

• Use multi-strand, insulated wire forconnections that require flexibility, andinsulate exposed terminals and wireswith shrink-wrap tubing or electricaltape. Solid wire is fine for use with plastic prototyping boards, but moreflexible stranded wire is generally a bet-ter choice for interconnecting batteries,sensors, power supplies, and proces-sors – especially when there may be rel-ative movement between components.

• Use sealed, leak-proof batterieswhenever possible. In addition, don’tleave batteries in your robots forextended periods – even if they areleak-proof.

• Use secure construction techniques,such as locking pins to secure parts,instead of relying on gravity or tape.

OperationSafe robot operation depends on

FIGURE 6. Use a clamp— not hands — to stabilize items on adrill press — especiallywith a step bit.

SERVO 01.2007 55

Bergeron.qxd 12/7/2006 7:52 PM Page 55

Page 56: Servo Magazine - 2007-01

the type of robot, the operating environment, and the purpose of therobot. What constitutes safe operationof a BattleBot engaged in a fight to thedeath in a BattleBot arena doesn’t nec-essarily apply to a robot designed toexplore robot-robot communications. Afew globally applicable safe operationheuristics are:

• Charge batteries in a well ventilatedarea and use a charger that guardsagainst overheating and overcharging.

• Affix robot arms and other stationaryrobots securely on a stable platformprior to power-up.

• Establish a safety zone around arobot within which no one may enterduring operation.

From HereThe above safety measures apply

in varying degrees to experimentalrobots and those designed for explo-ration and assorted tasks. Robotsintended for competition — such asBattleBot-style competitions — mustabide by specific safety guidelines.Even if you are not intending to enteryour robot in a competition, it’s agood idea to review safety guidelinesassociated with events for ideas onhow you can improve the safety ofyour robot.

A common question regarding

robot safety is how much safety overhead is enough. In general, thegreater the safety risk, the more safety should be emphasized in robotdesign. A kill switch and comprehen-sive energy management circuitry generally don’t make sense for a slowmoving, 12 ounce carpet rover.However, a highly mobile, 20 poundrobot equipped with an expensive sensor array, significant on-board processing hardware, and a high-current drive system may dictate a fullsuite of safety technologies.

The obvious tradeoffs are safetyfor increased complexity, weight, cost,and development time. Increased complexity usually translates to agreater likelihood of failure because ofan increased number of failure points.For example, a dead battery in aremote enable/kill switch can disablean otherwise operational robot.However, replacing a battery is a trivialmatter compared with replacing anexpensive video camera because youcouldn’t stop your robot from slamming into a table leg. SV

56 SERVO 01.2007

All Electronics Corp.www.allelectronics.com

BattleBot Rules & Guidelineswww.battlebots.com

Crydom, Inc.www.crydom.com

Parallaxwww.parallax.com

Surge Protection Device Handbook.Cooper Bussman, Inc., 2002.

www.bussman.com/apen/pubs/spd/index.asp

RESOURCES

Bergeron.qxd 12/7/2006 7:52 PM Page 56

Page 57: Servo Magazine - 2007-01

Figure 1 shows the complete CIRCBot. The main body of the robotis a solderless breadboard on a

plastic frame. If you have been readingSERVO for awhile, you have seen otherbreadboard bots (and if you have readNuts & Volts since the mid-1990s, youhave seen several more). The big difference between this robot and theothers that have been presented is thatit is built to a tight budget. Most of thetime, a beginner’s robot is shown with

a BASIC Stamp for its microcontrollerand modified servos for its motors.Both of those choices are made with

Amateurrobotics is FUN.

Amateur roboticsis EDUCATIONAL.

Amateur roboticsis EXPENSIVE!

Last month, youpurchased the basic

hand tools andsupplies you need to

build a robot andyou learned to

solder. This month,you will be building acomplete robot. This

robot will be morethan just a platform.

It will be mobile,sense its environ-ment, change howit moves based on

what it senses, andbe easily modifiable.

PART 2:Building the

CIRC Bot

SERVO 01.2007 57FIGURE 1. CIRC Bot.

Pawelski2.qxd 12/6/2006 11:51 AM Page 57

Page 58: Servo Magazine - 2007-01

58 SERVO 01.2007

the assumption that it will be easier for the new builder to use these components. However, they add over$50 to the cost of the robot. That ismore than our entire budget!

For the CIRC Bot, you will be usinga $2.99 AVR Mega48 microcontroller.The Mega48 is not only less than atenth of the cost of a BASIC Stamp, itis also more powerful.

The robot will be programmedusing BASCOM-AVR from MCSElectronics. BASCOM is a version of theBasic programming language. You willneed to download a free version of the

BASCOM-AVR compiler complete withmanual from www.mcselec.com/index.php?option=com_content&task=view&id=14&Itemid=41. BAS-COM runs on Windows 95 or newerPCs. We will be programming using theparallel (printer) port, so you will needto have a PC available with a parallelport. If you do not already have one,you can often pick up an older PC at acomputer repair shop or a second-handstore for less than $50. Just make surethat the computer’s operating systemis Windows 95, 98, 2000, NT, or XP.

Ordering the Parts

The list of componentsnecessary to build the CIRCBot is shown in Table 1. Theentire component list can bepurchased as a kit fromWright Hobbies.

Subassemblies

Building the GearboxThe gearbox kit comes

with instructions; however,they are a little limited.Wright Hobbies has made avideo of the gearbox assem-bly procedure. You can find itonline at www.wrighthobbies.net/guides/. You willbe assembling the gearbox inits highest gear ratio configu-ration (344.2:1).

Adding Caps to theMotors

This is probably the hard-est part of the build, but ifyou practiced your soldering

using the LED projectdescribed in last month’s article, you will be able to handle it. Three of the 0.1 µFcapacitors need to be solderedto each motor. One cap will beconnected between the twomotor leads. The other twowill connect each lead to the motor case. In an ideal situation, the caps betweenthe leads and the case wouldboth connect to the case in

the same location. However, with theconfiguration of the Gearbox we areusing, this will not be possible, so wewill have to solder to two differentlocations on each motor.

Bend the leads on three capacitorsas shown in Figure 2. Hook the leadsfrom the capacitor with both of itsleads bent into the two motor lugs.The leads bent into a “J” shape on theother two capacitors also hook into themotor leads. These capacitors shouldbe positioned so that their straightleads touch the metal part of themotor case. Before soldering the capacitors into place, lightly sand theparts of the motor case (which areunder the capacitor leads) with a veryrough sand paper or emery board. Thegoal is to make the surface rougher sothat solder will bond to it easier. Cleanthe roughed areas with alcohol. Applyrosin paste to the roughed areas andthe leads so that the solder flows intoall of the crevices and makes a goodbond between the motor and both ofthe leads. The motor is a fairly largeheatsink so you will need to take sometime with your iron. Do not solder theconnection yet.

You need to add hookup wires.Cut two five-inch pieces of wire: onered and one green. Strip about a quarter inch of insulation off of eachend. With the wires side by side, twistthem together leaving only about oneinch at either end untwisted. Take astripped end of the red wire, twist itaround the capacitor lead goingthrough one of the terminal lugs, andtake a stripped end of the green wireand twist it around the capacitor leadgoing through the other terminal lug.

Now, you can position everything

Beginner’s Robotics on $50 a Month

Description Qty

Solderless Breadboard 830 contacts 1

Wire 3’ each of red, green, and black 1

.1 µF Axial Ceramic Capacitor 11

7805T 5V Positive Regulator, 1 Amp 1

100K ohm 1/4 Watt 10

360 ohm 1/4 Watt 11

4 AA Battery Holder w/leads 1

Heat Shrink Tubing 1

40 Pin Header 1

D-Sub Mini Connector/25 Pin Male 1

DB-25 Hood 1

6 Conductor 26GA Multicolor Wire 10

1” Squares 1/16” Thick Foam Squares (15) 1

SN754410 Quad Half-Bridge 1

ATMega48 — Atmel Mega48 Microcontroller 1

Tamiya Truck Tires (1 Pr) 1

Tamiya Double Gearbox 1

Tamiya Universal Plate Set 1

Tamiya Ball Caster (1) 1

CDS Photoresistor 2

2,200 µF 16V Radial Electrolytic Capacitor 1

TABLE 1. Bill of Materials.

FIGURE 2. MotorNoise Capacitors.

FIGURE 3. Capsand Wires on

Motor.

Pawelski2.qxd 12/6/2006 11:52 AM Page 58

Page 59: Servo Magazine - 2007-01

and solder it so that it looks like Figure 3.You will probably have to make severaltries to get the joints between the capac-itor leads and the motor case to hold.Just take your time and don’t give up.

Repeat this process for the othermotor.

Making the Programming CableThe simple cable programmer you

will be making is based on a designoriginally in Sample Electronics which isalso described on the Dontronics web-site at www.dontronics.com/dt006_programming.html

The only differences between thiscable and the one on the Dontronicssite are the pinout on the end that willconnect to the bot and the size of theresistors. Figure 4 and Table 2 show theconnections. Note that pin 18, 19, 20,21, 22, 23, 24, and 25 of the DB25male connector must be connected toeach other. To protect your computer’sprinter port, 360 ohm resistors havebeen added in series with the MOSI,RESET, and CLOCK signals.

Cut a four-foot piece of the six conductor cable. Cut off one inch ofthe outside cover from one end of thecable and 1-1/2 inches of the outsidecover from the other end. Trim thewhite wire so that it ends where the

outer cover ends on bothends. On the end with 1-1/2 inches of the coverremoved, trim the blue, yellow, and red wires sothat only an inch of each ofthem is exposed. Strip onehalf inch of insulation from both endsof all the wires so that the cable lookslike Figure 5.

The resistors and the pin jumperswill be added inside the connectorhood. Because of the short distancesinvolved, it will be easier to makejumpers out of leads trimmed off ofcomponents than out of the hookupwire. You will have to take your timewhile doing this to make sure thateverything fits. Read the rest of thissubsection several times and lay thepieces out to make sure that youunderstand how everything fits beforeyou start cutting.

Take three 360 ohm resistors andtrim their leads so that only 8 mm (a lit-tle more than a quarter of an inch) isleft on each end. Save the pieces youtrimmed off. The solder cups on theDB25 connector have numbers next tothem. Solder one end of one of thetrimmed resistors into the solder cupfor pin 2 (don’t forget the rosin paste).Do the same thing with another

resistor in the cup for pin 4 and takethe third resistor and solder it into thecup for pin 5.

Lay one of the pieces you trimmedoff of the resistors across the soldercups for pins 18 to 25. Solder it to eachof these cups.

The DB25 hood came with severalpieces of hardware which are used tosecure the cable and hold the twopieces of the hood together. The twocurved pieces of metal are called cableclamps. Normally, they go around thecable where it enters the hood withtheir concave sides facing each other toform a ring around the cable. However,our cable is smaller so we will be placing the two pieces around the cablewith the curved parts facing the sameway. Attach the cable clamps aroundthe cable at the end with the 1-1/2 inch-es of exposed wires as shown in Figure6. You now need to solder the wires asshown in the photo: the blue wire tothe resistor for pin 2, the yellow wire tothe resistor for pin 4, the red wire to the

SERVO 01.2007 59

Beginner’s Robotics on $50 a Month

FIGURE 5. CableWith Ends Prepared.

FIGURE 6.Programming Cable

With Hood Removed.

FIGURE 7.Breadboard Endof Programming

Cable.

FIGURE 4.Programming

CircuitSchematic.

Pin on DB25 MaleConnector Signal Header Pin Wire Color Pin on AVR

Mega 48

18-25 (ground) GND 1 Black 10

11 (busy) MISO 2 Green 18

5 (D3) CLOCK 3 Red 19

4 (D2) RESET 4 Yellow 1

2 (D0) MOSI 5 Blue 17

TABLE 2. Programming Cable Connections.

Pawelski2.qxd 12/6/2006 11:53 AM Page 59

Page 60: Servo Magazine - 2007-01

resistor for pin 5, the green wire to thesolder cup for pin 11, and the black wireto the jumper you soldered across pins10 to 25. Assemble the rest of the hoodaround the assembly.

On the other end of the program-ming cable, we will solder the wires tofive header pins. Break off a set of fivepins from the 40-pin header. Solder thewires as shown in Figure 7. The order ofthe connections on the header pin sideis GND (Black), MISO (Green), Clock(Red), Reset (Yellow), and MOSI (Blue).The plastic used to hold the header pinstogether will soften fast due to the heatfrom your soldering iron. You will needto work in fairly quick bursts. If the plastic softens too much around one ofthe pins, the pin will be able to moveonce the plastic is cool. If this happens,use a drop of super glue to hold the pinin the plastic.

Since the programming cable isthe part that will connect your low-costrobot to your expensive computer, youwant to make sure that you built it correctly. Take your multimeter andconfirm that each header pin is wiredto only the intended connector pin. Todo this, set your meter to resistance (or“continuity” if your meter has a conti-nuity tone setting). Touch one lead ofthe meter to header pin 1 (GND) and

touch the other lead to each pin on theconnector (one at a time). The metershould show infinite resistance on anypin except pins 18 through 25, whichshould show nearly zero resistance.

Move the lead to header pin 2(MISO) and repeat the process. Thistime, you should get infinite resistanceon all connector pins except on pin 11where resistance will be close to zero.Repeat with the other three headerpins. Since these three pins have resistors in their circuits, you should getresistance values close to 360 ohmswhen you touch the correct connectorpins instead of zero ohms as you did onthe previous header pins.

Base Assembly

The base for the CIRC Bot is madeusing the Tamiya Universal Plate Set.Take one of the plate pieces from thebase kit. Count in seven rows from oneedge. Using angled snips, cut a “v” fromthe edges of the plate to the first andlast holes in the seventh row as shown inFigure 8. These notches will allow you toattach the gearbox to the base.

Place the gearbox under the platewith the mounting tabs facing up andlocated under the notches you just cutin the plate. Place the gearbox mount-

ing rod across the topof the plate with theend stubs going intothe notches in theplate. Holding every-thing together in onehand, turn it over andinstall the mountingscrews through thetabs and into thestubs. The screws areself-tapping in the

plastic so you must be careful not toover-tighten them or they will strip outthe stubs. Just tighten them until theheads of the screws make contact withthe tabs. The gearbox assembled to thebase is shown in Figure 9.

Next, the battery box will beattached. Take three pieces of the double-stick foam tape and stick themto the side of the box where the switchis located as shown in Figure 10. Stickthe battery box to the bottom of theplate just in front of the gearbox withthe switch just clearing the side of theplate as shown in Figure 11.

The final piece that will be addedto the bottom of the plate is the roller-ball. Assembly instructions come withthe roller-ball kit. Assemble the unit forthe 25 mm height. The roller-ball isattached using the two-piece plastic rivets from the base kit. Locate theroller-ball so that it is centered on theplate with its front mounting holesover the third row of holes in the plate.From the top of the plate, push the hollow part of the rivet through theplate hole and the mounting hole inthe roller-ball assembly. Push the solidpart of the rivet through the hollowpart to cause it to expand and grip theroller-ball assembly. Repeat this for thethree remaining mounting holes to

60 SERVO 01.2007

Beginner’s Robotics on $50 a Month

FIGURE 8. Base PlateWith Notches forGearbox Mount.

FIGURE 9. GearboxAttached to Base Plate.

FIGURE 10. BatteryBox With FoamTape Attached.

FIGURE 11. BatteryBox Attached to Base(note switch location).

FIGURE 12. Roller BallAttached (note thefour orange rivets.

Pawelski2.qxd 12/6/2006 11:54 AM Page 60

Page 61: Servo Magazine - 2007-01

make the finished assembly.Now, press the wheels

and tires onto the axlesextending from the gearbox.The base will now look likeFigure 12.

On the top of the plate,two long angle pieces need tobe added. These angle pieceswill hold standoffs, which willbe added to the robot nextmonth. Place one over thevery front row of holes asshown in Figure 13. Use two plastic rivets to attach it to the plate. The second angle piece will be attached inthe same manner at the other end ofthe plate. However, it will need to havepart of its structure trimmed as shownin Figure 14.

Now, the second plate will beattached to the first plate. Make fourstacks of double-stick foam tape asshown in Figure 15. Each stack shouldbe three pieces deep. Two of the stacksare behind the motor mount and willneed to be trimmed slightly to fit.Attach the second plate to the top ofthe stacks. Twist the two battery boxwires together and route them throughthe holes in the base plates immediate-ly in front of the motor mounts so thatthe completed base looks like Figure 16.

The final piece for the base is thesolderless breadboard. This comes withdouble-stick tape on its backside.Position the breadboard before removing the protective paper fromthe tape. Note the numbered rows andlettered columns on the breadboard.The board should be placed with theedge near row one, flush with theedge of the angle support on the frontof the base and the edge nearest column J, flush with the side of thebase as shown in Figure 17.

Top Assembly,Programming, andTroubleshooting

The instructions for completing therest of the CIRC Bot can be found atwww.wrighthobbies.net/guides/.They will also tell you how to programthe robot and troubleshoot it if every-thing does not go perfect the first time.

Conclusion

When you finish the work describedin this month’s article and the online supplement, you can honestly say thatyou built a robot. Next month, we willgreatly enhance your robot’s sensor suiteand we will add an LCD display so yourbot can tell you what it is thinking. Untilthen, have fun with your project! SV

FIGURE 13. Front Support.

FIGURE 14.Trimmed Rear

Support.

SERVO 01.2007 61

FIGURE 15. TapeStacks on Lower

Base Plate.

FIGURE 16. Base WithSecond Plate Added and

Battery Wire Routed.

FIGURE 17. FinishedBase Ready for

Electronics.

Beginner’s Robotics on $50 a Month

Pawelski2.qxd 12/6/2006 11:54 AM Page 61

Page 62: Servo Magazine - 2007-01

OpenCV — Intel’s free, open-sourcecomputer-vision library — cangreatly simplify computer-vision

programming. It includes advancedcapabilities — face detection, face track-ing, face recognition, Kalman filtering,and a variety of artificial-intelligence (AI)methods — in ready-to-use form. In addi-tion, it provides many basic computer-vision algorithms via its lower-level APIs.

A good understanding of howthese methods work is the key to get-ting good results when using OpenCV.In this five-part series, I’ll introduce youto OpenCV and show you how to use itto implement face detection, facetracking, and face recognition. Then,I’ll take you behind the scenes toexplain how each of these methodsworks and give you tips and tricks forgetting the most out of them.

This first article introduces OpenCV.I’ll tell you how to get it and give you afew pointers for setting it up on yourcomputer. You’ll learn how to read andwrite image files, capture video, convertbetween color formats, and access pixeldata — all through OpenCV interfaces.

OpenCV OverviewOpenCV is a free, open-source

computer vision library for C/C++ programmers. You can download itfrom http://sourceforge.net/projects/opencvlibrary.

Intel released the first version ofOpenCV in 1999. Initially, it requiredIntel’s Image Processing Library. Thatdependency was eventually removed,and you can now use OpenCV as astandalone library.

OpenCV is multi-platform. It sup-ports both Windows and Linux, andmore recently, MacOSX. With oneexception (CVCAM, which I’ll describelater in this article), its interfaces areplatform independent.

FeaturesOpenCV has so many capabilities,

it can seem overwhelming at first.Fortunately, you’ll need only a few toget started. I’ll walk you through a useful subset in this series.

Here’s a summary of the majorfunctionality categories in OpenCV,version 1.0, which was just releasedat the time of this writing:

Image and video I/OThese interfaces let you read in

image data from files, or from livevideo feed. You can also createimage and video files.

General computer-vision and mage-processing algorithms(mid- and low-level APIs)

Using these interfaces, you can

experiment with many standard com-puter vision algorithms without havingto code them yourself. These includeedge, line, and corner detection, ellipsefitting, image pyramids for multiscaleprocessing, template matching, varioustransforms (Fourier, discrete cosine,and distance transforms), and more.

High-level computer-vision modulesOpenCV includes several high-level

capabilities. In addition to face-detection, recognition, and tracking, itincludes optical flow (using cameramotion to determine 3D structure),camera calibration, and stereo.

AI and machine-learning methodsComputer-vision applications often

require machine learning or other AImethods. Some of these are available inOpenCV’s Machine Learning package.

Image sampling and viewtransformations

It’s often useful to process a groupof pixels as a unit. OpenCV includesinterfaces for extracting image subregions, random sampling, resizing,warping, rotating, and applying perspective effects.

Methods for creating and analyzingbinary (two-valued) images

Binary images are frequently usedin inspection systems that scan forshape defects or count parts. A binaryrepresentation is also convenient whenlocating an object to grasp.

Methods for computing 3Dinformation

These functions are useful formapping and localization – either witha stereo rig or with multiple views froma single camera.

62 SERVO 01.2007

Seeing With OpenCVA Computer-Vision Library

b y R o b i n H e w i t t

FIGURE 1. Among OpenCV’s many capabilities are face detection (topleft), contour detection (top right), and edge detection (bottom).

PART 1

Hewitt1.qxd 12/7/2006 4:55 PM Page 62

Page 63: Servo Magazine - 2007-01

Math routines for image processing,computer vision, and imageinterpretation

OpenCV includes math commonlyused, algorithms from linear algebra,statistics, and computational geometry.

GraphicsThese interfaces let you write text

and draw on images. In addition to vari-ous fun and creative possibilities, thesefunctions are useful for labeling and mark-ing. For example, if you write a programthat detects objects, it’s helpful to labelimages with their sizes and locations.

GUI methodsOpenCV includes its own window-

ing interfaces. While these are limitedcompared to what can be done oneach platform, they provide a simple,multi-platform API to display images,accept user input via mouse or key-board, and implement slider controls.

Datastructures and algorithmsWith these interfaces, you can

efficiently store, search, save, andmanipulate large lists, collections (alsocalled sets), graphs, and trees.

Data persistenceThese methods provide convenient

interfaces for storing various types ofdata to disk and retrieving them later.

Figure 1 shows a few examples ofOpenCV’s capabilities in action: facedetection, contour detection, and edgedetection.

OrganizationOpenCV’s functionality is con-

tained in several modules.CXCORE contains basic datatype

definitions. For example, the datastructures for image, point, and rectan-gle are defined in cxtypes.h. CXCOREalso contains linear algebra and statis-tics methods, the persistence func-tions, and error handlers. Somewhatoddly, the graphics functions for draw-ing on images are located here, as well.

CV contains image processing andcamera calibration methods. The computational geometry functions arealso located here.

CVAUX is described in OpenCV’s doc-umentation as containing obsolete and

experimental code.However, the sim-plest interfaces forface recognition arein this module. Thecode behind them isspecialized for facerecognition, andthey’re widely usedfor that purpose.

ML contains machine-learninginterfaces

The remaining functionality is con-tained in HighGUI and CVCAM. Both ofthese are located in a directory named“otherlibs,” making them easy to miss.Since HighGUI contains the basic I/Ointerfaces, you’ll want to be sure youdon’t overlook it! It also contains themulti-platform windowing capabilities.

CVCAM contains interfaces forvideo access through DirectX on 32-bitWindows platforms. However, HighGUIalso contains video interfaces. In thisarticle, I’ll cover only the interfaces inHighGUI. They’re simpler to use, andthey work on all platforms. If you’reusing Windows XP or 2000, you mayget a performance boost by switchingto the CVCAM interfaces, but for learning OpenCV, the simpler ones inHighGUI are just fine.

Installing OpenCVBasic Install

OpenCV for Linux or MacOSX ispackaged as a source-code archive.You’ll need to build both static andshared-object libraries. You can eitherbuild an RPM first and install from that,or compile and install it directly.Instructions for doing both are inINSTALL.

The Windows download is pack-aged as an executable that installsOpenCV when you run it. It placesOpenCV files into a directory of yourchoice, optionally modifies your systempath to include the OpenCV binaries,and registers several DirectX filters. Bydefault, it installs to C:/ProgramFiles/OpenCV/<version>.

Customizing a Windows InstallFor Windows users, OpenCV is

easy to install, and the default installa-tion will work. But a bit of advanceplanning may leave you happier withthe results. Here are a few suggestions.

Since OpenCV is a developers’toolkit — not a program — you maywant to locate it somewhere otherthan your Program Files directory. Ifyou do prefer to locate it elsewhere,decide that before you run the installer,and enter that location when asked.

I suggest you also decide — beforeinstalling — how you want Windows tofind the OpenCV dlls. You can eithermodify your system’s PATH variable toinclude their location, or you can movethem, after installing, from OpenCV’s“bin” directory to your SYSTEM_ROOTdirectory.

If you prefer to move the dlls, butaren’t sure where your SYSTEM_ROOTdirectory is, you can locate it by running the sysinfo utility available atwww.cognotics.com/utilities.

If you prefer to modify the PATHrather than moving the dlls, you canhave the installer do that for you by selecting the check box “Add bindirectory to PATH.”

After InstallingThe OpenCV directory contains

several subdirectories. The docs directo-ry contains html documentation for allthe OpenCV functions and datatypes.Since the best documentation is aworking example, you might also wantto browse the “samples” directory.

The header files you’ll need toinclude when you compile programs thatuse OpenCV are distributed among the

SERVO 01.2007 63

FIGURE 2. SelectingOpenCV header filesin Windows to placeinto a single include

directory.

Hewitt1.qxd 12/7/2006 4:56 PM Page 63

Page 64: Servo Magazine - 2007-01

OpenCV modules. Although you don’tneed to do this, I like to gather themtogether into a single include directory.

On both Linux and Windows, youcan locate the headers by searching theinstall directory and subdirectories forfilenames that match the pattern *.h,

*.hpp. There will belots of matches. Youdon’t need all ofthem. Headers for allmodules exceptHighGUI are in separate “include”directories inside eachmodule. You can skipheaders in the “src” directories forthese modules. ForHighGUI, you’ll needhighgui.h, located inotherlibs/highgui.

Programming withOpenCV: Some Basics

More about Headers and LibrariesMost OpenCV programs need to

include cv.h and highgui.h. Later, forface recognition,we’ll also includecvaux.h. Theremaining head-er files are includ-ed by these top-level headers.

If you’ve leftthe header filesin multiple direc-tories (defaulti n s t a l l a t i o n ) ,make sure yourc o m p i l e r ’ sinclude path con-tains these direc-tories. If you’vegathered theheaders into oneinclude directory,make sure thatdirectory is onyour compiler’sinclude path.

Your linkerwill need both

the library path and the names of thestatic libraries to use. The static librariesyou need to link to are cxcore.lib, cv.lib,and highgui.lib. Later, for face recogni-tion, you’ll also link to cvaux.lib. Theseare in OpenCV’s “lib” directory.

Reading and Writing ImagesImage I/O is easy with OpenCV.

Figure 3 shows a complete programlisting for reading an image from file and writing it as a second file, in adifferent compression format.

To read an image file, simply callcvLoadImage(), passing it the filename(line 14). OpenCV supports most commonimage formats, including JPEG, PNG, andBMP. You don’t need to provide formatinformation. cvLoadImage() determinesfile format by reading the file header.

To write an image to file, callcvSaveImage(). This function decideswhich file format to use from the fileextension. In this example, the exten-sion is “png,” so it will write the imagedata in PNG format.

Both cvLoadImage() andcvSaveImage() are in the HighGUI module.

When you’re finished using the inputimage received from cvLoadImage(), freeit by calling cvReleaseImage(), as on line29. This function takes an address of apointer as its input because it does a“safe release.” It frees the image struc-ture only if it’s non-null. After freeing it, itsets the image pointer to 0.

Live Video InputCapturing image frames from a

webcam, or other digital video device,is nearly as easy as loading from file.Figure 4 shows a complete programlisting to initialize frame capture, cap-ture and store several video frames,and close the capture interface.

The capture interface is initialized, online 19, by calling cvCaptureFromCAM().This function returns a pointer to aCvCapture structure. You won’t accessthis structure directly. Instead, you’ll storethe pointer to pass to cvQueryFrame().

When you’re finished using videoinput, call cvReleaseCapture() torelease video resources. As withcvReleaseImage(), you pass the addressof the CvCapture pointer tocvReleaseCapture().

Don’t release or otherwise modify

64 SERVO 01.2007

FIGURE 3. Example program that reads animage from a file andwrites it to a second file in a different compression format.

FIGURE 4. Exampleprogram that captures live videoframes and storesthem as files.

Hewitt1.qxd 12/7/2006 4:56 PM Page 64

Page 65: Servo Magazine - 2007-01

the IplImage you receive from cvQueryFrame()! If you needto modify image data, create a copy to work with:

// Copy the video frameIplImage *pImgToChange =

cvCloneImage(pVideoFrame);

// Insert your image-processing code here ...

// Free the copy after using itcvReleaseImage(&pImgToChange);

Color ConversionsFigure 5 shows code for converting a color image to

grayscale. OpenCV has built-in support for converting to andfrom many useful color models, including RGB, HSV, YCrCb,and CIELAB. (For a discussion of color models, see “TheWorld of Color,” SERVO Magazine, November 2005.)

Note that the conversion function, cvCvtColor(), requirestwo images in its input list. The first one, pRGBImg, is thesource image. The second, pGrayImg, is the destination image.It will contain the conversion result when cvCvtColor() returns.

Because this paradigm of passing source and destinationimages to a processing function is common in OpenCV, you’llfrequently need to create a destination image. On line 25, acall to cvCreateImage() creates an image the same size as theoriginal, with uninitialized pixel data.

How OpenCV Stores ImagesOpenCV stores images as a C structure, IplImage. IPL

stands for Image Processing Library, a legacy from the original OpenCV versions that required this product.

The IplImage datatype is defined in CXCORE. In addi-tion to raw pixel data, it contains a number of descriptivefields, collectively called the Image Header. These include

• Width — Image width in pixels

• Height — Image height in pixels

• Depth — One of several predefined constants that indicate the number of bits per pixel per channel. Forexample, if depth=IPL_DEPTH_8U, data for each pixelchannel are stored as eight-bit, unsigned values.

• nChannels — The number of data channels (from one tofour). Each channel contains one type of pixel data. For exam-ple, RGB images have three channels – red, green, and blueintensities. (These are sometimes called BGR images, becausepixel data are stored as blue, green, then red values.)Grayscale images contain only one channel – pixel brightness.

Accessing Pixel ValuesIt’s possible to create many types of functionality using

OpenCV without directly accessing raw pixel data. Forexample, the face detection, tracking, and recognition pro-grams described later in thisseries never manipulate rawpixel data directly. Instead,they work with image point-

ers and other high-level constructs. All pixel-level calculationsare performed inside OpenCV functions. However, if youwrite your own image-processing algorithms, you may needto access raw pixel values. Here are two ways to do that:

1. Simple Pixel AccessThe easiest way to read individual pixels is with the

cvGet2D() function:

CvScalar cvGet2D(const CvArr*, int row, int col);

This function takes three parameters: a pointer to a data con-tainer (CVArr*), and array indices for row and column location.The data container can be an IplImage structure. The topmostrow of pixels is row=0, and the bottommost is row=height-1.

The cvGet2D()function returns a C structure, CvScalar,defined as

typedef struct CvScalar{

double val[4];}CvScalar;

The pixel values for each channel are in val[i]. Forgrayscale images, val[0] contains pixel brightness. The otherthree values are set to 0. For a three-channel, BGR image,blue=val[0], green=val[1], and red=val[2].

The complementary function, cvSet2D(), allows you tomodify pixel values. It’s defined as

SERVO 01.2007 65

FIGURE 5. Example program for converting acolor image to grayscale.

Hewitt1.qxd 12/7/2006 4:57 PM Page 65

Page 66: Servo Magazine - 2007-01

void cvSet2D(CvArr*, int row, int col,CvScalar);

2. Fast Pixel AccessAlthough cvGet2D() and cvSet2D() are easy to use,

if you want to access more than a few pixel values, and performance matters, you’ll want to read values directly from the raw data buffer, IplImage.imageData.

Image data in the buffer are stored as a 1D array, in row-major order. That is, all pixel values in the first row are listedfirst, followed by pixel values in the second row, and so on.

For performance reasons, pixel data are aligned, andpadded if necessary, so that each row starts on an even four-bytemultiple. A second field, IplImage.widthStep, indicates the number of bytes between the start of each row’s pixel data. Thatis, row i starts at IplImage.imageData + i*IplImage.widthStep.

IplImage.imageData is defined as type char*, so you may

need to cast the data type. For example, if your image data areunsigned bytes (the most common input type), you’d cast eachvalue to unsigned char* before assigning, or otherwise using, it.

If you’re accessing data from a grayscale (single-channel)image, and the data depth is eight bits (one byte per pixel),you’d access pixel[row][col] with

pixel[row][col] = ((uchar*)(pImg->imageData +row*pImg->widthStep + col));

In multi-channel images, channel values are interlaced.Here’s a code snippet to access blue, green, and red pixel values:

step = pImg->widthStep;nChan = pImg->nChannels;// = 3 for a BGR imagebuf = pImg->imageData;

blue[row][col] =((uchar*)(buf + row*widthStep + nChan*col);

green[row][col] =((uchar*)(buf + row*widthStep + nChan*col + 1);

red[row][col] =((uchar*)(buf + row*widthStep + nChan*col + 2);

Finally, if image depth is greater than eight bits (forexample, IPL_DEPTH_32S), you’d need to transfer multiplebytes for each value and multiply the buffer offset by the number of data bytes for your image depth. It’s veryunlikely, however, that you’ll encounter a situation in whichyou must access multi-byte pixel values directly.

Finding HelpIf you have problems installing or using OpenCV, the first

place to turn for help is the FAQ (faq.htm) in your OpenCVdocs directory. The INSTALL file, at the root of your OpenCVdirectory, also contains helpful setup and troubleshootingtips. If these don’t answer your question, you may want topost a query to the official Yahoo! user group. The group’sURL is in the Resources sidebar.

API documentation for each module is in the docs/refsubdirectory. All reference manuals except the one forCVAUX are linked from index.htm, in the docs directory.

Coming Up ...Next month, I’ll show you how to detect faces with

OpenCV and explain the algorithm behind the interface. Beseeing you! SV

66 SERVO 01.2007

Perform proportional speed, direction, and steering withonly two Radio/Control channels for vehicles using two

separate brush-type electric motors mounted right and leftwith our mixing RDFR dual speed control. Used in manysuccessful competitive robots. Single joystick operation: upgoes straight ahead, down is reverse. Pure right or left twirlsvehicle as motors turn opposite directions. In between stickpositions completely proportional. Plugs in like a servo toyour Futaba, JR, Hitec, or similar radio. Compatible with gyrosteering stabilization. Various volt and amp sizes available.The RDFR47E 55V 75A per motor unit pictured above.www.vantec.com

STEER WINNING ROBOTS

WITHOUT SERVOS!

Order at (888) 929-5055

Sourceforge sitehttp://sourceforge.net/projects/opencvlibrary

Official OpenCV usergrouphttp://tech.groups.yahoo.com/group/OpenCV

OpenCV Wikihttp://opencvlibrary.sourceforge.net

Source code for the program listings in this article are availablefor download at www.cognotics.com/opencv/servo.

Resources

Robin Hewitt is an independent software consultant working inthe areas of computer vision and robotics. She has worked as aComputer Vision Algorithm Developer at Evolution Robotics andis a member of SO(3), a computer-vision research group at UCSan Diego. She is one of the original developers of SodaVision, anexperimental face-recognition system at UC San Diego.SodaVision was built with OpenCV.

About the Author

Hewitt1.qxd 12/7/2006 4:57 PM Page 66

Page 67: Servo Magazine - 2007-01

SERVO 01.2007 67

Happy New Year, robot builders! The 2007 contestdates are beginning to roll in as more organizations finalizetheir plans for the new year.

Know of any robot competitions I've missed? Is yourlocal school or robot group planning a contest? Send anemail to [email protected] and tell me about it. Be sure toinclude the date and location of your contest. If you have awebsite with contest info, send along the URL as well, so wecan tell everyone else about it.

For last-minute updates and changes, you can alwaysfind the most recent version of the Robot Competition FAQat Robots.net: http://robots.net/rcfaq.html

— R. Steven Rainwater

JJJaaannnuuuaaarrr yyy 222000000777

16-19 Singapore Robotic GamesRepublic of SingaporeLots of events including wall climbing, pole balancing, Micromouse, sumo, legged robot races,robot soccer, and more.http://guppy.mpe.nus.edu.sg/srg

20 Robot Sumo in DCWashington, DCThe name says it all. This is a robot sumo contestheld in Washington, DC.www.societyofrobots.com/sumo_robots_in_DC.shtml

26-28 TechfestIndian Institute of Technology, Bombay, IndiaMicromouse and two other events with the intrigu-ing names of SNAP and Full Throttle: Afterburn.www.techfest.org

FFFeeebbbrrruuuaaarrr yyy

1-4 RobotixIIT Khargpur, West Bengal, IndiaA national-level competition. Events includeFastrack Manual, Fastrack Auto, and Softandroid.http://gymkhana.iitkgp.ac.in/robotix

26 APEC Micromouse ContestAnaheim, CAOne of the best-known micromouse competitions

in the United States. Expect to see some veryadvanced and fast micromouse robots.www.apec-conf.org

MMMaaarrrccchhh

3 RoboWarsMontreal, CanadaSumo and BEAM Solaroller events.www.robowars.ca

9-10 AMD Jerry Sanders Creative Design ContestUniversity of Illinois at Urbana-Champaign, ILCheck the website for the details of this year's contest.http://dc.cen.uiuc.edu

9-10 National Robotics ChallengeVeterans Memorial Coliseum, Marion, OHIn addition to Sumo and maze solving events, thisstudent competition includes two unusual ones: arobotic workcell event and a pick-and-place event.www.nationalroboticschallenge.org

10 CIRC Central Illinois Bot BrawlPeoria, ILIncludes several classes of autonomous sumo andremote-control vehicle destruction.www.circ.mtco.com

17-18 Manitoba Robot GamesWinnipeg, Manitoba, CanadaEvents may include both Japanese and Westernstyle sumo, mini-tractor pull, and Atomic Hockey.www.scmb.mb.ca

31 Penn State Abington Fire-Fighting Robot ContestPenn State Abington, Abington, PARegional for the Trinity Fire Fighting contest.www.ecsel.psu.edu/~avanzato/robots/contests/outdoor/contest05.htm

31 Penn State Abington Mini Grand ChallengePenn State Abington, Abington, PAAutonomous outdoor ground robots must navigate onand off-road around the campus, avoiding obstacles.www.ecsel.psu.edu/~avanzato/robots/contests/outdoor/contest05.htm

Send updates, new listings, corrections, complaints, and suggestions to: [email protected] or FAX 972-404-0269

Events.qxd 12/6/2006 11:23 AM Page 67

Page 68: Servo Magazine - 2007-01

Tetsujin — the ultimate robotcompetition. When we buildother robots, we’re always

putting out time, money, and effortsinto the projects. More often than not,we put our souls into the project. Buthow often do we put ourselves into theproject? I mean that literally. No onewould enter a combat robot arena, orrisk riding in a Grand Challenge vehicle.But Tetsujin takes it to the ultimate —man and machine become one.

And to what end? Is this just some-thing that we do as yet another robotcompetition? Something that’s fun andcan win us medals or cash? Or is itsomething more? Something that cantruly benefit man.

Not only could the ultimateTetsujin suit make you look likeSigourney Weaver in Alien and helpyou move those shipping containersaround the room, but the ultimateTetsujin suit can truly advance man.How many crippled people could getout of a wheelchair and back to stand-ing in line at the supermarket?Running to catch the bus? That’s what Monty Reed of “They Shall Walk”had in mind when he started buildingwalking suits.

Monty was injured in a parachuteaccident, and the threat of never walking again was very real. Thanks toresearch and hard work on his part, he

did learn to walk again, but the dreamof mechanically assisted walking liveson. At last year’s RoboGames, Montytook up not only the weightlifting challenge of Tetsujin, but also thewalking challenge.

To the untrained eye, it appearedas though Monty was just walkingaround the arena with a bunch ofmetal and tubes surrounding him. Yethis stomping and jumping were alldone with the suit. The dream is not faroff! The mechanics of making a ROBO-one walk and helping the lame walkare essentially the same problems —the major difference being that thebones of the lame become part of thesupport structure along with the metal,and the motors are outside the skeleton rather than in it.

Ah, but what’s this got to do withRoboGames? Well, it’s one of the premier events! Broken up into threestages — weightlifting, walking, anddexterity — Tetsujin is SERVO’s ownrobot event.

Much too expensive, you think?Well, Alex Sulkowski — winner of thefirst $25,000 Tetsujin challenge —bought all the parts for his suit for$1,100. “Many parts were boughtcheaply on eBay,” says Alex. That’scheaper than the cost of the averagemiddleweight combat robot. BryanHood, who was a high school student

during the first competition, said “oursuit cost roughly $2,000. Because ofthe simplicity of the suit, there wereonly three major purchases. Theseincluded the pneumatics, the chromolysteel tubing, and an air tank. ClippardPneumatics sponsored 50% of thepneumatics cost for our team.” If ahigh school student can do it, so can you.

“The hardest thing about buildinga Tetsujin suit is it requires understand-ing and integrating multiple disciplines(mechanical engineering, electricalengineering, bio-medical engineering)while being extremely careful so thatyou do not get hurt,” said Alex. “Mostof us understand one or two of these,but few are masters at all three. This iswhere team members who comple-ment your skills come in handy. Themost difficult aspect of building a suitis the control system that commandsthe mechanical suit based on yourmovement. The three main choices for powering a suit are electrical, pneumatic, and hydraulic. Each onehas major pros and cons that impactthe control system. On top of that, afailure in the control system can resultin major damage to your body.”

Bryan adds, “Time, money, andknowledge just about sum it up. As Irecall, I spent only about two weeksactually building the suit and several

68 SERVO 01.2007

ROBOGAMESPREP:

Tetsujin! SERVO’s Original Robot Challenge

by Dave Calkins

Calkins.qxd 12/7/2006 1:36 PM Page 68

Page 69: Servo Magazine - 2007-01

SERVO 01.2007 69

“Not only could theultimate Tetsujin suit make

you look like SigourneyWeaver in Alien and helpyou move those shipping

containers around the room,but the ultimate Tetsujin suitcan truly advance man.”[ ]

Calkins.qxd 12/7/2006 1:46 PM Page 69

Page 70: Servo Magazine - 2007-01

months planning, researching, andfinding parts.” Two weeks to build asuit – and here you have six months to get ready for the June 2007 competition.

“As a 17-year-old kid at the time, Ireally didn’t know what I was doing,nor did I have a lot of capital available.All I had was my hobbyist knowledgeand whatever calculus and physics Ihad learned in high school. I had noCAD software so I had to be very care-

ful designing things. The entire projectwas done in my garage with only basictools and a Sherline milling machine. Ihad just about everything workingagainst me and I still believe it was amiracle that the suit worked at all.” Butit did work! Think what Bryan will beable to do next time.

If you’re worried about control,you should be. Both Bryan and Alexmake the point that balance and controls are crucial. “Without good

controls, it is very difficult to attain balance which is the biggest problemthat I faced in the competition,” saysBrian. “My suit lost balance on severaloccasions throughout the competitionwhich was a pretty scary experience.”

Alex adds, “Most people focustheir attention on the mechanicsbecause that is the area they are most comfortable with. They ignorethe control system which can be verycomplex.”

“The coolest part of the suit wasthat the control system read the electrical signals directly from my muscles and controlled the pneumaticsuit based on these signals. Thisresulted in my muscles receiving assistance from the suit ‘on demand’(as my muscles required more assistance, the pneumatic systemwould deliver more assistance to themuscles that required it).”

Like all robots, failures are boundto happen while building your suit.Although Alex had tested all of thecomponents of the suit, he did not leave enough time to test all components of the suit together. Hispneumatic hose connections devel-oped leaks because they were notproperly fastened, and he ended uplosing air pressure. This resulted in himnot being able to complete the walkingcompetition at RoboGames 2006.

Start simple and enhance as yousucceed. As Alex says, “In the originalTetsujin competition and in Robo-Games 2006, I talked to many peoplewho were interested in competing.Most of them had grand ideas thatsounded really cool but I have neverseen one of them work. Start withsmall successes and build from there.”

But just building a suit is success in itself. Bryan says, “to this day, I con-tribute more and more of my success[in life] to the Tetsujin competition. Itwas amazing to finally get the suitworking the morning of the competi-tion and to get up on the platform infront of hundreds of people to performthe lifts. That was the instant successbut it was only a taste of what was tocome. As I was only a high school junior at the time of the competition, I

70 SERVO 01.2007

ROBOGAMES Prep

● Suit can be up to three meters (9.84feet) in height and cannot exceed 1.5meters (4.92 feet) in diameter.

● Challenge 1 — Ascend stairs inyour suit to the lifting platform andlift a load of from 100 to 1,000 lbsfrom a squatting position to a heightof at least 24 inches, return the load to the ground in a controlledmanner, and descend the stairs.Stair-climbing may be unpowered.The winner is the competitor wholifts the largest weight.

● Challenge 2 — Dexterity. Stack nineconcrete cylinders weighing ~70pounds each in a 4-3-2 verticalarrangement. The winner is the competitor who arranges the cylinders in the shortest time.

● Challenge 3 — Walking Race. Walkthe challenge course carrying a loadin the shortest time. A time bonus isgranted based on the load carried.

● The operator must be inside thesuit in order to operate it.

● The suit must provide sufficientarticulation in the powered components to track the movementsof the human operator to meet thechallenge.

● Movement of the suit’s poweredcomponents must be initiated by —and track — the movements of the

human operator (e.g., to make thesuit squat, the operator squats; tolift a load with the suit arms, theoperator’s arms make the necessarylifting motions). This can be as simpleas micro-switches and limit switchesor as complex as closed-loop servocontrol and bio-electric sensors.

● All power for the exoskeleton andany required support systems mustbe provided by a self-contained system. The system may incorporateremote components connected viaa tether, wireless link, etc.

● The tasks(s) must be accom-plished by powered elements that are an integral part of theexoskeleton in response to the operator’s movements. Externaldevices such as winches, supportframes, jacks, etc., are not allowed.

● The exoskeleton must be able tobalance and support itself, the operator, and the load without theuse of outriggers, auxiliary braces,etc., other than its own legs and feet.A fixed base is allowed for theCylinder Stacking challenge.

● Stored mechanical energy devicessuch as springs, torsion bars, gasstruts flywheels, etc., are all allowed.

● The exoskeleton shall have aremovable power link that disablesall operation.

TETSUJIN RULES

Calkins.qxd 12/7/2006 1:38 PM Page 70

Page 71: Servo Magazine - 2007-01

SERVO 01.2007 71

used my Tetsujin experience to help meget an internship at KIVA Systems, arobotics start-up company in MA whichis revolutionizing warehouse robotics. Icontinued working on robotics projectsthrough my senior year. All of thisresulted in me getting the LombardiScholarship at the University of Florida.This scholarship pays all of my expenses and more, as well as sendingme abroad to Mexico, Greece, Japan,and South Africa each summer. The

scholarship also gives me a mentor,which will be very helpful for my futurerobotic endeavors. Now here at theUniversity of Florida, I am working on adouble major in Electrical andMechanical Engineering. My experi-ence in Tetsujin got my foot throughthe door and the success keeps build-ing on itself. I look back at what I knewthen and compare it to what I knownow and I realize that I have come sucha long way. I don’t know how it could

have worked out better.”And that’s the way it is with all

robots you build. Many people startout building them to win a competition, but along the way realizethat it’s not just about winning — it’sabout making the best robot you canmake. It’s about expanding yourknowledge of how both mechanicsand electronics work.

And of course, winning a medaldoesn’t suck either. SV

Calkins.qxd 12/7/2006 1:48 PM Page 71

Page 72: Servo Magazine - 2007-01

Request a Free Sample Today

Robotics ShowcaseRobotics Showcase

Ask for our FREE 96 page catalog

VISIT OUR ONLINE STORE ATwww.allelectronics.comWALL TRANSFORMERS, ALARMS,FUSES, CABLE TIES, RELAYS, OPTOELECTRONICS, KNOBS, VIDEOACCESSORIES, SIRENS, SOLDERACCESSORIES, MOTORS, DIODES,HEAT SINKS, CAPACITORS, CHOKES,TOOLS, FASTENERS, TERMINALSTRIPS, CRIMP CONNECTORS,L.E.D.S., DISPLAYS, FANS, BREAD-BOARDS, RESISTORS, SOLAR CELLS,BUZZERS, BATTERIES, MAGNETS,CAMERAS, DC-DC CONVERTERS,HEADPHONES, LAMPS, PANELMETERS, SWITCHES, SPEAKERS,PELTIER DEVICES, and much more....

ORDER TOLL FREE1 - 8 0 0 - 8 2 6 - 5 4 3 2

THOUSANDS OF ELECTRONICP A R T S A N D S U P P L I E S

Showcase - Menagerie Jan07.qxd 12/7/2006 10:03 PM Page 72

Page 73: Servo Magazine - 2007-01

SERVO 01.2007 73

Wacky SSuper SSpider

Vern Graner, CNE/CNA/SSE is a Senior Systems Engineer

at Texas Information Services. This super spider is just one

of many of his builds.

Showcase - Menagerie Jan07.qxd 12/7/2006 10:08 PM Page 73

Page 74: Servo Magazine - 2007-01

Digital logic depends upon theproper timing relationshipsbetween signals for correct

operation. In this part, we will examinevarious techniques for changing the fre-quency and/or period of a given signalbecause many designs require one ormore clocks with frequencies that arenot directly available. These approachescan be used for general frequency synthesis but have wider applications.Additionally, while the approach will beoriented towards programmable logicsolutions, these ideas can be imple-mented with discrete logic, as well.

Frequency DivisionThe simplest and most basic

method for reducing a frequency iswith a simple flip-flop. Figure 1 showsthis. This circuit divides the incomingfrequency by two. Additionally, theoutput is a perfect square wave. Thesignal is high for precisely 50% of thetime and low for precisely 50% of thetime. This is often a useful feature.

Note that the frequency is theinverse of the period and the period of asignal is measured in time. Typically, oneperiod of some signal is used as a digitaltimer. So, by changing the frequency,the timing is also changed. This discussion will concentrate on frequencymodification, but it is important to seethat this also applies directly to timing.

The circuit shown in Figure 1 isseverely limited. It only divides by two.Additional stages can be added to furtherdivide the signal (shown in Figure 2). Thisis a simple binary ripple counter. Eachstage reduces the frequency by a factor oftwo or precisely one octave. This providesa little more utility but is not really muchof an improvement. However, if your mainclock is a power of two, this can provideuseful and convenient timing intervals. Forexample, a 32,768 Hz watch crystal willprovide precise one-second signals if 15divide-by-two flip-flops are used. (Youmight also choose to use a 4.096 MHzcrystal for your design instead of the morestandard 4.000 MHz crystal for a similarreason. There is no engineering rule that

says that you have to makethings difficult for yourself.)

A more useful design isthe divide-by-N circuit. This willdivide by any integer that isless than the maximum valueof the counter. Figure 3 showsa four-bit binary counter wiredas a divide-by-10. Under nor-mal circumstances, the count-er would divide by 16, but the

The goal of this

bimonthlycolumn is to

provide a basic understandingof the various

programmablelogic techniques.

There are a lot of powerful

low-cost components

available todaythat are rarelyconsidered by

hobbyists — andeven some

engineers —because of

unfamiliarity.

You have to becomfortable

with the ideaand concepts of

programmablelogic before youwill be likely toemploy them.

Programmable Logic:✓✓ by Gerard Fonte

Dividers and Timers

74 SERVO 01.2007

FIGURE 1. The simplest divider isa flip-flop that reduces the inputfrequency by two.

ProgrammableLogic.qxd 12/6/2006 11:59 AM Page 74

Page 75: Servo Magazine - 2007-01

counter is automatically reset when 10counts are registered (note that zero isone of the counts). It is also importantto realize that many different types ofcounters can be used here, but the con-cept is the same. (Refer to the previousarticle on counter types in this column.)

The operation is straightforward.The circuit counts normally for 10counts. At the start of the 11th count,the output of the AND gate immediate-ly goes high and resets the counter to0000. The AND gate output also goesto zero when these bits change. In fact,the output of the AND gate is an

extremely narrow pulse that is relatedto the propagation speed of the circuit.Often, this pulse is less than 10 nS andcan be difficult to observe. The pulse isexaggerated in the figure for clarity.

There are several points concerningthe decoding of the outputs. An ANDgate will function properly without anyglitches as long as it is used to reset theripple-counter to zero. However, anAND gate used to decode state nine ofa 16 state ripple-counter will showglitches on some state changes beyondnine. (The ripple delay is not as significant a factor as it was for the

counters discussed the last time.)With programmable logic devices,

the routing of the decode and resetlines can cause problems. Not all of thebits may be reset properly. In this case,either use a synchronous counter designor else use a separate reset flip-flop thatproduces a predictable-length pulse.

These divide-by-N circuits can also becascaded to create any integer division.Figure 4 shows a divide-by-1,005 circuit(with a flip-flop reset). The operation isn’tas complicated as it first appears. Thereare three cascaded divide-by-10 countersthat are basically the same as Figure 3.

e

SERVO 01.2007 75

FIGURE 2. Simpled i v i d e - by - t wo circuits can becascaded forbinary division.This is a divide-by-eight circuit.

FIGURE 3. Dividing by N is a matter of choosing theproper bits to AND togetherto reset the counter. In thiscase, the counter divides by10. The reset pulse is greatlyexaggerated. It’s really onlya few nS long.

ProgrammableLogic.qxd 12/6/2006 11:59 AM Page 75

Page 76: Servo Magazine - 2007-01

This means that the second counter isactually counting 10s of counts and thethird is counting 100s of counts. After1,000 counts, the reset pulse turns on aflip-flop that enables the main input clockto pass through to a divide-by-five count-er. This counts five additional pulses pastthe already completed 1,000 pulses.

After these five pulses are complet-ed, another flip-flip is turned on. Thisgenerates a controlled “master reset”

pulse. Since the counter counts on thenegative-going edge of the input clock,the reset to this flip-flop is low when itis clocked. It will remain low for half ofa full input clock signal. When the maininput clock goes high, the master resetpulse goes low because the controllingflip-flop is reset. The master reset alsoresets all the other counters via the ORgates. (Each divide-by-10 counter couldhave incorporated its own flip-flopreset, if desired.) Also note that thedelay of the circuit (as measured by themaster reset signal) is only the divide-by-five circuit. The ripple delays throughthe divide-by-10 counters are not a fac-tor. Note that the master reset flip-flop

and the enable flip-flop are clocked ona rising edge rather than a falling edge.

Unfortunately, the division is a fixedvalue. The only way to change this is tochange the reset decoding. This is cer-tainly possible but it requires additionalresources. Figure 5 illustrates a basic pro-grammable divide-by-N circuit. The XNOR(exclusive NOR) gates go high when the“program” input matches the bit output.When all of the XNOR gates are high, thecount is correct and the circuit is reset.

There are many variations on this. Inparticular, a flip-flip reset would be veryuseful (as shown in Figure 4). Anotherpoint is that all of these divide-by-Ndesigns create an asymmetrical output

76 SERVO 01.2007

FIGURE 4. This circuit uses three cascaded divide-by-10 circuits to divideby 1,000. When this occurs, a secondcounter is enabled that counts five moremain clock cycles and then resets everyflip-flop. The result is a divide-by-1,005counter. Note that the reset flip-flip provides a half-clock pulse.

ProgrammableLogic.qxd 12/6/2006 11:59 AM Page 76

Page 77: Servo Magazine - 2007-01

(except for special cases). Most typicallythe output is a relatively small pulse.However, often something approaching50% can be obtained for non-program-mable dividers by choosing the propercounter bit as the “output.” For exam-ple, in the divide-by-10 circuit (Figure 3),bit 3 is on for 40% of the time.

One way to eliminate this is to followthe divide-by-N circuit with a simple flip-flop to square the output (as notedabove). This works but has two draw-backs. The first is fairly obvious — the fre-quency is now reduced by 50%. Thus, theprimary division ratio must be changed tocompensate for this. The second problemis a bit more subtle. The addition of thesquaring flip-flop limits the division valuesto even numbers. It becomes impossibleto provide a final division ratio that is odd.

This makes more sense when exam-ined from a mathematical perspective.These divider circuits have the effect of multiplying the period by an integer.The final “squarer” flip-flop multiplies thefinal result by two. Therefore, the finalresult must be even because everythingmultiplied by two is an even number.

It is possible to create symmetricalwaveforms with odd-division ratios butit requires additional resources.Basically, an extra flip-flop alternativelyadds and subtracts half of a clock to theoutput. This evens out the asymmetricalsignal and creates a nice square wave.

FrequencyMultiplication

The typical method for frequency

multiplication is with the use of a phase-locked loop (PLL). This is an analog technique that is not usually availablefor programmable logic. Digital design-ers tend to shy away from analog PLLs,as well. This is regrettable because thePLL has a lot of nice applications and is not really that difficult to master.Unfortunately, a proper discussion ofPLLs is too long to include here. Thereare other analog frequency multiplica-tion techniques besides PLLs, as well.

The typical method of frequencymultiplication for digital designers is touse an XOR gate (exclusive OR). Thisgate has a high output when theinputs are different and has a low output when the inputs are the same.Figure 6 provides a simple circuit todouble an input signal. The operation isfairly clear. The input signal is delayedin some manner. This can be done byusing the internal propagation delaythrough additional gates, internal routing delays, or an external resistor-

capacitor (RC) network. The result is apulse at the start and end of the inputsignal. The pulse length is exactly equalto the time interval of the delay circuit.

There are a number of issues withthis approach. The first is that the outputis usually a very narrow pulse of a fewns. This means that high-speed concernswill have to be examined. If a high-speedinput signal is used, say 40 MHz or so(the most common situation), the outputwill often be at a frequency where transmission line factors will becomeimportant. Short delay times (about 10nS) create the equivalent of a 100 MHz

SERVO 01.2007 77

FIGURE 5. A programmable divider usesXNOR gates to match the bit outputs tothe desired values. When all the bitsmatch, the counter is reset. Note that the “program” bits do not have to beswitches. Other flip-flops or logic circuitscould be used.

FIGURE 6. An input frequency can be doubled with an XOR gate and a delay.The output will be a pulse at the leadingand trailing edges of the input signal. Thepulse width will equal the delay.

ProgrammableLogic.qxd 12/6/2006 11:59 AM Page 77

Page 78: Servo Magazine - 2007-01

signal and again, transmission line con-siderations will be required. This is nottoo much of a concern with programma-ble logic chips where the internal pathlengths are very short. However, it is veryimportant with discrete designs.

Another problem with this approachis the variation of the delay circuit. Atemperature shift can cause a significantchange in the output if an internal delayis used. This is because the internalspeed of the gates and routing resourceschanges considerably with temperature.This is especially true with CMOS circuits.It is possible that an XOR frequency doubling circuit cannot be guaranteed towork over a given temperature range.Operation speed also depends upon thepower supply voltage. However, this isusually a second order considerationbecause most systems today regulate thepower quite well. But, if batteries areused, this becomes an issue.

The external RC delay can generallybe made to be reasonably stable overtemperature. But because of straycapacitance, the delay must be relativelylarge. External stray capacitance usuallyvaries more from unit to unit rather thanwith temperature and is often in the 10pF range. Good layout can reduce this toa few pF. Also, because the delay is nowoff-chip, it is more susceptible to noise.

Of course, the tolerances of these com-ponents must be considered too.

Average FrequencyDivision

Sometimes the instantaneous fre-quency is not as important as the average frequency. If so, then there isanother approach that allows fractionalfrequency division to arbitrary precision.Suppose you need a 4.5 MHz clock andonly have a 10 MHz clock. If you divide10 MHz by two, you get 5 MHz. If youdivide it by three, you get 3.3333 MHz.What you really need is to divide by2.2222. But it’s not obvious how to dothat. The solution is to alternate betweendividing by two and dividing by three.

The value needed is closer to a division by two than a division by three.If the 10 MHz signal was divided bytwo twice as often than being dividedby three, what would the result be?There would be two 5 MHz cycles andone 3.333 MHz cycle. The average frequency of these four cycles is 4.444MHz. This is an error of about 1.2%.This is certainly much closer to thedesired value than is 5.0 MHz (error of10%) or 3.3333 MHz (error of 35%).This can be further refined as necessaryby adjusting the division ratios as need-

ed. In theory, this approach will allowyou to close in on your desired fre-quency to whatever accuracy you need.

This idea is based on the mathematical principle that any ration-al number can be expressed by theratio of two integers. In this case, thefraction is 2.2222. The easiest availableintegers are two and three. It becomesclear that it is possible to take a certainnumber of twos and threes such thattheir average becomes 2.2222.

The quick and dirty way to deter-mine the proper ratio is by trial-and-error with the two division values thatbracket the desired value. Start with oneof each and determine the average. Inthis case, 5 MHz and 3.3333 MHz aver-age to 4.166 MHz. This is lower thanthe target value of 4.5 MHz so addanother 5 MHz cycle. Two 5 MHz cyclesand one 3.333 cycle average to 4.444MHz. If this is not accurate enough,continue adding a 5 MHz cycle if theresult is below 4.5 MHz and add a3.333 MHz cycle if the result is above4.5 MHz. The result will dither aroundthe value you want. Eventually, you willreach a value that is as close as youchoose. As you can see from Table 1, anexact solution occurs with seven cyclesof 5 MHz and 3 cycles of 3.3333 MHz.

Figure 7 provides a block diagramcircuit for the “perfect” solution. I choseto alternate between the different division circuits todistribute the vari-ations over the full

78 SERVO 01.2007

5 MHz Cycles 3.3333 MHz Cycles MHz Sum Average of Cycles % Error

1 1 8.3333 4.1666 -7.408

2 1 13.3333 4.4444 -1.236

3 1 18.3333 4.5833 +6.172

3 2 21.6666 4.3333 -3.704

4 2 26.6666 4.4444 -1.236

5 2 31.6666 4.5238 +0.5289

5 3 35.0000 4.3570 -3.178

6 3 40.0000 4.4444 -1.236

7 3 45.0000 4.5000 0.0000

TABLE 1. Making 4.5 MHz from 10 MHzusing two different dividers. If the average frequency is too low, add acycle of the higher frequency and viceversa. Eventually, the result will be asclose to the proper value as needed. Inthis case, the exact frequency (4.5000MHz) is achieved.

FIGURE 7. Withtwo simple coun-ters, a frequencyaveraging circuitwill allow mostany output divi-sion ratio. In thiscase, the inputfrequency is10.0000 MHz andthe output fre-quency averages4.5000 MHz for adivision ratio of2.2222. The out-put consists ofseven 5 MHzcycles and three3.3333 MHz cycles.

ProgrammableLogic.qxd 12/6/2006 11:59 AM Page 78

Page 79: Servo Magazine - 2007-01

10 cycles. It is certainly possible to use seven consecutive 5 MHZcycles followed by three consecutive 3.3333 MHz cycles. Thedesign might be marginally easier.

Whichever approach is selected, an additional counterand number of additional gates is needed. With this example, a total of 10 flip-flops is required. This uses five ofthe Xilinx 3000-series CLBs (Configurable Logic Blocks). But itsaves an extra crystal and two capacitors which reduces costand size and improves the reliability. Additionally, the outputis perfectly synchronized with the input clock. There is noconcern about frequency drift between the clocks.

You don’t have to use divisions by two and three. Anytwo values can be incorporated as long as one is greater thanand one is less than the target. You can use three values ormore. However, using the closest integer values creates the least amount of variability in the output signal. And, realistically, this approach works best if the ratios are small.(A ratio of 1,077 to 1,993 may make the output signal perfect, but it’s going to be impractical to implement.)

ConclusionThere are a number of ways to change the frequency of

a signal. Some are simple and direct, while others are morecomplicated and subtle. The approaches presented here arenot exhaustive but represent the majority of typical applica-tions. Being able to control the frequency and timing of yourdesign is useful and important. SV

SERVO 01.2007 79

ProgrammableLogic.qxd 12/6/2006 12:03 PM Page 79

Page 80: Servo Magazine - 2007-01

We accept VISA, MC, AMEX, and DISCOVERPrices do not include shipping and

may be subject to change.

The SERVO StoreMind Candy

For Today’sRoboticist

LEGO MINDSTORMS NXTHacker's Guideby Dave Prochnow

Here is an awesomenext-generation collec-tion of LEGO MIND-STORMS projects thatenables you to buildand program a realworking robot in just30 minutes! New tech-nologies and expand-ed sensor capabilitiesmake it easier thanever to add a level of sophistication torobotic and architectural creations. This cutting-edge guide describes new advancesthat make LEGO MINDSTORMS NXT such agreat robotics resource. The book explainsthe all-new NXT intelligent brick ... the inter-active servo motors with rotation sensorsthat align speed for precise control ... theultrasonic sensor that allows robots to “see”by responding to movement ... the improvedlight and touch sensors that let robots detectcolor and feel ... and much more. $24.95

CNC Roboticsby Geoff Williams

CNC Robotics givesyou step-by-step,illustrated directionsfor designing, con-structing, and testinga fully functional CNCrobot that saves you80 percent of theprice of an off-the-shelf bot — and thatcan be customized to suit your purposesexactly, because you designed it. Written byan accomplished workshop bot designer/builder, this book gives you all the information you’ll need on CNC robotics!$34.95

PIC Basic Projectsby Dogan Ibrahim

Covering the PICBASIC and PIC BASICPRO compilers, PICBasic Projects pro-vides an easy-to-usetoolkit for developingapplications with PICBASIC. Numeroussimple projects giveclear and concreteexamples of how PICBASIC can be usedto develop electronics applications, whilelarger and more advanced projects describeprogram operation in detail and give usefulinsights into developing more involvedmicrocontroller applications. $29.95

The Official RobosapienHacker's Guideby Dave Prochnow

The Robosapien robotwas one of the mostpopular hobbyist giftsof the 2004 holidayseason, selling approxi-mately 1.5 million unitsat major retail outlets.The brief manualaccompanying therobot covered onlybasic movements and maneuvers — therobot's real power and potential remainundiscovered by most owners — until now!This timely book covers all the possibledesign additions, programming possibilities,and "hacks" not found anyplace else. $24.95

NNEEW!W!

NNEEW!W!

TroubleshootingElectronic Equipment

by R. S. KhandpurFrom cell phones tomedical instrumentsto digital and micro-processor basedequipment, thishands-on, heavily illus-trated guide clearlyexplains how to trou-bleshoot, maintain,and repair all types ofelectrical equipment.The author covers all the essentials such asnecessary tools, soldering techniques, test-ing, fundamental procedures, and mechani-cal and electrical components. $49.95

Robot Builder's BonanzaThird Edition

by Gordon McComb / Myke PredkoEverybody's favoriteamateur robotics bookis bolder and betterthan ever — and nowfeatures the field's"grand master" MykePredko as the newauthor! Author duoMcComb and Predkobring their expertise tothis fully-illustrated robotics "bible" toenhance the already incomparable contenton how to build — and have a universe offun — with robots. Projects vary in complexi-ty so everyone from novices to advancedhobbyists will find something of interest.Among the many new editions, this bookfeatures 30 completely new projects! $27.95

SERVO CD-RomAre you ready forsome good news?Along with the first14 issues of SERVOMagazine, all issuesfrom the 2005 calendar year arenow available, aswell. These CDsinclude all ofVolume 1, issues 11-12, Volume 2, issues 1-12,and Volume 3, issues 1-12, for a total of 26issues all together. These CD-ROMs are PCand Mac compatible. They require AdobeAcrobat Reader version 6 or above. AdobeAcrobat Reader version 7 is included on thediscs. $24.95 – Buy 2 or more at $19.95each!

80 SERVO 01.2007

Practical Electronicsfor Inventorsby Paul Scherz

This intuitive, applica-tions-driven guide toelectronics for hobby-ists, engineers, and stu-dents doesn't overloadreaders with technicaldetail. Instead, it tellsyou — and shows you — what basic andadvanced electronicsparts and componentsdo, and how they work. Chock-full of illustra-tions, Practical Electronics for Inventorsoffers over 750 hand-drawn images that provide clear, detailed instructions that canhelp turn theoretical ideas into real-life inventions and gadgets. $39.95

50 Model Rocket Projectsfor the Evil Geniusby Gavin D. J. Harper

Yes, as a matter of fact,it IS rocket science!And because this bookis written for the popu-lar Evil Genius format,it means you can learnabout this fascinatingand growing hobbywhile having run creating 50 great projects. You will find adetailed list of materials, sources for parts,schematics, and lots of clear, well-illustratedinstructions. $24.95

NNEEW!W!

NNEEW!W!

BookstoreJan07.qxd 12/6/2006 11:24 AM Page 80

Page 81: Servo Magazine - 2007-01

Check out our online bookstore at www.servomagazine.com for a completelisting of all the books that are available.

To order call 1-800-783-4624 or go to ourwebsite at www.servomagazine.com

Linux Roboticsby D. Jay Newman

If you want your robotto have more brainsthan microcontrollerscan deliver — if youwant a truly intelligent,high-capability robot —everything you needis right here. LinuxRobotics gives youstep-by-step directionsfor "Zeppo," a super-smart, single-board-powered robot that can be built by anyhobbyist. You also get complete instructionsfor incorporating Linux single boards intoyour own unique robotic designs. No pro-gramming experience is required. This bookincludes access to all the downloadableprograms you need, plus complete trainingin doing original programming. $34.95

SERVO 01.2007 81

SERVO Magazine T-ShirtsGet your very own limited-edition SERVO Magazine T-shirt. Shirts come

in sizes S, M, L, and XL, and are available in either black or white. All shirts are 100% pre shrunk cotton.

$20 each$20 each15% of15% off if youf if you

buy two obuy two orr

momore.re.

From HomoSapien to RoboSapien Before R2D2 there was R1D1

Robot Builder's Sourcebookby Gordon McComb

Fascinated by theworld of robotics,but don’t know howto tap into the incred-ible amount of infor-mation available onthe subject? Cluelessas to locating specificinformation on robot-ics? Want the names,addresses, phonenumbers, and websites of companies thatcan supply the exact part, plan, kit, buildingmaterial, programming language, operatingsystem, computer system, or publicationyou’ve been searching for? Turn to RobotBuilder’s Sourcebook — a unique clearing-house of information for that will open2,500+ new doors and spark almost as manynew ideas. $24.95

Mind CandyFor Today’sRoboticist

Nuts & Volts CD-RomHere’s some goodnews for Nuts &Volts readers!Along with all 12issues of Nuts &Volts from the2004 calendaryear, the 2005issues are nowavailable, as well.These CDs include all of Volumes 25 and 26,issues 1-12, for a total of 24 issues (12 oneach CD). These CD-ROMs are PC and Maccompatible. They require Adobe AcrobatReader version 6 or above. Adobe AcrobatReader version 7 is included on the discs.$24.95 – Buy 2 or more at $19.95 each!

123 Robotics Experimentsfor the Evil Genius

by Myke PredkoIf you enjoy tinkering inyour workshop andhave a fascination forrobotics, you’ll havehours of fun workingthrough the 123 experi-ments found in thisinnovative projectbook. More than justan enjoyable way tospend time, theseexciting experiments also provide a solidgrounding in robotics, electronics, and pro-gramming. Each experiment builds on theskills acquired in those before it so you devel-op a hands-on, nuts-and-bolts understandingof robotics — from the ground up. $25.00

Take This Stuff and Hack It!by Dave Prochnow

Transform commonhousehold items intoreally cool stuff. Youdon't need to be anelectronics genius toget started turningeveryday items intohigh-performing won-ders. With how-to guruDave Prochnow's step-by-step directions andfully illustrated plans, even beginners canhack their way to a high-tech home, coolertoys, and less yard work. Certain to fire yourimagination and start you plotting new, origi-nal, and even more creative wonders youcan make from ordinary household items,Take This Stuff and Hack It! is the perfect giftfor your inner inventor. $27.95

PIC Microcontroller Project Bookby John Iovine

The PIC microcontroller isenormously popular bothin the US and abroad. Thefirst edition of this bookwas a tremendous successbecause of that. However,in the four years that havepassed since the bookwas first published, theelectronics hobbyist market has becomemore sophisticated. Many users of the PIC are now comfortable shelling out the $250 for the price of the Professional version of thePIC Basic (the regular version sells for $100).This new edition is fully updated and revisedto include detailed directions on using both versions of the microcontroller, with no-nonsense recommendations on which is better served in different situations. $29.95

JunkBots, Bugbots, andBots on Wheels

by Dave Hrynkiw / Mark W. TildenFrom the publishersof BattleBots: TheOfficial Guide comesthis do-it-yourselfguide to BEAM(Biology, Electronics,Aesthetics,Mechanics) robots.They're cheap, sim-ple, and can be builtby beginners in just afew hours, with help from this expert guidecomplete with full-color photos. Get readyfor some dumpster-diving! $24.99

NNEEW!W!

BookstoreJan07.qxd 12/6/2006 11:25 AM Page 81

Page 82: Servo Magazine - 2007-01

82 SERVO 01.2007

The general store once formed thecornerstone of every town in the

country. A single store provided justabout everything: food, clothing,hardware, animal feed — you name it, they had it, or could get it for you. Today, the small town generalstore has been all but supplanted bylarge retailers such as WalMart andTarget, but the idea is the same: the more the store offers within itsfour walls, the more likely its customers will stay there and do alltheir shopping.

In the world of electronics,Internet mail order has taken over therole of the general store for resistors,capacitors, integrated circuits, andother parts for our robots. While noInternet retailer stocks everything,odds are you’ll find 80%+ of what you need for your next project in thecatalog pages of a single electronicsretailer.

In this month’s RoboticsResources, we’ll take a look at theInternet electronics general store:what’s out there, what you can expectto find, and how to get the most out of them.

Start Local, ThenGo Global

Before clicking on that mouse, itpays to first check out any storeslocal to you. Depending on whereyou live, you may be just down theroad from the world’s best selectionof inexpensive electronic compo-

nents. In that case, you can saveyourself the costs of shipping and getwhat you want immediately. Checkthe Yellow Pages under the mainElectronics heading.

Most of us, however, aren’t solucky. These days, RadioShack is aboutall that’s left of the national chain store for electronics, and of late, thecompany has been closing stores andrevamping their product lineup as theychange their focus.

Fortunately, the Internet hastaken up the slack from the dearth ofthe neighborhood electronics outlet.It’s been and will continue to be a tremendous boost to the art and science of robot building. Through theInternet, you can now search for andfind the most elusive part for yourrobot. Just about all of the major surplus and electronics mail ordercompanies provide an online electron-ic catalog. You can visit the retailer attheir website, and either browse theirofferings by category, or use a searchfeature to quickly locate exactly whatyou want.

And, with the help of Google,Yahoo!, MSN, or other web searchengines, you can find items of interestfrom among the millions of websitesthroughout the world. Search enginesprovide a list of possible matches toyour search query. You can then visitthe web pages to see if they offer whatyou’re looking for.

And remember, there are manyauction websites like eBay for buyingand selling goodies, including pretty

elusive robot parts and kits. If yourdesign requires you to pull the guts outof a certain toy that’s no longer made, try finding a used one at a webauction site. The price should be reasonable as long as the toy is not acollector’s item.

Consider that the Internet is worldwide, and that some of the sites youfind may not be located in your coun-try. Though many Internet businessesship internationally, not all will do so,or the shipping cost may be prohibitive.Read the fine print of the website todetermine if the company will ship toyour country, and note any specificpayment requirements. If a check ormoney order is accepted, the denomi-nation of the check or money orderusually must be in the company’snative currency.

Checking Outthe Wares

Most Internet retailers use shop-ping cart software running on their siteto allow customers to browse andselect items they wish to purchase. Nodoubt you’ve used one such shoppingcart in the recent past so I won’t boreyou with the details — except to notethat shopping cart software variesfrom site to site, and not every Internetretailer has an easy-to-navigate storefront.

However, just because a retailerhas an under-average shopping cartdoesn’t mean you should avoid them.Some general electronics vendors

Shopping theElectronics General Store

Tune in each month for a heads-up onwhere to get all of your “roboticsresources” for the best prices!

RoboResources.qxd 12/7/2006 8:28 AM Page 82

Page 83: Servo Magazine - 2007-01

have great shopping carts, and someare not so great. You’d be surprisedwhat gems you can find in the simplest of shopping carts. Onceyou’ve found a site that offers the kindof wares you want, it pays to bepatient and wade through the store tofind the real values. A few extra minutes of your time may pay off infinding just the right part, or savingdollars off your bill.

The better websites will provide asearch feature where you can find spe-cific products. This is doubly importantfor a general electronics store, as thesite may offer tens and even hundredsof thousands of items. Ideally, you willwant to find items by part number andalso by category.

The search feature at Digikey.com— which is one of the largest mail order electronics depots — is a goodexample. If you know precisely whatyou want — an Atmel AVR ATTINY13rated at 10 MHz in an eight-pin DIPpackage, just enter its standard partnumber — ATTINY13V-10PU — and theDigi-Key system takes you right to theparts page where you can place yourorder. Conversely, if you don’t knowexactly what to order, you can enter ageneric keyword or even partial partnumber. Typing in “microcontroller,”for example, will display a list of numer-ous related categories, including booksand CDs, development boards, kits,and, of course, the microcontrollerchips themselves.

Not all websites have shoppingcart software. Smaller outfits, especially those that deal with the constantly-changing inventory ofsurplus goods, may simply list what they have on a web page. Youcontact them via phone or email toarrange a purchase. I’ve seen a fewsites publish a weekly or even dailyinventory in PDF format. You can usethe search feature in the AdobeAcrobat program to locate items ofinterest to you.

Know the DetailsBefore You Order

Before placing any order, be sure

to read through ordering, shipping,payment, and other terms, especiallythe company’s policy as it relates tominimum order amounts and merchan-dise return. If all you’re looking for is a$2 part, but the store imposes a $15minimum, you’ll either want to lookelsewhere, or wait until you need toorder something else.

Be sure you understand the shipping and handling fees. Some mailorder retailers don’t charge shipping,but they have to make up for the cost somehow, and usually that’s in ahigher selling price for the productsthemselves. When comparing pricesfrom online shops, be sure to includethe costs of shipping.

More common is for online retail-ers to pass on the shipping costs to youas a separate charge. The costs areeither calculated by item quantity or byweight, and go up with the morethings you buy, or you are charged aset amount, usually by order total.Electronics components can often beshipped very inexpensively, as they aresmall and lightweight. For very smallorders, the parts can be shipped FirstClass in a padded envelope, usually forabout a dollar or two. Parcel orders —via FedEx, US Post Office, UPS, or othershippers — are typically several timesthis amount, even if you’re buying asingle 14-pin DIP IC.

If your order is more than $20, Iadvise making sure insurance is includ-ed in the shipping price. Most shippersinclude up to $100 in insurance forparcels at no additional cost. If yourorder is over that, request additionalinsurance if the online store doesn’tautomatically add it in.

Finally, you’ll want to ensure thewebsite accepts the kind of paymentyou want to use. Almost everyoneaccepts credit cards, though the selection may be limited to Visa and MasterCard. Not all US-basedmerchants are set up to acceptAmerican Express and Discover.Increasingly, web merchants acceptPayPal, ePassport, and other online virtual payment options. And, ofcourse, most still accept checks ormoney orders sent through the mail.

When sending a personal check,expect the retailer to hold your orderuntil the check clears.

Is It New or Surplus?There has always been a thriving

market for electronics surplus, partsthat someone else — often the govern-ment or a large manufacturer —thought they needed, and decided notto use. Good thing, too, as some elec-tronic components can be frightfullyexpensive when purchased new.Sometimes the components are used(surplus or not), but this is rare forsmaller, general-purpose parts. You aremore likely to encounter used parts inthe amateur radio, antique radio, andsimilar fields.

It is not uncommon for the average general electronics partsretailer to sell a mix of new and surplus goods. Technically, there is little or no difference, except the surplus parts might be a little older.This could matter if buying something like large electrolyticcapacitors, which can leak with age,but in general has no bearing oncomponents like run-of-the-mill signaltransistors, integrated circuits, LEDs,resistors, diodes, and so forth.

Lastly, most online retailers men-tion if a product is surplus. You willwant to make note of this, as it couldindicate a limited availability. In mostcases, when a surplus item sells out, it’sgone for good, at least from that ven-dor. If you are designing a new productthat uses surplus components, you’ll want to make a “lifetime buy” to ensure you have enough to last you, should there be a shortage downthe road.

SourcesFound here are online retailers that

supply general electronics parts, suchas capacitors, resistors, transistors, ICs,fuses, switches, connectors, solderingirons and other electronics tools, wire, cable, and printed circuit boardmakings. These stores are your front-line of defense for collecting the

SERVO 01.2007 83

RoboResources.qxd 12/7/2006 8:29 AM Page 83

Page 84: Servo Magazine - 2007-01

84 SERVO 01.2007

electronic components necessary foryour robotics projects.

As you might guess, no list of general electronics resources can hopeto mention everyone. I have selectedfrom among the companies that havebeen around the longest, that I ampersonally familiar with, and/or areregular advertisers in SERVO and itssister publication Nuts & Volts. Youcan find even more electronics partsoutlets on Google, Yahoo!, MSN, orother search engines. For searchterms, you are better off looking for aparticular component you’re interest-ed in, rather than simply entering“electronics.”

All Electronicswww.allelectronics.com

All Electronics is one of the primarysources in the United States for newand used robotics components. Pricesand selection are good. Walk-in storesin the Los Angeles area are located inLA and Van Nuys. Product line includesmotors, switches, discrete compo-nents, semiconductors, LEDs, infraredand CdS sensors, batteries, LCDs, kits,and much more. Specifications sheetfor many products are available at the website.

Allied Electronicswww.alliedelec.com

Allied Electronics is a prime sourcefor all electronics (components, chemi-cals, tools, you name it), in single ormultiple quantities. Their prices areoften lower than the competition’s. Donote the minimum order amount.

Alltronicswww.alltronics.com

Not to be confused with AllElectronics in Southern California, thisNorthern California electronics retaileris known for a good assortment andreasonable prices. New and surplusmerchandise.

Arrow Electronics, Inc.www.arrow.com

Arrow Electronics, Inc. distributes a full line of electronic components to industry. Products can be located

by manufacturer, part number, or category.

Avnet, Inc. (Avnet Electronics)www.avnet.com

Full line distributor with localoffices worldwide. Refer to the websitefor locations.

B.G. Microwww.bgmicro.com

B.G. Micro is a haven for the electronics tinkerer and robotics enthusiast. Much of the stock is surplus, so it comes and goes, butwhile it’s being offered, it has a goodprice attached to it. Get it while youcan, because someone else surely will.

Brigar Electronicswww.brigarelectronics.com

Brigar Electronics sells electroniccomponents and parts; new and sur-plus. Excellent selection of electronicsand mechanical components for robotbuilders everywhere.

Circuit Specialists, Inc.www.web-tronics.com

Circuit Specialists, Inc. are sellers ofICs, active and passive components,test equipment, tools, microcontrollersand programmers, switches, relays,kits, lab trainers, chemicals, and more.

Dick Smith Electronicswww.dse.com.au

Dick Smith Electronics is Australia’sbiggest electronics retailer, well knownfor Mr. Smith’s head pasted over everything — though he is no longerconnected with the company. For a time, DSE also had stores in theUnited States, but they exited the market during the downturn of the late1980s and early 1990s. Stores acrossOz and New Zealand, and they shipworldwide.

Digi-Keywww.digikey.com

Digi-Key is one of the largest mailorder retailers/distributors of electroniccomponents in North America. Theyoffer a very fast and efficient online

ordering system, complete with links todatasheets (when available).

Electronic Goldminewww.goldmine-elec.com

Electronic Goldmine sells new andused electronic components, robotitems, electronic project kits, and more.

Electronix Expresswww.elexp.com

Electronics parts, supplies, compo-nents, hardware, switches, relays, testgear, tools. New and surplus; largeinventory.

Fair Radio Saleswww.fairradio.com

Fair Radio Sales primarily caters toham operators, with their radio setsand old gear. But they have plenty oftest equipment and general surpluselectronics to tide anyone over.

Farnellwww.farnell.com

U.K. based electronics mail order.Will ship most anywhere. Offers a complete line of electronics.

Findchipswww.findchips.com

Free search engine for locatingparts, by part number. Highly recommended.

Fry’s Electronicswww.frys.com

Fry’s Electronics is an electronicssuperstore chain operating primarily inthe West Coast (US West Coast). Theyoffer a subset of products via their web page, including electronics partsand kits.

Future Electronicswww.futureelectronics.com

Large electronics distributor.Mostly for industry, but they will alsosell to individuals.

Gateway Electronics, Inc.www.gatewayelex.com

Gateway Electronics is a generalelectronics mail order and retailer.Among their products are passive and

RoboResources.qxd 12/7/2006 8:29 AM Page 84

Page 85: Servo Magazine - 2007-01

active components, motors, electronickits, gadgets, books, and tools. Someof their goods are new; others are surplus. They operate local stores in St. Louis, MO, San Diego, CA, andDenver, CO.

Hosfelt Electronicswww.hosfelt.com

General electronics. New and surplus.

HSC Electronic Supplywww.halted.com

Mail order, with walk-in retailstores in Northern California.

Jameco Electronicswww.jameco.com

Full service general electronics mailorder. Jameco carries just about every-thing you need, and often at a priceless than the other guys. Resistors,capacitors, ICs, transistors, diodes, andother active components; connectorsand more.

Jaycar Electronicswww.jaycarelectronics.com

Jaycar Electronics carries a wideselection of components, test gear,prototyping, soldering equipment, and more.

JDR Microdeviceswww.jdr.com

JDR is a direct marketer of elec-tronic components to hobbyists andthe technical engineering communities.Their catalog is skewed towards PCcomponents, but they carry plenty ofgeneral electronics (active and passivecomponents, tools, wire and cable,etc.), as well.

JK Electronicswww.jkelectronics.com

JK Electronics carries a completeline of resistors, capacitors, relays,switches, semiconductors, electro-mechanical, batteries, adhesives, tools,and lots more.

Maplin Electronicswww.maplin.co.uk

Maplin Electronics is a got-it, have-

that electronic components superstore, based in the UK. Of course they offer the traditional passive and electronics components, relays,connectors, and other prime parts.

Marlin P. Jones & Assoc., Inc.www.mpja.com

MPJA sells both new and surpluselectronic and mechanical products.Their assortment of such items asmotors is fairly small, but they make upfor it with a wide selection of othercommon (and some not-so-common)products.

MCM Electronicswww.mcmelectronics.com

MCM is a mail order retailer ofgeneral electronics and repair parts forconsumer electronics.

MECIwww.meci.com

New and surplus components,motors, and more.

Mouser Electronicswww.mouser.com

Mouser Electronics is a mail ordercomponents distributor, providing a full line of products for industry andhobbyists. All general electronics are carried, including active and passivecomponents, wire and cable, hard-ware, relays, switches, fans, heatsinks,batteries, component kits, chemicals,and tools.

Newark Electronicswww.newark.com

Prime-component distributor tobusiness and industry; also caters tohobbyist market, but minimum ordersmay apply. Sells large quantities, whenavailable.

Nu Horizons Electronics Corp.www.nuhorizons.com

Nu-Horizons is a full-line electron-ics distributor, offering the majorbrands — and some not-so-major.

Parts Expresswww.partsexpress.com

Parts Express is an all-around

electronics retailer, selling everythingfrom sound systems to test equipment,and from stage lighting to electroniccomponents.

Quickar Electronicswww.quickar.com

Surplus electronics, tools. Goodselection.

RadioShackwww.radioshack.com

These days, The Shack has fewercomponents and other electronicsitems for sale at each store, but they do carry the basics — common valueresistors, capacitors, switches, solder,electronics construction tools, that sort of thing. Additional items can be ordered through the RadioShackonline store.

Skycraft Parts & Surplus, Inc.www.skycraftsurplus.com

Skycraft is a veritable surplus mallof accessories, power supplies, transis-tors, relays, ICs, wire, cable, heatshrink, transformers, motors, fiberoptics, test equipment, resistors,diodes, and other goodies.

Surplus Sales of Nebraskawww.surplussales.com

Surplus electronic parts, includingconnectors, passive and active compo-nents, electronics hardware, relays andsolenoids, chemicals, and more.

Tri-State Electronicswww.tselectronic.com

Distributor/online e-tailer of passive and active components (resistors, capacitors, transistors, ICs,etc.), batteries, relays, switches, solderand soldering stations, tools, and wireand cable. SV

SERVO 01.2007 85

Gordon McComb is the author ofthe best-selling Robot Builder’s Bonanzaand Electronics for Dummies. In additionto writing books, he operates a smallmanufacturing company dedicated tolow-cost amateur robotics (www.budgetrobotics.com). He can be reached [email protected].

ABOUT THE AUTHOR

RoboResources.qxd 12/7/2006 8:29 AM Page 85

Page 86: Servo Magazine - 2007-01

Robbie the Robot hit the groundrunning — let’s make that rolling

— at the North Carolina ScienceTeachers Association national meetingin Greensboro. Robbie prepared totake over the convention center armedonly with a silver tray of chocolate con-fections and a silver tongue to match.Robbie made his way down each islegreeting each vender and attendeealike. “Take me to your leader,” hewould demand in a low mechanicalvoice. Then after a brief pregnantpause, he would laugh like a fiend andoffer the human a sweet treat of

Hershey’s chocolate kisses much tothe delight of one and all.

Robbie is one of the latest creations to come out of my company,Innovation Robotics, in Greensboro.The robot was built as a teaching andentertainment tool. Robbie weighs125 lbs. He measures in at just overfive feet in height and has a top speedof five mph. The robot’s mid-section islighted by 160 LEDs and his entiremidriff revolves around his “waist.” Hisarms, wrists, and hands are fully articulated and are powered by pneumatic cylinders running regulated

carbon dioxide gas. Thelimbs are controlled througha gang of solenoid valvesinterfaced with a standardJR radio control unit.

Robbie’s voice comesfrom a speaker mounted inthe robot’s head. A hackedcordless phone allows two-way communicationbetween the robot and theoperator. When the operatorspeaks into the handset, thesound is emitted from therobot. When the robot isspoken to, a microphone inthe robot’s head picks upthe sound and transmits itback to the operator. If theoperator is clever, the audi-ence hasn’t a clue why therobot is so smart. Robbieasks questions and gives real

answers. He comments on your T-shirtand the color of your shoes. He’s evenbeen known to flirt with the ladies bycomplimenting them on their exquisitetaste in fashion.

Future improvements will incorpo-rate a PLC (programmable logic controller) to allow complex motionroutines at the touch of a button. Forexample, one flip of switch on therobot’s transmitter would commandthe robot to move his head up anddown and side to side as thoughlaughing and gesturing while his armand hand reach down and pick up anobject from the ground and offer it tothe audience. Robbie is also beingequipped with a device that will allowhim to offer a business card of adver-tisement to passers by.

Reaction to Robbie has been positive and interesting. He has a1950’s retro look and is non-threatening to even the youngest children. He serves hors d’oeuvreswith a certain definitive panache thatis sure to be remembered. He puts asmile on every face.

Robbie is being developed as apowerful marketing tool for high techcompanies who see the need for interactive advertising. Essentially, heis a rolling advertisement, as well as a mechanical ambassador for the company he is working for.

Robbie is available to host yourcorporate event, tradeshow, or adver-tising venue on a contract basis. SV

Take Me to Your Leaderby Lawrence Feir

86 SERVO 01.2007

A robot walks into a bar, orders a drink, and lays down a bill.The bartender says “Hey, we don’t serve robots!” and the

robot says “No, but someday you will.”

Robbie the Robot.

Appetizer.qxd 12/7/2006 2:03 PM Page 86

Page 87: Servo Magazine - 2007-01

who really cares about the finedetails and definition of this

amazing piece of space hardware as ithas accomplished many ‘impossible’tasks in a most inhospitable place —space. It holds a special place in myheart as I spent a very interesting fiveyears exploring its use for Rockwell’sSpace Station Program.

As Robotics Systems Lead Engineerfor Rockwell’s Space Station SystemsDivision, I was involved with implement-ing the already-developed CanadarmRemote Manipulator System into ourvarious designs of the Space Station.The RMS arm is 50’3” long and 15” indiameter and has six degrees of freedom. The arm itself weighs 905pounds and the total system (includingthe control panel) weighs 994 pounds(see Figure 1). The original RemoteManipulator System or RMS has six axesof freedom, or joints that closely match

the joints of the human arm, with shoul-der yaw and pitch joints; an elbow pitchjoint; and wrist pitch, yaw, and rolljoints. Pilots know these terms: ‘roll’ is atwisting motion; ‘pitch’ is the end risingup or moving down; and ‘yaw’ is turn-ing from side to side. The end effectoris the cylinder at the end of the wristthat actually grabs the payload. The twoboom sections are called the upper and lower arms. The upper boom isbetween the shoulder and elbow joints,and the lower boom is between theelbow and wrist joints. The RMS armattaches to the space shuttle’s payload

bay ‘longeron’ (upper sill or edge of thepayload bay) at the shoulder positioningmechanism. The diagram in Figure 2shows the RMS components and theirattachment to the space shuttle.

You might wonder why have such aheavy, complex, and expensive piece ofmachinery to manipulate objects inspace. Yes, heavy payloads can bemanipulated by astronauts in space suitsin the zero gravity realm, but these payloads still have the same mass asthey do on Earth. Considering that allspace payloads cost millions if not billions of dollars, they must be handled

Then NOWan

d

SHUTTLE REMOTE MANIPULATORSYSTEM/CANADARM

b y T o m C a r r o l l

Figure 1. Shuttle RMS.

Figure 2. RMS Diagram.

SERVO 01.2007 87

Without a doubt, the most expensive robot system in the world is NASA’s Remote ManipulatorSystem used on the space shuttle and space station and made by a Canadian company — Spar

Aerospace. Yet, by many people’s account, it is not a robot at all, but a very expensive teleoperator.

Then&Now.qxd 12/7/2006 8:47 PM Page 87

Page 88: Servo Magazine - 2007-01

88 SERVO 01.2007

very carefully. NASA drew up a detailedlist of requirements for a system to handle payloads on the space shuttle.Having heard a bit about some ofCanada’s aerospace expertise, the thenNASA Administrator, Thomas Paine wentto our northern neighbors in 1974 to askfor their assistance in building part of theentirely-new space transportation systembased on a reusable space shuttle. Littledid NASA, we at Rockwell, or ourCanadian counterparts realize just howexpensive something reusable would endup costing to develop and build.

The Canadian government workedwith the National Research Council todetermine the best approach. SparAerospace Ltd., a Canadian companybased in Weston, Ontario, was chosenafter determining that the manipulatorarm system was the most appropriatepart of the shuttle project to undertake.Spar designed, developed, tested, andbuilt the RMS after winning the NASAcontract. The terms of the contract specified that Canada would pay for thedevelopment and construction of the initial Canadarm flight hardware. NASAalso contracted to buy at least threemore Canadarms as part of the deal.Also in the contract was stated thatCanada would have preferential access to

shuttle launch-es as part of itsd e v e l o p i n gspace program.Spar was lateracquired byRichmond, B.C.Canada-basedM a c D o n a l dDettwiler &

Associates Ltd. in 1999 and formed intoMD Robotics.

Spar Aerospace’sDifficult Task

One might assume that a largerobot arm would be fairly simple todesign and build. Take a couple of lightweight carbon fiber composite tubes23 feet long and attach a two axisshoulder joint, a single axis elbow joint,and a three axis wrist/end effector,attach it to a good location on theshuttle, and you have a space robotarm. Toss in a bit of industrial robottechnology and couple that with a ‘typ-ical’ crane and you’re set to go. Right!

Gravity, or the lack thereof, a vacu-um, and extreme temperatures are just afew of the obstacles that make the designand construction of a 50-foot robot forspace tasks difficult. One might think thatthe zero gravity environment would allowthe program to use a weaker type of sys-tem. That’s true, to a point. On Earth, thearm cannot even lift itself off the floor,but the shuttle’s RMS cannot use theusual several hundred horsepower dieselengine that you might find on a ‘cherrypicker’ or solid boom crane, or even theequivalent with an electric motor. Awinch cable arrangement can’t be used,as there is no gravity pulling ‘down’ on aboom to keep the cables taut.

NASA had to use a jointed stiff‘arm’ with powered joints. Hydraulics orpneumatics certainly could not be used.The joint mechanisms had to be quiteprecise with virtually no gear slop. Aone-degree slop in the shoulder jointcould cause a 10-1/2 inch loss of accura-cy at the end effector. This is unaccept-able when the positioning of payloads inspace sometimes require sub-millimetermovement in three axes. Unlike on theground where gravity can hold a boomin one position, the micro-gravity space

environment would allow a RMS boomwith mechanical slop to bounce backand forth like a clock’s pendulum.

Precision andReliability

Gear slop is sometimes minimizedor eliminated by using two gears thatact as a single gear. The two gears arespring-loaded so they push in oppositedirections and effectively enlarge eachtooth just enough so that the gear thatis driving them sees no slop at all. Thiscannot be used on the RMS arm, as thepayload mass is far too large, so preci-sion machining was required. NASAspecified type 302 stainless steel alloy asthe material for the gears, but, when themachined gears were heat-treated forstrength, they shrank a few micrometers— too much to pass inspection. Since thegears were too hard to be machinedafter heat-treating, Spar had to calculatethe shrinkage and machine them a bitlarger to fit specs after the treating. Itworked. Lubrication of mechanisms in avacuum under extreme heat and coldconditions was also solved.

After solving literally thousands ofsimilar problems, Spar had to then testthe RMS system under predicted spaceconditions. Temperature extremes, vibration, duty cycles, and even excessgravity loading are easy to simulate onthe ground, but not the lack of gravity.Despite what some SciFi movies mayshow, there is no way to produce zero ormicro-gravity on Earth. The RMS arm istoo weak to even lift itself off the floor inEarth’s gravity so zero G must be attainedin some manner for successful testing.You can take NASA’s converted KC135‘Vomit Comet’ tanker and simulate 25second bursts of zero gravity in parabolicdives (followed by 35 seconds of 2 Gs —over and over again), or go to space.

Since the latter was too expensiveand the other offered test periods thatwere too short, Spar used what severalaerospace companies and NASA haveused for years — an air bearing floor. Wedid this at Rockwell when we tested twospacecraft closing in to dock in space.Think of an air hockey table in reverse.Instead of air entering from holes in a flatfloor to allow pucks to float about on acushion of air, drive air into the pucks

Figure 5. End Effector.

Figure 3. RMS onAir Bearing Floor.

Figure 4. Astronaut in WETF.

Then&Now.qxd 12/7/2006 8:48 PM Page 88

Page 89: Servo Magazine - 2007-01

themselves. Figure 3 shows the Canadarmbeing tested on an extremely flat floor,gliding on a series of pads with a flow ofnitrogen gas into them, much like a bunchof hover cars. Only a single axis can betested at a time on a single plane, notthree planes as in space, but repositioningthe RMS test item to the new plane caneffectively test all axes of motion. Much ofthe $100 million initial cost of the RMSarm went into this type of testing.

After the RMS was handed over toNASA and Rockwell to install on the SpaceShuttle, the only true test ahead was a livetest on the shuttle itself. Astronauts hadseveral systems set up to practice futurespace operations on at Johnson SpaceCenter in Houston, TX. The WeightlessEnvironment Training Facility (WETF) inBuilding 29 — also known as the NeutralBuoyancy Lab — allowed astronauts tofloat about in water to simulate weightlessness, and an RMS simulatorwas sometimes placed there also for themto interact with simulated payloads, suchas the Hubble Space Telescope.

Figure 4 shows an astronautattached to the end of the simulatedRMS in the WETF tank being assisted bysix divers as he practices with a pay-load. This tank works best when theastronauts are practicing EVAs, but theBuilding 9 High Bay Shuttle RMS Traineris what all prospective payload/missionspecialists must spend many hoursupon honing their mission’s skills.

Trying to Snare aPayload Simulator

As the engineer in charge of developing manipulator systems forRockwell’s bid on the Space Station, Ifrequently flew to Johnson Space Centerto interface with my NASA counterparts.I was fortunate to have Judith Resnik —one of the astronauts who died in theChallenger disaster several months later— as my instructor on the RMS trainer inBuilding 9 one morning. I certainly was-n’t overly confident about my abilitieswith robotic manipulators but I did havea bit of self-assuredness about trying myskills on the trainer. I had programmedseveral different industrial robots in my day so this big arm should be noproblem. Wrong! Though the trainerarm was nothing like the shuttle arm

except for a similar appearance, it didoperate in a similar manner. I had spentthe previous night reviewing an operator’s manual of sorts. To operateon Earth, this arm was far more robustand powerful than the shuttle’s RMS.

The RMS End EffectorMy task was to snare a simulated

payload that was nothing more than asatellite-shaped cloth-covered helium balloon with a post grapple fixture on theside that looked a lot like a large nailhead sticking out of a round disk. Theend effector was a unique design thatused three heavy steel wires that sur-rounded the head of the nail and werepulled around it much like the iris petalsin a camera. Figures 6a through Figure 6eshow the sequence of snaring and capturing a payload’s grapple fixture. AllI had to do was shove the end effector’smouth over the grapple fixture’s nailhead (a and b), rotate the inner ring (cand d) until the three wires were snug onthe head, and draw the rings and wiresdown into the end effector (e) until thegrapple fixture was snug against the rimof the end effector. Easy. Not.

The payload was the same size as atypical satellite but had only a few poundsof mass so I always managed to knock itwith the end effector so it bounced away.I had two sets of windows and TV moni-tors to watch the action through, yet itwas very difficult. Fortunately the payloadwas tethered so I finally managed tosnare the sucker. Judy smiled at my frustration but I’m sure she snickered atme under her breath and was ready totake control if I went astray.

Figure 7 shows a fake astronaut onthe end of the training RMS arm inBuilding 9. Notice the difference in thereal RMS, the WETF variety, and theBuilding 9 trainer arm.

Placing the RMS onthe Space Station

My task was to implement Spar RMSdesigns for the Space Station and theywere already at work with their newerconfigurations. The SS is huge — largerthan a football field — so a single RMS,even with a several hundred foot longarm, was impractical. The only solution

SERVO 01.2007 89

Figure 6a

Figure 6b

Figure 6c

Figure 6d

Figure 6e

Then&Now.qxd 12/7/2006 8:48 PM Page 89

Page 90: Servo Magazine - 2007-01

was to be able to move a specially modi-fied RMS arm about the SS. Brian Fullerand Tom Young of Spar supplied me withRMS technical data and our group devel-oped a Mobile Transporter to carry thespace station version of the RMS over allthe faces of the space station structure.We had to keep the weight to a mini-

mum so we decided not to use anattached rail system all over the SS.

The design that we came up withused a series of doorknob-sized pins allabout the SS structural surface. Themobile transporter used two sets offorks to grasp the knobs and pull itselfalong the surface. Figure 8 is a modelof the MT that I’m holding and showsthe fork assemblies and the two slottedrails through which the knobs traveledas it pulled itself along like a personclimbing a ladder. The MT could turn ata node, rotate 90° to a new surface bymeans of swivel joints in the middle ofthe two rails, and carry the RMS whileit was attached to a large payload. Thewhite box contains a series of nickel-hydrogen batteries, the control elec-tronics, and the fork actuators.

The Canadarm 2Space Station RMS

The Space Station is quite a bit fur-ther along since my days on the pro-gram. The new 58 foot, 7 degree-of-freedom Canadarm 2 Space StationRMS was installed on the SS in April of2001 (see Figure 9). The new system isself-relocatable (it can relocate itselfanywhere on the SS) and is the keycomponent of the $896 million MobileServicing System (MSS).

The MSS is composed of two othercomponents besides the SSRMS — TheSpecial Purpose Dexterous Manipulator(SPDM) and the Mobile RemoteServicer Base System (MBS). The SPDMis a small, advanced detachable two-armed robot that can be placed on theend of the RMS arm to install andremove small payloads and similar deli-cate operations. The (MBS) is a mov-able platform for the Canadarm2 andthe SPDM that slides along rails on theSpace Station’s main structure to trans-port Canadarm2 to various points onthe Station.

A lot of progress has been made onthese space systems since I worked on theprogram in the late ‘80s and early ‘90s.The International Space Station is a reali-ty and can be seen by the naked eye as itcrosses the sky. I truly enjoyed my smallpart in developing robotic systems forspace. As I always say, use your favoritesearch engine to keep abreast of theSpace Station’s robotic developments.

The author can be reached [email protected] and welcomesquestions and comments. SV

All Electronics Corp. .............................23, 72

AP Circuits .....................................................79

COMBOTS .....................................................33

Command Productions .................................7

CrustCrawler ...................................................3

Electronics123 ..............................................72

Futurlec .........................................................23

Hitec ..............................................................79

Hobby Engineering ......................................14

Jameco Robot Store ................................2, 23

Lorax Works ..................................................73

Lynxmotion, Inc. ...........................................19

Maxbotix .......................................................23

Maximum Robotics ................................23, 25

Net Media .....................................................91

NU-BOTICS ....................................................72

Parallax, Inc. ...................................Back Cover

Plantraco .................................................23, 72

Pololu Robotics & Electronics .....................38

Road Narrows Robotics ..............................72

RoboteQ .........................................................9

Robotis Co. Ltd. ...........................................56

Robot Power .................................................51

RobotShop, Inc. .....................................23, 43

Schmartboard ...............................................72

Solarbotics.....................................................61

Technological Arts .......................................23

Vantec ...........................................................66

Yost Engineering, Inc. ..................................15

Advertiser Index

90 SERVO 01.2007

Figure 7. Fake Astronaut on RMS.

Figure 8. The Author and HisMobile Transporter Module.

Figure 9. SSRMS with Manipulator.

Then&Now.qxd 12/7/2006 8:48 PM Page 90

Page 91: Servo Magazine - 2007-01

Perfect holiday gifts for kids of all ages!Perfect holiday gifts for kids of all ages!

WWW.ROBOTSTORE.COM/SRCI-800-374-5764

WWW.ROBOTSTORE.COM/SRCI-800-374-5764

Enthusiasts,Start Dreaming...

Gift Givers,Take Note...

Engineers,We’ve GotIt All!

Enthusiasts,Start Dreaming...

Gift Givers,Take Note...

Engineers,We’ve GotIt All!

Robotic Kits and Components...The World’s MostComplete Offering!

CATALOG I62

I-800-374-5764 WWW.ROBOTSTORE.COM

Call for your free catalog today!

robotic kits

chassis

servos

passives

optos

integrated circuits

semiconductors

muscle wires

connectors

motors

test equipment

software

books

Robotic Kits Components...Robotic Kits Components......there’s something for everyone!Robotic kits help you and your child to experience and learn about perception andcontrol using a variety of sensors and actuators. Challenge yourself with Jameco’sselection of fun and interactive kits! You or your child can assemble the kits andthen enjoy endless hours of discovery.

Check out our unique selection of robotic kits at www.RobotStore.com!. Robot Insects & Animals . Programmable Robots

. Solar Robots . Educational Kits

. Listening, Touching & Seeing Robots . Legged and Wheeled Platforms

. Hackable Robots . OctoBot Survivor Kit

At Jameco’s RobotStore you can get the world’s most complete robotic offering—

all in one place! You’ll find kits for all ages and experience levels, along with gear

boxes, servos and chassis, for those who are ready to take on the extreme.

CoverInside.qxd 12/6/2006 1:12 PM Page 2

Page 92: Servo Magazine - 2007-01

Get an HB-25 Two-pack (#29150) for only $79.95 and save $20! The Parallax HB-25 Motor Controller (#29144; $49.95) provides a simple and dependable motor control system for your motorized projects. With an efficiently integrated heat dissipation design, the HB-25 easily manages 12V motors drawing 25A of current! These are sizable motors, as shown in our two example robots which are both controlled by HB-25s.

Motor Size: 0.5 HP Max - No Minimum

Motor Supply: 6.0 vdc min - 16.0 vdc max

Load Current: 25 A Continuous 35 A Surge (13.8 V)

Standby Current: 50 mA @6 V 80 mA @13.8 V (fan on)

PWM Frequency: 9.2 kHz

Pulse Input: 1.0ms Full Reverse, 1.5ms Neutral (off), 2.0ms Full Forward

# of Motors: 1 (or 2 in same direction)

Protection Circuits: Over Voltage, Over Current, Over Temp.

Indicators: Power (green), Fault (red)

Cooling: Forced Air - Ball Bearing Fan

Terminals: Screw Post with 35 A Rating

Weight: 2.5 oz (71 grams)

Size: 1.6” x 1.6” x 1.9”

Mounting: (2) 6-32 screws on .800” centers

Included: (1) 25 A Fuse

Vol. 5 N

o. 1

SERV

OM

AG

AZIN

EV

INN

IE•

INTEL’S O

PEN CV

•D

IVID

ERS A

ND

TIMER

S•

SOU

ND

GIN

January 2007

0 474470 58285

01>U.S. $5.50 CANADA $7.00

Cover.qxd 12/7/2006 1:00 PM Page 84