servo2007 10

84
Vol. 5 No. 10 SERVO MAGAZINE ROBOTIC ARM NEEMO 12 ROOF INSPECTOR GPS M-BOT FASTENERS October 2007

Upload: karina-cristina-parente

Post on 01-Dec-2015

65 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Servo2007 10

Vol. 5 N

o. 10

SERV

OM

AG

AZIN

ERO

BOTIC A

RM

•N

EEMO

12•

ROO

F INSPECTO

R•

GPS

•M

-BOT

•FA

STENER

SO

ctob

er 2007

Cover.qxd 9/6/2007 11:31 AM Page 84

Page 2: Servo2007 10

Order 24 hours a day, 7 days a week

www.Jameco.comOr call 800-831-4242 anytime

©Jameco Electronics. *According to their web sites on August 28, 2007. Trademarks are the property of their respective owners.

We’re Semi NutsWe’ve got semis on the brain. Jameco offers more major brands of semiconductors than anyone

— almost twice as many as these catalog distributors.* It’s another Jameco advantage.

5

10

15

20

25

OTHER JAMECO ADVANTAGES: More major passive, interconnect and electro-

mechanical brands than other distributors.

99% of catalog products ship the same day.

Lowest prices guaranteed, or we pay 10%.

Major brand names and generic equivalentsfor even greater cost savings.

Free shipping on these and 79 other brands.Call for details.

Jameco®

AlteraAnalog DevicesAtmel SemiconductorAvago TechnologiesCypressDiodes INC.Fairchild SemiconductorFreescale SemiconductorInfineon TechnologiesIntegrated DevicesIntel CorporationIntersilLattice SemiconductorLinear TechnologiesLite-On SemiconductorMaximMicron TechnologiesMicrosemiNational SemiconductorNECNXP (formerly Philips)Renesas TechnologySharp MicroelectronicsST MicroelectronicsTexas InstrumentsToshiba

Allied®

Analog DevicesAtmel SemiconductorAvago TechnologiesFreescale SemiconductorInfineon TechnologiesIntegrated DevicesIntel CorporationIntersilLattice SemiconductorMaximNational SemiconductorNXP (formerly Philips)ST MicroelectronicsTexas Instruments

Newark®

AlteraAnalog DevicesAvago TechnologiesCypressFairchild SemiconductorFreescale SemiconductorIntegrated DevicesIntel CorporationIntersilLattice SemiconductorMaximNational SemiconductorST MicroelectronicsTexas Instruments

Mouser®

Atmel SemiconductorAvago TechnologiesCypressDiodes INC.Fairchild SemiconductorFreescale SemiconductorIntersilLattice SemiconductorLite-On SemiconductorNECSharp MicroelectronicsST MicroelectronicsTexas Instruments

CoverInside.qxd 9/4/2007 3:56 PM Page 2

Page 3: Servo2007 10

Full Page.qxd 8/8/2007 7:54 PM Page 3

Page 4: Servo2007 10

4 SERVO 10.2007

ENTER WITH CAUTION!24 The Combat Zone

Columns08 Robytes by Jeff Eckert

Stimulating Robot Tidbits

10 GeerHead by David GeerRobot Roof Inspector Holds its Footing

14 Ask Mr. Roboto by Pete MilesYour Problems Solved Here

68 Robotics Resources by Gordon McCombHolding it All Together

72 Lessons From The Labby James IsomNXT Packbot

78 Appetizer by Pete SmithScots wha hae!

79 Then and Now by Tom CarrollRobot Power 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 MAILING OFFICES. POSTMASTER:Send address changes to SERVO Magazine, P.O. Box15277, North Hollywood, CA 91615 or Station A, P.O.Box 54,Windsor ON N9A 6J5; [email protected]

Departments06 Mind/Iron

20 Events Calendar

21 Robotics Showcase

22 New Products

74 Robo-Links

75 SERVO Webstore

82 Advertiser’s Index

PAGE 10

PAGE 39

TOC Oct07.qxd 9/5/2007 4:39 PM Page 4

Page 5: Servo2007 10

10.2007VOL. 5 NO. 10

SERVO 10.2007 5

32 CAN NetworkingMiniature Styleby Fred EadyLearn everything you need to know tocode the tricky Firgelli miniature linear actuator into the electromechanical side of your robotic designs.

39 M-BOTby Ron HackettPart 2: Take a detailed look at M-bot’scircuitry and learn two useful yet simple software routines.

43 Building an Android Armby Mark MillerPart 1: Complete arm assembly to begin the transformation into a working limb.

46 NEEMO 12by Doug PorterTelerobotic surgery below the sea is good practice for telerobotic surgeryin space.

48 Target Practice forRobotics Classby Michael ChanTurn an old printer into a shooting range and learn basic electronic principles to apply in futurerobot builds.

52 Build a Vex Wireless Joystick Controllerby Daniel RamirezUtilize this device to bring Hollywood-style special effects to your next build.

61 GPSby Michael SimpsonPart 1: A beginning look at incorporating GPS into your robot projects.

Features & ProjectsPAGE 26

PAGE 46

TOC Oct07.qxd 9/5/2007 4:38 PM Page 5

Page 6: Servo2007 10

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]

EDITORBryan Bergeron

[email protected]

CONTRIBUTING EDITORSJeff Eckert Tom CarrollGordon McComb David GeerPete Miles R. Steven RainwaterMichael Simpson Kevin BerryFred Eady Doug PorterMark Miller Ron HackettDaniel Ramirez Michael ChanPete Smith Chad NewPaul Ventimiglia James Isom

CIRCULATION DIRECTORTracy Kerley

[email protected]

MARKETING COORDINATORWEBSTORE

Brian [email protected]

WEB CONTENTMichael Kaudze

[email protected]

PRODUCTION/GRAPHICSShannon LemieuxMichele Durant

ADMINISTRATIVE ASSISTANTDebbie Stauffacher

Copyright 2007 by T & L Publications, Inc.

All Rights ReservedAll 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.

When it comes to robotics,believing is seeing. Unlike scientificareas where researchers and enthusiastshappen upon novel processes orcompounds, robots are the product offocused work. As such, it’s possible toapproximate the trajectory of roboticswith fairly good accuracy. My crystalball? Military spending. Although thereis a substantial commercial footprint inrobotics, the US military is thetraditional and largest backer of risky,future-oriented developments.

The most accessible window intothe military’s investment in the futureof robotics is the series of DOD SmallBusiness Innovation Research (SBIR)solicitations that are posted every fewmonths at www.acq.osd.mil/osbp/sbir/. The SBIR program provides upto $850,000 in early-stage R&Dfunding directly to small technologycompanies, including individualentrepreneurs who form a company.The program is competitive, with 10-300 applicants per topic, and at mosta handful of recipients. Obviously, theodds of eventual commercializationare much better for a DOD-backedrobotics technology than for a roboticsproject without the additional, no-strings-attached funding.

As an example of what the DODfunds in robotics, consider the SBIRsolicitation that closed September of2007. Using the DOD Topics SearchEngine at www.dodsbir.net/Topics/Default.asp, searching for “robot”retrieved seven solicitations: one fromthe Air Force, one from the Navy, and five from the Missile DefenseAgency (MDA).

The Air Force solicitation was fora human/machine perceptual sensingtechnology to aid the wearer in

detecting an emerging threat, basedon multi-source sensor fusion. Theeffect on the future direction ofrobotics products is clear in thissolicitation. You can probably imaginean urban protective suit that warnspedestrians, cyclists, or police officersof impending danger, whether frommotorists, potential muggers, orsimply inclement weather.

The Navy’s solicitation was for anunmanned surface vehicle (USV) at-sea refueling system. The goal wasto develop a refueling system that canprovide fuel for USVs with minimalrisk to personnel or the environment.Spin-offs could one day autonomouslyrefuel your hybrid car — while youdrive. No need to pull over to fill up orplug in to the power grid.

The solicitations from the MissileDefense Agency ranged from spacecomponent miniaturization, interceptoralgorithms, and sensor data fusion tothe application of game theory inmodeling and simulation. Spacecomponent miniaturization, with anemphasis on micro-electro-mechanicalsystems (MEMS) and lightweight, high-efficiency motors, has obviousrelevance to the future of robotics.Lighter, more efficient motors will allowfor more compact robot designs,including more compact batteries andpower supplies.

Although intended to thwartballistic missiles, the MDA’s solicitationfor new interceptor algorithms willlikely result in new algorithms forrobot navigation and objectavoidance, among others. Sensorfusion has been an important topic inrobotics, ever since the introductionof the Kalman filter in the 1960s. TheMDA’s call for more advanced, multi-

Mind / Iron

by Bryan Bergeron, Editor

Mind/Iron Continued

6 SERVO 10.2007

Mind-FeedOct07.qxd 9/6/2007 9:33 AM Page 6

Page 7: Servo2007 10

sensor data fusion algorithms willlikely result in technology that willeventually appear in commercialrobots. Furthermore, modeling andsimulation are increasingly relied onfor testing new algorithms andplatform designs before physicalrobots are constructed. Advanced,innovative models for the evaluationand optimization of sensors haveobvious applications in the roboticsdesign process.

How long before the innovationsrequested by the DOD leave thelaboratory or workbench to becomecommercial realities? Probably years.But there is a continuous stream ofsimilar DOD solicitations, dating backdecades. Many of the DOD-fundedinnovations are just coming on linenow, in the form of affordablesensors, components, and algorithms.

Even if you don’t intend to apply fora grant, it’s fun to read through thedozens of DOD-funded SBIR solicitationsthat appear every few months, and thentry to imagine the likely effect on theevolution of robotics. SV

SERVO 10.2007 7

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

by J. Shuman

Mind-FeedOct07.qxd 9/5/2007 4:21 PM Page 7

Page 8: Servo2007 10

8 SERVO 10.2007

Strength Record Set

Back in May, Germany’s KUKARoboter GmbH introduced Titan, whichapparently has secured (at least for now)the title of “world’s strongest robot” inthe Guiness Book of World Records. Themachine is powered by nine motors thatgive it a 1,000 kg (2,200 lb) payloadcapacity, and it has a reach of 3.2 m(10.5 ft) and a work envelope of 78 m3

(2750 ft3). At full stretch, Titan reaches aheight of more than 4 m (13 ft).

According to the company, thismonster is capable of moving entire carbodies all by itself and can withstand astatic torque of 60,000 Nm (or 44,000ft-lb, roughly 100 times the torque generated by your father’s Oldsmobile).Titan is intended for various applicationsin the building materials, automotive,and foundry industries. Details are available at www.kuka.com.

Getting Into Your HeadAt the other end of the spectrum

is a small bot invented by ProfessorLeo Joskowicz, of the Hebrew

University of Jerusalem (www.huji.ac.il/huji/eng/). The apparentlyunnamed device was developed toimprove “keyhole” surgical proceduresin which tiny instruments are insertedinto your brain through a small hole.

Doctors already can make use ofCT or MRI images, but there is still arisk of misdirecting the surgical instru-ments and causing hemorrhaging orsevere neurological damage. ButJoskowicz and some associates havedeveloped an image-guided systemthat, based on a robot that is pro-grammed using electronic scans of thepatient, can provide better precisionand dexterity than a surgeon’s hand.

During surgery, the robot isclamped onto the patient’s skull, afterwhich it automatically and accuratelypositions itself with respect to surgicaltargets. Once positioned, the robotlocks itself in place and serves as aguide for insertion of a needle, probe,or catheter to carry out the procedure.

The invention won Prof. Joskowiczthe Kaye Innovation Award (namedafter and established by Isaac Kay, aBritish pharmaceutical mogul).

Robot Ankle DevelopedA less unsettling breakthrough

comes from Professor Hugh Herr andhis team of researchers at the MITMedia Lab (www.media.mit.edu).

They have developed an ankle-footdevice that, driven by a small battery-powered motor, allows amputees towalk normally again.

In operation, the energy producedfrom the wearer’s forward motion isstored in a power-assisted spring andthen released as the foot pushes off.Additional mechanical energy is providedfor momentum. According to Herr, “Thisdesign releases three times the power ofa conventional prosthesis to propel youforward and, for the first time, providesamputees with a truly humanlike gait.”

And he should know, being a double amputee who tested his owninvention. Herr created the deviceunder the auspices of the Center forRestorative and Regenerative Medicine(CRRM), a collaborative research initiative that includes the ProvidenceVA Medical Center, Brown University,and MIT. Commercial versions may beavailable by the summer of next year.

Bluegill Inspires UAV DesignAlso from MIT, over in the Bio-

Instrumentation Systems Laboratory(bioinstrumentation.mit.edu), is arobotic fin design that someday couldbe used to propel UAVs in functionsranging from ocean floor mapping tosurveying shipwrecks, as well as mili-tary tasks such as mine sweeping andharbor inspection. An underwater bot

KUKA’s Titan is billed as the world’slargest and strongest six-axis

industrial robot. Photo courtesyof the KUKA Robot Group.

Professor Joskowicz demonstratesequipment for probing your brain.

Photo courtesy of Hebrew Universityof Jerusalem. Photo by Sasson Tiram.

The MIT Media Lab’s poweredankle-foot prosthesis in action.

Photo by Webb Chappell.

by Jeff EckertRobytes

Robytes.qxd 9/5/2007 2:42 PM Page 8

Page 9: Servo2007 10

driven by fins could prove to be moremaneuverable and energy efficientthan its propeller-driven counterparts.

The researchers picked the bluegillsunfish because of its unusual swim-ming motion, in which it generates aconstant forward thrust without creat-ing backward drag. The latest design isbased on a flexible polymer that repli-cates two critical motions: the forwardsweep and the simultaneous cupping ofthe upper and lower fin edges.

When an electric current is runacross the base of the fin, it sweepsforward, just like the fish. When thedirection of the current is changed,the fin curls to create the cuppingaction. Future research will focus onother aspects of the sunfish’s move-ment, including interactions betweenits fins and body.

Robotic Punk MusicHis real name is Jay Vance, but

he goes by the moniker of JBOTwhen performing with his “band,”Captured! By Robots (C!BR).According to the official story, JBOTspent a few years playing in someawful ska groups but back in the late‘90s decided to build his own backupband. He collected some scrap metal, pulleys, and pneumatic actuators, and the result was DRM-BOT0110, GTRBOT666, AUTOMATOM,

TAWHNN, SOTAWHNN, and theHeadless Hornsmen.

C!BR’s 10-year anniversary springtour ended in June, but presumably theact will go on the road again someday.In the meantime, you can hear sam-ples, watch video clips, and even buyCDs at www.capturedbyrobots.com.But be warned that, with tunes like“Torture,” “I Hate Your Techno,” and “IJust Peed Your Waterbed,” this ain’texactly Peabo Bryson. It’s more likeChuck E. Cheese from Hell.

Walking on Water — AlmostApparently, there is this thing

called a basilisk lizard, a member ofthe iguana family, that hangs out inCentral and South America eatinginsects, plants, and small vertebrates.Its main claim to fame is that it canflap its web-like feet up to 10 times persecond, which allows it to walk (run,actually) on water for distances of upto 20 m (~66 ft); hence the nickname“Jesus lizard.”

Now some students at theCarnegie-Mellon NanoRobotics Lab,

working with Professor Metin Sitti, areattempting to build a robotic versionon the theory that a bot that can travel across water without being submersed may offer more efficientmovement by eliminating viscous drag.

It’s still in the prototype stage,but you can monitor the critter’sprogress and even see videos atnanolab.me.cmu.edu/projects/waterrunner/. SV

Robytes

A bluegill sunfish swims in alaboratory tank near a prototype

of a robotic fin it inspired.Photo by Donna Coveney.

Four-legged prototype of the “Jesus lizard.” Photo courtesy of

Carnegie-Mellon NanoRobotics Lab.

JBOT and the band: not everyone’s cup of hemlock.

SERVO 10.2007 9

Robytes.qxd 9/5/2007 2:42 PM Page 9

Page 10: Servo2007 10

10 SERVO 10.2007

Nicholas McMahon — a currentengineer at iRobot (where he isproudly working on the iRobot

Packbot project) — took a few minutesto fill in the details about his roof-inspecting electro-mechanization.

Robotic Goals,Rooftop Got-yas

Roboticists are problem-solvers.They solve problems of physics, physi-

cal mechanics, electronics, and roboticsto create moving solutions to seeming-ly immovable problems.

A key challenge for Nick and partnerSam Feller was to create a robot thatcould perform practical, quality roofinspections while maintaining balanceand mobility in an environment of steepinclines and treacherous twists and turns.

The duo had to design the robotaround maintaining stability and tractionon steep surfaces (i.e., 45-degree slopes),

according to McMahon. The stabilityproblem required a low center of gravity.

The roboticists used CAD modelingtechniques and live testing scenarios to design and validate the robot’s low center of gravity. In order to be a suit-able replacement for human inspectors,the robot must not tip or get hung upin this most inhibitive of environments.

Traction was another matter. Thetraction problem meant experimentupon experiment with varying materi-als of differing levels of friction to create wheel surfaces that would maintain contact with the roofing. Notjust any material would do.

“We started with traditional convey-or belt material. Other candidates wereScotch Brite pads and various foams andrubbers. We settled on EPDM (ethylene

Contact the author at [email protected] David Geer

Robot Roof InspectorHolds its Footing

Former Worcester Polytechnic Institute (WPI, Worcester, MA) students Nick McMahon andSam Feller designed and built a roof inspection robot to help keep flesh and blood roofexaminers from precarious and injurious positions. (Both McMahon and Feller graduated

from WPI this year with Bachelor of Science degrees in Mechanical Engineering.)

The roof inspection robot (top-side, on faux roof). At the bottom, see if you canfind the pan/tilt X10 camera. Can you find the potentiometer in the center?

Can you tell which way it is going? Which way is it looking right now?

According to former WPI

student and now graduate Nick

McMahon, he and former student

Sam Feller learned how robotics rely

on software engineering, mechanics,

and electronics to work properly.

They also learned about time

management, team work, and

working with customers to get their

input. Travelers Insurance, their

customer for this robot research,

sponsored the roof robot project,

McMahon explained.

LESSONS LEARNED

Geerhead.qxd 9/5/2007 2:44 PM Page 10

Page 11: Servo2007 10

GEERHEAD

propylene diene monomer) rubber,”says McMahon. EPDM has several properties including density, durability,and resistance to abrasion.

McMahon and Feller used forcegauges and friction testing to “calcu-late the coefficient of friction onasphalt shingles” to determine the bestmaterial for the job from among all the candidates.

The roboticists attempted to addto the surface area of the wheel thatwould actually make contact with theroof by using substrates — layers ofmaterial — on the wheels.

“In theory, surface area doesn’tmatter in friction calculations,” saysMcMahon, “but we found that themore weight you have per area, themore likely the shingle is to fall apartfrom the rotation of the wheels.”Spreading out the contact area helpsspread the weight of the robot acrossmore area so the shingles don’t crack.

“Peak” NavigationPerformance

Talk about difficult terrain — therobot would need to straddle roof peaksand negotiate the valleys between themwithout getting stuck or leaving hiddenplaces it couldn’t reach to inspect. Thefirst part was resolved by leaving theunderbody of the robot open to allow for “the cresting of peaks,”

according to McMahon.The body of the robot

uses a special joint thatallows it to drive onto oneplane of the roof fromanother plane and sit halfon one at one angle andhalf on another at anotherangle, if necessary.

Basically, the front andback of the robot are dividedinto two independent seg-ments that can turn up anddown and left and right tonavigate the planes of a roofwhere they meet withoutthe wheels or other parts ofthe robot getting hung up. “So, it canoperate on two planes without losingcontact with the roof,” says McMahon.

The robot’s controls allow eachwheel to move at the speed necessaryto maintain its “rolling contact” withthe roof, dependent upon the angle ofthe wheel joint. This arrangementavoids loss of traction and roof damage simultaneously. The operatoruses command and control and a videocamera to inspect the roof and to drivethe robot around.

What Goes Up...Into every roboticist’s life, a few parts

must fall, smash, crack, bang, and bend.McMahon and Feller tested the

robot’s maneuverability and center ofgravity on an 8’ x 8’ test roof builtinside a WPI lab. The test roof had the necessary 45-degree slope and a right-angle section to test the “valleytraversing” capabilities.

The two young scientists drove therobot in every possible orientation andangle to test the limits of its configura-tion and software code, according toMcMahon. Of course, robots seldomscore 100 the first time around.

Too fast a speed or too twisted aturn and off the makeshift roof therobot flew. “For instance, as it wentaround the corner, the body wouldtwist and the center of gravity wouldmove causing the whole robot to fallover and off of the roof. No significant

SERVO 10.2007 11

WPI students conduct MQPs or Major Qualifying Projects intheir Senior year at WPI. This is an example of a WPI search andrescue robot project. Here, the robot is seeking out the candle.

Take a look at the WPI search and rescue robot on a test rescue mission.

Here is a side angle. Why is it looking to its rear?

Geerhead.qxd 9/5/2007 2:45 PM Page 11

Page 12: Servo2007 10

12 SERVO 10.2007

damage ever occurred but we hadsome bent parts that needed to bestraightened out,” says McMahon.

McMahon also recounts how therobot would literally try to destroyitself. This flaw required adjustmentsaround potentiometer feedback.

This particular potentiometertracks body rotation angle. On rareoccasions, the feedback signals looped.The robot, responding to the feedback,went into convulsive joint oscillations,gyrating its two halves continually untilthe roboticists reset it.

This happened at varying points inthe testing phase for different reasons.In the beginning, the potentiometerwasn’t properly secured to the joint itwas measuring. When the potentiome-ter slipped, the software code would

use the misguided feedback to try tokeep the joint in position, oscillating thejoint, according to McMahon. “Othertimes, bits of phantom code wouldcause the joint motor to suddenly comeon full power and slam the two bodyhalves together,” McMahon explains.

Parts andConfigurationUnique to theProblem at Hand

For the roof robot construction,McMahon and Feller used leftover win-dow motors from FIRST competitionrobot projects, a McMaster-Carr gearmotor, and IFI Victor speed controllers.

The motors are Nippon Densos,like those shipped with the FIRST robotics competition kits, according toMcMahon. “We chose them becausethey suited our power and speedrequirements,” comments McMahon.

McMahon and Feller bought ageneric 12V motor with gear reductionto drive that infamous joint in the cen-ter of the robot. The motor drives thetwo halves of the robot mechanicallywhen the wheels don’t get traction,explains McMahon.

The Victor speed controllers also

come from the FIRST robotics competi-tion kit and control the speed of thewheel motors.

The two roboticists also usedpotentiometers, encoders, and SharpIR sensors for edge detection.

The potentiometer tracks the jointposition. This information helps thewheels to each move at the right speed to maintain contact with theroof. The encoders are actually beaminterrupters modified to read the speedof each wheel independently.

The robot feeds the encoder infor-mation back to the microcontroller. Themicrocontroller uses software to makesure the wheels don’t slip and thateach wheel is powered at the righttime to keep them touching the surface, according to McMahon.

The Sharp IR sensors reflect abeam off the surface of the roof andback to the sensor. When the sensordoesn’t see its reflection, it knows ithas reached the edge of the roof andthe robot stops so as not to fall off.

“All of the mechanical pieces weredesigned and fabricated by us in theschool’s machine shops,” says McMahon.These include chassis panels, motormounts, joint parts, the “belly pan” andthe “pan tilt tower” used for the camera,according to McMahon. “Everything isheld together with threaded fasteners,”he adds.

McMahon and Faller also used anX10 camera for the video and a VEXmicrocontroller for the robot’s brain.

The VEX masterminds the edgesensing, course of direction, velocity,and joint angle; it also negotiates command and control instructions froma human operator. The pan/tilt towerforms the foundation for the X10 camera. This makes it possible for theoperator to maneuver the camera, tocatch every glimpse of the roof for athorough inspection. Nickel metalhydride batteries power the robot, giv-ing it an hour’s worth of locomotiveand inspection capabilities.

The robot is currently sitting instorage at WPI where it can be usedfor parts for future Major QualifyingProjects (MQPs); MQPs are WPI’smoniker for senior design projects. SV

GEERHEAD

Worcester Polytechnic Institute

www.wpi.edu

First college major in

Robotics Engineering

www.wpi.edu/News/Releases/20067/rbemajor.html

WPI Robotics Engineering

www.wpi.edu/Academics/Majors/RBE

RESOURCES

Tormach PCNC 1100 Features:Table size 34" x 9.5"

R8 Spindle 1.5 hp variable speed to 4500 RPM

Computer controlled spindle speed and direction

Precision ground ballscrews

Digitizing and tool sensing support

4th axis and high speed spindle options

3 Axis Mill

$6800plus shipping

When you’re serious about hardware, you need serious tools. Whether milling 0.020” traces on prototype PCBs or cutting ½” steel battle armor, this CNC mill can do it all. Weighing in at more than 1100 lbs, the PCNC can deliver the hardware end of your combined hardware & software projects.

Precision CNC Machining

Mill includes Control, CAD and CAM software. Optional stand, coolant system, computer and accessories are extra.

Product information and online ordering at www.tormach.com

Geerhead.qxd 9/5/2007 2:55 PM Page 12

Page 13: Servo2007 10

Full Page.qxd 9/4/2007 4:07 PM Page 13

Page 14: Servo2007 10

14 SERVO 10.2007

Q. Here is a tough question foryou to chew on. I have seenyou write articles about the

PS2 controller and the bluetoothmodem from SparkFun, but can youmake the PS2 controller a wireless controller using these two parts? Rightnow, I have a regular Futaba R/C controller to drive my robot around, butit doesn’t have any switches for turningon lights and sounds. The PS2 con-troller has 12 buttons for turning thingson and off and two joysticks for drivingmy robot. Can you help me here?

— Will Harrison

A. Sounds like you have a funrobot project, and converting aPlaystation 2 controller into a

wireless controller isn’t that difficult,especially if you are using theBlueSMiRF Bluetooth serial modemfrom SparkFun Electronics (www.sparkfun.com). There are two different things that you have to build:a serial interface for the Playstation 2controller and a serial interface for your robot.

In the January ‘07 issue of SERVOMagazine, I showed how to interface aregular wireless Playstation 2 controllerto a BASIC Stamp from Parallax(www.parallax.com). This may be thesimplest way to go since all you wouldneed is one of the wireless PS2 controllers, such as the Madcatz(www.madcatz.com) or the PS2robot controller from Lynxmotion

(www.lynxmotion.com), a microcon-troller, and a controller interface cable.(I included the above reference for anyone who may have missed thatissue of SERVO Magazine.)

I am going to do something a littledifferent here. In the previous article,the communication timing betweenthe wireless PS2 controller and theBASIC Stamp needed to be at highspeeds, which limited the selection ofthe BASIC Stamps to their fasterprocessors.

For this article, I am going tomake the PS2 interface using a ScenixSX-28 microcontroller (www.parallax.com/SX), mainly because it isfaster than the BASIC Stamp (up to 75MHz), and it uses the SX/B program-

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]

SX

28AC

/DP

Vss RB.0

Vdd

RB.1

RB.2

RB.4

RB.3

RB.7

RB.6

RB.5

RC.0

RC.3

RC.2

RC.1

RC.5

RC.6

RC.4

RC.7

RA.3

RA.0

RA.2

RA.1

MCLR

OSC2

OSC1

RTCC

4 MHz

+9V FOR VIBRATION MOTOR POWER

NOT CONNECTED

ACKNOWLEDGE

Vdd (+3V to +5V)

ATTENTION

CLOCK

GROUND

COMMAND

DATA

LYNXMOTION PS2 CONTROLLER ADAPTERCABLE. AS VIEWED FROM THE FEMALE END

GREEN

BROWN

ORANGE

BLACK

YELLOW

RED/SHIELD

BLUE

VIOLET

N/C

DATA

CMD

ATTN

CLOCK

Vdd

GND

+9V

ACK

4.7 KΩ 4.7 KΩ

10 KΩ

+5V

+5V+5V

BA

SIC

ST

AM

P2

FA

MILY

P6

P7 VSS

P4

P5

P13

P9

P8

P10

P11

P15

P14

RES

VDD

+5V

VIN

P3

P2

P1

P0

ATN

VSS

SIN

SOUT

220 Ω

Figure 1. Playstation 2 controller interface hardwired to a BASIC Stamp for testing.

MrRoboto.qxd 9/5/2007 2:38 PM Page 14

Page 15: Servo2007 10

ming language which is very similar to the BASIC Stampprogramming language. As a side note, the SX family ofmicrocontrollers are the core microcontrollers for most of theBASIC Stamps.

To make this project one step easier, I borrowed some ofthe work that Jon Williams developed for the Playstation 2controller interface using the SX-28 chip from the StampApplications column in the January ‘06 issue of Nuts & VoltsMagazine (www.nutsvolts.com).

As with all wireless development activities, the first thingthat needs to be done is to make sure that the two devicescan communicate directly with each other without thewireless connection. The reason for this is to make sure that the two devices are individually working properly and that they are properly communicating with each other. It is much easier to diagnose hardwired problems than wireless problems.

Figure 1 shows a simple schematic for connecting thePS2 controller to an SX-28AC/DP microcontroller. The SXmicrocontroller receives a serial command to read thecurrent state of the PS2 controller, then converts the data tobe transmitted via a serial output. One serial input line isused for receiving the data and a second serial line is usedfor outputting the data. Two lines were used since theBlueSMiRF uses two separate serial lines for receiving andtransmitting data. For testing purposes, a BASIC Stamp isconnected to the SX microcontroller to transmit and receivedata with the SX microcontroller and display the PS2controller results on a debug window on a computer. Here,the BASIC Stamp is simulating the main microcontroller ona robot.

The key to obtaining reliable communications betweentwo serial devices is to make sure that they are synchronizedto each other. A synchronous serial communication protocolcan be used, but this will require four communication lines,two data lines, and two handshaking lines. The othermethod is to use an asynchronous method. Here, data will go back and forth at their own timing rates. Receiving datain midstream is often a problem with asynchronous serialcommunication methods.

One way to get around this is to have the master devicetransmit a command that it is ready to receive data. Then,the slave device is programmed to continuously monitor theinput serial line, looking for the ready to receive command.When the slave receives the command, it then collects thedata and transmits the results back to the master device. Inthe meantime, the master device is waiting to receive thedata. When it receives the data, it processes the data, andwhen it is ready to collect a new set of data, it repeats thisprocess again.

For this project, the asynchronous communication issynchronized when the BASIC Stamp sends a four characterinstruction, !PSX, to the SX microcontroller (see the MainBASIC Stamp Loop program that follows). The main loopin the SX microcontroller is looking for the same set ofcharacters (see the Main SX PSX Controller Loop program).Once the SX microcontroller receives these characters, it willthen read the current state of the Playstation 2 controller,

and then serially transmit this data back to the BASICStamp. During this time, the BASIC Stamp is waiting fora response from the Playstation controller. When itreceives the data, the BASIC Stamp displays the results on acomputer’s debug window. The BASIC Stamp is using a200 ms timeout in the serial input command so that themain robot doesn’t get stuck waiting for some data thatmay never come if the input signal is lost (i.e., theBlueSMiRF loses its radio connection link or bad interferenceoccurs in the signal).

‘Main Basic Stamp LoopMain:

SEROUT S_cmd, Baud, [“!PSX”]SERIN S_Data, baud, 200, Main,

[psxID,psxStatus,psxThumb1,psxThumb2,psxJoyRX,psxJoyRY,psxJoyLX,psxJoyLY]

DEBUG CRSRXY, 8,0, IHEX2 psxID,CRSRXY, 8,1, IHEX2 psxStatus,CRSRXY, 8,2, BIN8 psxThumb1, BIN8 psxThumb2,CRSRXY, 8,3, DEC3 psxJoyRX,CRSRXY, 8,4, DEC3 psxJoyRY,CRSRXY, 8,5, DEC3 psxJoyLX,CRSRXY, 8,6, DEC3 psxJoyLY

GOTO Main

‘Main SX PSX Controller LoopMain:

char = RX_BYTEIF char <> “!” THEN Mainchar = RX_BYTEIF char <> “P” THEN Mainchar = RX_BYTEIF char <> “S” THEN Mainchar = RX_BYTEIF char <> “X” THEN Main

Get_Status:WAIT_MS 1READ_PSXif psxStatus = $00 then

PSX_ConfigREAD_PSX

endifTX_OUT psxIDTX_OUT psxStatusTX_OUT psxThumb1TX_OUT psxThumb2TX_OUT psxJoyRXTX_OUT psxJoyRYTX_OUT psxJoyLXTX_OUT psxJoyLY

GOTO Main

Program Listing 1 is the entire program for the SX-28chip to communicate with the PS2 controller and ProgramListing 2 is the entire BASIC Stamp program for communicat-ing with the SX-28 microcontroller and displaying the resultson a computer’s debug display (both are available on theSERVO website; www.servomagazine.com). When thetwo devices are hooked up and programmed properly, thecomputer will display which buttons on the PS2 controller arebeing pressed, and what the joystick values are when thecontroller is in analog mode. Once you have this working,you will be ready to install the BlueSMiRF serial modems.

Figure 2 shows how the BlueSMiRF modems are installed

SERVO 10.2007 15

MrRoboto.qxd 9/5/2007 2:38 PM Page 15

Page 16: Servo2007 10

in this circuit to make this into a wireless Playstation 2 controller. As you can see, Figures 1 and 2 are essentially thesame except there is a pair of BlueSMiRF serial modemsbetween the BASIC Stamp and the SX-28 microcontrollerinstead of the two serial hardwires. The only other thing thatis new in this circuit is the serial bypass switch between theBASIC Stamp and the BlueSMiRF modem. The serial bypassswitch was added so that the BlueSMiRF modems can beconfigured in the circuit.

Configuring the two BlueSMiRF serial modems to talkto each other is probably the trickiest part of the wholeproject. To do this, a TTL voltage level (0-5V) RS-232 cable

needs to be attached to the master BlueSMiRF serial modem.The master BlueSMiRF serial modem is the one attachedto the BASIC Stamp, and the RS-232 cable is attached tothe bypass switch. As a reminder, the TX line on the RS-232cable connects to the RX line on the BlueSMiRF, and the RX line on the RS-232 cable connects to the TX line onthe BlueSMiRF.

Using a computer, open the HyperTerminal program (orany other serial port terminal program) and put the com portsettings to the 9600 baud rate shown in Table 1. This is thedefault baud rate setting for the BlueSMiRF. To see the characters being typed on the screen from the keyboard, set the ASCII character sending parameter to EchoCharacters Locally.

Apply power to both circuits, and open the com port tothe master BlueSMiRF serial modem. Type these three characters +++ on the HyperTerminal screen and hit the carriage return key. Then type the two characters AT and hitthe carriage return. The text, OK, should be displayed on theHyperTerminal window. At this point, the BlueSMiRF modemsare ready to be configured.

SX

28AC

/DP

Vss RB.0

Vdd

RB.1

RB.2

RB.4

RB.3

RB.7

RB.6

RB.5

RC.0

RC.2

RC.1

RC.5

RC.6

RC.4

RC.7

RA.3

RA.0

RA.2

RA.1

MCLR

OSC2

OSC1

RTCC

4 MHz

+9V FOR VIBRATION MOTOR POWER

NOT CONNECTED

ACKNOWLEDGE

Vdd (+3V to +5V)

ATTENTION

CLOCK

GROUND

COMMAND

DATA

LYNXMOTION PS2 CONTROLLER ADAPTERCABLE. AS VIEWED FROM THE FEMALE END

GREEN

BROWN

ORANGE

BLACK

YELLOW

RED/SHIELD

BLUE

VIOLET

N/C

DATA

CMD

ATTN

CLOCK

Vdd

GND

+9V

ACK

4.7 KΩ 4.7 KΩ

10 KΩ

+5V

+5V+5VR

X-I

RT

S-0

TX

-0

PW

RC

TS

-I

Modem

BlueS

MiR

F

+5V

CT

S-I

PW

R

TX

-0

RT

S-0

RX

-I

+5V

BlueS

MiR

FM

odem

P11P4

P10

P7

P6

P5

VSS P8

P9

220 Ω

220 ΩVIN

RES

P14

P13

P12

P15

VSS

P1

P2

P3

P0

BA

SIC

ST

AM

P2

FA

MILY

SIN

ATN

SOUT VDD

+5V

TTL SERIAL OUTPUT

TTL SERIAL INPUTEXTERNAL MODEM CONFIGURATION

Figure 2. Wireless Playstation 2 controller test circuit.

Bits per Second 9600

Data Bits 8

Parity None

Stop Bits 1

Flow Control None

Table 1. Initial com port settings.

16 SERVO 10.2007

MrRoboto.qxd 9/5/2007 2:38 PM Page 16

Page 17: Servo2007 10

There are three different ways to get the two BlueSMiRFmodems to connect to each other:

• Manually send commands via RS-232 cable and usingHyperTerminal every time the circuit is powered up.

• Having the BASIC Stamp issue the various connection commands to the Master BlueSMiRF serial modem and analyze the responses from the slave BlueSMiRF modems.

• Having the master BlueSMiRF serial modem automaticallyconnect to a specific slave BlueSMiRF serial modem on its own.

The easiest way to go about this is to have the masterBlueSMiRF serial modem automatically connect to the slavemodem. The only drawback to this is that the main microcon-troller won’t know if the communication link is connected ornot connected, lost, or corrupted. The microcontroller iscapable of monitoring the connection status, making a connection, and reconnecting if a problem occurs, but thiswill take a lot of software to do.

For this project, an automatic connection approach wasused. When the BlueSMiRF modem receives the three charac-ter escape sequence (+++), it is put into a configurationmode. It will no longer transmit or receive wireless data.Remember to make sure that the bypass switch is toggled tothe external RS-232 data cable, or the BlueSMiRF won’taccept the +++ command since it’s mixing it with the datafrom the BASIC Stamp.

To configure the BlueSMiRF for automatic connection,first clear the master radio with the ATUCL command. Thenperform an inquiry to determine what the Bluetooth addressto the slave modem is (if you don’t already know it). The following shows what is typed in the HyperTerminal windowand the replies from the master BlueSMiRF radio.

Send: ATUCL<cr> //Clear master radioReply: <cr_lf>OK<cr_lf>Send: ATDI,1,00000000<cr> //Look for only 1 deviceReply: <cr_lf>00A0961D2023<cr_lf>

<cr_lf>DONE<cr_lf>

The ATDI is an inquiry command; the “1” means look foronly one device. The “00A0961D2023” is the Bluetoothaddress for the slave BlueSMiRF modem connected to the SX microcontroller.

Next, set the master BlueSMiRF to autoconnect mode,and then tell the master BlueSMiRF what the address is to theslave BlueSMiRF. The following shows what is typed in theHyperTerminal window and then replies from the masterBlueSMiRF radio.

Send: ATSW25,1,1,0,0<cr> //Set autoconnect modeReply: <cr_lf>OK<cr_lf>Send: ATSMA,00A0961D2023,1101<cr> //Set slave addressReply: <cr_lf>OK<cr_lf>

About one second after executing the ATSMA command, the green flashing LED on the BlueSMiRF will turn

off and the red LED will turn on. At this point, the twoBlueSMiRFs are now connected together and the masterBlueSMiRF will exit the configuration mode. The twomodems will start transmitting data back and forth wireless-ly with each other. Now change the serial bypass switch toconnect to the BASIC Stamp, and the BASIC Stamp terminalwindow will start displaying the Playstation 2 controller information (just like it did when the testing configurationfrom Figure 1 was used).

The default baud rate for the BlueSMiRF modems is9600 bps. At 9600 bps, it takes about 1 ms to transmit onebyte of data. Since 12 bytes of data is being exchangedbetween the two devices, about 12 ms of time is required toquery the PS2 controller to determine its current state. Thismay or may not be a problem for your application, but ifyou need a faster response, then the baud rates in the twoprograms will need to be increased, and the BlueSMiRFmodems will need to be reconfigured individually with thenew baud rate.

The following sequence of commands are used tochange the BlueSMiRF baud rate to 19200 bps. Rememberthat the RS-232 serial cable needs to be hooked up and the serial bypass switch changed to the external serial data source.

Send: +++<cr> //Enter configuration modeSend: AT<cr> //Verify you are in conf modeReply: <cr_lf>OK<cr_lf>Send: ATSW20,79,0,0,1<cr> //set baud rate to 19200 bpsReply: <cr_lf>OK<cr_lf>

The command ATSW20 is the command to change thebaud rate. The 79 is the code for the specific baud rate of19200 bps. Table 2 shows the codes for other baud rates.Once the ATSW20 command is executed, the baud rate isimmediately changed. To continue to communicate with the BlueSMiRF, the baud rate for the HyperTerminal program must be immediately changed to the same baudrate that is now programmed into the BlueSMiRF. You need to remember this baud rate, since BlueSMiRF will beoperating at the baud rate until reprogrammed, even afterpowering up the device again.

To verify the current baud rate settings, execute the following command:

Send: ATSI,8<cr> //Verify current baud rate settingsReply: <cr_lf>OK<cr_lf>

<cr_lf>004F,0000,0000<cr_lf>// Above are the current baud settings in HEX

Baud Rate ASCII Value Hex Value

4800 20 14

9600 39 27

19200 79 4F

38400 157 9D

57600 236 EC

Table 2. BlueSMiRF baud rate programming values.

SERVO 10.2007 17

MrRoboto.qxd 9/5/2007 2:39 PM Page 17

Page 18: Servo2007 10

An important command to remember if things getmessed up is the ATFRST command. This will cause theBlueSMiRF serial modem to reset back to the original factorysettings. In order to execute this command, you must besending data at the same baud rate that is currently programmed into the BlueSMiRF.

At this point, you have all the information needed to makea wireless Playstation 2 controller for your robot using the

BlueSMiRF serial modems. One thing that might help you withyour project is the PS2 controller cable from (www.lynxmotion.com). This cable costs less than $5, and it has the proper female connector for your Playstation controller andsimple plugs for connecting to your electronic project. Figure3 shows a photo of this handy cable. Figure 4 shows the wireless SX microcontroller interface to the Playstation 2 controller to show the simplicity of the wiring. SV

Figure 3. Lynxmotion Playstation controller adapter cable.Figure 4. Wireless SX-28 microcontroller interface

prototype for the Playstation 2 controller.

18 SERVO 10.2007

MrRoboto.qxd 9/5/2007 2:39 PM Page 18

Page 19: Servo2007 10

SERVO 10.2007 19

Full Page.qxd 9/4/2007 4:15 PM Page 19

Page 20: Servo2007 10

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

OOcc ttoobbeerr

5-7 MindSparkCollege of Engineering, Pune, IndiaMindSpark includes a standard Micromouse eventand a competitive pick-and-place event calledDogfight. MindSpark will also host a region IITBTechfest Nexus event called Vertigo that requirescooperation between a remote-controlled machineand an autonomous robot. Working together, thetwo machines must move a number of blocks fromone location to another.www.robotics.mind-spark.org

12-13 Cal GamesWoodside High School, Woodside, CAThis year’s event will be a recreation of the FIRSTRobotics 2007 Rack and Roll contest.www.wrrf.org/Events/index.php

17-20 Russian Olympiad of RobotsMoscow, RussiaRussian robots compete in Sumo, fire-fighting, line-following, and RoboCup events. There is also a cross-country robot race and remote-controlledvehicle combat to keep things interesting.http://intronics.bogorodsk.ru

19-21 Elevator:2010 Climber CompetitionEvent Center, Greater Salt Lake City, UTAutonomous climber robots must ascend a scalemodel of a space elevator using power beamedfrom the base.www.elevator2010.org

20 Franklin Institute Robot ConflictInstitute Science Museum, Philadelphia, PARemote-control vehicles destroy each other. www.nerc.us

21 ChiboticaDonald E. Stephens Convention Center, Rosemont, ILChibotica returns with even more events: maze solving, line-following, mini Sumo, Robo-One, arobot talent show, and remote-controlled vehiclecombat.www.chibots.org

26-28 Critter CrunchHyatt Regency Tech Center, Denver, COHeld in conjunction with MileHiCon. See robotcombat by the folks who invented robot combatcompetitions.www.milehicon.org

26-28 Korea Intelligent Robot ContestPohang Indoor Gymnasium, Pohang City, KoreaSeveral events are planned for autonomous robotsincluding Micromouse, MIROzSOT games, andintelligent robot demonstrations.http://irc.piro.re.kr

NNoovveemmbbeerr

10 DPRG RoboRamaMuseum of Nature and Science, Dallas, TXThe usual assortment of events including QuickTrip, T-Time, wall-following, line-following, and canretrieval. Check the website to verify the date andvenue as they were still be finalized as this month'slist went to press.www.dprg.org

23-24 Hawaii Underwater Robot ChallengeUH Manoa Duke Kahanamoku Aquatic Complex,Oahu, HIROVs built by university and high school studentscompete in this event, which is part of the MATE(Marine Advanced Technology Education) series ofcontests.www.marinetech.org/rov_competition

Send updates, new listings, corrections, complaints, and suggestions to: [email protected] or FAX 972-404-0269

20 SERVO 10.2007

Events.qxd 9/5/2007 10:59 AM Page 20

Page 21: Servo2007 10

! " #

$ $ " %

$ $ & ' " %

ThePower SchmartModule™

will power up yourcircuits with your choiceof -9, -12, +2.5, +3.3,+5, +9, and +12 volts.

$15Very Schmart!

www.schmartboard.comAsk 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

SERVO 10.2007 21

Robotics ShowcaseRobotics Showcase

ShowcaseOct07.qxd 9/5/2007 4:03 PM Page 21

Page 22: Servo2007 10

High Tech Hero

Learning Curve Brands, Johnny Lightning Boy’s Divisionhas created a new high tech hero just in time for

the 2007 holiday season. The radio controlled V_BOTtransforms from a sleek street vehicle into a giant robotwith a touch of a button, and is loaded with action moveslike the signature “V Chop.”

“An internal concept, V_BOT came with big engineer-ing challenges and from those challenges came bigrewards,” said Holger Kraetschmer, Senior ManagingDirector at RC2 Corp. “V_BOT is a truly revolutionary radiocontrol toy that captures kids’ imaginations with a giantrobot that they can control, transform, and drive. That’s abig payoff.”

V_BOT is a 15-inch radio control robot which also hasa plug-in for an MP3 player. V_BOT comes with a handheldcontroller featuring six action buttons and three preprogrammed action buttons. V_BOT will be availablenationwide at leading retailers this fall for $129 SRP.

Battle Wheels Radio ControlAction Figures

Battle Wheels — JohnnyLightning’s newest addition to

this season’s radio controlled toys— are fully articulated, high-speed remote controlled warriors that crash and spininto each other, knockingoff each other’s armor, and ultimately theiropponent’s head to claim victory. These warriors areaction based and have multibandcontrollers allowing up to six warriors to battle at a timeusing two frequencies.

Each Battle Wheel warrior comes with five removablepieces of armor, two weapons, a controller, and a card-board training dummy. The fully articulated warriors canbe strategically positioned for attack or defense, depend-ing on the style of combat chosen. Five removable piecesof armor (two shoulder pads, two wheel blades, and ashield), as well as the individual character’s battleweapons, accompany each warrior into battle. Body armor

and weapons can be interchanged between Battle Wheelwarriors to outfit the ultimate champion. Play one-on-one,or as a team with the multiband feature allowing up to sixwarriors to battle at the same time.

Characters include: VUL, the savage protector ofVenus; TYR, the cold arm of Pluto’s justice; BASHAMON,the silent enforcer of Saturn’s law (pictured), and KAGI-TSUCHI, the fury of Mercury’s fire.

Cost is approx. $30, and each warrior will be availablethis fall.

For further information on all toys mentioned, pleasego to:

Ultrasonic Rangefinders FeatureCustom Beam Width

Users of ultrasonic rangefindershave found that the beam

widths of low cost ultrasonic sensors do not always match theirapplication. Wider beam width(and more sensitivity) is bettersuited for obstacle detection, people detection, collision avoidance, detectingsmall objects, and more robust detection in the centralbeam area. Narrower beam width (and less sensitivity) isuseful for clutter rejection, high acoustic noise environ-ments, directional ranging, room mapping, or using an

ultrasonic sensor to locate an opening such as a door.Some users require very long detection and ranging,while others only care about performance out to one

meter. In addition, users of ultrasonic sensors — evensensors that have a narrow beam width — still desiredetection of small objects within the central beam, stablerange measurements (even when ranging movingobjects), small size, low power, and the sensor must beeasy to use. Both narrow or wide beam sensors can be useful for all of the mentioned uses but, in general, aspecific beam width will perform better than another fora given user application.

The beam width of the LV-MaxSonar® sensor line-upis factory calibrated and precisely controlled. This allowsthe precision beam angles that users of the EZ1™ have

New Products

ROBOT TOYS

SENSORS

NNEEWW PPRROODDUUCCTTSS

22 SERVO 10.2007

Website: www.rc2.comRC2 Corporation

Oct07NewProd.qxd 9/6/2007 9:21 AM Page 22

Page 23: Servo2007 10

come to depend on. The beam width of the LV-MaxSonar-EZ1 balances robust people detection ability with a narrowbeam width. This compromise does not fit all users assome users have reported that, for their application, theydesire either a wider or narrower beam. To address this,MaxBotix®, Inc., has added four additional ultrasonicrangefinders to the LVMaxSonar sensors; each calibratedto a specific beam width. This allows users to select thesensor that provides the beam width of choice. The sensorbeam width is widest for the EZ0 where it is well suited tousers desiring a high sensitivity or a wide beam width.Each sensor — the EZ1, EZ2, EZ3, and EZ4 — is progressive-ly narrower. For example, the EZ4 provides users with anarrow beam width for much better clutter or acousticnoise rejection.

The LV-MaxSonar ultrasonic rangefinders operate overthe voltage range of 2.5V to 5.5V (2 mA typical), providethree simultaneous user outputs (analog voltage, pulsewidth, and serial), fill a volume less than one cubic inch,and weigh only 4.3 grams. The rangefinders cost $29.95and are RoHS compliant.

For further information, please contact:

SERVO 10.2007 23

4613 County Road 8Brainerd, MN 56401

Tel/Fax: 218•764•2489Email: [email protected]

Website: www.maxbotix.com

MaxBotix, Inc.

Oct07NewProd.qxd 9/6/2007 9:22 AM Page 23

Page 24: Servo2007 10

Featured This MonthParticipation24 “A Day in the Life Of”

by Kevin Berry

25 Family Corner: LegendaryRobotics by Kevin Berry

Feature25 New Big Bots by Kevin Berry

Technical Knowledge28 Mounting the Solarbotics

Gearbox by Chad New

Events27 Results — Jul 15 - Aug 1230 Upcoming — Oct & Nov

Product Review29 Team Delta Powerdrive Kit

by Paul Ventimiglia

When designing a bot,certain safety rules are

in play. We all know — perthe tech regs — we need apower cutoff switch, a powerindicator, power returnisolated from the frame, andweapon restraints. What weoften forget in the process oflaying out and fabricating thebot, is to put some thoughtinto how we will activateand safely deactivate our latestmonster.

A lively debate on the RFLforum recently showed that —just like bellybuttons — allbuilders have opinions on botactivation and safing, but notwo are alike. The permuta-tions of powering up thetransmitter, turning on thebot, handling restraints,and moving the machineinto the box are endless.Toss in the unique design

of each machine and thereare few “hard” answers

outside those in the event safetyprocedures.

One technique that can beused during design is simulating“a day in the life of the bot.” Walkthrough, in discussion with another team member, each stepfrom connecting the batteries inthe pit, moving it to the box, activating it, fighting it, safing,powering it down, removing, andrecharging it. Ask questions like,“If the weapon happened to gooff while I was pulling the safetybar, where would my hands be?Would the safety bar go flying?”

24 SERVO 10.2007

PARTICIPATI N“A Day in the Life Of”

by Kevin Berry

Middleweight Heavy Metal Noise presents lotsof safety opportunities as it awaits its turn in

the arena at Battle Beach.

CombatZone.qxd 9/5/2007 10:49 AM Page 24

Page 25: Servo2007 10

SERVO 10.2007 25

Family Corner: Legendary Robotics by Kevin Berry

Taking some editorial license,(meaning I sort-of forgot to put

out a call for Family Corner items tothe community), let’s pretend I hadreally planned to talk about myteam/family this month, anyway.

Legendary Robotics is myself andthree of my children: Collin, Morgan,and Holden. We started in the sportat Robocide in January 2003, when14-year-old Collin and I shredded ourfirst bot. We then pulled in theyounger two, and started buildinginsects. We became regulars on the active Florida Insect circuit under SECR.

Three quick stories — one per kid— showing how greatly this sport hashelped them. At Battle Beach 2,Collin — a young teen — took our wellranked wedge beetle, Fir Darrig, upagainst Team Whyachi’s new spinner,3A. He was nervous for days at thethought of fighting one of Terry’sbots. Turns out, a few hits into thematch, 3A’s spinner died and Collinhad his way with it. He’s a quiet sort,but later that night I overheard himsaying to himself, “Yes! I beat Team

Whyachi!” It may have only been awedge against a beta version spinnerin an insect class, but to him, it wasthe day he beat a giant.

Morgan — after four years in thesport — took charge of her middleschool Odyssey Of The Mind teamlast year in building mannequins ofthe Three Stooges. Using parts canni-balized from her antweight, she builta moving arm complete with eye-poking fingers for one Stooge, and ahead slapping hand for another. Herpart in the skit was “Beauty Queen.”

After the skit, the judges askedabout the technical element. Dressedin her costume (a pink prom dress,heels, and a tiara), she proceeded togive them a SERVO quality lecture onhacking servos, the advantages ofNiMH batteries, fulcrum positioningon Class 1 vs. Class 3 levers, and thespeed vs. torque tradeoff problem.Eyes glazed, they awarded her teamfirst place.

Holden started fighting botswhen he was eight. In 2005, whenhe was nine and a veteran of dozensof fights, he went up against Team

Ninja’s Pirhana, one of the topranked and most vicious spinners inthe sport. Our little antweight boxbot, Babe, was getting killed. Aftermany pieces had flown off and Babehad spent more time in the air thanon the floor, Mike Emerson, the driver, backed off to let us tap outgracefully. Holden, ever the show-man, turned around to the crowd,held up his hands, and informedthem “don’t worry, folks, I’ve got himright where I want him!” To the roarof the crowd, he turned back to thebox and motioned to Mike, “bring iton!” Of course Babe got pasted, butthat day, Holden was a winner to thewhole community. SV

It’s long been known that quantitiesof Heavy and Super Heavyweight

bots are on the decline. The attrac-tion of builders to smaller bots is obvi-

ous, with less cost, quicker builds,ease of transport, and less back strainfrom lugging them around in theshop. For the spectator, though, the

bigger the bot, the better. I remem-ber standing next to the arena atRobocide, watching Countach andEradictor — over a quarter ton of

Think about and discuss aheadof time what would be done ifbatteries start to smoke duringcharging. What happens if wedrop a wire and short out a pack?Is there any way we could acciden-tally bypass the power contactor?Then, work these answers into the

design. Maybe your spinning diskneeds a couple of more holes, so asafety restraint can easily bedropped in, no matter what positionthe disk stops in. Maybe you needan insulating pad under the bat-tery’s power terminals. Perhaps alaminated checklist, so excited

drivers and wranglers don’t miss acrucial step.

It’s far better to spend an hourthinking about “What could gowrong” ahead of time, than hundreds of hours thinking “Howcould we have let that happen?”after the accident! SV

Team Moon and CombotsPromote NEW BIG B TS

by Kevin Berry

Legendary Robotics at The CapitalOffense, July 2003.

CombatZone.qxd 9/5/2007 10:49 AM Page 25

Page 26: Servo2007 10

26 SERVO 10.2007

nasty — lock together and skid acrossthe arena, crashing with such force Iwatched the steel I beams of thearena bow out nearly a foot.

A few folks are trying to counterthis decline, however. One of thefocus areas for Combat Zone isencouraging people to build big. “BigCombat Bots — Bargains orBankruptcy?’ (August ‘06), the buildreport for Tombstone in the sameissue, and our August ‘07 “HeavyPower Month” focus were allattempts to show how it can be

done without going bankrupt.While this author uses words,

(cheap and easy!) two other individ-uals have put their money wheretheir mouth is to rebuild theseweight classes ranks. Billy Moon andDave Calkins recently sponsored acash prize for builders bringing newbig bots to events.

Billy — previously a sponsor ofBattle Beach 4 — stepped up first.This March, he offered a cash prizeof $200 for a new Heavyweight, and$300 for a Super Heavy, up to 10bots, if they competed at a recog-nized event in the next 12 months.Judge Dave immediately stepped upto match this offer. With an incentiveof $400 or $600, interest soared.Within two days, nine bots had beendeclared as “in the race.” It began tolook like maybe the limit of 10 wasgoing to be reached, with others leftout. Once again, Billy decides to be ahero. (Horrible 1970s bad music pun,left to the reader to look up). Hedeclared that he would pay thebonus to ANY number of qualifying

bots that showed up at the next fourevents: Combots Cup, RoboGames,MechWars 10, and WBX IV. In May,he sweetened the pot even more,adding in his own team’s winnings tothe MechWars qualifiers! Ultimately,14 bots declared, and seven of thosequalified for the bonus money.

The rules were:

1) The sponsorship is available onlyto experienced teams that have competed in a previous RFL event.

2) The robots must represent a serious attempt to make a competi-tive machine and must pass all RFLtechnical and safety regulations.

3) Teams may construct and enter asmany robots as they wish (no limit tothe number of robots per team).

4) Robots must be entered in one ofthe following events: Combots Cup,RoboGames, Triangle City Mechwars10, or WBX -IV.

5) Robots must be new. They caneither be a total rebuild of an oldrobot or a complete new design. Thissponsorship does not cover existingrobots that have previously compet-ed at an event. One exception is thatfor a Super Heavyweight, the robotmay be composed as a “multi-bot”made up partially or completely fromexisting bots. This rule only applies toSuper Heavyweight robots.

6) Teams are encouraged toannounce their intention to claim asponsorship by posting their inten-tion to do so to the RFL forum underthe “Big Bot Sponsorship” thread.Additionaly, teams are encouragedto report on their build status under

The days of art bots are long since over,the game is kill or be killed. Billy Buckshelped to defer the costs of entrance feesand consumables like wood. Without hisoutlay, this just-for-fun bot would havenever been built. I take pride in the idea thatwinning isn’t a prerequisite to being a crowdfavorite, and that I hold the distinction ofmaking the biggest mess inside the box.Photo by Steve Judd.

Wewe was built out of used wheelchair parts and wood. The Mooney Money was used to buybatteries/parts for the flame thrower and some of the entry fee to the event. The rest of Wewewas found/scrounged. The biggest hurtle to getting into the bigger bots was battery/entry feecosts. With the Moon money, this became a non-problem. I have been helping to put onMechwars for a number of years and have had light weights/show bots and beetles before, butthis let me move up. The event was great and we went one win and two losses. I took home arobot that needed minor work on the speed controllers (Replaced switches with real ESC units)and nothing else. Given another close event, we should compete again. Dean Hoyt.

Artros. Photo courtesy of www.buildersdb.com.

Defyer 2. Photo courtesyof www.builders

db.com.

What Chewy means by “the biggest mess.” RedBarron and Mulch show why wood isn’t goodarmor against Megabyte. Photo by Steve Judd.

CombatZone.qxd 9/5/2007 10:50 AM Page 26

Page 27: Servo2007 10

SERVO 10.2007 27

the “progress reports” thread.

7) Teams will be paid via check orPayPal one week following their firstevent. In order to be paid, teamsmust send their team name, robotname, robot weight class, and eventthat they are first competing at alongwith either their shipping address orPayPal account information.

8) We reserve the right to list allsponsored robots on this and othersights to help promote the sport ofrobot combat. There are no otherstrings attached.

The winning bots were:

• SUPER HEAVYWEIGHTSRoboGames — The Red Barron —Team Tiki: Micah Leibowitz, a.k.a.,“Chewy.”

• HEAVYWEIGHTSTriangle City MechWars 10 — Wewe— Team Love Bots: Dean, Sean, andChris Hoyt.

Artros & Defyer 2 — Team RagingBrits, Mike, Martin, and Jay O’Byrne;Mel Michalchuk.

RoboGames — Enforcer X — Team XBots: Joe Murawski.

Mulch — Team PITA: Will Evans.

WBX-IV — Speed Bump X — Team XBots: Joe Murawski. SV

North America

WBX-IV Bushwacked was pre-sented by War-Bots Xtreme

in Saskatoon,Saskatchwan on7/21-22/2007.Results are as follows:

Ants — 1st: Kitbot, Fingertech;2nd: Glitch 2, Chaos Robotics; 3rd:Iron Lotus, Rumble Robotics.

Kilobots — 1st: Swiss Chef,Fingertech; 2nd: Bot and Paid For;

3rd: Roadbug, Chaos Robotics.

Beetles — 1st: Limblifter,Guavamoment; 2nd: Hoot, AcmeRobotics; 3rd: Mowbot, Inner Logic.

Mantisweights — 1st: GIR, ChaosRobotics; 2nd: Wedgely Brickleson,Fingertech; 3rd: Papillion,Guavamoment.

Lightweights — 1st: Agent 7,Team-X-Bots; 2nd: Modern DayCatastrophist, Inner Logic.

Middleweights — 1st: Maddgoth;2nd: Black Betty, Junk PropulsionLaboratories; 3rd: The Disorganizer,Team-X-Bots.

Heavyweights — 1st: Tourbillon;2nd: Enforcer X, Team-X-Bots; 3rd:Speed Bump Xtreme, Team-X-Bots.

Europe

The EuropeanFeatherweight and

Raptor Championshipswere presented by Robo Challenge in

Enforcer X was not ready for Combots due to being overweight. Between Combots andRobogames, I reduced weight and brought what amounted to a skeleton of what I would haveliked. While making a poor showing for its first time out, I was happy with the gear boxes that

use the 7” Mag Motor. We made them ourselves in a fashion as to make them available for sale.In the photo are Joe Murawski and my wife Pam. Our team name is Team-X-Bots and we are

starting our eighth year of robot fighting. Since I had it and wanted to do better, I broughtEnforcer X to WBX IV where it won second place and is qualified to go to Nationals.

I had always dreamed about building a bigrobot and here was my chance. Being only16, I was on a very serious budget. I made

the frame from 4” x 6” pine timbers andwrapped the frame in old car tires. The

motors were from an old electric wheelchair.Even though much cheaper and using crude

materials, Mulch managed to go 1-2 in thecompetition and even survived being

slammed into Megabyte in the Rumble. WillEvans, Team P.I.T.A. Photo by Steve Judd.

Speed Bump Xtreme fought at WBX IV whereit took third place (losing to Enforcer X for

second and a chance at first). Joe Murawski.

Websiteswww.team-moon.com

www.combots.net

EVENTSRESULTS — July 15th - August 12th

CombatZone.qxd 9/5/2007 10:51 AM Page 27

Page 28: Servo2007 10

28 SERVO 10.2007

Cannock, England on 7/21-22/2007.Results are as follows:

Featherweights — 1st: Beauty;2nd: Push N Shove.

Raptors — 1st: Pro-lodjo; 2nd:Nebelwerfer.

Roaming Robots held an event atthe Royal Air Tattoo at RAF

Fairford on 7/14-15/2007. Eventresults not available at press time.

South America

RoboCore Winter Challenge 2007was presented by Guerra de

Robos in Amparo, Brazil on 7/28-29/2007. Results are as follows:

Middleweight — 1st: Touro, TeamRioBotz; 2nd: Orion, Team Triton;3rd: Estepe, Team Omegabotz.

Hobbyweight (12 lb) — 1st:Tourinho, Team RioBotz; 2nd: LascaBit, Team Proteus; 3rd: Spectrum,Team Factronic. SV

This is a little ‘how to’ articlewhich I hope will give you a little

advice on how one can simply andcheaply modify some standardSolarbotics parts for use on a weight-conscious combat antweight or fairyweight robot. On these smallerrobots, it is often hard to make surewe stay under the weight limit.However, I found a great way to helpwith that. Sound like something youcould use? Give it a read!

In this particular case, I chose togo with the new Solarbotics 35:1drive units because of their smallsize, light weight, and good perform-ance numbers. Get Flippen, the botthey are used in, needs extra weightfor armor due to the amount of frag-ile components that need protecting,so I needed a light alternative to theusual 24:1 BaneBot gear motors. Theone odd thing about this motor isthat the gearbox is offset with themotor which makes a simple flatmount rather hard to do without

misaligning something. I started outwith four of the gear motors asshown here. You can also see the offset in the photo.

I thought about many differentmounting options to overcome theoffset; a piece of 90 degree angle,CNC — a box type mount that wouldenclose the whole thing, and amotor clamp. But all of the previousideas would weigh too much, costtoo much, and take too long to build.So, while eyeballing the motor, I sawthat the offset was not that much,just about 1/16” or so. Therefore, if I were to glue something that was roughly 1/16” thick to the bottom of the gearbox, it wouldnegate the offset!

I happened to have a piece of1/16” plastic lying around, so I quick-ly cut it into shape and shoe goo’d itto the side of the gearbox where thegears are furthest away from theedge. When gluing, be very carefulnot to get any inside the gearbox.

Only use a small amount at thispoint. You will use a lot more whenyou attach the unit into its final spot.Apply a little goo to the front andback of the spacer plate and attach itto the gearbox; then use a clamp tohold it in place until it is dry.

While the motor spacers are drying, you can make a set of neat-osmall and light wheels that I alsomade from a Solarbotics product.You need to start with a set of theSolarbotics RW2 wheels. Once youhave the wheels, take off the stockrubber tire and set it aside for futureuse. These are great wheels as theyare, but on a bot such as Get Flippenwhere weight is tight, the thick rubber wheel is a little too weighty.

Now that you have the wheeloff, you will see a nice aluminum hubthat has two deep grooves in it thatare perfect for a set of double O ringwheels or even O ring tank treads,should you so desire. But again, dueto weight, I only need one O ring as

Mounting the Solarbotics GearboxTECHNICAL KN WLEDGE

by Chad New

PHOTO 1

PHOTO 2

PHOTO 3

CombatZone.qxd 9/5/2007 10:51 AM Page 28

Page 29: Servo2007 10

SERVO 10.2007 29

a wheel, so the other groove may get cut off.

Take the hub and cut off the urthest groove. You can do this witha Dremel, hack saw, sander, orgrinder, whatever you have. I tookthe hub, put it into a vise, and thencut it off with a hack saw. Once I wasfinished with all of them, I gave thema ride on the belt sander to even thecut and to make them look shiny.Then all you have to do is find someappropriate-sized O rings and popthem into the grooves. Presto! Youhave a small, light, strong set of cus-tom wheels that get good traction!

Now that you have the spacersall glued to the gearboxes and abrand new set of wheels, go aheadand mount the whole thing to your

robot. Make sure you mark outwhere you want the motors to go soeverything is in correct alignment. Ichose again to use shoe goo tomount the units to my base plate.Shoe Goo is easy to work with,cheap, gives good support by fillingin all the voids, and can easily bereplaced and fixed. Dab a generousamount of goo onto the motor and

place it onto the mounting point.Wiggle the motor around so that youget goo onto all areas of the motor.Again, make sure that you DO NOTget any goo inside the gearbox!Then clamp the gearbox into placeand leave it alone until it’s dry. Thenwire it up and take it for a testdrive. See, that was not hard at all!Easy as pie! SV

Iremember reading about the drillmotors used by Battlebots on the

Internet. They were powerful andsmall, but were very hard to workwith. Drills were designed to fit insidedrill cases surprisingly, and not combat robots! Luckily for us, Dan Danknick of Team Delta sells acomplete driveline solution designedby robot builder Peter Abrahamson.

The kit consists of an 18VDewalt motor and matching gear-box, an aluminum mount, and a steelshaft that mates with the gearbox.One complete Powerdrive Kit costs$170 from TeamDelta.com withindividual spare parts priced appro-priately. I have used these motors foryears, and they have driven my 120lb robots to victory several times.They are excellent drive motors for30 lb to 120 lb robots.

Those motors are tiny, so theycan’t be very powerful, right?Wrong! Running one of these motorsat its native 18V produces almost 3/4horsepower, but it only weighs in atjust over 1 lb! Additionally, thesemotors handle some over-voltingwell. Most builders run them at 24V

and get over 1 horsepower out.The gearbox offers two different

reduction ratios because it wasdesigned to run in a drill with “high”and “low” speed. With the motor runat 24V, “low” provides 600 rpm andan impressive stall torque of 530 in-lbs, while “high” gear runs at1,930 rpm with a stall torque of 165in-lbs. Included in the kit is amachined aluminum spacer which iseasily installed in the gearbox toensure no shifting takes place duringthe harsh shock loads of combat —a nice touch!

The most valuable part of the kitis the motor mount. It only weighs 3oz, but it contains the gearbox exter-nally to prevent it from breaking apartand provides a simple and strong wayto incorporate the motor into yourrobot. There are four tapped holes onthe bottom and front of the mount,depending on whether you mountthe motor to your base plate or aframe rail. The mounted motor andgearbox is still compact enough to fitinside a two inch space — perfect forsmall 30 lb robots.

Completing the kit is a 1/2 inch

steel keyed shaft with a hardenedend that mates with the gearbox. It isready to directly drive a wheel afteryou support the shaft with two ballbearings. The entire kit weighs under2 lbs, leaving you extra weight foryour killer plasma gun weapon. SV

PHOTO 4

PHOTO 5

PRODUCT REVIEW — Team Delta Powerdrive Kit by Paul Ventimiglia

Dewalt motor kit with a custom rear mountadded for motor support.

Almost completeMW named Brutality,which uses four Dewalts in“low” gear to 3.5 inch wheels.

CombatZone.qxd 9/5/2007 10:52 AM Page 29

Page 30: Servo2007 10

EVENTSUPCOMING — October and November

US Events

Franklin Institute Robotic Conflictwill be presented by North East

Robotics Club in Philadelphia, PA on10/10/2007. The Franklin InstituteScience Museum & NERC have teamedup to host a 12 lb, 30 lb, and 30 lbSportmans class event. Matches willtake place in a 16’ x 16’ woodenfloored arena. Registration closes on9/17/2007. Go to www.nerc.us formore information.

2007 Halloween Robot Terror willbe presented by California Insect

Bots in Gilroy, CA on 10/27/2007.This is open to Fleaweights,Antweights, and Beetleweights. Therewill also be a bot costume contest —that’s right! You have to put acostume on your fighting bot. Thecostume contest will take place duringa break in fighting and the audiencewill decide the winner. There willbe prizes for the 1st, 2nd, and 3rdplace bot costume winners. Heldat Gilroy Hobby. Weigh-in starts at10:00 AM and fighting starts aroundNoon. The entry fee will be $20per fighting bot with prizes for 1st,2nd, and 3rd place in each fightingweight class. Go to www.calbugs.com for more information, includingfight rules.

HORD Fall 2007 will be presentedby the Ohio Robot Club in

Brecksville, OH on 11/3/2007. Thisevent is for Fairy, Ant, andBeetleweight combat robots. It will beheld at the Cuyahoga Valley CareerCenter (CVCC — south east ofCleveland). For complete detailsincluding rules, safety forms, releaseforms, maps, and local hotels, seethe website at www.ohiorobotclub.com.

UK Events

Roaming Robots Winter TourRound 2 will be held in

Portsmouth on 10/6-7/2007. Thisevent will take place at theMountbatten Centre, Alexandra Park,Twyford Avenue, Portsmouth. Pleasevisit www.roamingrobots.co.uk formore information.

Roaming Robots Winter TourRound 3 will be held in

Birmingham on 11/10/2007. VenueTBA.

2007 Roaming Robots Winter TourFinal will be held in Maidstone on

11/24/2007. This event will take placeat the Maidstone Leisure Centre inKent. SV

30 SERVO 10.2007

CombatZone.qxd 9/5/2007 10:52 AM Page 30

Page 31: Servo2007 10

Full Page.qxd 9/5/2007 10:21 AM Page 31

Page 32: Servo2007 10

32 SERVO 10.2007

Firgelli Miniature LinearActuators

Firgelli Technologies currently offers five variants ofits L12 miniature linear actuator line in +5 VDC and +12VDC voltage configurations. The miniature linear actuatorvariants differ in intelligence, gearing, stroke length, andlinear force. The Firgelli miniature linear actuator you see inPhoto 1 is a +12 VDC model with a gear reduction ratio of100 and a 30 mm stroke. The peak force that my L12 canproduce is 23N (newtons) or 5.175 pounds. The maximumforce you can obtain with an L12 actuator is 67N (15.075pounds) of force using a gear reduction ratio of 298. Inaddition to being powerful, the L12 gives you a positionalaccuracy of 0.1 mm.

Intelligence — as far as their product is concerned — ismeasured by the additional electronics that may be crammedinto the actuator’s internal structure. For instance, youcan get an L12 that is simply a mechanical device. Applypower and it moves. That’s it. In our case, my L12 isequipped with an integral linear potentiometer. The pot

allows me to always know where the actuator piston isrelative to its extents.

If you look closely at Photo 2, you can make outthe flexible mechanics of the linear pot flowing out intothe actuator piston area at the top of the shot. Whileyou’re focused on Photo 2, also note the motor, gear train,and lead screw in this shot. If you desire, you can take the L12 miniature linear actuator intelligence factor onestep further by ordering an L12 fitted with a standard R/Cservo interface.

As you would imagine, the basic Firgelli L12 miniaturelinear actuator is a two-wire device. Applying a positive voltage to one of its motor leads while grounding the otherpower lead will extend or retract the actuator piston,depending on the polarity. Applying a positive voltage to themotor V+ (RED) motor lead and grounding the Motor ground(BLACK) lead will cause the actuator to extend. Reversing thevoltage source connections will result in the retraction of theactuator piston.

With the basics of the Firgelli L12 understood, let’s add a feedback potentiometer to the mix. The feedbackpotentiometer, in this case, acts as a simple voltage divider.We simply apply +5 VDC to the feedback potentiometer’spositive reference pin and ground the feedback potentiome-ter’s negative reference pin. The voltage returned at the feed-

back potentiometer’s wiper is proportional tothe position of the actuator’s stroke. The L12actuator’s internal feedback potentiometer islinear with a resistance of 2.75KΩ/mm.

Building Miniature LinearActuator Driver Hardware

If all you need to do is extend and retractthe actuator piston between its extents, all youneed is a +12 VDC power source and a DPDTtoggle switch. To really exploit the advantagesof the Firgelli miniature actuator, you’ll needan intelligent motor driver. That may sound likea tall order, but in reality, it’s pretty simple to

Last time, I mentioned that I may be able to get my hot little hands on ahappen to have in my possession the ONLY Firgelli L12 miniature linear

tricky Firgelli miniature linear and all you need to know about how to

CAN Networking

PHOTO 1. The Firgelli L12 series of miniature linear actuatorsare small enough and powerful enough to work side-by-sidewith standard hobby servos. This puppy is the dog you turn to when you need that extra bit of thump.

PHOTO 2. Any closer and I would have caughtthe camera lens up in the gear train. This iswhere the work is done. Note the flexibleprinted circuit board that is most likely thepotentiometer that is used to sense theposition of the actuator piston.

Eady3.qxd 9/5/2007 2:32 PM Page 32

Page 33: Servo2007 10

do with today’s microcontroller technology.Our miniature linear actuator motor driver design will be

built around the Microchip PIC18F2685 CAN-enabled PICmicrocontroller. Pulling CAN into the miniature linear actuator motor driver design will enable us to externallymanipulate the motor control electronics by way of anotherCAN-enabled intelligent device.

We’ll definitely want to be able to move the miniaturelinear actuator’s piston in both directions. However, insteadof using that DPDT toggle switch, we’ll use the electronicequivalent: an H-bridge. From previous experiences (andSERVO articles), we all know that an H-bridge needs steeringlogic to be useful. So, instead of designing the steering logicfrom scratch, we’ll take a technological shortcut and employthe services of the Allegro Microsystems A3953 motordriver IC. The A3953 is a full-bridge motor driver with integralsteering logic. Using the A3953, we can extend and retractthe miniature linear actuator piston and apply the brakes atthe end of our moves. Only three A3953 control lines areneeded to master the miniature linear actuator and eachA3953 control line is under the care of the PIC18F2685microcontroller.

The A3953 emulates the DPDT toggle switch and throwsin a center-off feature. Basically, the A3953 applies voltage tothe L12 actuator’s motor power pins to drive the miniature

linear actuator and removes power from the motor powerpins to stop the motor. Braking turns off the source driversand turns on the sink drivers in the full bridge to dynamicallybrake the brushed miniature linear actuator motor. The polarity of the voltage applied to the miniature linear actuator motor leads — and thus the direction of the miniature linear actuator piston — is determined by the stateof the A3953 PHASE pin. The A3953 circuitry is very simpleas you can see in Schematic 1.

There’s nothing remarkable about the contents ofSchematic 2, either. However, note that I have reserved twoPIC analog inputs for a pair of potentiometers in additionto the miniature linear actuator feedback potentiometer.I’ve done this to illustrate how one can set the extents orpreset an actuator position by simply adjusting the extendlimit and retract limit potentiometers. Here’s how thatworks.

The Firgelli actuator driver firmware is constantly monitoring the position of its piston as it moves towards itsdesignated stop point. If we desire, we can read the appropriate extent potentiometer’s value prior to the actuator move. Then, we simply compare the value returnedfrom the miniature linear actuator’s feedback potentiometerwith the value of the extent or retract potentiometer we readprior to the move. When the feedback potentiometer value

LINEAR ACTUATOR CONNECTOR TABLEPIN 1 - ORANGE - POT NEGATIVE REFERENCEPIN 2 - PURPLE - -POT WIPERPIN 3 - RED - MOTOR +PIN 4 - BLACK - MOTOR GNDPIN 5 - YELLOW - POT POSITIVE REFERENCE

BLACK

BRAKE RED

FWD/REVENABLE

MOTOR +MOTOR GNDPOT +

POT -POT WIPER

+5VDC

+5VDC

+12VDC+5VDC

+12VDC

R120.56 1W

R1110K

C10.01uF

R1010K

C6680pF

LINEAR ACTUATOR MOTOR

C8.1uF

U4

A3953

1

23

45

678 9

10

1112

13

14

15

16BRAKE

REFRC

GNDGND

VCCPHASEENB VLOAD

OUTA

SENSEGND

GND

MODE

OUTB

VLOAD

C9.1uF

R930K

C7.1uF

FIRGELLI CONNECTOR

12345

SCHEMATIC 1. I’ll let you read theA3953 data sheet for yourself.It’s rather obvious that deployingthe A3953 is a very easy job toundertake.

miniature linear actuator. Well, you’re in luck. As of this very moment, I justactuator in the world. Before we’re done, you’ll have the low-down on the code it into the electromechanical side of your actuator robotic designs.

Miniature Styleby F red Eady

SERVO 10.2007 33

Eady3.qxd 9/5/2007 2:33 PM Page 33

Page 34: Servo2007 10

34 SERVO 10.2007

matches the extent limit or retract limit potentiometer value,we stop the motor. In fact, we perform this same mechanicalpotentiometer extent limit process programmatically in theminiature linear actuator driver firmware every time we makean actuator move.

As you can see, building up the L12 driver hardware is awalk in the park. If you built up the CAN modules I describedin the previous issues of SERVO, you can piggyback thisminiature linear actuator circuitry onto those boards.

I’m always working on the “next” project and sometimesthe design changes after the pretty printed circuit boards(PCBs) are manufactured. Photo 3 is an example of this. Icobbled together the circuitry you see in the schematics ontoa CAN-enabled PCB that was really designed for another project. It’s ugly, but it works.

Now that we’re done with the hard stuff, let’s get moving on the soft stuff.

Writing the Miniature LinearActuator Driver Firmware

We will code our actuator application in C using the HI-TECH PICC-18 C compiler. The first order of firmware businessis to write some code to simply retract and extend the piston.The code that follows is built around the A3953 truth table:

//*******************************************************// LINEAR ACTUATOR DRIVER DEFINITIONS//*******************************************************#define out 0b00010000 //extend#define in 0b00010001 //retract#define actuator LATB#define cntl_mask 0b00101000#define brk_actuator actuator &= cntl_mask#define extend_actuator actuator &= cntl_mask; \

actuator |= out;#define retract_actuator actuator &= cntl_mask; \

actuator |= in;

#define pnFR LATB0#define pnENA LATB1#define pnBRK LATB4//*******************************************************

To move the actuator, the A3953’s BRAKE line must beheld logically high. Bringing the BRAKE line low will apply thebrake pedal no matter what the state of the other A3953 control lines. You can see the A3953’s BRAKE line (LATB4) heldlogically high in the out and in binary definitions. Since we’resharing PORTB pins with the CAN interface, we must be carefulnot to interfere with the CAN I/O while moving the miniaturelinear actuator’s piston. On the other side of that, we don’twant the CAN stuff washing over into our motor movement,either. To prevent any contention, we will use a mask(cntl_mask) to preserve the condition of the CAN I/O interfacewhen we make actuator moves using the other PORTB I/O pins.

Now that we have the A3953 basic motor movement bit

F/R

+5VDC

+5VDC

+5VDC

+5VDC

+12VDC +5VDC

R110K

D2RED

C1.1uF

C4

.1

ICSP CONNECTOR

13579

2468

10

13579

246810

C2.1uf

VR1LM340S-5.0

1 3

2

IN OUT

GN

D + C13220uF

R3 1K

R7330

TO MICROCHIP ICD2

JF1

12

34

56

R8

10K

R9

10K

TO CAN ICSP CONNECTOR

13579

246810

13579

2468

10

R5470

+ C510uF

X110MHz

R4

120

+C11

680uF

C3.1uF

U1

PIC18F2685

1

2345

7

8

9

10

1112131415161718

19

20

2122

23

24

25262728

6

MCLR/Vpp

RA0RA1RA2RA3

RA5

GND

OSC1

OSC2

RC0RC1RC2RC3RC4RC5RC6/TXRC7/RX

GND

VCC

RB0RB1

CAN_TX

CAN_RX

RB4RB5

PGC/RB6PGD/RB7

RA4

R6470

U2

MCP2551

1

4

3

2

5

6

7

8

TXD

RXD

VDD

GND

VREF

CANL

CANH

RS

C12.1uF

R2100

D3

GRN

LINEARACTUATORPOT

D1GRN

SCHEMATIC 2. This circuitry is akin to anamplifier. Applying this technology to control

the Firgelli L12 miniature linear actuator resultsin major gains in terms of movement control

for your robotic projects.

Eady3.qxd 9/5/2007 2:33 PM Page 34

Page 35: Servo2007 10

patterns and the mask bit pattern defined, we can now move theactuator by combining the motor movement bit patterns and themask bit pattern onto the PORTB I/O latch. As you can see in thelinear actuator driving definitions, the bit pattern combinationsresult in the three commands we need to produce actuatormotion (brk_actuator, extend_actuator, and retract_actuator).

The higher the gear reduction ratio, the slower the actua-tor piston will move. Thus, it takes a couple of seconds for theL12 that I have to move from extent to extent. We must com-pensate for this in our actuator driver firmware. The solution isto code in a firmware real-time clock, which is based on one ofthe PIC’s internal timers. Our miniature linear actuator driverfirmware design will employ the services of the PIC’s TIMER3.

In the code that follows, I’ve configured TIMER3 to inter-rupt every millisecond based on a 10 MHz system clock. In themeantime, every tick of the firmware clock will provide timingmechanisms we can use to create time delays that range frommilliseconds to hours. Our real-time clock code also providesa visual indication that it is running by toggling the miniaturelinear actuator driver board’s activity LED every second. Here’sthe source code behind our firmware real-time clock:

//*******************************************************//* CONFIGURE AND START TIMER3//* SET TO OVERFLOW EVERY 1mS//*******************************************************

hours3 = 12;mins3 = 0x00;secs3 = 0x00;milliseconds3 = 0;T3CON = 0x00;TMR3H = 0xF6;TMR3L = 0x3C;TMR3ON = 1;

//*******************************************************//* CONFIGURE EXTERNAL INTERRUPTS//*******************************************************

enable_TMR3int;enable_GLOBALint;

//*******************************************************//* INTERRUPT HANDLER ROUTINE//*******************************************************void interrupt TIMERS(void)

if((TMR3IF && TMR3IE))

TMR3IF = 0;TMR3H = 0xF6;TMR3L = 0x3C;

++msecs_timer3;if(++milliseconds3 == 1000)

milliseconds3 = 0;++secs3;++secs_timer3;act_led ^= 1;

if(secs3 == 60)

secs3 = 0;++mins3;++mins_timer3;

if(mins3 == 60)

mins3 = 0;++hours3;

//*******************************************************

Up to this point, we’ve written enough code to success-fully move the miniature linear actuator’s piston from fullretract to full extend and vice versa. If we want to preciselyposition our actuator piston, we must code some firmware tomonitor the piston’s position relative to the piston’s extents.The hardware we will use to monitor the piston position consists of the analog-to-digital (A-to-D) conversion enginethat is native to the PIC18F2685. To use the PIC’s A-to-D hardware, we must configure it and enable it in firmware asI have done in this code snippet:

TRISA = 0b11111111; //PORTA = ANALOG INPUTSTRISB = 0b11001000; //PORTB = DIGITAL I/O PLUS CANTRISC = 0b11111001; //PORTC = ACTIVITY LED

//*******************************************************//* CONFIGURE EEPROM READ/WRITE//*******************************************************

EECON1 = 0b00000000; //ENABLE EEPROM FOR READ/WRITE//*******************************************************//* CONFIGURE A2D AND COMPARATORS//*******************************************************

ADCON0 = 0b00000000; //SELECTS ANALOG INPUT CHNADCON1 = 0b00001010; //ENABLE ANALOG INPUTS AD0-AD4ADCON2 = 0b10111111; //CONVERT ON RC OSCADON = 1; //POWER ON THE ADCCMCON = 0x07; //DISABLE THE COMPARATORS

//*******************************************************

Okay, with the addition of the A-to-D configuration code,we can now programmatically move the miniature linearactuator piston and check on its position and progress.

To be able to move the piston within the boundaries ofits extents, we must know what those extents are.Otherwise, the firmware will be able to initiate a move to a

SERVO 10.2007 35

PHOTO 3. What you don’t see in this shot is the cut lands andpoint-to-point “custom” wiring I did on the other side of thisboard. Otherwise, a few 0Ω resistors and some clever parts

placement made this board a perfect surrogate miniaturelinear actuator driver board.

Eady3.qxd 9/5/2007 5:02 PM Page 35

Page 36: Servo2007 10

36 SERVO 10.2007

point in space that resides beyond the extent boundaries. Ifthis happens, the actuator will drive the piston indefinitely inthe direction of the target point. That’s a bad thing. To makesure we never put ourselves into the beyond-the-extents position, we can pool our current firmware resources andbuild a calibration routine into our firmware.

Here’s what the miniature linear actuator calibration routine I assembled looks like:

//*******************************************************//* CALIBRATE ACTUATOR//*******************************************************void calibrate_actuator(void)

char x;

retract_actuator;secs_timer3 = 0;while(secs_timer3 < 5);for(x=0;x<21;++x)

ADCON0 = 0b00000001;GODONE = 1;while(GODONE);

slider_vals[ee_full_retracthi] = ADRESH;slider_vals[ee_full_retractlo] = ADRESL;

extend_actuator;secs_timer3 = 0;while(secs_timer3 < 5);

for(x=0;x<21;++x)

ADCON0 = 0b00000001;GODONE = 1;while(GODONE);

slider_vals[ee_full_extendhi] = ADRESH;slider_vals[ee_full_extendlo] = ADRESL;brk_actuator;retract_actuator;delay_secs3(5);brk_actuator;write_slider_ee_vals();read_slider_ee_vals();full_retract =

make16(slider_vals[ ee_full_retracthi],slider_vals[ee_full_retractlo]);

full_extend = make16(slider_vals[ee_full_extendhi],

slider_vals[ee_full_extendlo]);//*******************************************************

Let’s walk through the logic in the calibrate_actuatorfunction. As a starting point, we retract the actuator to itsretract extent. Recall that moving the actuator piston takestime that we must compensate for. In the code I’ve provided,five seconds is ample time to move the actuator piston fromone extent to the other. Once the actuator piston is at itsretract extent, I kick off an A-to-D read of the feedbackpotentiometer wiper. The 10-bit feedback potentiometerwiper value is then stored as the full-retract feedback potentiometer wiper value (ee_full_retracthi, ee_full_retractlo), which will be stored into the PIC’s EEPROM for later use.With the retract extent value in the memory bank, I thencommand the miniature linear actuator to extend its pistonto the extend extent. After allowing enough time for the

piston to reach full extension, I kick off another A-to-D readof the feedback potentiometer wiper. This value is stored asthe full-extend feedback potentiometer wiper value(ee_full_extendhi, ee_full_extendlo). As with the full-retractvalue, the “ee” preceding the full-extend value means thatthe full-extend value is also stored in EEPROM, just in case weneed to retrieve it later.

With both extent values in hand, I brake the miniaturelinear actuator’s motor and retract the piston to the retractextent. I then write the extent values to the PIC’s EEPROMand read them back before committing their values to theirrespective program variables (full_retract, full_extend).

One would be led to believe that the extents would runfrom zero (0x0000) to the maximum count (0x03FF) that thePIC’s 10-bit A-to-D can render. That’s not true. My Firgelli L12actuator’s full_extend value is 0x00C9 and the full_retractvalue is 0x03E5. (I’ll always use A-to-D ticks in this discussion.If you wish to convert A-to-D ticks to voltage, multiply the A-to-D values by 0.005 volts.) It is important to rememberthat although every Firgelli L12 miniature linear actuator willbe physically identical, they most likely won’t be electricallyidentical. I happen to have a pair of Firgelli L12 miniature linear actuators and the second unit’s full_extend value is0x00B9 and its full_retract value is 0x03E2.

The calibration routine simply moves the actuator’s piston to their extents and takes a voltage reading. We mustprovide a more accurate method of moving the actuator piston between the extents. The way we will do this is by taking multiple A-to-D readings and using their average asthe result. Note that in the calibration routine we took multiple readings, but did not average them. In both cases —averaging and not averaging — we are “filtering” the A-to-Dinput voltage by performing a number of readings on thevoltage source. If you’ve worked with A-to-D stuff before, youknow that sometimes the voltage you read can spike or fadewith single A-to-D reads. Reading the voltage several times“filters” out the peaks and valleys. By trial and error, I believereading the voltage at least 20 times is very reliable. The codeto obtain an accurate actuator piston position looks like this:

//*******************************************************//* GET LINEAR ACTUATOR POSITION//*******************************************************unsigned int get_actuator_position(void)

unsigned int rc;

sum = 0;for(rc=0; rc<20; ++rc)

ADCON0 = 0b00000001;GODONE = 1;while(GODONE);sum += make16(ADRESH,ADRESL);

rc = sum / 20;return rc;

//*******************************************************

Okay, now that we can compute the actuator pistonposition accurately, let’s use all of the firmware stuff we’ve written thus far to fabricate a precision move routine.

Eady3.qxd 9/5/2007 2:33 PM Page 36

Page 37: Servo2007 10

Here’s what I came up with:

//*******************************************************//* MOVE ACTUATOR TO VECTOR ROUTINE//*******************************************************void move_actuator(unsigned int vector)

actuator_loc = get_actuator_position();if(actuator_loc < vector)

retract_actuator;do

actuator_loc = get_actuator_position();while(actuator_loc != vector);brk_actuator;

else

extend_actuator;do

actuator_loc = get_actuator_position();while(actuator_loc != vector);brk_actuator;

S//*******************************************************

Walking through the MOVE ACTUATOR TO VECTORROUTINE, you immediately see me use the get_actuator_position function we just wrote to provide a valuefor the actuator_loc variable. The argument (vector) of themove_actuator function is the desired position in A-to-D ticksthat we want to move the actuator piston to. The A-to-D tickcount increases as the actuator piston moves towards thefull-retract extent and decreases as the actuator piston movestowards the full-extend extent. With that bit of physicalknowledge, we can determine which way to move the actuator piston by examining the A-to-D tick count of its current position. Thus, if our desired final vector value isgreater than the actual location of the actuator piston, weknow to retract to the desired vector. Conversely, if we findthat the vector actuator piston A-to-D tick count is less thanour current piston location, we extend the actuator piston toreach the new target vector.

We can actually stop here as our miniature linear actua-tor driver firmware work is done. That’s no fun. So, let’s puttogether a small application and use those extra potentiome-ters I mounted on that PCB. Before we look at the miniaturelinear actuator application, I need to show you a couple ofmacros I whipped up to make the delay timing easier:

#define delay_msecs3(msecdelay) msecs_timer3 = 0; \while(msecs_timer3 < msecdelay);

#define delay_secs3(secdelay) secs_timer3 = 0; \while(secs_timer3 < secdelay);

Remember, the PIC’s real-time firmware clock is alwaysrunning. That allows me to collect milliseconds and seconds inthe msecs_timer3 and secs_timer3 variables for use in themacros I just introduced to you. One more thing before weexamine the actuator positioning application. It may help to beable to read the extent potentiometer values. Here’s that code:

//*******************************************************//* GET ACTUATOR POSITION AND POT VALUES//*******************************************************void get_pot_positions(void)

char x;

for(x=0;x<20;++x)

ADCON0 = 0b00001101;GODONE = 1;while(GODONE);

adc_set_hi = make16(ADRESH,ADRESL);for(x=0; x<20; ++x)

ADCON0 = 0b000010001;GODONE = 1;while(GODONE);

adc_set_lo = make16(ADRESH,ADRESL);

//*******************************************************

I used the “bang-the-heck-out-of-it” A-to-D method toobtain the A-to-D tick values of the potentiometer pair. The vari-able adc_set_hi is used in our application as the retract extentvalue. That leaves the adc_set_lo variable to set the extendextent. Now I can show you the little application I put together:

void main(void)//*******************************************************//* INITIALIZE//*******************************************************

init();//*******************************************************//* MAIN SERVICE LOOP//*******************************************************

calibrate_actuator();do

get_pot_positions();move_actuator(adc_set_hi);delay_secs3(5);move_actuator(adc_set_lo);delay_secs3(5);

while(1);//*******************************************************

Take a look at Screenshot 1. The results of the calibrate_actuator function are shown in the full_extend and full_retractvalues. This set of calibration values tells you that I’m using the“second” Firgelli L12 miniature linear actuator. The extent limit

SCREENSHOT 1. Note that the actuator_loc value matches theadc_set_hi value. That’s a good thing.

SERVO 10.2007 37

Eady3.qxd 9/5/2007 2:34 PM Page 37

Page 38: Servo2007 10

potentiometer A-to-D tick values are displayed as adc_set_hi andadc_set_lo. I resumed the actuator piston position applicationand stopped after the actuator piston was repositioned. The

results are displayed in Screenshot 2. Again, the actuator pistonsought out the new position vector and went there.

You CAN Do This Too

If you got the chance to read the recent SERVO CAN articles, you are already thinking about how to embed thenecessary codes into the CAN messages to utilize the Firgelliactuator driver routines I’ve presented here. For instance, youcould send a two-byte CAN message “M 0x100.” The “M”could be interpreted to mean call the move_actuator functionwith the 0x100 being the move_actuator function’s vectorvalue. On the other side of that, you could load up a CAN mes-sage with the actuator_loc value and report the current posi-tion of the actuator’s piston to any CAN nodes that request it.

I had a bunch of fun with this project. I’ve supplied the fullFirgelli L12 miniature linear actuator driver source code listing soyou can have some fun too. Take a look at the CAN drivers I pre-sented in previous SERVO articles and mix in the actuator drivercode you have access to this month on the SERVO website atwww.servomagazine.com. You’ll find that you really CAN putthe Firgelli L12 miniature linear actuators to work for you. SV

Fred Eady can be reached via email at [email protected]

SCREENSHOT 2. I love it! I ran this program over and over withconsistent results like this. If you like blinking lights, you’ll lovewatching the Firgelli L12 miniature linear actuator move thatpiston at your command.

• Firgelli Technologies, Inc. (www.firgelli.com): Firgelli L12

Miniature Linear Actuators

• HI-TECH Software (www.htsoft.com): HI-TECH PICC-18 C Compiler

• Microchip (www.microchip.com): PIC18F2685

• Allegro Microsystems (www.allegromicro.com): A3953

SOURCES

38 SERVO 10.2007

Eady3.qxd 9/5/2007 2:34 PM Page 38

Page 39: Servo2007 10

Last month,in Part 1 of thisseries, we assem-

bled the chassis and power supply cir-cuitry for M-bot, an autonomous robotwhich uses the eight-pin PICAXE-08Mmicrocontroller as its only processingpower. This month, we will take adetailed look at M-bot’s circuitry. Inaddition, we will present two simplesoftware routines that will enable M-botto avoid obstacles, and to respond tovisible light levels in its environment.Finally, we will suggest a couple of pos-sible modifications and improvementsyou might want to consider as you carryout your own experiments with M-bot.

Hopefully by now, you have beenable to obtain all of the necessary partsand are ready to tackle M-bot’s electronics and software. In order tofacilitate the discussion and construc-tion of M-bot’s circuitry, the completeschematic is presented in Figure 1 anda photo of the completely wired bread-board area is presented in Figure 2.

PICAXE-08M CircuitryTwo aspects of the PICAXE circuitry

presented in Figure 1 are worth mention-ing. First, if you are familiar with the

standard PICAXE programmingcircuit, you may be surprised to see the

five-pin header. I now make all myPICAXE programming cables using nine-or 10-pin ribbon cable with a female DB-9 IDC connector on the PC end, and a2x5 female IDC connector on the PICAXEend (which mates with the five-pin header in the schematic), because it’seasy to make these cables without need-ing to solder or crimp individual wires.

If you are interested in making thistype of PICAXE programming cable,you can see the construction details onmy website (www.JRHackett.net). Ifyou prefer to use the standard three-pin connection, feel free to make thechange (pins 1 and 4 on the five-pinheader aren’t used, anyway).

The second thing you may havenoticed is that there is a 220Ω resistor inseries on the serout programming line(output0, pin 7). The PICAXE standardspecifies 180Ω for this, but that size resis-tor is harder to locate, and I have foundthat 220Ω works fine. If you have 180Ωresistors available, you could certainly useone in place of the 220Ω resistor.

DC Motor ControlCircuitry

Let’s begin with M-bot’s motor con-

trol subsystem, which essentially consistsof two geared DC motors and a dual H-bridge motor driver chip. R/C-type servomotors do have one advantage over DCmotors: they can be driven directly from aPICAXE I/O pin. DC motors, on the otherhand, require additional driver circuitrycapable of handling the current requirements of the motors, which can beseveral amps or more for larger motors.

One of the common choices for driv-ing DC motors is the integrated H-bridgechip, which contains the necessary powertransistors and related circuitry to get thejob done. For M-bot, we will be using theSN754410 motor driver chip; it can handlethe small Tamiya motors without aheatsink, and it’s easy to interface withthe PICAXE. You could just as easily usean L293D motor driver if you have one tospare; it’s pin-for-pin compatible with the754410. In fact, that’s what I did (becauseI had an extra one), but the L293D is considered “obsolete” at this point, so Iput the 754410 in the parts list.

The 754410 (available from Pololuand elsewhere) is a quadruple half-H driv-er, which means that it is capable of driving two independent DC motors. Ifyou read the data sheet (available on thePololu website; www.pololu.com) —which is always a good idea when addingany chip to your design — you will see that

SERVO 10.2007 39

FIGURE 1. M-bot’s schematic diagram.

M-BOTM-BOTPART 2 by Ron Hackett

Hackett2.qxd 9/5/2007 1:09 PM Page 39

Page 40: Servo2007 10

40 SERVO 10.2007

it requires three inputs for each motor(pins 1, 2, 7, 9, 10, and 15 in Figure 1).

If we were using a larger processorthan the PICAXE-08M, it wouldn’t be aproblem to reserve six pins for motorcontrol. However, on the 08M we onlyhave five I/O pins to begin with, and we need two of them for IR obstacledetection and one for the LDR sensor,so we need to find a way to reduce the754410’s I/O requirements from six totwo pins.

In order to do so, let’s look at the754410 connection requirements inmore detail (see Figure 1). The chip controls each motor via three pins: onepair of pins controls the direction ofeach motor (pins 2 and 7 for one motoror 10 and 15 for the other) and a third(Enable) pin (pins 1 and 9) controls thepower to each motor. So, consideringthe direction control of the motor con-trolled by the pins on the left side of thechip, for example, we see that a highlevel on pin 2 and a low level on pin 7runs the motor in one direction, while alow level on pin 2 and a high level onpin 7 runs it in the opposite direction.

To see how we can conserve one08M I/O pin for each motor output,consider M-bot’s left motor, which is

connected to the 08M output 4(pin 3) in the schematic in Figure1. First, output 4 is connected toboth inputs (pins 9 and 10) ofone 74HC00 NAND gate andthen to pin 2 of the SN754410.The output of the NAND gate(pin 8) is connected to pin 7 ofthe SN754410.

If you look at the NANDgate truth table presented inFigure 3, you can see that a NAND gate with its two inputs tied together functions as an inverter; two high inputs produce a low output, and viceversa. Of course, we could use a

hex inverter chip to accomplish thesame thing, but as we will soon see,we still need three additional NANDgates for M-bot’s circuitry, so we willstick with our implementation of aninverter from a NAND gate and meetall our logic needs with one IC.

With the NAND gate connected asdescribed above, when the 08M’s output4 is high, pin 2 of the SN754410 is highand pin 7 is low, so the left motor turnsin one direction. On the other hand,when the 08M’s output 4 is low, pin 2 ofthe SN754410 is low and pin 7 is high, sothe motor turns in the opposite direction.In other words, we can now control themotor’s direction with only one 08M I/Opin. Since the same holds true for the circuitry connected to the 08M’s output0 (pin 7 — right motor), we have reducedthe necessary I/O connections to theSN754410 from six to four, but we stillneed to free up two more 08M I/O pins.

The solution I finally arrived atinvolves a sacrifice, but it’s a small one— I decided to give up the ability to runM-bot in reverse. You may wonder howM-bot will ever be able to get out of ajam without being able to back up. Theanswer is simple — turn around! In fact,this is actually an advantage in disguise.If M-bot could back up, we would needanother set of sensors pointing to therear to avoid bumping into things; byturning around instead, we avoid theadditional complexity and expense.

Essentially, what we are going to dois to convert “reverse” to “stop.” In orderto understand how this works, we need

to examine how motor rotation relates toM-bot’s movement. If we connected theSN754410’s two enable pins (pins 1 and9, Figure 1) to +5 volts, the two motorswould always be rotating in one of thefollowing four combinations: forwardrotation of both motors results in M-botmoving forward; forward rotation of theleft motor and backward rotation of theright motor results in M-bot turning inplace to the right; backward rotation ofthe left motor and forward rotation ofthe right motor results in M-bot turningin place to the left; and a command forbackward rotation of both motors resultsin M-bot moving backward.

So, what we need to do is to con-vert the last possibility into “a commandfor backward rotation of both motorsresults in M-bot stopping,” and we canuse a third NAND gate to do exactly that.As you can see in Figure 1, the NANDgate that has pins 1 and 2 as inputs hasone input connected to the inverteddirection control output for one motor,while the other input is connected to theinverted direction control output for theother motor. This NAND gate’s output(pin 3) is connected to both SN754410Enable inputs (pins 1 and 9, Figure 1).

If you look again at the NAND truthtable in Figure 3, you can see that the twoEnable pins are high for three of the fourpossible combinations of 08M motor out-puts; the one exception occurs when both08M motor outputs are low. When andonly when this happens, the two invertedNAND outputs (pins 8 and 11) are high.Therefore, the two inputs (pins 1 and 2)of the third NAND gate are also high,which is the only combination that pro-duces a low output at pin 3 of the gate.

Since this output is connected toboth SN754410 Enable pins (1 and 9),we get the result we want: when the08M issues a “forward,” “turn left,” or“turn right” command, the M-bot dutiful-ly obeys; when the 08M says “reverse,”the M-bot defiantly stops! We can nownavigate the M-bot around its environ-ment using only two 08M I/O lines.

IR ObstacleDetection

Now that we have covered M-bot’smotor control circuitry, we can turn ourattention to the IR obstacle detection

M-BOTFIGURE 2. M-bot’s completedbreadboard assembly.

FIGURE 3. 74HC00 quad NAND gatetruth table.

INPUT 2INPUT 1 High Low

High Low HighLow High High

Hackett2.qxd 9/5/2007 1:09 PM Page 40

Page 41: Servo2007 10

M-BOTcircuitry. It’s very similar to the stand-alone 08M IR obstacle detectionproject presented in “Robot’s LittleHelper” (SERVO Magazine, October‘06, pp. 40-43), so I won’t repeat thedetails. Essentially, M-bot emits a shortPWM pulse on the IR LEDs attached tooutput 2 (pin 5), and listens for theecho on input 3 (pin 4). If an obstacleis detected, evasive action is taken.

The only unusual feature of M-bot’s IR circuitry is that the twoPanasonic IR detectors are connectedto the inputs (pins 4 and 5) of the oneremaining NAND gate. Since we onlyhave one 08M I/O pin left for IR obsta-cle detection, we can’t connect each IRdetector separately, but in spite of this,it’s still helpful to use two IR detectorsbecause it gives us wider coverage todetect obstacles in front of M-bot.

The Panasonic IR detectors areactive low, which means that their outputs go low whenever an obstacleis detected. If you refer once more tothe NAND truth table in Figure 3, youcan see that the gate’s output is highwhenever either (or both) inputs arelow. So, if either IR detector spots anobstacle, the 08M’s input 3 goes highand evasive action can be taken.

When you assemble the IR detec-tion circuit, be sure to completely coverthe sides of the two IR LEDs with heatshrink tubing (or black tape), as shownin Figure 2. Otherwise, the IR detectorswill pick up the direct IR emissions fromthe LEDs, and M-bot will continuallyspin around helplessly!

Visible LightDetection

M-bot’s visible light detection circuitry is all that remains to discuss. Itemploys a cadmium sulfide (CdS) pho-tocell, also known as a light dependentresistor (LDR), and is super simple. Thebasic idea is to connect the LDR inseries with a fixed resistor with one endof the two-resistor circuit connected to+5 volts and the other end connectedto ground. The junction of the tworesistors is connected to the 08M’sinput 1 (pin 6), and the analog voltageproduced by this basic voltage dividercircuit is measured using the 08M’s“readadc” command.

The LDR that I used is from aRadioShack five-piece “variety pack.” Itsresistance varies from approximately20K in relative darkness down to 1Kwhen a lit flashlight is pointed directlyat it. As a result, the analog voltage atinput 1 varies roughly between one voltin darkness and four volts in bright light.

The minimum and maximum resist-ance values for the LDR are not at allcritical, but choosing one with a relatively large variance will also produce a large swing in the input analog voltage. You can wire eitherend of the voltage divider to +5 volts,but if your LDR is the same as the oneI used (i.e., resistance is inversely proportional to light-level), connectingit to +5 volts (and the fixed resistor toground) results in the analog voltagebeing directly proportional to the lightlevel, which simplifies computations.

If your LDR has different minimumand maximum values, here’s a handyformula to determine the value of the fixed resistor that will result in the largest possible variance in the input analog voltage: Multiply the LDR’sminimum and maximum values together and takethe square root of theproduct. For example,using my values of 20Kand 1K, 20K times 1K is20M, and the squareroot of 20M is 4.47K, so4.7K is close enough.

M-botSoftware

There are twosample software pro-grams available onthe SERVO Magazinewebsite (www.servomagazine.com). Thefirst, M-bot_IR.basdemonstrates M-bot’sobstacle avoidancecapabilities. Downloadit and use theProgramming Editorsoftware (www.picaxe.co.uk) to transfer thesoftware to M-bot. Ifyou have difficulties getting it to function

properly, it might help to temporarilyremove the LDR from pin 6 of the 08M,modify the software to make the pin anoutput by changing the “dirs” commandto “dirs = %00010111” (see the PICAXEmanual, part 2, for documentation onthe “dirs” command), and attaching avisible LED and current limiting resistorto the pin. Then you can insert a simplecode fragment to blink the LED whenev-er an obstacle is detected to providevisual feedback for debugging.

The second sample program (M-bot.bas) available on the SERVOwebsite implements simple light-seeking behavior. M-bot turns in placeto locate the brightest direction. Whenhe finds it, he heads in that directionuntil an obstacle is detected and thenagain scans his environment to locate alight source. In a dimly-lit room, whenev-er a flashlight is turned on and pointed inhis direction, M-bot will head toward it.

Both programs are fairly simple, andare intended as springboards for yourown ideas. We may have fairly wellmaxed-out the PICAXE-08M’s hardwarecapabilities but as M-bot’s CPU, but there

SERVO 10.2007 41

ITEM DESCRIPTION PART NO.DC motors and gearbox Tamiya #70168 double

gearboxWheels (2) Tamiya #7010 truck tire setBall caster Tamiya #70144 ball casterBase (bottom) Custom laser-cut (or DIY)Base (top) Custom laser-cut (or DIY)6-32 threaded rod (or 1-1/2 inch standoffs)4-40 bolts (4) RadioShack #64-30114-40 nuts (4) RadioShack #64-30189V battery RadioShack #23-8759V battery Connector RadioShack #270-3249V battery Holder RadioShack #270-326AA battery (4) RadioShack #23-873AAbattery pack holder RadioShack #270-383SPST toggle switch RadioShack #275-612SPST toggle switch RadioShack #275-324Breadboards (2) Pololu #0351 BreadboardJumper wires Pololu #0354 Jumper

Wire KitC1 100 µF (35V) elect. cap RadioShack #272-1028C2 10 µF (35V) elect. cap RadioShack #272-1025IRin1, 2 IR detector Panasonic #PNA4620MIR-LED1, 2 IR LED VariousLDR Light dependent resistor RadioShack #276-1657

(assorted)R1 Resistor, 4.7K, 1/4 watt RadioShack #271-1330R2 Resistor, 22K, 1/4 watt RadioShack #271-1339R3 Resistor, 10K, 1/4 watt RadioShack #271-1335R4 Resistor, 220Ω, 1/4 watt RadioShack #271-1313R5 Resistor, 470Ω, 1/4 watt RadioShack #271-1317U1 PICAXE microcontroller PICAXE-08MU2 Quad NAND-gate 74HC00U3 Motor driver SN754410U4 LM7805 voltage regulator RadioShack #276-1770

LINKSPololu — www.Pololu.com; JR Hackett — www.JRHackett.net;RadioShack — www.radioshack.com

M-bot’s Parts List

Hackett2.qxd 9/5/2007 1:09 PM Page 41

Page 42: Servo2007 10

is still plenty of room for software modi-fications and improvements. Experimentwith M-bot and see what you can create!

One final note — as I was experi-menting with M-bot, I learned twoimportant facts concerning the Tamiyadouble gearbox. First, it helps to followTamiya’s directions to lubricate thegears. I initially skipped this step, andbefore long, M-bot was behaving slug-gishly. I thought I had possibly depletedhis motor battery pack, but that wasn’t

the case. It took me a while to figure itout, but once I did apply Tamiya’s includ-ed lubricant, M-bot was as good as new!

Secondly, I also discovered that it’sa good idea to seal the large openareas in the double gearbox — widemasking tape works well. At one point,M-bot began behaving erratically —veering off in one direction and thenanother. At first, I thought it was a software problem, but after a while Idiscovered a fairy substantial fuzz-ball

lodged in one set of gears. Afterremoving it with tweezers (which washarder than it sounds), I taped up theopenings and M-bot has been well-behaved since then. Maybe my nextproject should be a vacuuming robotfor my basement work area!

ConclusionWe have accomplished our goal of

creating an intelligent, autonomousrobot using the PICAXE-08M as its onlyprocessing power. That alone is quitean accomplishment, but it’s only thebeginning. There is ample space on M-bot’s breadboards to accommodateconsiderable variations on the theme.

The most obvious approach toexpanding M-bot’s capabilities is toreplace the 08M microcontroller with alarger processor. For example, therecently released PICAXE-14M chip —with 11 I/O pins — would enable us toeliminate the 74HC00 quad NANDgate and directly interface the CPUwith the SN754410 motor driver chip.

Another possibility would be todevelop a multiprocessor-based bot. Forexample, we could use an 08M for the IRobstacle detection system (see “Robot’sLittle Helper” in the October ‘06 issue ofSERVO Magazine) and a PICAXE-28Xprocessor (which has two independentPWM outputs) to implement variablespeed control for our bot’s DC motors.

Or, you could even take M-bot in anentirely different direction. For example,in the process of writing this article, Itested a second version of M-bot, whichisn’t autonomous at all; M-bot becomesa completely remote-controlled vehicleusing an ordinary TV remote in conjunc-tion with the 08M’s “infrain2” command.

If you come up with your own version of M-bot, I would love to hearabout it so send me an email! Ofcourse, you may already be thinkingabout an M2-bot or an M3-bot; I knowthat I am. In fact, an M3-bot with fullPWM speed control of both motors isalready in the works! SV

42 SERVO 10.2007

M-BOT

You can reach Ron via email

at [email protected] or visit his

website at www.JRHackett.net

Contact the Author

Hackett2.qxd 9/5/2007 1:10 PM Page 42

Page 43: Servo2007 10

Itend to build larger robots, so I needan arm able to lift at least a pound or two. The arm we’ll be building

will be about 19 inches long. You willhave the option of adjusting the length,however, to fit your specific design.

Gears and MotorSelection

Common issues that come upinvolve a motor shaft of one size (odd,metric, etc.) and gears of a completelydifferent size bore.

The key element to resolve thesematters is to have some form of standardization. I use four basic motorsin just about all my projects which haveshaft sizes ranging anywhere from3/32 to 1/4 inch. However, I tend tobore hubs to a logical size or madeadapters, which unfortunately takesloads of time to get just right.

In meshing gears, fine pitchdemands a precision fit, so if you arejust getting started in gearing, play withsome 24 or 48 pitch sizes since they arepretty forgiving in tolerances and mesh.

If you browse the American Scienceand Surplus mag, you will find sets ofgears on a sprue of four, plus a few smallshaft adapters or bushings attached.These may not be the most compact onthe market, but they are incredibly easyto use. The gears include a 12, 20, 30,and 40 tooth gear. The smallest has abore of .074”; the rest are .187” (3/16”).

The plastic used in these gears isrigid, durable and — best of all — forgiv-ing. I ordered a few sets, just to samplethem and found a secondary benefit:

they can be used as a spur or bevel gear.Figure 1 shows the basic set of

gears, which come in a random colorsampling. While there is no colorchoice, you can mix and match them inyour projects. You’ll need to cut thegears off the sprue with a sharprazor/knife to make a clean edge.

The Gear to MotorShaft Connection

I hand-pressed three larger gears

Building anANDROID

ARMPart 1

by Mark Miller

Building robotic limbs is the double whammyof engineering problems. You need thedesign to offer strength to be useful, yetlightweight to be practical. Then there’s theissue of compactness. Fortunately, I havemanaged to come up with some reasonableoptions that are both affordable and functional.The arm presented here will have three poweredjoints, with the capability to add a fourth degree offreedom (DOF) later.

FIGURE 1

SERVO 10.2007 43

Miller.qxd 9/5/2007 2:28 PM Page 43

Page 44: Servo2007 10

44 SERVO 10.2007

onto shafts from .19” to about .22”,which covered my stepper motor shaft.You really have to push the motor downwith a good deal of pressure against ahard surface to get the gear seated, butat least it won’t slip or pull off withoutequal and opposite force. (I use a clawhammer to get the gears back off whenI need to remove them.) I pressed thesmallest gear in the set onto a .076-.081”shaft, so it is non-slip and workable.

For 1/8” shafting, the bushing provided can be pressed onto the shaftthen, in turn, pressed into the 20, 30, and 40 tooth gears, providing flex-ibilty in making some nice reduction gearboxes of your own ratio choice.

Figure 2 shows a random assort-ment of motors, with odd and standard shafts. The gears are securelyattached just by pressure fitting themto the shaft without tools. In the caseof the 1/4” shaft, I was able to drill out the bore with a hand drill to15/64” and press it on the motor shaft

(again, a super, non-slip fit).This does require some good force

to accomplish and you need to watchyour fingers while pushing. The forcerequired for the gear to slip on themotor shaft is at least three times the available torque the motor could supply and — to date — I have not experienced any problems.

Figure 3 shows the 1/4” shaftmotor fitted with the 20 tooth gear, aswell as the tiny 12 tooth gear on a3/16” shaft motor. These gears are all24 pitch — very standard in the worldof gears. The neat feature about thesegears is the elastic nature of the plastic. They also are capable of moving multiple pounds of mass instraight or right angle directions.

Bicep LayoutOnce you have a motor with an out-

put gear, mounting them in a practicalarrangement is straightforward. Figure 4

shows the blank starting plate, then thedrilled plate to mount the motor withthe applied gear to. This plate will ultimately become the android’s upperarm, and will be required to tow all themechanical assemblies below it, includ-ing the forearm, wrist, and end effector.

The plate measures 2.5”wide by 6”long. It can range in thickness from.070” to .090”. (You can also use thick-er plastics including Plexiglas for thesetypes of assemblies.) For mine, I used aKp4m4 stepper motor. These are cheap,plentiful, and easy to drive. (ElectronicGoldmine offers these at approx. $2.95each). If you would like extra informa-tion about the motor itself, just Googlekp4m4. It has been around for years.

Figure 5 shows a linear gear layoutacross the panel which helps to main-tain a low profile, building torque alongthe way. The first gear moving againstthe motor is a 50 tooth compoundgear. It is attached to the mountingplate using a 6-32 screw, one inch long

with a stop nut underneath,and a locking nut under the chassis. As an addedmeasure, you can also tapthe mounting plate to 6-32for an even more secure fit.

Normally, I make a bushing for plastic gearsusing brass tubing (K&S) sothe screw threads don’t rideagainst the plastic gear bore.If you tighten the screwdown, it allows the gears toturn freely on the tubing.Gears can be easily drilled

FIGURE 2 FIGURE 3

FIGURE 4

FIGURE 5

Miller.qxd 9/5/2007 2:28 PM Page 44

Page 45: Servo2007 10

out to accommodate standard tubingsizes. Brass tubing is sold in 12” lengthsand the sizes “telescope” inside eachother for perfect bushing coverage.You can cut the tubing by scoring thetube with a file, then snapping it off tolength if you don’t have other methods.You can also use shoulder bolts if avail-able. Utilize any ratio or combination ofgears to acheive the torque desired forthe motor you choose (or the load youintend to lift).

An easy way to perfectly mesh thesegears is by making a paper thicknessgauge. Use a 1/2” wide strip off 110 lb.paper and force the gears to mesh withthis strip between them. Mark the holeto be drilled — you get a perfect meshevery time. This mesh level has been tested effectively up to 80 RPM andaround 15 pounds of load. I have neverlubricated these gears on any design.

The 50 tooth output gear has beenfitted with a 3/16” steel shaft whichprotrudes through the plate and a journal to keep it square and turningaccurately. This was made from a smallpiece of 3/4” aluminum round stock.Drill a center hole for the shaft to turnin, and a couple of holes around it thatcan be tapped and tightened againstthe mounting plate.

The final drive shaft needs to be ata 10:1 ratio from the input gear. Theflat layout of the gears provides a tight,compact package necessary for thebicep. The small amount of shaft abovethe gear can be fitted with a positionsensor or encoder. The output of this shaft will be fitted later for an offset crank that will raise and lowerthe forearm with a pushrod.

Forearm and WristFor a wrist joint, the same gears

may be used, again with K&S brass tubing. The largest 40 tooth gear isattached to a two inch long 7/32” tubeaxle as a compression fit, using a hammer. Place the gear on a flat piece ofhardwood, line the tubing on the bore ofthe gear, and tap smartly several times.Don’t try and hit it like you are driving anail; rather, strike it like you are startinga nail. If you hit the tubing squarely, itwill cleanly press into the gear’s bore.

Please note that once the tubing ispressed in, it cannot be removed.

The 7/32” tubing slips neatly intoa 1/4” tubing now, and makes a nicesmooth journal for the wrist and endeffector to rotate on (and thus easilymotorize). A shorter piece of 1/4” tubing is pressed into the wrist mount;the gear with the axle is slipped inside;then the hub is pressed on completingthe working assembly.

Figures 6a and 6b show the beforeand after assembly of a wrist joint madewith tubing/gears mounted to the fore-arm plate (six inches long, two incheswide). The end effector mount showncan be used for a gripper or an articulat-ed hand. Because the axle is hollow,mechanical linkage, power, and/or sensor wires can be fed straight through.You can also feed tendon pull cables andmount the drive motor for the end effec-tor back in the forearm. The wrist jointmount itself, as well as the end effectormount, are made from resin. (Othermaterials may be used, if you prefer.)

It will be easy to mount an encoderdisk to this assembly later for trackingthe position of the end effector. Also,the wrist is capable of 360 degrees ofmotion. The wrist motor (SMS-40) iscompact and will drive the assemblynicely. It’s a small flat package design (aswell as being lightweight), so it can beeasily fitted with the small gear suppliedin the set (see far right in Figure 2).

The wrist motor can be mountedoffset to the output gear which leavesthe opening into the journal bore clear. This is important as a drive linkage will be placed through the borefor articulation of the end effector.

You can also just add a readilyavailable servo driven gripper. Shoparound to find one that has the desiredopening/closing size, as well as theweight class for your application.

With two assemblies now com-plete, the arm can begin transformationinto a working limb. Next time, I willdetail the jointing and final assembly ofa functioning, usable arm. SV

FIGURE 6a FIGURE 6b

ITEM SUPPLIER/PART NO.GEARS

• Set 92657 American Science and Surplus

• Set GR-86 All Electronics (www.allelectronics.com)

MISCELLANEOUS

• K & S Metals Available at your local hobby shop

• Resin joints, humanoid robotic components, including a complete kit of parts

(mechanical structure) to build this arm, email: [email protected]

STEPPER MOTORS

• Elbow and shoulder Electronic Goldmine/KP4M4-G14781

(www.goldmine-elec.com)

• Wrist motor Alltronics/SMS40-2401-A (www.alltronics.com)

PARTS LIST

SERVO 10.2007 45

Miller.qxd 9/5/2007 2:29 PM Page 45

Page 46: Servo2007 10

46 SERVO 10.2007

Space can be a dangerousplace and the Moon andMars are too far away for a

quick 911 call. How will NASAdeal with medical emergencies inspace? That is one question thatDr. Timothy Broderick, MD, a“surgeon with the University ofCincinnati is trying to answer.

Dr. Broderick is part of aresearch mission called NEEMO 12.NEEMO stands for NASA ExtremeEnvironment Mission Operations,which are analog missions. That is,

missions that simulate conditionsin space or on another planet toprepare for manned spaceexploration. Dr. Broderick and acrew made up of astronautsHeidemarie Stefanyshyn-Piper andJose Hernandez, as well as NASAflight surgeon Josef Schmid andcrewmembers James Talacek andDominic Landucci, spent 12 daysthis May, at the bottom of the sea. Not as astronauts, but as aquanauts.

The crew spent their time inan undersea habitat calledAquarius. Aquarius is a 45 foot

NEEMO 12Telerobotic Surgery Below the Sea

by Doug Porter

NASA has sent missions to the farthestreaches of our solar system, exploring the

planets with probes and robotic rovers. Thedream is that someday humans will follow.

NASA has sent missions to the farthestreaches of our solar system, exploring the

planets with probes and robotic rovers. Thedream is that someday humans will follow.

Conceptual design of the minisurgical robot — CAD drawing.P

hoto

cou

rtesy

of t

he U

nive

rsity

of W

ashi

ngto

n B

io R

obot

ics

Labo

rato

ry.

Porter.qxd 9/5/2007 1:58 PM Page 46

Page 47: Servo2007 10

long, 13 foot diameter research habitatowned by the National Oceanic andAtmospheric Administration (NOAA).The habitat rests 62 feet (19 meters)below the surface of the ocean just afew miles off the coast of Key Largo, FL.While many different types of studieswere done during this mission, Dr.Broderick’s goal was to continue todevelop robotic telesurgery proceduresfor future space missions.

Telesurgery is the ability of a sur-geon to do robotic surgery on a patientin another location. A medical expert inthe United States for example, could becalled in to do surgery on a soldier on abattlefield halfway around the world, orpotentially on an injured astronaut onMars. The surgeon operates the robotby placing rotating hand grips in eachhand and twisting and turning them tomanipulate the handles of a controller.The surgeon’s movements are thentransmitted to the robot which thenmoves thin surgical probes. The probesare similar to those used in laparoscopicsurgery in many hospitals. The probeshave small grippers on the end of themthat are used to grasp tissues or to holdsurgical blades and suture needles.

The surgical robots used onAquarius were the Raven from theUniversity of Washington and the M7from SRI International. Experimentshave shown that telerobotic surgeryover hundreds and even thousands ofmiles can be done successfully, but trying to do the same thing on theMoon presents additional challenges,such as dealing with the time delay.

I recently had a chance to attend alive teleconference from Aquarius, as Dr.Broderick talked to a gathering of middleschool students and others at theCincinnati Museum Center. Dr. Broderickexplained, as he spoke over an Internetlink between Cincinnati and Key Largo,that the time lag we were having in ourconversation was not noticeable. In exper-iments where a two second time lag wasadded to simulate the time lag in commu-nications between the Earth and theMoon, telesurgery became much moredifficult. Dr. Broderick explained that, “Asurgeon could normally sew up an incisionin about 30 seconds, but doing the samething with a two second lag time took 10

minutes. Trying to do the same thing onMars could mean up to a 20 minute delayin transmissions each way.” He explainedthat this would make telesurgery fromEarth very difficult, if not impossible.

Part of the NEEMO 12 mission wasto try to solve some of the time lagproblems. One way to solve this is to program the robot to do some procedures autonomously. During theoperation, the surgeon would signalthe robot to sew up an incision. Instead of the surgeon controlling eachstitch, the robot would execute theprogrammed procedure on its own.

Programming the robot to do certainprocedures autonomously would alsogreatly speed up robotic surgery. A similarplan is being developed for futureMars rovers where many of theirtasks will be autonomous, increas-ing the amount of terrain coveredand the number of experiments performed in a given period of time.

While the tour that Dr.Broderick gave everyone of Aquariuswas fascinating, the real treat waswhen several of the students in theaudience had the opportunity toteleoperate the M7 RAVEN robot onAquarius. Grasping the telesurgeryhandles, the students manipulatedthem while watching the motion ofthe probes on a computer monitor.The students turned and moved theprobes to delicately pick up smallpieces of sponge and place them ina Petri dish.

The robot is designed withhaptic feedback, so that forces

experienced by the probes are transmit-ted back to the telesurgery handles.The greatest problem the studentsseemed to struggle with was depthperception. Determining when theywere over the Petri dish or directly overa piece of sponge took some practice.

While the students worked, a cluster of fish could be seen out theporthole spinning and gliding in thebrightly lit turquoise water. The task wasnot easy, but each student managed tocomplete their work. With a little morepractice, it would be easy to imaginethese same students performing telero-botic surgery on another planet with thelandscape of an alien world visible outthe station porthole before them. SV

A two-armed remotely controlled surgical robotfrom the University of Washington known asRaven is photographed inside the underseahabitat for the 12th NASA Extreme EnvironmentMission Operations (NEEMO) mission.

NASA NEEMO 12 website

and images

www.nasa.gov/mission_pages/NEEMO/index.html

University of Washington:

Raven Telerobotic Surgical Robot

website and images

http://brl.ee.washington.edu/Research_Active/Surgery/Project_07/Project_07.html

M7 SRI International Robot

www.military-medical-technology.com/print_article.cfm?

DocID=1886

For AdditionalInformation, Go To ...

SERVO 10.2007 47

NEEMO 12

Porter.qxd 9/5/2007 1:58 PM Page 47

Page 48: Servo2007 10

Safety FirstAlong with using a printer for the

shooting range, we will make use of acheap laser pointer as our shootinggun. This way, we manage to avoidcomplications of shooting mechanicsand projectiles in conventional ways.However, it is important to recognize

that laser beams can causegreat harm to human

eyes. Therefore, no one should lookdirectly into the laser or point a laser atsomeone else’s eyes. Figure 1 shows acheaper style of laser pointer.

Printer RangeControl Circuit

A printer provides a convenient system for our purpose. While the printerhead serves as an excellent target

platform, the lateral and verticalline-feed motors of the printerprovide a sturdy framework forour target movement. In addi-

tion, the paper-out sensor port givesus a perfect feedback loop to freeze upontarget hits. It absolutely amazes me tosee such an ideal compatibility betweenthe printer and our range application.

Figure 2 shows the shooting range

detection schematic circuit. Basically,phototransistor Q1 is the target. It monitors any presence of laser beamsas hits. When it detects light, it willlatch relay RL1 on through SCR Q3, thusactivating the printer paper-out signal.The message will then freeze the printermovement signaling a target strike.

There is no critical choice for thephototransistor because the incominglaser beam from the pointer is veryconcentrated and focused. Resistor R1controls the sensitivity of the circuitand could be varied according to work-ing conditions (see Figures 3 and 4).

Laser Shooting CircuitWe used a $1 laser pointer for the

shooting gun. What is incredible aboutthe pointer is that the laser beam

TARGET PRACTICEfor ROBOTICS CLASS

Imiss the old days as a kid at carnivals. In particular, I always enjoyedknocking over the ducks in the shooting range. To mix things up a bit for

the students in my robotics class, I came up with the idea of turning an oldmatrix printer into a shooting gallery. I felt this would be a great trainingexercise that would demonstrate basic electronic principles and show thatyou can turn junk into just about anything.

Perhaps you'll be able to teach your kids (or yourself!) some basic skills toapply on future robot projects!

48 SERVO 10.2007

FIGURE 1. A laser pointer.It is hazardous!

by Michael Chan

Turn a dusty, old printer into a fun shooting range

and learn some basicelectronic principles you

can apply to future robot builds.

Chan.qxd 9/5/2007 1:53 PM Page 48

Page 49: Servo2007 10

produced is fully focused and couldeasily reach up to a range of 30 feet.As a safety precaution to avoid over-exposure of laser light, a monostabletimer circuit is used in the controllingcircuit to limit the on-time of the beamto just a fraction of a second. A decadecounter is used to record and displaythe number of shots. Output at pin 5of the counter is used to disable thecounter at the sixth shot.

As a result, we have a total of fiveSCR latching LED tallies for five shots ina game. To simulate charging at theend of each shot, the push button S2

has to be pressed to unlatch SCR U1 sothat the timer is ready again for thenext shot. Push button S3, on the otherhand, resets the counter to simulateloading a new round of ammunition.We also used a buzz module retrievedfrom a cheap toy to add sound effectson the trigger.

In general, the laser circuit

SERVO 10.2007 49

FIGURE 2

FIGURE 3. Detection circuit.

FIGURE 4. Range assembly.

FIGURE 5. Gunschematic diagram.

Chan.qxd 9/5/2007 1:54 PM Page 49

Page 50: Servo2007 10

employs 4.5V as its powersupply, whereas we use a common 9V battery in our gun circuit. A voltage regulator IC is therefore necessary to interface between the two circuits, or we might burn out thelaser pointer (see Figures 5 through 7).

Construction TipsIn this project, we used

vector boards for our circuitssince they are very simple. Italso helps to build and checkthe circuits module by module in the process. Wecreated a 3D rotation for thetarget by using a belt driveacross the line-feed roller in

addition to the lateral movement of the printer head.The printer paper-out sensor was found easily at a

small opening under the paper roller. Cable from thesensor leads to the jumper port (three pins) on theprinter motherboard. Use a multimeter to identify the +5V line and the paper-out signal line. When theprinter sees a +5V at the signal line, it will assume thereis paper and is ready for action.

On the shooting side, scavenge for casings and soundgenerators from available toys. We wasted a few laser

pointers in an effort to take the laser module out. We did finallyarrived at a simple solution though. The pointer can be pushedinto a marker tube. An empty marker fits nicely to house thepointer. It not only engages the push button of the pointer, butalso insulates the pointer metal case from the rest of the circuit.

Instead of soldering, drilling, and taking things apart, wemade the power connections to the pointer by using two alligator clips to connect the battery spring and the metalcase of the pointer (negative for the spring and positive forthe case). The power supply for the sensor circuit, as well asthe target hit LEDs, can be readily tapped from the printerstatus indicator panel (see Figure 8).

ConclusionIn our project, we simply print lines of text to provide our

target movement. To take things up a notch, programmingcould be used to control the target to go to specified locations and, at the same, timedisplay scores and animations on ascreen. One could also raise thelevel of difficulty of the game byreducing the exposure time of thelaser beam. Needless to say, thissimple project can turn into anadvanced game, much like a simple robot can be built upon tomake it do all kinds of cool things.Maybe even shoot at ducksautonomously! SV

Michael Chan, Ceng. Miee, graduated in1980 with a Master Degree (MSEE) inElectrical Engineering. He teachesMathematics/Computer Technology/Roboticsat Albert Campbell C.I. in Scarborough,Ontario. Details of his works can be found at www.geocities.com/keensd.

RESISTORS• R1: 1M

• R2,R3,R5,R6: 1K

• R4: 2.2K

LEDs• D1-D3: Red LEDs

SEMICONDUCTORS• Q1: Phototransistor

• Q2: 2N3904 transistor

• Q3: C106B SCR

MISCELLANEOUS• RL1: 5V relay

• S1: Push button (N.C.)

Parts List forTarget Sensor

RESISTORS• R1: 100K

• R2,R3, R5-R8, R11-21: 1K

• R4,R9,R10: 10K

DIODES• D1: Laser emitter

• D2: 1N4148 diodes

• D3-D10: red LEDs

SEMICONDUCTORS• IC1: 555 timer

• IC2: MC14017B counter

• IC3: 7805 voltage regulator

• Q1-Q2: 2N3904 transistors

• U1-U7: C106B SCR

MISCELLANEOUS• C1: 100 nf cap

• BUZ1: 5V buzzer

• S1: SPST switch

• S2,S3: Push button (N.O.)

Parts Listfor Gun Circuit

50 SERVO 10.2007

FIGURE 6. Assemblyinside the guncase.

FIGURE 8. Ourshooting range

prototype.

FIGURE 7.A shootingmodel.

Chan.qxd 9/5/2007 1:54 PM Page 50

Page 51: Servo2007 10

SERVO 10.2007 51

Full Page.qxd 9/4/2007 4:41 PM Page 51

Page 52: Servo2007 10

52 SERVO 10.2007

The Vex wireless joystick controllershown in Photo 1 features thecapability to send joystick

positions and button states to a nearbyrobot or animatronic device using aMaxstream XBee PRO Wireless UARTrunning at 115200 baud, 8N1. Theenclosure shown is made from a largeplastic box with an LCD display, two Vexanalog joysticks, two keypads, and onepotentiometer (motor speed control),along with an array of switches andLEDs. A wireless controller provides asafe way to “train” robots at a distancefor various movements. You can alsoattach the controller to a laptop to runobstacle avoidance and navigation algorithms. If your robot has an arm

and/or wrist and gripper, the controllerwill provide a way to operate theseremotely to pick up objects. A futureenhancement to the wireless joystickwould be to have it sense the tilt of thejoystick box itself using XYZ accelerom-eters (Freescale SARD; see Sources).These tilt angles would then be scaledand converted to servo and motor commands and transmitted to therobot via the XBee PRO wireless UART.

The block diagram in Figure 1shows the main system componentsthat include a Microchip-baseddsPIC30F6014 microcontroller as themain processor and the Maxstreamwireless UART (WiFi). This board is usedto send commands from the wirelessjoystick to the robot. The controller andUART are shown side-by-side in Photo 2.

The Vex robot in Photo 3 is myHero 2007 which was inspired by theoriginal 1980’s era Heathkit Hero. Iconstructed it from Vex sets originally

sold at RadioShack, who unfortunatelyhas since dropped this product line.Vex merchandise is still sold on the webat www.vexlabs.com, and a new Vexconstruction kit will be marketed byRevell (www.revell.com).

My Hero 2007 robot shown inPhoto 4 with the original Vex R/Cremote uses a drive train (motion subsystem) that includes four Vexmotors with gearboxes and uses thelarge wheels that came in the kit. Thefour Vex motors are wire-wrapped tothe Parallax Serial Servo Controller(PSC). The XBee PRO wireless UARTand the PSC boards are connected tothe onboard laptop controller via USBcables which are ready to accept commands from the wireless joystickcontroller. You can see lots of robotmodels designed by other builders onthe Vex forum (www.vexforum.com).

How it WorksTo use the wireless

Joystick, just toggle switchS19, to the “Record” positionand start making all themovements with the joystick.The Record LED will remainlit until the entire serial

Build a Vex WirelessJOYSTICKCONTROLLERUtilize Hollywood-style special effects like slow motion, fastforward, and single step that will bring your robot to life!

PHOTO 1. The wireless joystick controllerin a plastic enclosure which houses twojoysticks, two keypads, switches, and LEDs.

PHOTO 2. Here is the wirelessjoystick controller side-by-sidewith the XBee wireless UART.I used the wire-wrap methodin combination with aTQFP80 adapter board forconstruction of the joystickcontroller board.

by Daniel Ramirez

Ramirez.qxd 9/5/2007 10:00 AM Page 52

Page 53: Servo2007 10

EEPROM memory buffer has been filledor Record is switched OFF. If it is notswitched OFF, then it will start recordingat the beginning again, overwriting theprevious animation sequence.

Next, toggle the switch S20 to the“Play” position, and the animationsequence will be repeated. The servosor DC motors will be active during boththese operations while the live action istaking place. The Play function willremain in an infinite loop unless it isswitched OFF.

On PC style joysticks, the Fire and Trigger LED indicators changestate whenever a button is pressed (or toggled). These LEDs are handy whendebugging the hardware or verifying if

SERVO 10.2007 53

PHOTO 3. A snapshot of my Hero 2007robot, which was built from Vex robot

construction sets and is being used as atest platform for this project.

FIGURE 1. Block diagram of the basicwireless joystick system configurationthat I am currently using. It includesthe wireless joystick controller, thetwo XBee PRO modules, and theParallax serial servo controller.

PHOTO 4. My Hero 2007 robot hasa drive train (motion subsystem) thatuses four Vex motors with gearboxes

and a rotating sensor platform, alsodriven by a Vex motor.

Ramirez.qxd 9/5/2007 10:02 AM Page 53

Page 54: Servo2007 10

a toggle switch or button commandhas been accepted. They light up during startup indicating that the joysticks are calibrated. They also lightup as indicated whenever the Record,Play, or Calibrate switch is turned ON.

The joystick controller takes thepositions read from the joysticks andmaps them to commands suitable forthe motor controllers using the follow-ing equation sets:

1) The following general equation isused to compute scale factors for the xand y joystick pots that map raw joystick positions to scaled joystick positions or actuator commands inorder to obtain their widest dynamicrange. The window coordinates areentered during calibration and the min-imum and maximum joystick positionsand scale factors are determined whenthe joysticks are calibrated by togglingthe S23 switch.

Scale = ((JoystickMax - JoystickMin) /(WindowMax - WindowMin))

2) These next general equation mapsthe selected raw x and y counts toscaled joystick positions or actuatorcommands each time the joystick issampled during an animation andsends them to the selected Vex controller (or R/C servo controller) viathe serial RS-232 using the XBee wire-less UART. In practice, I take advantageof the dsPIC’s floating point capabilitiesto perform all scaling calculations.

Joystick =((JoystickRaw - JoystickMin) / Scale

+ WindowMin)

The joystick positions are mappedto servo or DC motor commands.Individual servos to be controlled by thejoystick are selected via the keypad.

Multiple servos may be linked together(also using the keypad) for 2WD or 4WDcontrol of mobile platforms. The joystick“trains” the robots with a series of com-plex motion sequences. These are digi-tized by the PIC using the C languageequivalent of the Parallax BS2 PBASICrctime command as shown in Listing 1.

More and more, a PC’s game portis being abandoned in favor of the USBport. This is too bad since the gameport is such a useful device for gameand sensor input. Because of this trend,however, there are lots of joysticks forsale at surplus electronics stores thatare available at bargain prices. Officesupply stores and RadioShack also havegood deals on these older joystickswhen they’re still in stock.

There are several websites dedicat-ed to Joystick customizations that usethe game port. In fact, www.tiac.net/ten10ths/the_wheel.html is agreat website dedicated to using joysticks (and steering wheels) for racing car simulators. Any R/C-basedinput device can be substituted for thejoystick in this project as long as itmeets the PC joystick interface specifi-cations for the game port adapter.

Having trouble finding PC joysticks?A custom joystick can easily be madeusing 100K pots and some discrete com-ponents as shown in the joystick sectionof the schematic available on the SERVOwebsite (www.servomagazine.com).This joystick design is compatible withthe original PC game board adaptersthat are used for popular computerbased video games. It will also workgreat with the wireless joystick controllersince it can use the dsPIC’s timers tomeasure an RC time constant in order todetermine the joystick positions.

The 0.1 µF capacitor across eachaxis connection and ground is used asan RC circuit where the time is measuredby how long it takes for the capacitor todischarge to 0 volts using the dsPIC’s 32-bit high resolution timer. Although thisjoystick worked well returning the positions, I found that the readings weretoo noisy for controlling servos, so I usedtwo Vex analog joysticks instead. (I recy-cled from a surplus Vex R/C remote.)These are available from All Electronicsfor under $25 (see Sources). The analogjoysticks actually provided a faster

54 SERVO 10.2007

The following list shows several capabilities that can be added to the joystick controller:

• Control up to 16 servos and motors

using a Parallax Serial Servo Controller or

control up to eight servos using a Pololu

Serial Servo Controller (SSC) or a Scott

Edwards Mini-SSC.

• Issue PWM DC motor commands to a

high performance two DC motor

controller that is used to position a tilt/

pan sensor platform.

• Add WiFi modules for extended range.

• Include a robust fault tolerant design

using message checksums for reliable

command transmission of command

messages and reception of status, sensor,

and diagnostic messages.

• A teaching pendant/learn mode —

record, play, fast forward, slow motion,

reverse, stop, jog, or single step using

serial EEPROM for recording and playing

back motion scripts.

• Add a serial LCD display that shows

important status, commands, and error

messages.

• Incorporate pushbutton switches to

select menu options for the User

Interface (UI).

• Use two hex keypads to enter

commands and data.

• Have 16 analog inputs used to interface

joysticks, pots, flexible resistors, XYZ

accelerometers, sensors, and many other

analog devices using the dsPIC’s 12-bit ADC.

• Utilize a motion script language using

algebraic notation (AOS) entered via

the keypads.

• Send wireless DDT messages to a Vex

microcontroller.

• Install a Freescale SARD XYZ accelerom-

eter board that will measure the tilt

angles of the controller box.

• Install Freescale Pressure sensors used

for tactile feedback during tele-presense

experiments.

• Incorporate a Vex or Mattel

PowerGlove which allows the operator

to move fingers and push the buttons

during remote operation. May be used

for virtual reality (VR) experiments.

• Have a portable Vex servo controller to

receive messages from the wireless

joystick, unpack, and process them,

instead of using a laptop.

• Add an SD card reader for even greater

motion recording capacity.

ADDITIONS AND UPGRADES

Ramirez.qxd 9/5/2007 10:02 AM Page 54

Page 55: Servo2007 10

response and much better resolu-tion using the dsPIC’s 12-bit ADC.

The custom-made joystickscan be used for car pedals, musicgeneration, volume controls, servo position, and motor speed controls using pots as shown inthe schematic. Analog racing carwheels may also be connected tothe controller as long as they usea DB-15 game port connector.These analog joysticks may notprovide Fire and Trigger buttons,so I have added extra pushbuttonswitches to be assigned to thesefunctions (shown in the schemat-ic). Listing 2 shows how to readthe two analog joysticks and (upto) four pots using a subset of thedsPIC’s 16 ADC ports. Other kindsof analog devices and sensorssuch as flexible resistors (used inthe Mattel® Power Glove), XYZaccelerometers, and temperaturesensors can also be connected tothe dsPIC’s analog inputs. GordonMcComb provides many examplesof DIY robot mechanisms in theRobot Builder’s Bonanza [1].

Digital filtering of the joystickreadings is possible, and Microchipprovides a digital filtering tool thatworks with the dsPIC30. I didn’t usedigital filtering in the applicationpresented here since just averaginga few readings during each sampleinterval seemed to work fine.

Listing 2 shows where to cus-tomize the interface commands forvarious kinds of motion controllers.The listing shows how commandsare sent to the PSC controller viathe serial RS-232 interface. A wealthof information on calibration algorithms for sensors and even joysticks is found in Fred Martin’sbook, Robotic Explorations [2].

The joystick controller pollsdsPIC I/O lines to detect if aCalibration, Record, or Play switchhas been toggled, or if a joystickTrigger or Fire button has beenpressed. It also uses LED(s) connected to dsPIC I/O lines as

SERVO 10.2007 55

//********************************************************************************//* ReadJoystick - Reads the selected joystick using the rctime function and//* returns the raw x and y axis counts for it.//********************************************************************************void ReadJoystick(byte JoystickID, unsigned long *XCount, unsigned long *YCount)

byte PinValue;byte State;

State = 0;

if (JoystickID == JOYSTICK_1)

// Get counts for Joystick #1

// Read Joystick X axis using RC circuit code

XJoystickDir1 = OUTPUT; // Set X joystick #1 pin to output

XJoystickPin1 = 0; // Discharge the capacitor

pause(JOYSTICK_DELAY); // Allow time for discharge

// Make the selected BS2 pin an input

//input(Pin);XJoystickDir1 = INPUT; // Set X joystick #1 pin to input

// Set the 1 second timer// Close 32-bit Timer 23CloseTimer23();

// Configure 32-Bit Timer 2/3 here with no interrupts

//ConfigIntTimer23(T3_INT_PRIOR_3);

// Clear 32-Bit timer 2/3WriteTimer23(0);

// Setup Timer 2/3 for 1 second delay (works!!)

T23_Match_Value = TIMER_32_COUNT_1S;

OpenTimer23(T2_ON & T2_GATE_OFF & T2_IDLE_STOP & T2_PS_1_1 & T2_SOURCE_INT, T23_Match_Value);

WriteTimer23(0); // Reset timer 1

while(XJoystickPin1 == State);

// wait for Pin to equal state

*XCount = ReadTimer23(); // read timer 1

// Restore 1 millisecond timer// Close 32-bit Timer 23CloseTimer23();

// Clear 32-Bit timer 2/3WriteTimer23(0);

// Setup Timer 2/3 for 1 millisecond delay (works!!)T23_Match_Value = TIMER_32_COUNT_1MS;OpenTimer23(T2_ON & T2_GATE_OFF & T2_IDLE_STOP & T2_PS_1_1 &

T2_SOURCE_INT, T23_Match_Value);// Read Joystick Y axis using RC circuit code// Make the selected pin an output to charge capacitor for RC circuit time

YJoystickDir1 = OUTPUT; // Set Y joystick #1 pin to outputYJoystickPin1 = 0; // Discharge the capacitor

pause(JOYSTICK_DELAY); // Allow time for discharge// Make the selected BS2 pin an inputYJoystickDir1 = INPUT; // Set Y joystick #1 pin to input

LISTING 1

LISTING 1. The joystick positionsare digitized by the dsPIC using

the C language equivalent of theBS2 PBASIC rctime command. continued ...

Ramirez.qxd 9/5/2007 2:08 PM Page 55

Page 56: Servo2007 10

visual cues and turns them ON or OFF,depending on the state of the Record,Play, and Calibrate switches. Pressingthe Joystick Trigger and Fire buttonsalso causes corresponding LED(s) to betoggled ON and OFF.

The large knob on the wireless joystick controller is attached to the100K Pot 1 currently used as a motorspeed control, although it can be reassigned for other control purposes.

Building the WirelessJoystick Controller Boards

Recording motion is like recordingmovies to film. Long dance sequencesmay be choreographed and carefully re-played, and movie scenes may need tobe retaken in exactly the same manner.The joystick controller does this by stor-

ing the motion commands for later re-play by the animation hardware to a seri-al EEPROM or to a host PC (or laptop) fordiagnostics and calibration applications.

The prototype dsPIC30F6014-basedjoystick controller board is made from aBellin Dynamic Systems TQFP80 adapterboard. It is used to interface up to twojoysticks, four joystick buttons (twoTrigger and two Fire buttons), and threepushbutton toggle switches used forRecord, Play, and Calibrate functions.Two PC-style or analog joysticks can beconnected to two DB-15 D shell connec-tors shown in the schematic with thejumpers in. Two analog joysticks can beconnected to the same I/O lines withthe jumpers out. These joysticks allowthe operator to independently controltwo actuators (servos, DC motors, step-per motors), and up to four relays (con-

nected to the Trigger and Fire buttons).The number of actuators and relays

can be increased if they are slaved ormixed to one another or a method canbe devised to multiplex them with selectcontrol lines. (Presently, I only use oneof the analog joysticks for this applica-tion, but I plan to take advantage of thesecond joystick in the future.)

Optional features include the addition of XYZ accelerometers (tiltsensors) to measure the joystick controlbox orientation, which provides evenmore control of Vex-based robots (oreven any R/C servo-based applicationsusing an accelerometer board). Tactilefeedback to the operator can also besensed using pressure sensors.

The joystick controller runs at 120MHz (30 MIPS). A MAX233 serial driverIC provides the serial interface between

the dsPIC30F6014 and the wire-less UART at 115200 baud(although this baud rate may bechanged in firmware to obtainother standard rates for directconnection to a PC or laptop). Iselected the dsPIC because it pro-vided the necessary processingspeed and memory capacity tohandle all the functions of thewireless controller, with addition-al room for future enhancements.

An alternative to making thecontroller board (which can savetime) is to purchase the MicrochipDevelopment Board. Just makethe necessary connections to thecorresponding pins brought outon the board’s I/O pin header.

The advantages of purchasingthis board are the built-in graphicsLCD display and 24LC256 serialEEPROM. Just solder 0.001 pinheaders to the I/O pin holes in theboard and wire-wrap the remain-ing wireless joystick hardwaredirectly to the board.

To build the controller boardyourself, use the schematic avail-able on the SERVO website. Partsplacement and board fabricationtechniques are not crucial. Wirewrap, point-to-point, and printedcircuit board (PCB) constructioncan all be used for this project. Iused the wire-wrap method incombination with a TQFP80 PC

Listing 1 continued ...

// Set the 1 second timer// Close 32-bit Timer 23CloseTimer23();

// Clear 32-Bit timer 2/3WriteTimer23(0);

// Setup Timer 2/3 for 1 second delay (works!!)

T23_Match_Value = TIMER_32_COUNT_1S;

OpenTimer23(T2_ON & T2_GATE_OFF & T2_IDLE_STOP & T2_PS_1_1 & T2_SOURCE_INT, T23_Match_Value);

WriteTimer23(0); // Reset timer 1

while(YJoystickPin1 == State);

// wait for Pin to equal state

*YCount = ReadTimer23(); // read timer 1

// Restore 1 millisecond timer// Close 32-bit Timer 23CloseTimer23();

// Clear 32-Bit timer 2/3WriteTimer23(0);

// Setup Timer 2/3 for 1 millisecond delay (works!!)

T23_Match_Value = TIMER_32_COUNT_1MS;

OpenTimer23(T2_ON & T2_GATE_OFF & T2_IDLE_STOP & T2_PS_1_1 & T2_SOURCE_INT, T23_Match_Value);

.

.

.

56 SERVO 10.2007

Ramirez.qxd 9/5/2007 2:09 PM Page 56

Page 57: Servo2007 10

adapter board. The Bellin TQFP80adapter socket made it possible for meto hand solder the dsPIC30F6014microcontroller to standard 0.001 inchpin headers using a 40X surplus microscope. I was able to wire-wrapthe prototype board with all the necessary hardware, so that it would fitnicely in my enclosure.

I was also able to successfully solder another postage stamp-sized, 80pin microcontroller onto the TQFP80adapter board by using the informationprovided in an excellent SeattleRobotics Society Encoder article titled”Have you seen my new solderingIron?” by Kenneth Maxon. TheEncoder article may be found at(www.seattlerobotics.org/encoder/200006/oven_art.htm).

Another construction alternative isthe SchmartBoard SMT develop-ment system. SchmartBoards areeasy to solder using their uniqueSMT construction system.

Power Supply (JP1)The power requirements for

the wireless joystick controllerboards are quite modest since Idesigned this board to be used forsmall mobile robot applications.Jumper JP1 is used to connect the3.3 volt/5 volt power supplyshown in the schematic in Figure2. A separate +5 volt lab powersupply connected to VSS and VDDmay also be used. A power LEDconnected between the VDD andVSS using a 220 to 470 ohm resis-tor in series to limit the currentprovides an indication of when theboard is powered up. Either SMTor standard discreet componentsmay be used to make the powersupply, depending upon your ownsizing requirements.

You may want to use a separate voltage supply and extrafilter and bypass capacitors sincelarge voltage drops and voltagespikes could inadvertently resetthe dsPIC30F6014.

UART1 AND UART2Connector (X1, X2)

Inside the dsPIC30F6014, there areactually two UARTs that make it capa-ble of handling two serial ports. This isaccomplished by using the on-chipaddressable UART hardware (alsoknown as the Serial CommunicationsInterface — SCI — on other microproces-sors). Without the UART interface, com-munications to the dsPIC30F6014would be severely limited. A MAX233provides the voltage level translationfrom logic levels to standard RS-232 lev-els. For debugging and testing purpos-es, a laptop serial port may be connect-ed to the dsPIC’s UART1 serial port.

Communication between the lap-top mounted on my Hero 2007 robotand the wireless joystick controller was

accomplished by connecting the firstXBee Wireless UART to the laptop’sCOM3 serial port. The second XBeeUART connected to the dsPIC UART2using the 115200 baud, high-speedserial port. The TX, RX, and GND pinsare connected to two DB9 RS-232 con-nectors (X1, X2) enabling a host micro-controller, PC, or laptop to talk to thedsPIC.

Serial LCD DisplayThe LCD display provides the oper-

ator with a portable user interface (UI)to display menus, messages, anddebug output, and it also allows theuser to input commands and data. Theserial LCD display is similar to the onesold by Scott Edwards Electronics. It isconnected to UART1.

SERVO 10.2007 57

//*******************************************************************************// Main Wireless Joystick Controller application - Send Hex or binary servo // commands to laptop at 38400 or 115200 Baud so that the laptop can format // them and send them to the Parallax Servo Controller (PSC).//*******************************************************************************

// Read joysticks and display the values. Works!!!

while(1)

Nop();i = 0;while( i <16 )

ConvertADC12();while(ADCON1bits.SAMP);while(!BusyADC12());

// Read the ADC for selected channels result[i] = ReadADC12(i);i++;// Small delay to help with conversionfor (j=0; j<CONVERSION_DELAY; j++);

XJoystickRaw[JoystickID] = result[11];YJoystickRaw[JoystickID] = result[12];

// Scale the joystick x and y axis raw pot valuesmap_viewport_to_window(XJoystickRaw[JoystickID], YJoystickRaw[JoystickID],

&X_Joystick, &Y_Joystick); // Works!!!

// Return scaled joystick positions and pushbutton states to the Host.JoystickMessage.JoystickCommand.X_Position_1 = (word) X_Joystick;JoystickMessage.JoystickCommand.Y_Position_1 = (word) Y_Joystick;

JoystickMessage.JoystickCommand.Button_1 = JoystickButtonState;

// Send the joystick commands via the XBEE Pro Wireless UARTSend_Joystick_Commands();

LISTING 2

LISTING 2. This code segment showshow to read various analog sensors

and joysticks, and pots using thedsPIC’s 12-bit, 16 channel ADC.

Ramirez.qxd 9/5/2007 10:03 AM Page 57

Page 58: Servo2007 10

Joystick AdapterConnectors (JP6, JP7)

I used two standard PC joystickcables with DB-15 sockets which Imounted on the wireless joystick con-troller enclosure and connected themto JP6 and JP7. These pin headers are,in turn, connected to the dsPIC I/O Pinsshown in the schematic. They provide aconvenient connection to PC-styleJoysticks (JP8, JP9, JP14, JP15) withjumpers or analog joysticks connectedin a similar manner without jumpers.

ICSP/ICD2 RJ-11Connector (JP4)

The ICSP/ICD2 connector, JP4, is

used to connect the board to theMicrochip In-Circuit Debugger (ICD2)using the VPP/MCLR, RB1/PGC,RB0/PGD, VSS, and VDD pins. In addi-tion to debugging dsPIC applications,the ICSP allows you to program thedsPIC microcontroller directly using In-Circuit Serial Programming (ICSP). (Thisis much easier than removing the micro-controller to erase and program it.)

The connector simply attaches tothe ICSP pin headers on the TQFP80board, while insuring that pin 1 isaligned correctly. I use a short wiringharness with an RJ11 6P6C socket and6” leads that I connected to jumper,JP4, that allow me to program themicrocontroller without having toremove it.

I2C Interface (JP5)The I2C interface is used to store data

in the 24LC512 Serial EEPROM by takingadvantage of the dsPIC’s built-in I2C hard-ware and library. The dsPIC’s I2C MasterMode works well in both the 100 kHz(slew off) and 400 kHz (slew on) modesto access the serial EEPROM (I2C slave).

The dsPIC board provides access tothe I2C interface using jumper, JP5. Itconnects the SCL, SDA, and GND signals to an I2C slave device and it usesthe Master Synchronous Serial Port(MSSP) peripheral hardware to supportthe I2C seven-bit and nine-bit communi-cation protocols in both master andslave configurations. The I2C interface ishandy for reading and writing to and

from serial I2C EEPROMS. It is alsoused for connecting various I2Cdevices commonly found in robot-ics, such as sensors and controllers.The biggest feature that makes I2Cdevices appealing for roboticsapplications is that they can be networked via a two-wire bus usingonly two pull-up resistors.

I have also been able to accessmultiple devices for larger motionscript storage capacity. With appropriate pull-up resistors rangingfrom 2.2K to 4.7K, you can connectalmost any I2C serial EEPROM, usingonly the dsPIC30F6014 SCL andSDA I/O pins. Be careful to assigneach I2C device a unique addressrather than using the defaultaddress if more than one I2C deviceis connected to the I2C bus.

The software required toaccess the I2C interface is availableeither by the Microchip Maestro I2Cdrivers at the Microchip website orthe dsPIC I2C library accessed withthe i2c.h C header file. The dsPIClibrary currently supports theMaster I2C mode, but does not support the I2C slave mode at thistime. I have not been able to get itworking reliably in C, and it is a taskthat is further complicated because

58 SERVO 10.2007

//*******************************************************************************//* Send_Parallax_Commands - This routine computes checksum and packs and sends//* servo commands from the Wireless Joystick Controller to the Parallax Servo//* Controller (PSC) using the scaled joystick positions via the XBEE Pro //* Wireless UART using the selected servo at the specified ramp rate. //* SEROUT Sdat, N38400+$8000,[“!SC”, ch, ra, pw.LOWBYTE, pw.HIGHBYTE,CR]//*******************************************************************************void Send_Parallax_Commands(void)

int i;word LocalChecksum = 0; // Message checksum

// Compute message checksum

LocalChecksum = 0; // Initialize local checksum

for (i=0; i<MESSAGE_BUFFER_SIZE-2; i++)

// Compute local checksumLocalChecksum += ServoCommandMessage.Message.Data[i];

ServoCommandMessage.ServoPositionCommand.Checksum = LocalChecksum;

// Copy the entire servo message generated by the wireless joystick // controller to the UART Tx Buffer for wireless transmission. It may// include sensor data, telemetry and status information and is received // concurrently with each message that the joystick controller sends.memcpy(Uart_Tx_Buffer, &ServoCommandMessage.Message,

sizeof(ServoCommandMessage.Message));

//******************************************************************************//Send the generated servo commands to the XBEE Wireless here//******************************************************************************

for (i=0; i<MESSAGE_BUFFER_SIZE; i++)

// Process the Servo Position command messagesSendByte2(Uart_Tx_Buffer[i]);

// Delay for 115200 Baud using XBEE Pro and GNAT Ada 95pause(2);

LISTING 3

LISTING 3. This code segment showshow to customize the interfacemessages for various kinds ofmotion controllers including theParallax serial servo controller, theScott Edward’s Mini-SSC, and thePololu serial servo controllers.

Ramirez.qxd 9/5/2007 10:03 AM Page 58

Page 59: Servo2007 10

I2C slave modes require interrupt serviceroutines to handle the incoming data.Microchip’s AN734 app note is an excel-lent introduction to the I2C protocol [5].

The Power SupplyA 3.3 volt power supply is required

to power the optional Freescale XYZaccelerometers. Otherwise, just buildthe five-volt supply since it will be usedto power the dsPIC joystick controllerboard and the PSC board. Check for +5volts output when the nine-volt batteryis connected to the power input termi-nals. Also check for +6 volts used topower the R/C servos.

Try to isolate the +6 volts servopower supply from the +5 volts logicpower supply. Include bypass and filtercapacitors and diodes, as required, inorder to suppress voltage spikes gener-ated by collapsing electromagneticfields from the DC motors (if used).

My Hero 2007 uses a surplus, six-volt sealed lead acid (SLA) battery topower the R/C servos and the Polaroid6500 sonar ranger board. A separateVex, nine-volt rechargeable battery usedfor the +5 volts power supply is requiredby the joystick and PSC controller boards.

Maxstream XBee PROWireless UART

The Maxstream 2.4 GHz XBee PROZigBee/802.15.4 RS-232 RF Modem

(OEM RF Module) provides all thebenefits of the ZigBee standard in adesign that yields three times the rangeof traditional ZigBee solutions. All ofthis hardware is provided in a boardthat measures only 24 mm by 27 mm,which helps it to fit into an enclosurewithout taking up too much space. Thewireless UART used for this applicationprovides telemetry to the nearby clientdevice such as a laptop, a robot, orother animatronic device. The XBeePRO UART is configured with thewireless UART application usingstandard Hayes Modem AT commandswith the serial port protocol set at115200, 8N1.

The power supply required for thisboard is 2.8 volts to 3.4 volts, so the3.3-volt power supply circuit shown inFigure 2 works great. If you decide topurchase the Maxstream DevelopmentKit, you can use the connectionsshown in the block diagram in Figure 1.The advantages of purchasing the kit isthat the serial connectors and RS-232voltage level translations, along withthe power supply and cables, are sup-plied, including one board that directlyconnects to the USB port on a laptop.

Controller RangeThe 100 mW XBee PRO provides

up to one mile range (1.6 km) and itsRS-232 connectivity makes integrationsimple. The range of this controller

exceeds that of the standard Vex controller since the line-of-sight rangeis the same as the one specified in theZigbee protocol. Maxstream XBee PROprovides the maximum range of 300feet line-of-sight indoors.

The actual range depends onmany factors including direct line-of-sight, antenna length, walls, and windows that can block the low powerZigBee signal. The standard antenna isbuilt into the board, but Maxstreamdoes sell other options.

The Maxstream wireless UART canbe easily configured using the standardAT modem commands and includes a

SERVO 10.2007 59

FIGURE 2. The 3.3-volt and five-voltpower supply circuits.

Building surface mount technology

(SMT) boards requires special equipment

and handling. Some tools that you will

need when working with SMT devices

include: a dental pick or Xacto knife

used to check for loose pins and remove

bits of solder; a small set of vacuum

tweezers to pick up miniature SMT

components; a very thin tipped

soldering iron to solder individual SMT

pins or to remove solder bridges; and a

40X microscope or electronic magnifier

to examine the fine pitch traces and SMT

pins for solder bridges and loose pins.

Materials needed to work with SMT

parts include pin headers, water soluble

solder paste, and an application syringe.

WORKING WITHSMT COMPONENTS

Ramirez.qxd 9/6/2007 9:14 AM Page 59

Page 60: Servo2007 10

utility to configure the modem channel and baud rate as required bythe application.

Tilt SensorAs mentioned previously, the

optional tilt sensor used here is theFreescale ZigBee XYZ accelerometer(SARD) connected to the dsPIC joystickcontroller board using UART1. It canalso function as a motion input deviceby using it to measure the actual con-trol box orientation. It uses the ADC orUART at 38400 baud, 8N1, as the seri-

al configuration (see Figure 2). A virtu-al SARD consisting of just the XY and Zaccelerometer boards can be directlyconnected to the ADC as long as the3.3-volt and five-volt supplies and volt-age references are taken into account.

Noise ImmunityNoise can be a critical factor when

using R/C servos for robots, which isone reason why it is important to usefilter and bypass capacitors. This is due— in part — to the sensitivity of theinternal electronics which can causethe servo motor to move unexpectedlywhen power supply spikes occur. Noisepicked up by the R/C servo wires thatact as antennas can cause the R/C servos to move unexpectedly. Radiofrequency interference (RFI) from nearby R/C remotes and cell phonescan also cause problems.

This is a safety concern when theyare connected to a mechanical actua-tor that could injure someone. For thisreason, make sure that no one is closeto an R/C servo actuated mechanism.The strong torque produced by theseservos and the speed at which theymove is also a concern. These sameissues apply to powerful DC gearedmotors and stepper motors, as well.

Sources of noise can include theR/C servos themselves, the antennaeffect of the servo wire connections,and spikes induced by other brushed DCmotors, stepper motors, solenoids, relaycontacts, and switches. The noise maybe minimized by using capacitors to filter the power lines and by also usingshort lengths of twisted pair wire toconnect the R/C servos to the controller.

Virtual KeypadTwo keypads form a 4 x 8 virtual

keypad to be used for selecting variousservo and motor control options anddata entry using the UI and the serialLCD display. It provides a handy simu-lated Texas Instruments’ TI-59 program-mable calculator using an AlgebraicOperating System (AOS) similar to theoriginal TI-59s. The keypads provide theoperator data entry capability to entermotion script commands in order totrain a robot or animation prop.

Development ToolsThe Microchip ICD2 in-circuit debug-

ger/programmer is required to Flash thedsPIC firmware since it works directlywith Microchip’s MPLAB. In addition,the dsPIC C30 C compiler (student edition) was used to develop the wire-less joystick firmware. Both MPLAB andthe C compiler are available as a freedownload from the Microchip website.

Hardware ImprovementsFuture hardware improvements to

the wireless joystick include adding aSD card reader to provide for longeranimation scripts. This applicationcould also be used for security and tele-presence applications for manipulatinga tilt/pan camera platform.

I also plan to integrate a PIC basedrelay controller board that I recentlydesigned so that I can switch highpower relays, solenoids, valves, andMuscle Wire®.

Action!Using the wireless joystick

controller, I was able to integratemany commercial and DIY motorcontrollers into my various roboticprojects. Although I was onlyexperimenting with it, I was ableto carry out serious animationswith this system.

I hope other readers will enjoybuilding this project and using itfor their own animations. SV

Daniel Ramirez can be reached by email [email protected].

60 SERVO 10.2007

PHOTO 5. This is how I mounted theParallax serial servo controller and the XBee wireless UART on my Hero2007 robot.

[1] McComb, Gordon, Robot Builder’sBonanza, Second Edition, McGraw-

Hill Professional Book Group, 2001.

[2] Martin, Fred, G., RoboticExplorations: A hands-OnIntroduction to Engineering,

Prentice Hall, Inc., 2001

[3] Bowling, Stephen, “AN734: Using

the PICmicro ® SSP for Slave I2C TM

Communication,” Microchip

Technology Inc., document

#DS00734A-, 2000.

FOOTNOTES

Maxstreamwww.maxstream.net

Pololuwww.pololu.com

Microchip Technology, Inc.www.microchip.com

Scott Edwards Electronics, Inc.www.seetron.com

Parallax, Inc.www.parallax.com

Bellin Dynamic Systemswww.beldynsys.com

SchmartBoard SMT DevelopmentSystem

www.schmartboard.com

Freescalewww.freescale.com

All Electronicswww.allelectronics.com

SOURCES

Ramirez.qxd 9/6/2007 9:23 AM Page 60

Page 61: Servo2007 10

Each of the modules can be used with your desktop PC, laptop, Pocket PC, or a

microcontroller. All the units outputthe National Electrical ManufacturersAssocation (NEMA) 0183 protocol, asdo many GPS modules. Later, I will give you a walk through NEMA0183 protocol.

EM-406A

Let’s start by looking at the EM-406A module, manufactured byUSGlobalSat, as shown in Figure 1. Ofthe three modules we will examine,this is the only one that has a develop-ment board — which is perfect if youare going to interface to a desktop,laptop, or Pocket PC. This makes theEM-406A a perfect starting point inthe GPS series.

Let’s take a quick look at the feature set of the EM-406A:

• 20 channel receiver• Built-in antenna• High sensitivity: -159 dBm

• 30’ positional accuracy/25’ withWAAS

• Hot start: 8 seconds• Warm start: 38 seconds• Cold start: 42 seconds• 70 mA power consumption• 4.5–6.5 volt operation• Outputs NEMA 0183 and SiRF binary

protocols• Small foot print: 30 mm x 30 mm x

10.5 mm• Built-in LED status indicator• Six-pin interface cable included

We are going to start by connect-

ing the module to our PC using theEM-406 evaluation board shown inFigure 2. This board will allow you touse a standard AC adapter andnine-pin cable to connect the EM-406A to your PC of choice. SparkFunElectronics also sells a USB EM-406evaluation board. You may use thisboard as well, as it sets up a com portthat you can use once it’s connectedto your PC or laptop. You can’t use theUSB board with your Pocket PC ormicrocontroller.

In order to secure your EM-406Ato the evaluation board, I recommend

by Michael Simpson

FIGURE 1

SERVO 10.2007 61

Simpson.qxd 9/5/2007 4:19 PM Page 61

Page 62: Servo2007 10

62 SERVO 10.2007

the following steps:

• STEP 1: Tape some double stickfoam to the underside of theEM-406A. I recommend four smallpieces rather than one large pieceas shown in Figure 3. This willmake it easier to remove later.One of the reasons we are usingfoam tape is to keep the metalbottom of the module from shortingout any of the evaluation boardconnections.

• STEP 2: Remove the backing fromthe foam tape and affix the moduleto the evaluation board as shownin Figure 4. It’s okay if some ofthe foam tape is on top of a

couple of the small components.

• STEP 3: You need to keep thebottom of the evaluation board fromshorting out. One way to do this isto place small standoffs on the boardas shown in Figure 5. Note that Iadded small nylon washers on the topto prevent the screws from shortingout any of the pads on the evaluationboard.

• STEP 4: The standoffs mentioned inStep 3 are fine for bench top testingor mounting on a larger surface. Ifyou plan on using your evaluationboard in your car, I recommendsandwiching the board between twopieces of plastic. Start by marking

the hole for the board.This is easily done byplacing the board ontop of the plastic andtracing the holes. Oncethe holes are drilled in the bottom piece, use itto mark the top piece of plastic.

Insert four, #4 x 3/8”machine screws throughthe bottom of the baseplastic piece and secure

them with four nuts. I recommendadding four small nylon washersfor insulation. Next, place the moduleon top of the screws as shown inFigure 6.

• STEP 5: Place four more nylon washers on top of the machinescrews, then attach four, 1/2” stand-offs to the screws. Next, place the toppiece over the standoffs and attachwith four, #4 x 3/8” machine screwsas shown in Figure 7.

EM-408

The EM-408 module shown inFigure 8 is also manufactured byUSGlobalSat. While it does not haveits own evaluation board, you can usethe Copernicus evaluation boardavailable from SparkFun. The EM-408has a built-in antenna, but also sportsa MMCX connector for attachingan external antenna. EM-408 featuresinclude:

• 20 channel receiver• Built-in antenna• High sensitivity: -159 dBm

• 30’ positional accuracy/25’with WAAS

• Hot start: 8 seconds• Warm start: 38 seconds• Cold start: 42 seconds• 75 mA power consumption• 3.3 volt operation• Outputs NEMA 0183 and SiRF

binary protocols• 30 gram weight• Built-in LED status indicator• Five-pin interface cable

FIGURE 2

FIGURE 3

FIGURE 4

FIGURE 5

FIGURE 6 FIGURE 7

Simpson.qxd 9/5/2007 11:07 AM Page 62

Page 63: Servo2007 10

included• External MMCX

antenna connector

In order to plugthe EM-408 into theCopernicus evalua-tion board, you needto add a couple ofheaders to the five-pin connector thatcomes with the EM-408. Even if youdon’t plan on using the Copernicusboard, you will still need to mount theheaders if you plan on connecting toa microcontroller. I will detail this laterin this series.

• STEP 1: Refer to Figures 9 and 10and add a three-pin header attachingthe Enable, Vcc, and Gnd leads asshown. Mark them with differentcolored heat shrink so you canidentify the pins later when you plugit into the evaluation board. Noticethat the gray colored wire is theEnable lead.

Next, connect the two outsidepins on a three-pin header to the RXand TX leads as shown in Figure 10.

• STEP 2: Plug the male headers intothe female headers on the evaluationboard as shown in Figure 11.

• STEP 3: Take some double stickfoam tape and attach them as shown in Figure 12. I recommendusing two pieces on each one to double the thickness.

• STEP 4: Peel the backing from thetape and attach the EM-408 as shownin Figure 13. Make sureyou do not cover themounting holes.

• STEP 5: As I showedin the EM-406 instruc-tions, cut two piecesof plastic and mountthe Copernicus boardas outlined. The plasticshould be at least3.5” x 2.5”. Whenfinished, it should

look like the moduleshown in Figure 14.

Testing theModules

You now havea nice platform fortesting your EM-406A and EM-408.All you need to do is apply powerto the 2.1 coax and connect thenine-pin connector to your PC witha cable. For power, I used a small9V wall wart I had lying around(center positive). (SparkFun sellsboth the AC adapter and cable if youdon’t already have them.) Notethat on the Copernicus board weuse Port A.

Once you apply power to theevaluation board, there is a smallswitch that needs to be turned on.Once on, the main power LED on theboard will light. On the EM-406, thesmall status LED on the module willlight, as well.

Both the EM-406A and theEM-408 outputs its data at 4800baud, 8N1. I have included a programcalled QuickTerm_DT.exe in thedownloads (available at www.kronosrobotics.com). This is a simple terminal program that will

FIGURE 8

FIGURE 10

FIGURE 11

FIGURE 12

FIGURE 13

FIGURE 9

SERVO 10.2007 63

Simpson.qxd 9/5/2007 11:08 AM Page 63

Page 64: Servo2007 10

64 SERVO 10.2007

allow you to see the raw NEMA 0183data that the GPS unit is transmit-ting. Once you connect your moduleto your PC, laptop, or Pocket PC, youshould see a form that lookssomething like Figure 15. If youdon’t, make sure you set the comport using the Settings menu.Even if you are deep in your basement, you should still see thisdata coming from the module.Please note that if you are using aPocket PC, you need to use theQuickTerm_PPc.exe file (included inthe downloads). You will also need anull modem (Tx and Rx crossover).

NEMA 0183 Protocol

In the old days, there were asmany GPS protocols as there wereGPS manufacturers. Even today, myMagellan Meridian has three differentoutput protocols available. However,the NEMA 0183 protocol has evolvedto become the protocol of choice formost software applications. Justabout any GPS module or receivernow supports it.

NEMA has defined a series ofmessages. These messages arereferred to at the NEMA 0183 protocol. You can download a complete NEMA 0183 reference manual at www.sparkfun.com/datasheets/GPS/NMEA%20Reference%20Manual1.pdf.

Let’s take a closer look at theNEMA 0183 protocol. Table 1 showssome of the NEMA messages that wewill be looking at.

A NEMA 0183 message beginswith a $GP and ends with a carriagereturn. It looks something like this:

$GPGSV,3,1,12,20,00,000,,10,00,000,,25,00,000,,27,00,000,*79

The message name — which isalso referred to as the option — isthe characters just following the$GP. Each data element is separatedby a comma. The data elementsare terminated by the * character,followed by the checksum. Thereis an eight-bit XOR of eachcharacter between the $ and * toform the checksum. The last twocharacters in the message are a hexrepresentation of the calculatedchecksum.

Once you supply power to yourGPS module, it will attempt to

acquire and track satellites. The GPSmodule needs to track at least threesatellites in order to report its position.There are two commands the protocoluses to relay the current satellite tracking status.

GSAField 1, Mode (M=Manual, A=Auto)Field 2, Fix (1=No Fix, 2=2D, 3=3D)Fields 3-14, The satellite numbers usedto calculate positionField 15, PDOP (Position Dilution ofPrecision)Field 17 , HDOP (Horizontal Dilution ofPrecision)Field 18, VDOP (Vertical Dilution ofPrecision)

The main field we are interestedin is Field 2 (Fix). If this field value isa 1, then not enough satellites canbe tracked to get a signal. If it is2, then the module is in 2D mode.This means that only the X and Ypositions can be reported. If the value is 3, then the module is in 3D mode and X, Y, and Z axis positionscan be reported.

GSVField 1, Number ofMessages (1-3)Field 2, Current MessageNumber (1-3)Field 3, Satellites in ViewField 4-7, Satellite Number(1-32), Elevation (0-90),Azimuth (0-359), SNR (0-99)

FIGURE 14

FIGURE 15

FIGURE 16

Message Description

GGA Time, position, fix type.

GSAGPS receiver operating mode, satelliteused in the position solution, DOP values.

GSVThe number of GPS satellites in view, satelliteID numbers, Elevation, Azimuth, SNR values.

RMC Time, date, position, course, speed.

TABLE 1

Simpson.qxd 9/5/2007 11:09 AM Page 64

Page 65: Servo2007 10

Fields 8-11, Satellite Number (1-32),Elevation (0-90), Azimuth (0-359), SNR(0-99)Fields 12-15, Satellite Number (1-32),Elevation (0-90), Azimuth (0-359), SNR(0-99)Fields 16-19, Satellite Number (1-32),Elevation (0-90), Azimuth (0-359), SNR(0-99)

The GSV message reports thenumber of satellites in view and theactual signal values of any of thosesatellites that it is able to track. Thethird field reports the number of satellites in view. After that, four fieldsfor each of the satellites in view reportthe satellite number, Elevation,Azimuth, and SNR. I have provided aprogram called Satellites_DT.exe thatwill plot each satellite being tracked as shown in Figure 16. I have alsoincluded the ZeusPro source code withthe download files so that you can seehow I parsed the data.

I have included the compiledDesktop and Pocket PC programs, aswell as the ZeusPro source code sothat you can see how I parsed thedata. As this series continues, I willadd programs and source code foryou to experiment with.

The main function called procnema (shown in Program 1) is where I test for the particular output messages and make the appropriatecall to the message handler. In thissegment, I have also provided anexample of the GGA handler.

Final Thoughts

When you purchase a GPS mod-

ule or standalone receiver, you wantas many channels as possible. Youalso want a module or receiver thatsupports the NEMA 0183 protocol. Ifyou are going to connectto a microcontroller, youshould also look forsome sort of TTL levelserial output.

Before I close thisarticle, it’s importantthat I point out thatthere are literally hun-dreds of GPS modulesand receivers that areavailable. Here are twothat I have used.

Holux GPSlim236The Holux GPSlim236

module (Figure 17)supports a Bluetoothwireless interface. I use it with my Pocket PC and laptop for most ofmy trip navigation. Theconnector is actually anon-inverting TTL serialinterface that we willexplore later wheninterfacing to microcon-trollers. The GPSlim236has a built-in batterythat will power the GPSfor up to 10 hours. Youcan also supply powerto the connecter thatwill both charge andpower the unit. Thisreceiver will run youbetween $60 and $100,depending on whereyou purchase.

NAVIBE 611 Sport GPSThe NAVIBE 611 shown in Figure

18 is a small GPS module. It runsoff of two AA batteries, or can be

func procnema(lndat as string)dim msg as string

‘——————————————-‘Print message to consoleprint lndat,len(lndat),asc(mid(lndat,1,1))

if calcchecksum(lndat) = 0 thenprint “Checksum Error”exit()

endif

‘——————————————-‘Get msg typemsg = replace(getword(lndat,1,1,”,”),”$GP”,””)select case msg

case “GGA”procGGA(lndat)

case “RMC”procRMC(lndat)

case “GSA”procGSA(lndat)

case “GSV”procGSV(lndat)

endselect

endfunc

‘—————————————————————‘Global Positioning System Fixed Data‘ Populates‘ GGA_UTC, GGA_Latitude, GGA_NS‘ GGA_Longitude, GGA_EW, GGA_FIX‘ GGA_SATS, GGA_Alt, GGA_AltUnit‘—————————————————————func procGGA(lndat as string)

global GGA_UTC as stringglobal GGA_Latitude as stringglobal GGA_NS as stringglobal GGA_Longitude as stringglobal GGA_EW as stringglobal GGA_FIX as stringglobal GGA_SATS as stringglobal GGA_Alt as stringglobal GGA_AltUnit as string

GGA_UTC=getword(lndat,1,2,”,”)GGA_Latitude=getword(lndat,1,3,”,”)GGA_NS=getword(lndat,1,4,”,”)GGA_Longitude=getword(lndat,1,5,”,”)GGA_EW=getword(lndat,1,6,”,”)GGA_FIX=getword(lndat,1,7,”,”)GGA_SATS=getword(lndat,1,8,”,”)GGA_Alt=getword(lndat,1,10,”,”)GGA_AltUnit=getword(lndat,1,11,”,”)

endfunc

Program 1

FIGURE 17 FIGURE 18

SERVO 10.2007 65

Simpson.qxd 9/5/2007 11:09 AM Page 65

Page 66: Servo2007 10

powered via the rear connector. Ipicked one of these little gemsup from an eBay store for $24new. It displays current and maxspeed in the small display windowand spits out the NEMA 0183protocol via a small connector. Theconnector supplies both a serial and USB interface. This unit also has the ability to log GPS data forlater retrieval.

What’s Next

Alright, so next month, we willlook at interfacing a couple moreSparkFun modules and take ourNEMA 0183 interface to the nextlevel. I will show you how to pull the positional data from theNEMA messages.

Be sure to check for updatesand downloads for this article atwww.kronosrobotics.com/Projects/GPS.shtml. SV

The following is a breakdown

of sources for all the components

needed for Parts 2 and 3 of this

project.

SPARK FUN ELECTRONICS

EM-406A GPS Module

www.sparkfun.com/commerce/product_info.php?products_id=465

EM-406 Evaluation Board

www.sparkfun.com/commerce/product_info.php?products_id=653

EM-408 GPS Module

www.sparkfun.com/commerce/product_info.php?products_id=8234

Copernicus Evaluation Board

www.sparkfun.com/commerce/product_info.php?products_id=8145

Nine-Pin Serial Cable

www.sparkfun.com/commerce/product_info.php?products_id=65

6V AC Adapter

www.sparkfun.com/commerce/product_info.php?products_id=737

External Antenna with SMA

Connector

www.sparkfun.com/commerce/product_info.php?products_id=464

SMA to MMCX Adapter Cable

www.sparkfun.com/commerce/product_info.php?products_id=285

KRMICROS

ZeusPro

www.krmicros.com/Development/ZeusPro/ZeusPro.htm

Parts List

MaximumRobotics.com1-800-979-9130

Wiring Robot Controller· Atmel ATMega 128

· 128k Memory· 43 Digital I/O Pins· 8 Analog Inputs

· 8 External Interupts· 6 PWM Channels

· 2 Serial Ports including Bi-Directional USB· The Wiring Programming Language

The Wiring language provides a simplified subset ofC or C++ that hides more advanced concepts likeclasses, objects, pointers (while still making themaccessible for advanced users). You get the powerof C or C++ with the ease of a language like Basic.Programs execute at full C++ speed on the board.

$69.95

Robot Controllers

ARC1.1 Robot Controller• Atmel ATMega16• 1k SRAM, 16k Flash• Dual 1.1 amp motor drives• Supports motors up to 25V• Dual quadrature encoder support• Programming cable included with kit• No additional hardware needed• Works with BASCOM and AvrDude programming softwareIdeal for controlling your small robot. With a Microcontrollerand onboard motor controllers, you get all the electronicsthat you need (except sensors) on one board.Kit $37.95 / Assembled $41.95

Programmable Robot KitsINEX MicroCamp Mega8· Atmel ATMega8· Dual DC motor drivers· 2 Buttons, 2 LEDs· Serial port· 5-Analog ports for sensors· +5V switching power supply· No soldering required· Supports In-system Programming via ISP connectorwith included PX-400 Serial ProgrammerIncludes eveything you need to build a simple mobilerobot. Add your own additional sensors for evenmore complex robots.$59.95

MicroBric Viper· Screw-together Assembly· BasicAtom Microcontroller

· 2 motor modules· Bump sensor modules

· Switch Modules· IR Remote & Receiver Module

With microbric, you can build complex electronicdevices with little or no prior electronics knowledge.As no soldering is involved and the parts are fullyreusable, you can build and rebuild programmable

robots as many times as you like.$89.95

Also Available:Electronic Components

ServosMotorsHardware

Wheels & Tiresand More!

More New Products on the way!

66 SERVO 10.2007

Simpson.qxd 9/5/2007 11:10 AM Page 66

Page 67: Servo2007 10

Subscribe online at: www.servomagazine.com or call: 877-525-2539 (toll free) / 818-487-4545 (outside US)

Go towww.servomagazine.com

to enter your gift order!Be sure to use promotion code Y7WXMS when ordering.

U.S. Prices 1 Yr – $24.952 Yr – $45.953 Yr – $65.95

Give thegift thatlasts all

year!

Give thegift thatlasts all

year!

SV-GiftSubAd2007.qxd 9/5/2007 3:07 PM Page 67

Page 68: Servo2007 10

68 SERVO 10.2007

Ilike keeping things together. Literally.I’ve never been a fan of what’s called

“rubber band and bubble gum” construction — building techniques thatmay be quick and easy, but are onlytemporary and usually more frustratingin the long run. With temporary construction, things are apt to get misaligned or even fall off.

Fasteners are those things that aremeant to keep one thing attached toanother. The most common type of fas-tener is the screw, but there are others,such as rivets and clamps. We’ll take ashort excursion through the fastenerjungle, and cover hardware fasteners.

Screws and NutsScrews come in many different

forms. Two of the most common are thetapered screw and the machine screw.Tapered screws are most often self-tap-ping, and combine the action of a minia-ture drill bit and fastener in one. Taperedscrews are available for a variety of mate-rials, including wood and sheet metal.Their construction differs and each one isbest at the job it’s intended for. Youshould always match the screw to the job.

Machine screws (usually) require aready-made hole. Slip in the screw, andsecure it with a nut or other threadedretainer on the other end. If the materi-al being joined is threaded, the screwcan be secured directly. Machine screwsare sometimes referred to as bolts, and when a nut is included, they’recommonly known as stove bolts.

Speaking of nuts, the most com-

mon is the hex nut, so called becausethe nut has six sides (a hexagon). Thenut is fastened using a wrench, pliers,or hex nut driver. Hex nuts are the mostcommon form out there, and they arethe cheapest. However, there are othertypes as well, including square nutsand T-nuts, also called blind nuts.They’re for wood and soft plastics.

For robotics use, you’ll also want tobe familiar with the locking nut. Theseare standard hex nuts, but with a nylonplastic insert. The nylon helps preventthe screw from working itself loose.

Complementing the screw and nutis the washer, designed to spread outthe compression force of the fastener.Under load and without a washer,damage may occur when the small surface area of the machine screwhead or nut digs into the material. Thewasher doubles or even triples the surface area, spreading out the force.

Washers are available in diametersto coincide with the size of the screw.Choices include tooth washers — bothinternal tooth or external tooth — andsplit lock washers. These provide a locking action that helps prevent thenut from unloosening.

Metal or Plastic?Go into any hardware store and

the vast bulk of hardware fasteners aremade of zinc plated steel. These aremade to resist (but not prevent) rust.Their main benefit is that they areaffordable, even in small quantities.

There are other materials used in

hardware fasteners you’ll want to beaware of:

• Stainless steel. Provides addedstrength and resistance against rustingor corrosion. They don’t need to beplated because the material alreadyresists rust and other corrosion.

• Brass. Softer metal that’s most oftenused for looks. No plating is necessary.Some steel fasteners are only platedbrass.

• Aluminum. Used when a metal fastener is desired at lower weight.Threads are more prone to stripping.

• Titanium. Supreme strength for itsweight. Only modestly heavier than alu-minum, but with the strength of steel.

• Nylon. Lighter than steel or othermetals, but not nearly as strong.Typically available in natural, white, or black.

Have Your Pick ofSizes and Shapes

Machine screws come in standardlengths, though you can often special-order screws to an exact length (whichcosts a lot extra). When you need ascrew of a particular length, you canalways cut down a longer one. Or, youcan use an all-thread rod which is a longmachine screw without a head on it. All-thread is sold in one to six foot lengths.

You secure the materials using

Holding it All Together

Tune in each month for a heads-up onwhere to get all of your “roboticsresources” for the best prices!

RoboResources.qxd 9/5/2007 9:33 AM Page 68

Page 69: Servo2007 10

nuts on both ends. Apart from makingyour own custom-length screws, all-thread is good for making shaftsand linear motion actuators.

The myriad of sizing choices canbe confusing for those new to the artand science of hardware fasteners.Screws, nuts, washers, and other hard-ware is available in either of two sizingstructures: metric or standard. Metricsizing is self-explanatory, and the hard-ware is expressed in millimeter lengths.Standard, or SAE, uses a number classification system in which the small-er the number, the smaller the size.

For machine screws and nuts, andfor both metric and SAE, the fastener isdenoted by diameter and thread pitch.For example, a fastener with a threadsize of 6-32 has a diameter referred to as#6, with 32 threads per inch. Diametersunder 1/4” are indicated as a # (number)size; diameters 1/4” and larger are usually indicated as a fractional measure-ment — 3/8”, 7/16”, and so on.

The pitch (number of threads perinch) can be either coarse or fine forstandard fasteners. Therefore, not all #6fasteners have 32 threads to the inch.This is typical for #10 screws and nuts,which you can often find at the hard-ware store either with both 24- and 32-threads per inch. They cannot be mixed.

Metric fasteners are a bit different.Screw sizes are defined by metric diam-eter, and the thread pitch is the numberof threads per millimeter. In the case ofa machine screw, for example, M4 x 0.7x 10 means the screw is 4 mm in diam-eter, has a pitch of 0.70 threads per millimeter, and has a length of 10 mm.(The standard pitch is typically omittedso in this example, you would see itreferred to as a 10 mm long M4 screw.)

Screws differ in the shape and sizeof the head (the part you use with thescrewdriver), and then there’s the typeof driver used with the screw. The threemost common are: slotted, for a flat-bladed screwdriver; Philips, for a cross-shaped screwdriver; and combination,where you can use either a flat-bladed orPhilips screwdriver. Additional specialtytypes, such as Torx and hex socket, pro-vide for more grip when tightening thescrew, but require specialty driver bits.

The shape of the screw head great-

ly contributes to the amount of torquethat can be applied to the screw whentightening it. Round, pan, and flat headscrews are by far the most common,and they tend to be the least expensive.

• Pan. Good general use.

• Round. Taller head provides greaterdepth for screwdriver bit.

• Flat (or countersunk). Used whenhead must be flush with the material’ssurface.

• Oval. Often used as a substitute forflat head screws, but used when thehead requires extra depth. The top ofthe oval head is semi-rounded.

• Fillister. Extra deep head for very hightorque. The top of the head is rounded.

• Hex bolt. Uses no slot, and requires awrench to tighten. Used in highesttorque applications.

Taking Stock ofMetal Rivets

If bridges, buildings, and airplanescan be assembled using rivets, certain-ly robots can too. A rivet is a metal rodwith a rounded head on one end. Thestraight portion of the rivet is insertedinto the holes of the materials to be fas-tened together. With the pieces posi-tioned, the straight portion of the rivetis deformed to create a second head.The two heads on either end keep thematerials together, while the body ofthe rivet swells into the clearance holesto really make everything snug.

Heavy-duty steel construction useshot rivets that are pounded into shapewith a jack-hammer. For small robots, thePop or blind rivet is the more commonform of rivet construction. These use specially-made rivets and a riveting tool,and are constructed using a soft sheathmetal surrounding a nail-like center post.

The rivet is first inserted and lockedinto place into the tool. The center postis pushed through the materials to bejoined. Squeezing the handle of the rivettool mushrooms the two ends of themetal sheath, creating a firm fastened

joint. The center post then breaks off,leaving only the mushroomed sheath.

Blind rivets come in various sizes andlengths. You choose the length of the rivetbased on the thickness of the materials tobe joined. Bigger diameter rivets are usedwhen you need extra holding power.

Blind rivets are easy to use,but their main disadvantage is thatthey restrict disassembly. If you need totake things apart, you have to drill outthe rivet, thus destroying it and possi-bly enlarging the mounting holes.

A similar idea — but not as perma-nent — is the plastic push rivet. Theseare constructed out of plastic (obvious-ly!), using a head on one end and abifurcated or pronged shank on theother. To use, you press the parts of theshank together, and push through theholes of the material you wish to join.Assuming the correct length of rivet, theprongs spread out on the other end ofthe material, locking things into place.

To work properly, the length of therivet must precisely match the thick-ness of the materials being joined. Ifthe rivet is too short, the prongs wouldspread out and the rivet will not lockinto position. If the rivet is too long, thematerials won’t be firmly joined.

Another option in plastic rivets is thescrew type. These can be either perma-nent or non-permanent. Screw rivets aresingle piece, and combine a screw with anexpanding plastic outer sheath. The rivetholds the materials together using thecompression of the sheath. These types offasteners are popular in car interiors andother applications where you don’t haveaccess to the back side of the material.

Other FastenersYou Can Use

Another useful permanent — buteasy-to-use — construction techniqueis the tie and base clamp. These arenormally used in “wire management”applications, where you tie up a bunchof wires to keep things need and clean.The tie grabs and holds all the wirestogether. The tie goes through theclamp, which may be stuck, glued, orfastened to some base. In our case, thebase of the body or frame of the robot.

Most clamps and ties are made

SERVO 10.2007 69

RoboResources.qxd 9/5/2007 9:33 AM Page 69

Page 70: Servo2007 10

70 SERVO 10.2007

of durable nylon. The larger clampsand ties can be used to hold thingsdown like motors and even wheels andwheel shafts. Select a larger size tie forthe bigger stuff; a 1/8” thick by 1/4”wide nylon tie can hold 50 or morepounds of weight. Slip the loose end ofthe tie through a base clamp, thensecure the clamp to the robot.

Most base clamps come with aself-adhesive that is acceptable for verylight weight applications. For a moresecure construction, I advise applyingthe base using epoxy or a couple ofhardware screws.

SourcesAaron’s General Storewww.aaronsgeneralstore.com

Portal to a number of online special-ty fastener stores. The machine screwswebsite sells Phillips, slotted, hex, screws,bolts, SAE washers and nuts. Steel andstainless steel industrial fasteners.

Atlantic Fastenerswww.atlanticfasteners.com

Fasteners in tens of thousands of varieties, with pictures for your convenience. A downloadable catalogin Adobe Acrobat PDF is available.

Barnhill Bolt Co.,Inc.www.barnhillbolt.com

Fasteners for all occasions, includ-ing all-thread, threaded couplers,thumb screws, roll pins, rings, retailer,and the usual nuts, bolts, and washers.In zinc, steel, stainless, brass, nylon.Metric and standard.

Bolt Depotwww.boltdepot.com

Bolt Depot carries wood screws,sheet metal screws, machine screws,hex bolts, carriage bolts, lag bolts,socket head cap screws, nuts, andwashers — standard and metricsizes. Sales by individual pieces or smallquantity boxes.

Fastenal Companywww.fastenal.com

Fasteners, as well as industrialcomponents and parts (casters, etc.).Local outlets in many US states.

Fastener-Expresswww.fastener-express.com

Fastener assortments, socketscrews, metric fasteners, aluminum fasteners, servo and flange screws,machine screws, sheet metal screws,nuts, washers, and nylon fasteners.

Fuller Metric Partswww.fullermetric.com

Metric fasteners; all sizes andstyles, including pins, threaded spacers,and socket head screws. Check outtheir tech info pages.

ITW Fastexwww.itw-fastex.com

Various types of plastic fasteners,including plastic rivets.

Maryland Metricswww.mdmetric.com

Something of a one-stop-shop,Maryland Metrics carries bearings, linear bearings, fasteners, rods, gears,pneumatics, more.

McFeely’s Square Drive Screwswww.mcfeelys.com

Fasteners, tools, adhesives. Checkout the technical information aboutscrews.

Micro Fastenerswww.microfasteners.com

Fasteners (machine screws, nuts,lock washers, rivets, etc.) predominatelyin petite sizes. US and metric threads.

Micro Plastics, Inc.www.microplastics.com

A major manufacturer and seller ofplastic fasteners, including clips, cableties, hose clamps, plastic stand-offs,panel fasteners, whole plugs, threadedrod, and the usual screws, nuts, andwashers. Standard or metric sizes.

MSC Fastenerswww.mscfasteners.com

Fasteners: body washers, buttonhead, socket cap screws, lag screws,carriage bolts, levis pins, cotter pins,drive screws, flat head socket capscrews, hex head cap bolts, more.

Small Parts, Inc.www.smallparts.com

Variety of components including alarge inventory of fasteners. SV

Atlantic Fasteners carries fasteners in tens of thousands of varieties.

Gordon McComb can be reached via

email at [email protected]

CONTACT THE AUTHOR

RoboResources.qxd 9/5/2007 9:33 AM Page 70

Page 71: Servo2007 10

SPECIAL EXTENSION: Register by October 5th and Save $200

Founding Sponsor

Gold Sponsors

Corporate Sponsors & Exhibitors

Breakfast Keynote Sponsors

Premier Media Co-Sponsor

Media Co-Sponsors

Analysts, Associations & Academic Co-Sponsors

Produced by:

The International Technical Design and Development Event for the Personal, Service and Mobile Robotics Industry

October 25-26, 2007San Jose McEnery Convention CenterSan Jose, CA

The RoboDevelopment Conference & Exposition is the industry’s first event focused on

the technical design and development of commercial robotic products.

This unique and unprecedented event will draw over 1,000 robotics industry

personnel from across the globe and will feature:

Keynote presentations by Tandy Trower, General Manager, Microsoft Robotics Group;

Paolo Pirjanian, President and CEO, Evolution Robotics; Lloyd Spencer, CEO, Coroware;

and Dan Kara, President, Robotics Trends

Over 30 technical sessions delivered by leading robotics and development professionals

Three conference tracks including Design, Development and Standards, Tools and

Platforms, and Enabling Technology

Bonus Microsoft Robotics Studio Development Track

Robotics Evening Network Reception

Expo Hall featuring products, tools and technology from around the world

REGISTER TODAY ATwww.robodevelopment.com or call 800-305-0634

SPECIAL EXTENSION: Register by October 5th and Save $200

www.robodevelopment.com

Full Page.qxd 9/4/2007 4:34 PM Page 71

Page 72: Servo2007 10

72 SERVO 10.2007

// castling bonusesB8 castleRates[]=-40,-35,-30,0,5;

//center weighting array to make pieces prefer//the center of the board during the rating routineB8 center[]=0,0,1,2,3,3,2,1,0,0;

//directions: orthogonal, diagonal, and left/rightfrom orthogonal for knight movesB8 directions[]=-1,1,-10,10,-11,-9,11,9,10,-10,1,-1;

//direction pointers for each piece (only really forbishop rook and queenB8 dirFrom[]=0,0,0,4,0,0;B8 dirTo[]=0,0,0,8,4,8;

//Good moves from the current search are stored inthis array//so we can recognize them while searching and makesure they are tested first

by James Isom

Abi-monthlycolumn for

kids!LESSONSFROM THELABORATORY

LESSONSFROM THELABORATORY

NXT Packbot

i-Robot’s Packbot is well known to any-one interested in robotics. It has been

widely used for surveillance and recon-naissance purposes by both the militaryand law enforcement. Our friend Brian

Davis was inspired by its robust design tomake a version using the NXT. I built onebased on some pictures Brian sent meand the beast will climb over just aboutanything it can get its treads on. Brian

suggested I share it, so over the next sev-eral articles will be the steps to make andprogram your very own NXT Packbot.

This time around we’ll focus on thecore portion of the chassis.

STEP 1:

STEP 4:

Parts:Parts:

STEP 2:

Parts:STEP 5:

Parts:STEP 3:

LessonsFromTheLab.qxd 9/5/2007 9:54 AM Page 72

Page 73: Servo2007 10

SERVO 10.2007 73

STEP 7: Parts: STEP 8:Parts:STEP 6:

STEP 10: Parts: STEP 11:Parts:STEP 9:Parts:

STEP 13: Parts:

STEP 16:

Parts:

STEP 14:Parts:STEP 12:

STEP 15:

Parts:

STEP 17: Parts:

LessonsFromTheLab.qxd 9/5/2007 9:55 AM Page 73

Page 74: Servo2007 10

Parts:STEP 18:That’s all for now. Sorry to leave you

hanging like this, but it’ll be worth it inthe long run. We’ll finish up in December.Happy building! SV

Electronic Parts & Supplies Since 1967

Standard Features:

• CAN, SPI, SCI

• RS232

• 10-bit A-to-D

• 32K or 128K Flash

• PWM

• Input Captures

• Output Compares

• 3V/5V Operation

Plug in the power

of9S12

!

Adapt9S12C

Helping you Adapt to new technology

www.technologicalarts.com

C Stamp™ Controller• LOW COST - High Pin Count

• 48-Pin Module with Analog

• High Speed, Large Memory

• Professional SW Dev. Tools

• Easy to Connect Accessories

• Free Expert Technical Support

www.c-stamp.comToll-Free: 1 (800) 985-AWIT

HobbyEngineering

www.HobbyEngineering.comRobot Kits, Parts, Tools and Books

For the finest in robots, parts, andservices, go to www.servomagazine.com

and click on Robo-Links.

74 SERVO 10.2007

LessonsFromTheLab.qxd 9/5/2007 9:56 AM Page 74

Page 75: Servo2007 10

Robot Builder’s Sourcebookby Gordon McComb

Fascinated by theworld of robotics butdon’t know how totap into the incredibleamount of informa-tion available on thesubject? Clueless asto 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 that will open 2,500+new doors and spark almost as many newideas. $24.95

123 Robotics Experimentsfor the Evil Genius

by Myke PredkoIf you enjoy tinkeringin your workshop andhave a fascination forrobotics, you’ll havehours of fun workingthrough the 123experiments found inthis innovative projectbook. More than justan enjoyable way tospend time, theseexciting experiments also provide a solidgrounding in robotics, electronics, andprogramming. Each experiment builds onthe skills acquired in those before it so you develop a hands-on, nuts-and-boltsunderstanding of robotics — from theground up. $25.00

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

FIRST Robots: Aim Highby Vince Wilczynski / Stephanie

SlezyckiThis book looks at30 different robotdesigns all based onthe same chassis,and provides in-depth informationon the inspirationand the technologythat went into build-ing each of them.Each robot is fea-tured in 6-8 pages providing readers with asolid understanding of how the robot wasconceived and built. There are sketches,interim drawings, and process shots for eachrobot. $39.95

Mechanisms and MechanicalDevices Sourcebook

by Neil Sclater / Nicholas ChironisThe fourth edition of this invention-inspiring engineeringresource covers thepast, present, andfuture of mechanismsand mechanicaldevices. You’ll finddrawings anddescriptions of morethan 2,000 compo-nents that haveproven themselves over time and can be incorporated into the very latestmechanical, electromechanical, and mecha-tronic products and systems. Overviews ofrobotics, rapid prototyping, MEMS, andnanotechnology, along with tutorial chapterson the basics of mechanisms and motioncontrol, will bring you up-to-speed quicklyon these cutting-edge topics. $89.95

We accept VISA, MC, AMEX, and DISCOVERPrices do not include shipping and

may be subject to change.

CNC Roboticsby Geoff Williams

CNC Robotics gives youstep-by-step, illustrateddirections for designing,constructing, and testinga fully functional CNCrobot that saves you 80percent of the price of anoff-the-shelf bot — andthat can be customizedto suit your purposesexactly, because you designed it. Written by an accomplished workshop bot designer/builder, this book gives you everything you need. $34.95

The SERVO WebstoreInsectronics

by Karl WilliamsThis complete projectbook delivers all the step-by-step plans you needto construct your ownsix-legged insect-likerobot that walks andactually responds to itsenvironment. Using inexpensive off-the-shelfparts hobbyists can “build a better bug” and at the same time have loads of fun honing their knowledge of mechanical construction, programming, microcontrolleruse, and artificial intelligence. $19.95

Attention Subscribers ask about your discount on prices marked with an *

NNEEW!W!

SERVO 10.2007 75

WebstoreOct07.qxd 9/6/2007 9:14 AM Page 75

Page 76: Servo2007 10

Get your very own limited-edition SERVO Magazine T-shirt. Shirts come in sizes S, M, L, and are available in either black or white.

All shirts are 100% preshrunk cotton.

SERVOMagazineT-Shirts

For men and women

GreatGreat

GifGift Idea!t Idea!

$19.95!$19.95!

From HomoSapien to RoboSapien Before R2D2 there was R1D1

Take This Stuff and Hack It!by Dave Prochnow

Transform commonhousehold items into real-ly cool stuff. You don'tneed to be an electronicsgenius to get started turn-ing everyday items intohigh-performing wonders.With how-to guru DaveProchnow's step-by-stepdirections and fully illustrated plans, evenbeginners can hack their way to a high-techhome, cooler toys, and less yard work.Certain to fire your imagination and start youplotting new, original, and even more creativewonders you can make from ordinary house-hold items, Take This Stuff and Hack It! is theperfect gift for your inner inventor. $27.95

Building Robots with LEGOMindstorms NXT

by Mario Ferrari, Guilio Ferrari

The Ultimate Tool forMINDSTORMS®Maniacs, the newMINDSTORMS kit hasbeen updated toinclude a program-ming brick, USB cable, RJ11-like cables,motors, and sensors. This book updates therobotics information to be compatible withthe new set and to show how sound, sight,touch, and distance issues are now dealtwith. $39.95

NNEEW!W!

JUN-07JUN-07

BasicX and Robotics by Chris Odom

This book is writtenaround the wheeledrobot called theMouse. The Mouse ismanufactured byRobodyssey Systems.This exciting companybased in Trenton, NJhas created an entirefleet of high-quality,intelligently designedrobots to satisfy thecuriosity of the hobbyist as well as the educational needs of the classroom. Unlikemany robotic toys, the Mouse does notoperate with a remote control (although you can program it do so!). $44.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 to this fully-illustratedrobotics “bible” to enhance the alreadyincomparable content on how to build —and have a universe of fun — with robots.$27.95

NEED MOREINFO?

Go whereSERVE’goes!

The online storThe online store @e @wwwwww.ser.ser vvomagazineomagazine .com.com

To order call 1-800-783-4624

76 SERVO 10.2007

WebstoreOct07.qxd 9/6/2007 9:15 AM Page 76

Page 77: Servo2007 10

To order call 1-800-783-4624Or order online www.servomagazine.com

BACK ROOM SPECIALS

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 any place else.$24.95 Sale Price $14.95Pub date: August 17, 2005

Concise Encyclopediaof Robotics

by Stan GibiliscoWritten by anaward-win-ning electronics author,the Concise Encyclopediaof Robotics delivers 400up-to-date, easy-to-readdefinitions that make evencomplex conceptsunderstandable. Over150 illustrations make theinformation accessible at aglance and extensive cross-referencingand a comprehensive bibliography facilitatefurther research.$19.95 Sale Price $11.95Pub date: November 12, 2002

SERVO'S CUSTOMEMBROIDERED HAT

This is one good looking hat, with its stonewashed blue cap and bright yellow/goldstitching. There's no better way to showeveryone that you're well endowed with abigger - than - average brain then by proudlydisplaying your affiliation with SERVOMagazine. $ 14.95*

H-racer-and-Hydrogen-station

Recently named as one of the Best Inventions of 2006 by Time Magazine, the H-racer is now thebest selling fuel cell product in the world. The H-racer is a micro-version of what engineers andscientists have been dreaming about for real cars: combining hydrogen with oxygen to generatea DC current to power an electric motor. Unlike a gas-powered car engine, the only byproductsof this electrochemical process are electricity, heat, and pure water. With the H-racer, you canwitness the power of new energy technology in the palm of your hand. Horizon has createdthis unique, patented miniature fuel-cell car and hydrogen refueling station. All you need to dois add water. Only $115.00 plus S/H

Robotics Demystified by Edwin Wise

YOU DON'T NEED ARTIFICIAL INTELLIGENCETO LEARN ROBOTICS!Now anyone with aninterest in robotics cangain a deeper under-standing — without for-mal training, unlimitedtime, or a genius IQ. InRobotics Demystified,expert robot builderand author Edwin Wiseprovides an effective and totally painlessway to learn about the technologies used to build robots! $19.95 Sale Price $13.95Pub Date October 20, 2004

The Day the EarthStood Still

An alien (Klaatu) with hismighty robot (Gort) landtheir spacecraft on ColdWar-era Earth just afterthe end of World War II.They bring an importantmessage to the planetthat Klaatu wishes to tellto representatives of allnations. Directed by: Robert WiseActors: Michael Rennie, Patricia NealRun Time: 92 minutes $14.95

Forbidden Planet:50th Anniversary Edition

A starship crew goes toinvestigate the silence of aplanet’s colony only tofind two survivors and adeadly secret that one ofthem has. Dr. Morbius andhis daughter Altaira havesomehow survived ahideous monster whichroams the planet. Directed by: Fred M. WilcoxRun Time: 98 minutes $26.95

Blade Runner(The Director’s Cut) (1982)

In a cyberpunk vision ofthe future, man has devel-oped the technology tocreate replicants, humanclones used to serve in thecolonies outside Earth butwith fixed lifespans. In LosAngeles, 2019, Deckard is aBlade Runner, a cop whospecializes in terminating replicants.Directed by: Ridley ScottRated: R — Violence $19.95

NEW! THE SERVO STORE NOW OFFERS DVDS!

With this kit, you now can see andfeel the future of energy generationin your own hands!

SERVO 10.2007 77

WebstoreOct07.qxd 9/6/2007 9:16 AM Page 77

Page 78: Servo2007 10

My son (Andrew, age 14) and Ihave been involved in combat

robotics for about nine years now.The BBC “Robot Wars” TV series wasvery popular back in our nativeScotland in the late ‘90s and I hadpersuaded my company to sponsorme and a couple of colleagues in alocal community college event.Andrew was very interested in thebuild process and greatly enjoyedit when we convincingly won theevent. We had planned to take part inthe next BBC series when our liveswere all turned upside down. Myemployer decided to close the localR&D facility and asked me to move toRaleigh, NC.

We arrived in early 2000 and oncewe were settled in, I started tolook into what was happening in thesport locally. I found that there weretwo local competitions and the

“Battlebots” TV show wasstill running. I joined thelocal robotics club andfound that a couple ofmembers were interested in helping. We built a heavyweight spinner andcompeted at a few eventswithout much success, butlearned a lot in the process.

In 2003, my sonexpressed an interest intaking part. Together, weassembled an armored RCcar, “CheepShot,” for himto enter the 12 lb class. Helost both his first fights butstill said it had been thebest day of his life! Nowthat he was hooked, we decided to move into smaller bots, buildingmuch more sophisticated 12 and 30 lb robots.

These were more successful, andwe started winning some matches.Andrew got our first 30 lb championship at RCRAII in theautumn of 2004. Since then, we have won the 12 lb and 30 lb 2006Nationals and most recently took firstplace in 12 lbers at the 2007RoboGames. Andrew does most ofthe driving now (he is much betterthan his old Dad!) and recently didmost of the design work on a new Beetle. His rapidly improving mechanical skills have also allowedhim to take a much bigger share ofthe builds and also the repairs atevents. You can follow our progress atwww.teamrollingthunder.com.

I have enjoyed competing with(and sometimes against!) Andrewand the sport has helped both of usget out and see America. It’s reallyhelped Andrew to build self-confidenceand abilities which will stand him ingood stead whether he continues incombat robots or moves on to otherinterests. SV

Scots wha hae!by Pete Smith

Father and son.

78 SERVO 10.2007

Appetizer.qxd 9/5/2007 11:02 AM Page 78

Page 79: Servo2007 10

Typical of all the list servers that thedifferent robotics groups sponsor,

the Seattle Robotics Society’s server([email protected])draws some lively discussions on differ-ent facets of robotics. Some postingsrecently were about ‘legs not wheels’for robots and numerous solutions forpower of rather large robots includedeverything from batteries to super capsto pulse jets.

Generally, when we think ofpower for our robots, basic batteriescome to mind first. We take power forgranted as we design our robots, but,were it not for a reliable source ofpower, our best robotic creation willjust stand there on our workbench and stare at us, albeit with lifeless eyes.I’m going to focus on batteries, but Iwill discuss some other power sources,as well.

Batteries have been around foralmost a century, but there are sourcesthat were used long before our modern day battery systems. Many ofus saw the giant steam-powered robot‘crab-thing’ that was featured in theWill Smith movie Wild, Wild West thatthe villain used to crawl across thewestern desert of the late 1800s. Ofcourse, this was a computer generated‘robot,’ but there are some actualworking steam robots that I have mentioned in previous columns, suchas the various CrabFu creations.

Early Spring-PoweredRobot Automatons

Some of the earliest mechanical

devices built to resemble humansor animals were powered by water.The mechanical creations of the 18thand 19th centuries are some of themost elegant ever constructed. Theunique automatons built by HenriMaillardet and Jaquet-Droz such as TheScribe, The Draughtsman, and TheMusician are powered by wound-upsprings; the same power used formost watches and clocks well into the20th century.

The Scribe was built in 1770 and isa child-formed automaton that dips aquill pen in ink and moves it over paperto write. The Musician actually plays aworking organ and the automaton’sfingers depress each key to producethe notes. Its breast rises and falls tosimulate breathing and the body, eyes,and head sway and move in rhythmwith the music.

The Scribe, Draughtsman, andMusician are still in working conditionand are on display in the Musee d’Artet d’Histore in Neuchatel, Switzerland,where they are operated occasionally.

Henri Maillardet’sPhiladelphia Doll, shown inFigure 1 was built in 1811and is on display at theFranklin Institute in Philadelphia.This automaton’s movementswere controlled by a set ofhand-filed cams driven by a spring-powered clockworkescapement shown in Figure 2.

When we feel a bit ofpride in our microcontrollerbased machines with a

lithium polymer battery pack inside, wemust remember that these 18th and 19th century marvels were powered by simple wound-up springsand revolving cams.

The Age of theBattery

Let’s jump back a millennium ortwo before the spring-wound andsteam creations to the earliest part ofthe electrical age and the chemical battery. Yes, people knew of electricitylong ago, especially static electricity.However, it is the Baghdad Battery of250 BC that is considered to be the firstbattery (see Figure 3).

In 1936, several earthenware jarswere excavated near Baghdad thatcontained a copper cylinder with asealed copper disk at the bottom. Aniron rod was suspended inside the cop-per cylinder and insulated by an asphaltstopper. The iron rod shows evidenceof corrosion (possibly by vinegar or similar fluid) and the construction and

Then NOWan

d

ROBOT POWERb y T o m C a r r o l l

FIGURE 1. ThePhiladelphia Doll.

FIGURE 2. Cams inthe doll’s back.

SERVO 10.2007 79

Then&Now.qxd 9/5/2007 9:27 AM Page 79

Page 80: Servo2007 10

80 SERVO 10.2007

insulation of the two metals shows definite evidence of the device’s use asa battery.

Their probable use was for silverplating and most likely delivered anywhere from a half volt to a volteach. Several were on display at theBaghdad State Museum and werestolen during the raids after Baghdad’scapture in the war.

Early BatteryExperimenters

We’ve all read about BenjaminFranklin’s experiments with electricity,especially the foolhardy experiment offlying a kite with a conductive string ina thunderstorm. Well, he didn’t getfried by a lightning bolt and becamefairly famous in American history. Hedid coin the term ‘battery’ in 1748 foran array of electrically charged glassplates, more of what we would call

today as a series-connected bank of capacitors.

In the 1780s, Luigi Galvani delveddeeper into this new electrical phenomenon and provided the basisfor experimenters to come. The terms‘galvanic’ reaction and ‘galvanometer’were derived from his name.

In 1800, Alessandro Volta madethe first device to produce electricity ina practical manner — the voltaic pile. Itliterally was a ‘pile’ of alternating discsof zinc and copper separated by piecesof cardboard soaked in a brine solution(see Figure 4). This was the first batteryto produce an electrical current (voltage) of over a volt or so. This wetcell battery could produce a reliableand steady voltage that experimenterslater used to develop electric motorsand other devices. The term ‘volt’ wasderived from his name.

A volt is a unit of measure of elec-tromotive force or difference in poten-tial between two points in an electricfield that requires one joule of energyto move a positive charge of onecoulomb from the point of lower poten-tial to the point of higher potential.Rather than trying to remember all ofthis and look up all these other terms,we just pull out our trusty multimeterand turn the dial to ‘volts,’ place thetwo probes on the two different points,and read the potential on the LCDscreen. A hundred years ago, experi-menters used a galvanometer housedin a fancy wood case to determine voltage; it’s a piece of cake these days.

Many types of battery technolo-gies were developed, both in the wetcell types that we still use today as carbatteries, and electrolytes that were inpaste form. In 1866, a French engineer,Georges Leclanche developed the carbon-zinc battery later referred to as the Leclanche Cell. Many improve-ments followed in this design, and itgradually evolved to the familiar 1-1/2volt dry cell flashlight battery thatsome of us may remember from the‘60s and earlier.

This cell used a paste of manganese dioxide in a zinc cylinderwith a positive electrode carbon roddown the center. These cells were produced in many variations, the firstbeing the familiar D size. Many farms

of the ‘50s and earlier did not haveelectricity and used battery-poweredradios for entertainment.

Since these were the days beforelow voltage transistors, huge batterypacks were used that contained 60 Dor C sized cells to produce 90 volts forthe B voltage required for the plates ofthe tubes, and four to eight larger cellsin series for the A voltage for the tube’sfilaments. There were even 510 voltbatteries that photographers used for strobe lamps before transistorswitchers allowed the use of a few drycells to produce the same voltage.

The Use of TransistorsBrings About DesignChanges

The advent of transistors changedthe entire battery industry and certainly made a great impact onmobile robot designs. The commonnine volt battery was developed thatvirtually all consumer transistorizeddevices began to incorporate in theirdesigns, along with a few six and 12volt configurations.

Alkaline batteries soon took theplace of traditional battery chemistriesas consumers desired longer batterylife and were willing to pay the premium price. Alkaline batteries arewhat is known as primary batteries —not rechargeable. Their initial low costis nice, but they end up costing a lotmore when you toss the dead onesout. Once experimenter robots cameto the marketplace, any robot largerthan a pound seemed to eat an endlesssupply of alkaline AA cells. Robotexperimenters needed a cheaper way to feed their creations and the machines that they bought ready-made.

RechargeableBatteries

There is no way any serious robotexperimentation could take place with-out the use of some sort of electricalsource that was cheaply replenished.Rechargeable batteries take centerstage as a mobile robot power source,even with the cheaper fuel cells

FIGURE 3. Baghdad battery.

FIGURE 4. Voltaic pile.

Then&Now.qxd 9/5/2007 9:28 AM Page 80

Page 81: Servo2007 10

becoming available to the experi-menter. Let’s review what’s available.

Lead Acid and SLABatteries

The lowly lead acid battery hasbeen around for more than a centuryand still starts virtually all of our carstoday. These batteries have the advan-tage of being readily available and arefairly cheap. They can deliver quite a bitof current, but are heavy and are filledwith one of the most wicked fluids everdiscovered — sulfuric acid.

If you don’t think that spilled bat-tery acid can do damage, try turningone over in your robot. I saw a singlebattery that accidentally got turned onits side that not only ate through arobot’s base plate, but ate a hole in thebottom of the van that the robot wassitting in. It also scarred the garagefloor where the van was parked. We’retalking aluminum and steel, here; justimagine what it can do to electronic circuit boards and your skin. Even the vapors released when charging cando a lot of damage.

Enter the sealed lead acid battery,or SLA. These batteries have the advan-tage of not leaking acid even if upside-down. Most use a gelled electrolytethat does not run out like a liquid evenif the battery is punctured; a situationthat happens in combat robotics. The term ‘gel cell’ came from the gelatinous electrolyte makeup.

These are the least expensive batteries for their current output, butdesigners find their weight excessiveand small number of charge-dischargecycles limiting. Hawker and PowerSonic brands of SLA batteries seem tohave developed a good following fromthe combat robotics community.

Batteries never were developed toundergo the tremendous dischargestrain that combat robotics places onthem. Instead of the typical 20 hourdischarge period that most batteriesare rated at, a full-on robot battle candeplete a battery in as little as five or six minutes. Most experimenters don’t demand such a current drawfrom their robot’s batteries as is foundin combat robotics.

One might be tempted to assume

that a 12V, 20 AH battery can deliver20 amps at 12 volts for one hour,when, in fact, it is rated at one amp for20 hours and maybe only five to sixamps for one hour. The cell voltage is abit over two volts, so six and 12 voltconfigurations are the most popular. A12 volt battery typically has a no-loadvoltage of 13.2 volts when fullycharged, and 10 volts when dischargedand is replenished at around 14.7 volts.

Battery chemistries vary widelyand internal plate construction, vent-ing, and other design characteristicscan make seemingly similar batteriesreact very differently under similarcharge and discharge situations.Always check the manufacturer’s spec sheets for charging and userequirements.

Nickel CadmiumBatteries

The nickel cadmium or NiCad battery has been around many yearsand has found its way into virtuallyevery type of portable power tool inexistence. The C or sub-C sizes are themost popular for power tools andexperimenters have used these in alltypes of robots, many extracted fromold power tools. Smaller robots haveused the AA sizes built into packs.

At 1.2 volts per cell, 10 cells makeup a typical 12V NiCad battery pack.NiCads have the advantage of lowercost, even lower than many lead acidtypes. They have up to three times theenergy density of SLA batteries, can becharged and discharged up to 1,000times, and are easy to fit within a smallrobot’s internal cavities.

They do lose up to 1% of theircharge per day; they exhibit what isknown as the ‘memory effect’ whenpartially discharged and then re-charged; and they contain the toxicelement cadmium which requires proper disposal. As always, go to thevarious manufacturers sites and learnmore about these workhorses of thebattery world.

Nickel Metal HydrideBatteries

The Nickel Metal Hydride or NiMH

battery is a newer technology thatis finding its place in hand powertools, computers, and mobile robots.D cell NiMH packs usually exhibit aslightly lower peak current outputcapacity, but can source a steady 40amps and spikes up to 100 amps.There are standard and fast chargersavailable for the typical robot hobbyistand the combat enthusiast, but it isnever recommended to use a NiCadcharger for charging NiMH batteries asthey will probably suffer permanentdamage.

These batteries have the greatestpower density of the more commontypes of rechargeable batteries; can berecharged over 300 times; have a fairlyflat voltage discharge curve; have nomemory effect; and are not toxic towaste dumps. They are fairly expensivethough, and have an even greater levelof self-discharge at up to 5% per day. They also require a bit of carefulmonitoring and maintenance.

Lithium Ion andLithium PolymerBatteries

Lithium ion is even newer than theNiMH types and has a fairly high ener-gy density if discharged at a moderaterate. This caveat does not always workwell with most robot designs thatsometimes draw an excessive amountof power if the robot, for instance,happens to traverse a thick carpet or lawn. The shelf life is fairly short attwo years.

Lithium Polymer batteries are thenew kid on the block, having foundtheir way into electrically-poweredmodel aircraft in a big way. This batterytechnology was introduced in the late1990s and stores less energy perpound than lithium ion but is a bitmore flexible.

Lithium polymer uses a gelled elec-trolyte rather than liquid. The individualcell voltage is about 4.2 volts, a bit toolow for some five volt circuits. Robotexperimenters have used these batteries for a few years now, however,several horror stories have arisen.

Some of the less expensivebrands of both types of lithium

SERVO 10.2007 81

Then&Now.qxd 9/5/2007 9:28 AM Page 81

Page 82: Servo2007 10

batteries have been known to explodeand burn for no apparent reason. Alithium-fueled fire can be wicked.Laptop computers have caught fireand burned up cars; robots have incin-erated themselves. It is recommendedthat experimenters remove the batteries from their robots when notin use for this reason.

As always with my column, I do not and cannot cover the myriad of types of products or the many

manufacturers of products that I discuss. This certainly applies to the science and engineering aspects of batteries for which there are literallythousands of books on the subject anda million or more hits on the Internet.Battery technology involves too manyaspects to cover in a single article. Anomission by me of a type or brand is inno way a negative feeling by me aboutthat brand anymore than an inclusionis indicative of my choices.

I am absolutely convinced, howev-er, that a properly selected powersource for your robot design is one ofyour most important decisions. Use thismagazine and other reputable sourcesto learn from others just what powersystem is best for your design. SV

Tom Carroll can be reached via emailat [email protected].

CONTACT THE AUTHOR

82 SERVO 10.2007

Active Robots .............................................3All Electronics Corp. ..........................21, 74AP Circuits/e-pcb.com ............................50AWIT ..........................................................74Budget Robotics ......................................78CrustCrawler .............................................19Electronics123 ..........................................21Futurlec ......................................................74Hitec ..........................................................38Hobby Engineering ..................................74IMService ............................................21, 74

Jameco ..................................................2, 74Lorax Works ........................................21, 74Lynxmotion, Inc. .......................................13Maker Faire ................................................51Maxbotix ...................................................74Maximum Robotics ............................66, 74Net Media .................................................83Parallax, Inc. ...............................Back CoverPCB Pool ..............................................42, 74Pololu Robotics & Electronics ...........18, 74

Robo Development 2007 ........................71Robotis Co. Ltd. .......................................23RobotShop, Inc. .................................74, 82Schmartboard .....................................21, 23Solarbotics/HVW .....................................42SORC ............................................................7SPSU ...........................................................31Technological Arts ...................................74TORMACH .................................................12Vantec .........................................................7Yost Engineering ......................................30

Advertiser Index

Then&Now.qxd 9/5/2007 9:29 AM Page 82

Page 83: Servo2007 10

Order 24 hours a day, 7 days a week

www.Jameco.comOr call 800-831-4242 anytime

©Jameco Electronics. *According to their web sites on August 28, 2007. Trademarks are the property of their respective owners.

We’re Semi NutsWe’ve got semis on the brain. Jameco offers more major brands of semiconductors than anyone

— almost twice as many as these catalog distributors.* It’s another Jameco advantage.

5

10

15

20

25

OTHER JAMECO ADVANTAGES: More major passive, interconnect and electro-

mechanical brands than other distributors.

99% of catalog products ship the same day.

Lowest prices guaranteed, or we pay 10%.

Major brand names and generic equivalentsfor even greater cost savings.

Free shipping on these and 79 other brands.Call for details.

Jameco®

AlteraAnalog DevicesAtmel SemiconductorAvago TechnologiesCypressDiodes INC.Fairchild SemiconductorFreescale SemiconductorInfineon TechnologiesIntegrated DevicesIntel CorporationIntersilLattice SemiconductorLinear TechnologiesLite-On SemiconductorMaximMicron TechnologiesMicrosemiNational SemiconductorNECNXP (formerly Philips)Renesas TechnologySharp MicroelectronicsST MicroelectronicsTexas InstrumentsToshiba

Allied®

Analog DevicesAtmel SemiconductorAvago TechnologiesFreescale SemiconductorInfineon TechnologiesIntegrated DevicesIntel CorporationIntersilLattice SemiconductorMaximNational SemiconductorNXP (formerly Philips)ST MicroelectronicsTexas Instruments

Newark®

AlteraAnalog DevicesAvago TechnologiesCypressFairchild SemiconductorFreescale SemiconductorIntegrated DevicesIntel CorporationIntersilLattice SemiconductorMaximNational SemiconductorST MicroelectronicsTexas Instruments

Mouser®

Atmel SemiconductorAvago TechnologiesCypressDiodes INC.Fairchild SemiconductorFreescale SemiconductorIntersilLattice SemiconductorLite-On SemiconductorNECSharp MicroelectronicsST MicroelectronicsTexas Instruments

CoverInside.qxd 9/4/2007 3:56 PM Page 2

Page 84: Servo2007 10

Vol. 5 N

o. 10

SERV

OM

AG

AZIN

ERO

BOTIC A

RM

•N

EEMO

12•

ROO

F INSPECTO

R•

GPS

•M

-BOT

•FA

STENER

SO

ctob

er 2007

0 474470 58285

10>U.S. $5.50 CANADA $7.00

Cover.qxd 9/6/2007 11:31 AM Page 84