servo2008 08

84
0 4 74470 58285 08 > U.S. $5.50 CANADA $7.00 Vol. 6 No. 8 SERVO MAGAZINE DARPA AT THE GRAND PRIX RC ROBOTICS CPLD SERVO DRIVER VEX MOTOR PWM August 2008

Upload: karina-cristina-parente

Post on 03-Jan-2016

29 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: servo2008 08

0 474470 58285

08>U.S. $5.50 CANADA $7.00

Vol. 6 N

o. 8

SSEERRVV

OOM

AG

AZIN

ED

AR

PA A

T THE G

RA

ND

PRIX

•RC RO

BOTICS

•CPLD

SERVO

DR

IVER

•V

EX M

OTO

R PW

MA

ugust 2008

Cover.qxd 7/9/2008 1:54 PM Page 1

Page 2: servo2008 08

Let your geek shine.Meet Pete Lewis, lead vocalist for the band Storytyme. Pete recently created the RS1000, a new personal monitor system for performing musicians. It was SparkFun’s tutorials, products and PCB service that enabled him to take his idea to market in less than a year.

The tools are out there. Find the resources you need to let your geek shine too.

©2008 SparkFun Electronics, Inc. All rights reserved.

Hear music from Storytyme at www.storytymeband.com, or check out Pete’s RS1000 at www.rockonaudio.com.

Sharing IngenuityW W W. S P A R K F U N . C O M

Full Page.qxd 7/9/2008 9:57 AM Page 2

Page 3: servo2008 08

a) Scienceb) Technologyc) Engineeringd) Mathematicse) All of the above

Given a choice, middle and high school students prefer robotics among science courses. And our Classroom Lab Kits make it easier than ever to bring VEX Robotics to your school while making your budget go farther. With standards-based curriculum available from Intelitek, Carnegie-Mellon and Autodesk, VEX is quickly becoming the robotics platform of choice among schools internationally. We now offer local, regional, national and international competitions for students to test their skill and express themselves. Visit RobotEvents.com for event information. Only one choice is clear when considering an educational robotics platform – the VEX Robotics Design System.

Studies prove whatwe at VEX® already knew...Students love Robotics.

Classroom Lab Kitbundles start at $549

A product of Innovation First. Copyright 2008. Innovation First, Inc.

Think. Vex.Amaze.Build.Create.

VISIT WWW.VEXROBOTICS.COM

Full Page.qxd 7/9/2008 10:18 AM Page 3

Page 4: servo2008 08

Features28 BUILD REPORT:

Combat Robot: $1.25 a Pound

32 PARTS IS PARTS:Power Switches

Events30 Results and Upcoming Competitions

30 Event Report:Mall of America Rotunda Rumble

Robot Profile33 Touro

06 Mind/Iron24 Events Calendar26 New Products44 Robotics Showcase66 Robo-Links73 SERVO Webstore81 Advertiser’s Index

Columns08 Robytes

by Jeff EckertStimulating Robot Tidbits

10 GeerHeadby David GeerMAARS Robots Taking Off for War

14 Twin Tweaks — Special Editionby Bryce and Evan WoolleyRhyme of the Modern Submariner

20 Ask Mr. Robotoby Dennis ClarkYour Problems Solved Here

62 Robotics Resources by Gordon McCombRobotics via Remote Control

67 BasicBoard Roboticsby William SmithMoving From BS1 to PIC

76 Appetizerby John SosokaThe Greatest Playground of All

78 Then and Nowby Tom CarrollRobots — How We’ve Built Them Over the Years

PAGE 10

PAGE 14

4 SERVO 08.2008

THE COMBAT ZONE ...

Depa

rtmen

ts

TOC Aug08.qxd 7/9/2008 4:04 PM Page 4

Page 5: servo2008 08

08.2008VOL. 6 NO. 8

SERVO 08.2008 5

36 The CPLD Servo Driverby Fred EadyDriving hobby servos is only one of the tricks a CPLD can perform. In addition to turning servo rotors, you can also use a CPLD to replace a number of discreet logic ICs in your next robotic design.

46 Build a PWM Circuit to Run a Vex Motorby John ToebesYou don’t just have to use NiCad batteries to drive a Vex motor.

49 Look Ma, No Driver!by Jason BardisAutonomous DARPA vehicles take center stage (track!) at the Long Beach Grand Prix.

55 Build the Ultimate Robotby Michael SimpsonIf you’re not afraid to part with a little cash, this series will give you the choice of building either a six- or three-wheeled robot with an onboard PC.

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

PAGE 46

PAGE 28

PAGE 36

Features & Projects

TOC Aug08.qxd 7/9/2008 5:14 PM Page 5

Page 6: servo2008 08

Published Monthly By T & L Publications, Inc.

430 Princeland CourtCorona, CA 92879-1300

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

Webstore Only 1-800-783-4624www.servomagazine.com

SubscriptionsToll Free 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 GeerDennis Clark R. Steven RainwaterFred Eady Kevin BerryBryce Woolley Evan WoolleyJason Bardis John ToebesMichael Simpson John SosokaTim Wolter Aaron NielsenChad New William Smith

CIRCULATION DIRECTORTracy Kerley

[email protected]

MARKETING COORDINATORWEBSTORE

Brian [email protected]

WEB CONTENTMichael Kaudze

[email protected]

PRODUCTION/GRAPHICSShannon Lemieux

Joe Keungmanivong

ADMINISTRATIVE ASSISTANTDebbie Stauffacher

Copyright 2008 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.

Next Level RoboticsTo an outsider looking in at

amateur robotics, it often appearsthat the field hasn’t evolved much inthe past few years. Certainly, therehave been evolutionary gains.Sensors are a little smaller andsmarter, and motors and controllersare a little more powerful andsophisticated. Furthermore, therehave been a few advances inmicrocontrollers, such as thedevelopment of the Parallax Propeller,and more powerful fieldprogrammable gate arrays or FPGAs.

Despite incremental advances inthe components we use to constructrobots, the fundamental capabilitiesof carpet roamers, crawlers, andarms haven’t changed much. Theleading edge of low-cost robotics isoften represented by toys carried bythe major retail outlets. So what’s itgoing to take to get amateur roboticsto the next level? That is, to a levelthat not only matches the capabilitiesillustrated by commercial andacademic robotics, but that at leasthints at the capabilities we ascribe torobots depicted in Star Wars andTransformers?

First, a reality check. Developinga semi-autonomous Martian rover ora robotic prosthetic arm for a soldierinjured in Iraq takes significantfinancial resources and teams ofengineers, scientists, and machinists.So what can you do, given thecurrent economic environment, to move your robot designs to thenext level?

The most fertile area in roboticsyet to be fully exploited that is within

reach of every roboticist is softwaredevelopment. For example, in thearea of robot vision, there is a needto better recognize, track, anddifferentiate objects, to read facialexpressions and gestures, and — ingeneral — to make robots moresocially adaptable. If your interest isoutdoor navigation, then there is aworld of software options to explore,from GPS-based localization tonavigation with light and RF beacons.Means of providing robots with the ability to maneuver throughmazes and how to best avoid ledges and low-traction areas haveyet to be perfected.

Connected to a PC, your roboticarm or vehicle with appropriatesensors can become just assophisticated as any rover developedby NASA. Of course, you can workon challenges completely within acomputer using simulations. Andthat’s an efficient, low-cost method.However, at some point you have tovalidate your work on a real robot.One thing I’ve learned over severalyears of building robots is that unless you’re working on a specifichardware specification, you’ll makemore progress in shorter time if youleave the design of the hardwareplatform to someone else and focuson the overall functionality.

For example, why spend monthsdesigning and building an arm whenyou can buy a kit from Lynxmotion(www.lynxmotion.com) orCrustCrawler (www.crustcrawler.com)? Even if you have to modify anoff-the-shelf arm, you’ll likely still savetime and money. I’ve used variousversions of the CrustCrawler arm —

Mind / Iron

by Bryan Bergeron, Editor

Mind/Iron Continued

6 SERVO 08.2008

Mind-Iron Aug08.qxd 7/9/2008 8:10 PM Page 6

Page 7: servo2008 08

SERVO 08.2008 7

Wearable SensorsConceived atHarvard RoboticsLab MeasureHand ForcesFingerTPS™ PutComfortable Tactile Sensorsat Your Fingertips ... Literally

Pressure Profile Systems, Inc. (PPS),had just released their innovative

new wireless FingerTPS™ (Finger Tactile Pressure Sensing) system forimmediate sale worldwide. FingerTPSsensors are soft, flexible sensors wornon the hand that transmit accurate,repeatable tactile force data to a PC

via wireless Bluetooth connection.FingerTPS tactile data with integrated video provides a completerepresentation of user interaction withtools, sports equipment, new productdesigns, and medical applications.

"The FingerTPS concept wasoriginally funded by DARPA research

grants to capture the forces of askilled surgeon for developingvirtual surgical simulationsystems. After a decade ofnumerous iterations, we finallyhave a system that is easy touse," said Dr. Jae Son, CEO of PPS.

The wireless FingerTPSsystem was unveiled to thepublic at the IVR IndustrialVirtual Reality Expo in Tokyo,Japan this last June. "The wireless capability and thesimple, one-touch calibrationwere the most exciting featuresamong attending engineers andresearchers from hundreds ofleading firms," said David Ables,CTO of PPS.

FingerTPS was recentlyfeatured in programming on theNational Geographic Channeland Fox Sports Net. Episodes of"SportScience" and "FightScience"called on PPS and industryexperts to scientifically explainthe performance of world-classathletes including NFL Hall ofFame receiver Jerry Rice, NBAsharpshooter Jason Kapono, and Mixed Martial Arts legendRandy Coture.

"For elite athletes like JerryRice or Jason Kapono, theirhands are their livelihood, and

they readily grasped how real-timetactile data could help evaluate and improve their performance,"explained Ables.

FingerTPS systems start at a mere$4,995 for a single-hand system withtwo sensors that are available inmultiple sizes in specialized shapes for fingers, thumbs, palms, and innerphalanges. FingerTPS systems also include a video camera forsynchronized video input, software,and a reference sensor for easy, one-touch calibration.

Pressure Profile Systems, Inc., wasfounded in 1996 by two graduatesfrom the Harvard University RoboticsLab. Government grants and industrialsales have enabled PPS tactile sensingtechnology development for medicaldevices, industrial instruments, andconsumer electronics.

For more information, visit the PPSwebsite at ww.pressureprofile.com.

including their latest Smart robotic arm —as the basis for many projects that relyon the processing power of a PC. BothCrustCrawler and Lynxmotion offer PC-based software to control their arms,and third party software is available, as well.

Similarly, you needn’t start yoursoftware designs from scratch or with ahuge budget. The entry-level versions ofthe various Microsoft .Net compilers andthe MS Robotics Studio can be freelydownloaded. If you’re not a Microsoftfan, there are dozens of softwareoptions, from MatLab and Simulink(www.mathworks.com) to open-sourcecompilers. If possible, leverage what’sbeen done before and move to the nextlevel more quickly and easily. Just be sureto return the favor and post your softwareto the web – and consider sharing yourexperience with SERVO readers.

I don’t want to discouragemechanical engineers and engineers-in-training from tackling new hardwaredesigns. If you have a machine shop atyour disposal and the skill to use thosetools, then don’t hesitate. Everyone hasdifferent goals and ideas of what theywant to get out of robotics. However, ifgetting to the next level quickly on alimited budget is your focus, then youshould at least consider focusing on thebrains — as opposed to the brawn — ofyour robots. SV

FAST FAQsWhat is the maximum pressure rangethat PPS sensors can reach?

PPS industrial sensors can reach pressureranges of up to 2,000 psi. However, currentlyPPS can only guarantee factory calibration atpressures up to 700 psi.

What is the maximum speed of the PPS sensors?

TactArray systems have an element-to-elementscan speed of up to 10 kHz. ConTacts systemshave a continuous analog output allowing anysampling rate, but the sensors have athroughput of approximately 2 kHz.

Of what materials are PPS sensors made?

PPS sensors are made from conductive cloth(conformable), Kapton (industrial), Lycra(stretchable) or a combination of conductivecloth and Kapton (hybrid).

What is the smallest element size for PPS sensors?

Element sizes in TactArray sensor arrays can be as small as 1mm x 2 mm, however, practicalresolution is actually much greater. PPS'spressure-sensing technology allows accuratepressure interpolation between sensingelements. Single-element ConTacts sensorshave been built as small as 5 mm x 5 mm.

Are PPS sensors waterproof?

PPS sensors are NOT waterproof, however,PPS can provide removable waterproofsheaths to protect the sensors orcomplete encapsulation for more rugged environments.

Mind-Iron Aug08.qxd 7/9/2008 1:54 PM Page 7

Page 8: servo2008 08

8 SERVO 08.2008

New Hopperbot Sets Record

Mechanical jumpers are nothingnew, but one that was unveiled atthe IEEE International Conference onRobotics and Automation appears tohave, um, leaped ahead of its com-petitors in terms of jump distance.The tiny, 7 g mechanical grasshoppercan jump 1.4 m, which is said to be10 times farther — relative to its size— than any other existing jumpingrobot. The little bug was developedat the Laboratory of IntelligentSystems at the Ecole PolytechniqueFederale de Lausanne (EPFL, www.epfl.ch), and, according to Prof. DarioFloreano, “This biomimetic form ofjumping is unique because it allowsmicrorobots to travel over many typesof rough terrain where no other walk-ing or wheeled robot could go. Thesetiny jumping robots could be fittedwith solar cells to recharge betweenjumps and deployed in swarms forextended exploration of remote areason Earth or on other planets.”

The bot mimics the way fleas,locusts, and other pests travel bycharging two torsion springs via asmall 0.6 g pager motor and a cam.To optimize jump performance, thelegs can be adjusted for jumpingforce, take-off angle, and force profileduring the acceleration phase. An on-board battery allows it to make upto 320 jumps at 3 second intervals.

Microbots Self Organize

Down on the MEMS level, DukeUniversity (www.duke.edu)researchers have been training micro-bots to maneuver separately, withoutany obvious guidance, and assemblethemselves into organized structures.The devices — which are basicallyshaped like a spatula — can displaysurprisingly flexible movements. Inone experiment, two of them weretaught to pirouette to Strauss musicon a tiny “dance floor.” In the accompanying photo, four of themnumbered 1, 2, 4, and 5 (no. 3 was probably somewhere being questioned by Mike Nifong), startedat the corners of a rectangle a bitsmaller than one square mm. Next,two species (4 and 5) docked to form

the initial stable shape, afterwhich the others joined to formthe final assembly.

The devices measure about60 x 250 x 10 µm and drawpower from an electrified surface. They take steps of only10 to 20 nm but can make upto 20,000 movements per second. The only speculationabout practical applicationscited the ability to move aroundthe interiors of laboratory-on-a-chip devices. But they’ll

probably come up with somethingmore provocative.

Robofish in SchoolMost subaquatic robots

need to communicate withhuman beings from time totime, often via communicationsatellites during operation. Butthe University of Washington(www.washington.edu) isdeveloping fin-propelledRobofish that can skip the middle man and work cooperatively with each otheruntil their task is complete.Kristi Morgansen, UW assistant

professor of aeronautics and astronautics, recently ran them in aschool of three as their first majortest, in which they were programmedto either swim all in one direction orall in different directions. The latterdoesn’t sound like much of an accomplishment, being essentiallywhat would happen if you turnedthree flies loose in your living room.But bigger things are planned. Theresearchers trained some live fish torespond to a stimulus by swimminginto a feeding area. They discoveredthat you only have to train about athird of the fish to get the entire schoolto act in unison. “The fish that have astrong idea tend to dominate over those

This mechanical grasshopper can leap 27times its body size. Photo courtesy of EPFL.

Microassembly experiment recorded via opticalmicroscope. Image courtesy of Duke University.

Fin-propelled Robofish (shown witha penny) is about the size of a 10 lb

tuna. Photo courtesy of theUniversity of Washington.

bbyy JJeeffff EEcckkeerrttRRoobbyytteess

Robytes.qxd 7/8/2008 10:25 AM Page 8

Page 9: servo2008 08

that don’t,” according to Morgansen.“That has implications for what willhappen in a group of vehicles. Can onevehicle make the rest of the group dosomething just based on its behavior?”

Like the live fish, the robotic onescommunicate with each other, in thiscase using low-frequency sonar. Testresults showed that although only abouthalf of the transmitted communicationsactually get through, the Robofishprogramming allowed them to accom-plish their task anyway. The next stepwill be to let them loose in the ocean,where they will be programmed totrail a remote-controlled toy shark.Ultimately, they could be dispatchedto explore caves and ice-coveredwaters, track whales, map regions ofpollution, or harass baby seals.

Walk Like a ManMost bots walk in the rigid,

clunky movements that are typical ofindustrial machinery, toy robots, andpeople who buy their shoes at Wal-Mart. This differs from the muchmore fluid way humans generallymove, which basically consists offalling forward in a controlled manner. But, in pursuit of a PhD,

researcher Daan Hobbelen of theDelft University of Technology (TUDelft) has developed an advancedrobot, called Flame, that demonstrates that a robot can behuman-like, energy-efficient, and highly stable. The overall goal is toprovide insight into how people walk,which ultimately can be applied to helping people with mobility problems via improved diagnosis andrehab. Flame employs seven motors,a balance organ, and some propri-etary algorithms to ensure a highlevel of stability. The robot can, forexample, apply the information provided by its balance organ to placeits feet slightly farther apart to prevent falling. According toHobbelen, Flame’s advanced ankleshave already provided motion scientistswith advanced insight into how thecomplicated joint works. For details,visit www.dbl.tudelft.nl.

TP-Bot Wins Award

LEGO’s 2008 Earth Day BuildingChallenge was to create a MINDSTORMS NXT robot that “couldbe used to help maintain a healthy,sustainable environment.” TheChampion’s Award went to DinoMartino’s TP-Bot 2008, which helpssave energy and the environment viathe efficient dispensing of toilet

paper. The bot is compatible for useby up to five different people (presumably not all at once), and itincludes a scanner (to which userspresent an access pass and a four-digit secret code) and a paperdispensing system. It even monitorshow much toilet paper is left on theroll. Can’t you feel the greenhousegases abating already? For info onthis and others in the winners’ circle,visit mindstorms.lego.com/news/.

New Hall of Fame Inductees

In case you missed it, the 2008inductees into the Carnegie MellonRobot Hall of Fame (www.robothalloffame.org) are the Raibert Hopper,NavLab5, LEGO® Mindstorms, and Lt.Cmdr. Data. The Hopper (shown in thephoto) was developed in 1983-84 forexperiments on active balance anddynamics in legged locomotion. Namedfor its developer, Marc Raibert, theone-legged bot could hop in place orrun at a top speed of 2.2 m/sec (4.8mph). Congrats to all. SV

RRoobbyytteess

Robot “Flame” walks like a human.Photo courtesy of TU Delft.

SERVO 08.2008 9

The award-winning TP-Bot 2008.Photo courtesy of LEGO.

The Raibert Hopper.Photo courtesy of MIT.

Robytes.qxd 7/8/2008 10:25 AM Page 9

Page 10: servo2008 08

10 SERVO 08.2008

In 2005, I covered the SWORDS(Special Weapons ObservationReconnaissance Direct-action

System) maneuverable military robots,which soldiers use as scouts andremote weapons systems in the war inIraq. As reported, the SWORDS iterationof the robotic sentry is compatiblewith M16s, M240s, M249s, Barrett 50calibers, 40 mm grenade launchers, orM202 anti-tank rocket systems.

The SWORDS have many otherfeatures including advanced sensing.The robots use these technologies to locate enemy combatants, IEDs(Improvised Explosive Devices), andother hazards.

The SWORDS are unmannedground vehicles (UGVs), which meansthat threats to these vehicles in theireveryday line of work don’t directlythreaten the soldiers who operatethem from a safe distance via aremote control console.

Since the Defense AuthorizationBill for Unmanned Vehicles, the armedforces have been pressed to convert thevast majority of ground combat vehiclesto unmanned for this very reason.

The war and the need to keep soldiers further out of risk hasbrought us to the latest evolution ofthe unmanned fighter. The newlyreleased MAARS (Modular Advanced

Armed Robotic System) is the offspring of the SWORDS and“the first fully modular groundrobot system capable of providinga measured response includingnonlethal, less lethal, and evenlethal stand-off capabilities,” saysa June 4th media release fromQinetiQ, owner of Foster-Miller,which produced the robots.

If you’ve heard references toSWORDS 2.0, these are theMAARS robots. Soldiers will beable to supplement the threeexisting SWORDS robots whichare deployed in Iraq with theserobots.

The Federal government andQinetiQ have been working onMAARS for 18 months to delivera robot system that is armed,

unmanned, and controlled by the soldiers themselves, according to the release.

MAARS will replace SWORDS asthe core platform for building outthese kinds of systems for battlefieldtactics. Because the new MAARS platform is standardized and modular,it will make it affordable for the military to have more of the robotsand to repair them more readily.

QinetiQ worked closely with themilitary to ensure that the MAARSrobot would “enhance the war fighter’scapability and lethality, extend his situational awareness, and provide allthese capabilities across the spectrumof combat,” says Dr. William Ribich,President of the Technology SolutionsGroup, QinetiQ North America.

By extending the capabilities ofMAARS, soldiers can save their livesand the lives of area non-combatantsmore frequently.

MAARS MayhemUnlike SWORDS, MAARS gives

the human operator choices forconfrontation on the battlefield. Fornonlethal confrontation, a humanoperator can project their voice or asiren through mounted speakers to aperson or crowd, or emit a green pulsing laser light that is visually confusing, though harmless.

When a confrontation calls formore, soldiers use MAARS to disperse

Contact the author at [email protected] David Geer

MAARS Robots Taking Off for War

SWORDS Military Robots Graduating to 2.0, MAARS Status

Here is the new MAARS robot — the largeroffspring to the SWORDS robot. Four

grenade launchers, machine gun, turret,other equipment, and tracks visible.

Geerhead.qxd 7/8/2008 10:16 AM Page 10

Page 11: servo2008 08

40 mm “less lethal” grenade ammunition, bean bags, smoke, starclusters (illumination), tear gas, pepper spray, and M240B mediummachine gun warning shots. Thistype of confrontation is purposedagainst the enemy with theweapons/guns pointed upward as ifto fire warning shots. For lethal firepower, MAARS weapons are pointed directly at their targets, firing40 mm high-explosive grenades or400 rounds of 7.62 mm shells fromthe M240B medium machine gun.

Where SWORDS came withweapons optional, MAARS come withfour grenade launchers, a machinegun, and less lethal defensesattached.

The MAARS robot is remote controlled to over a kilometer awayfrom the operator, putting a safetybuffer between the soldier-operatorand the point of immediate contactwith the aggressor. This increases the soldier’s ability to survey the warzone, confront the aggressor from adistance, and survive the battle.

MAARS MechanicsFoster-Miller constructed the

robot on a uni-body frame/chassiswith a simple, plug-and-play designfor quick assembly with new accessories and attachments thatmay become available. The uni-bodyconstruction makes access to thebattery and electronicseasy and efficient. TheMAARS has a larger payload bay areathan SWORDS, higher torque forfaster travel, andimproved brakingcapability. Therobot’s remote control system isuser-friendly, intuitive, and digitalfor quick uptake bymilitary personnel.The new DigitalControl Unit (DCU)— the remote control device the

Here is the mighty SWORD with cameras,machine gun, ammo case, tracks, antennae,

and identifying US flag emblem.

This Operator Control Unit (OCU) is theSWORD’s wireless remote control,

fitted with a hard-shell case. Noticethe antenna, numerous controls for

driving and manipulating the SWORDcombat robot, and the multiple splitscreens for viewing everything the

robot’s cameras pick up.

This drawing of the SWORDS robot identifies key partsand systems, many of which are duplicated

or enhanced on the new MAARS robot.

The real ancestor of the MAARS robot is the TALONrobot for military, police, and emergency rescue. From these, Foster-Miller developed the SWORDS bots. The SWORDS originally topped out at 120 lbs., though they packed amighty punch through the Small Mobile Weapons Systems(SMWS) they employed.

At about $230,000 per unit, SWORDS offered front andrear cameras with night vision, thermal vision, and wideangle views and zoom lenses. On its rugged tank tracks and powered by a lithium ion battery, the SWORDS can run forfour hours with a maximum velocity of 5.2 mph.

Soldiers can carry parts from the disassembled SWORDSin their backpacks, transporting it from combat site to combat site.

WHERE IT ALL BEGAN

SERVO 08.2008 11

GEERHEAD

Geerhead.qxd 7/8/2008 10:17 AM Page 11

Page 12: servo2008 08

operator uses — offers advanced command and control capabilities andgreater situational awareness aroundthe robot. The system gathers a largearray of situational feedback from thebattlegrounds.

SWORDS laid the groundwork forsensing battle hazards with heat, gas,chemical, and radiation sensors. Thesereport to the soldier wirelessly so they

know when and where it’s safe totread or what precautions to take.

MAARS also uses Blue ForceTracking, a satellite and GPS trackingtechnology that informs soldiers onthe locations of friendly forces, enemyforces, and neutral areas.

The MAARS robot comes with all-terrain tracks in the military style ofthe old tanks. With these, it can scale

stairs. It can also use wheels to travelmore quietly on other terrain, to be“stealthier.”

Field personnel can equip therobot with a robotic arm, numerousweapons other than those described,and a broad range of sensors. Therobotic manipulator arm can lift about100 lbs. By replacing the gun turretwith the arm, soldiers can readily turnthe robotic war fighter into a device foridentifying and neutralizing explosives.

MAARS can also sense its environment via its seven multi-modecameras. The operators can viewaction the robot views in streamingvideo. The robot uses day and nightthermal vision. The robot also gaugesits location and distances using a laserrange finder. The soldier-operatorsknow where they are pointing therobot’s weapons in relation to therobot’s surroundings, other people,and themselves because of these cameras. At about 350 lbs., the complete MAARS system is the largestmember of the TALON robots, largerthan the SWORDS.

Foster-Miller has already shippedits first MAARS robot to the US military under a contract from theExplosive Ordnance Disposal/Low-Intensity Conflict (EOD/LIC) program,which is part of the CombatingTerrorism Technical Support Office(CTTSO). This is the same programthat acquired the SWORDS robots. SV

Order 24 hours a day, 7 days a week

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

Exclusively at Jameco…The Lowest Prices…

Guaranteed!

3 Levels of Choice3 Levels of Savings

Save 3% to 5%Looking to save on thousands of Name Brandcomponents? Jamecooffers these popular products for 3% to 5%below market price, andwe guarantee it!

Save 15%-25% Save more when a specific manufacturer isnot required. Major Brandsemi’s are sourced from 5-6 specific major manufacturers, plus wealso offer Jameco Brandand Generic passives foreven greater savings.

Save 30% or more! Looking for killer deals?Jameco buyers often findFactory Overruns fromsome of the industry’sbiggest names. Thatmeans savings of 30%and more to you!

Other Jameco Advantages:

� We offer over 300 Major Manufacturers� 99% of catalog products ship the same day.� Lowest prices guaranteed, or we pay 10%.

SEMICONDUCTORS • PASSIVES • INTERCONNECTS • ELECTROMECHANICAL • POWER

12 SERVO 08.2008

GEERHEAD

Demo video MAARS robotwww.foster-miller.com/images/

Videos/MAARS_test.avi

Fox interview about Talon(including MAARS) robots

www.myfoxboston.com/myfox/pages/ContentDetail?contentId=6692317#

Talon_on_Fox

Foster-Miller, SWORD vendorwww.foster-miller.com

Foster-Miller robotics technologieswww.foster-miller.com/t_r_military/

relatedprojects.htm

Foster-Miller projectswww.foster-miller.com/lemming.htm

RESOURCES

Geerhead.qxd 7/8/2008 10:17 AM Page 12

Page 13: servo2008 08

SERVO 08.2008 13

Full Page.qxd 7/9/2008 10:22 AM Page 13

Page 14: servo2008 08

14 SERVO 08.2008

This month, we have the honor ofpresenting the ROV-In-A-Box Kitfrom !nventivity. ROV stands for

Remotely Operated Vehicle, and whilethis can refer to a tethered vehicle thattackles any sort of terrain, it very oftenrefers to an underwater vehicle, as wasthe case with this kit. After coveringthe AUVSI underwater robotics competition in 2006, we knew thatthere were competitions out therethat catered to these aquatic bots,and we thought a competition wouldbe a much more exciting way of testing the robot than surreptitiouslydunking it in the community pool. TheAUVSI competition, however, was

solely for autonomous robots, and aremotely operated vehicle wouldn’texactly fit into that category. After abit of searching, we stumbled uponthe MATE Competition — an under-water ROV competition sponsored bythe Marine Advanced TechnologyEducation Center. What’s more is thatthe international championship wassponsored by the Scripps Institute ofOceanography at our very ownUniversity of California, San Diego.

Several engineering studentorganizations at UCSD are involved ina number of design competitions, butthere was not yet a team for the MATEevent. We had the kit, the opportunity,

and the onus of the home turf advan-tage, so we really felt that the MATECompetition was an opportunity thatwe couldn’t pass up. All we had to donow was get a team together.

Ocean’s Eleven andThen Some

Evan is lucky enough to be a part of UCSD’s Tau Beta Pi chapter,California Psi. Tau Beta Pi is the engineering honor society and UCSD’schapter pursues excellence in engi-neering through outreach, academic,and social programs. Conspicuouslymissing from TBP’s repertoire, though,was a robotics team. Why a roboticsteam? Because robotics is an inter-disciplinary field that demands theeffort of engineers from every field ofstudy, and a robotics team would bemade up of the same cross sections ofengineers as Tau Beta Pi. By virtue ofhis position as Publicity Officer, Evanwas able to organize meetings for arobot team and soon a group of talented engineering students hadcoalesced around our ROV in a box,and we were eager to take on thechallenge of MATE.

The ROV-in-a-box seemed like a

SPECIAL EDITION:SPECIAL EDITION:

Rhyme of theModern

Submariner

THE ROV-IN-A-BOX IN THE BOX. COLTER (L) AND BRIAN (R) WORKINGON THE FRAME.

TwinTweaks.qxd 7/8/2008 10:42 AM Page 14

Page 15: servo2008 08

great way to tackle the challenges of the MATECompetition. The eventdemands that teams completethree underwater missions thatare part of a scenario inspiredby mid-oceanic ridge research.The first mission was to free anOBS trapped mercilessly on theocean floor. An OBS is anOcean Bottom Seismometer,and in the game scenario, itwas placed in order to gatherinformation on ocean floor seismic events like underwater eruptions and earthquakes. The goodnews is that the OBS did indeed gather the hoped for information, butthe bad news is that the OBS becametrapped in a fierce lava flow in theprocess. Our first mission — should wechoose to accept it — would be tofree the OBS from the lava flow. It’s basically like an episode of theThunderbirds, but instead of sendingpuppets to save the day, we’ll besending in our ROV.

After freeing the helpless OBSfrom the ocean floor, the second mission was to collect three samplesof the lava flow for analysis. The finalmission was to take a temperaturereading from a hydrothermal vent.

For the competition, the OBS isrepresented by a PVC box skeleton;the lava is represented by eight, twopound soft dive weights; and thehydrothermal vent is another PVCstructure spewing hot water. The mis-sions will be discussed in more detaillater, because first and foremost wewanted to have a working platform.

The ROV-in-a-box would give us afunctional ROV that could be expandedupon to complete the missions. Wewanted to finish our basic ROV beforeworrying about the details of the missions, and with that in mind, wepopped open the instruction manualto the first step.

The Life Aquatic Meetsthe Life Robotic

Now that we had a team ofmechanical engineers, structural engineers, computer science

engineers, and many more, it wastime to pop open the ROV.

When we first opened it, we werereminded of our experiences at thebeginning of every FIRST build season— we were faced with a somewhatintimidating box of loose parts.Motors, wire, PVC, and switchesabounded, and the project might haveseemed a bit overwhelming had it notbeen for the handy instruction manual.The ROV-In-A-Box K it comes with acomprehensive manual that gives easyto read, step-by-step instructions thatare illustrated by clear pictures.

The first thing that the manualwalks you through is the constructionof the frame for the ROV. The PVCbits are all nicely cut and ready to go,but the kit does not include PVCcement or primer. That’s nothing apreemptive trip to the hardware storewon’t fix, and the beginning of eachstep in the manual conveniently listsany additional parts required for thestep not already included in the kit.Thankfully, this list is usually veryshort, and most of the entriesare simple tools that any self-respecting tinkerer shouldhave at the ready.

The PVC frame goestogether very easily, and it’s anice thing to do first becauseit already gives you a sense ofthe scale of the ROV. The botwas a bit smaller than we hadinitially guessed, but there’snothing wrong with that —just ask the Thunderbirds.

The next step involves theinitial wiring of the motors tothe tether. The tether for the

ROV is primarily made up of speakerwires, and their 50 foot length was theperfect size for the MATE Competition.The ROV kit comes with three motorsfrom Mayfair Marine: two for the rightand left thrusters, and one for the liftthruster. The motors come with easyto install couplers for small plastic propellers. A soldering iron and theassociated paraphernalia is one ofthose things not included in the kit,but once again these are essentials for every robot project that roboticistsshould have in their arsenal.

After preparing the motors, thenext step is to prepare the CCD cameraand LED cluster used for lighting. Theunforgiving work environment facedby the ROV requires some extra

MOUNTED MOTORS.

SERVO 08.2008 15

Rhyme of the Modern Submariner

TAU BATES AT WORK.

ROV-IN-A-BOX MOTORS.

TwinTweaks.qxd 7/8/2008 10:42 AM Page 15

Page 16: servo2008 08

16 SERVO 08.2008

Twin TTweaks ....

attention that land bound bots findunnecessary — waterproofing. Themanual suggests casting the lightsand camera in resin and gives detailedinstructions on how to do just that,but our CCD camera and LED clustercame already cast in the kit. We didn’tmind the assistance, and we set abouttackling the next steps.

The ROV-in-a-box is a humblerobot equipped with only the essentials: three motors, the camera,and the lights. Mounting these essentials to the frame is also donewith PVC bits. After just a few quickcuts, the ROV was starting to look likea real robot, but the real test was stillahead — wiring it all up.

We have to say that up until thewiring of the control box, we were

consistently impressed with thequality of the parts included inthe kit and the clarity of theinstructions that helped to putit all together. Perhaps this initial awesomeness created aharsher contrast than waswarranted when it came towiring the robot, but we haveto say at times it becamedownright inelegant. For themost part, the control boxwas fine — each thruster wascontrolled with a double poledouble throw (DPDT) switch,

the main power was controlled with asingle pole single throw (SPST) rockerswitch, and the kit even came withlabels for all of the switches to denotewhich motor they controlled. All ofthe switches even went into a niftycontrol box that looked downrightsleek, and all of this was quite nice.The problem, we suppose, was in the wires.

We have nothing against heavygauge wires. They are great for whenyou are pulling a lot of amps and theirbeefiness makes them generally easierto solder than super thin wires. Whenyou have more than three 16 gaugewires going to one leg of a switch in a crowded control box, then size canbecome a problem. This might notseem so difficult if you are properlyprepared — you can twist the ends ofthe wires together and save time andenergy by soldering once where youwould have had to solder many times.The manual, however, goes through theconnections one wire at a time, andafter the fourth wire going to the same

switch leg, you begin to wonder if you’resoldering a control box or a clown car.The large gauge wires are also stifferand when it came time to close thecontrol box, it was not exactly fun.

The problem with the wires could have been minimized if theinstructions had warned about theoverpopulated legs beforehand, butinstead they go through connectionby connection and by the time yourealize there’s going to be a problem,it’s already too late. Some of the TBPteam members were learning how tosolder on the ROV control box, andthese complications gave them theopportunity to learn how to desolder.

For all of the grief that the size of the wires gave us, the actual electronics of the ROV were elegantlystraightforward. The relatively simplewiring even made it easy for us totrack down an electrical problemusing a multimeter. Our ROV onlyseemed to work intermittently, andthe rocker switch did not seem to control the main power. When wehad first installed the fuse, we hadnot done it correctly; but with theaddition of a spring, everything was in top shape. Even with the ROV effectively finished, the manual continues to be useful. The manualincludes an electrical schematic for the robot and an exhaustively comprehensive parts list that detailsthe cost and vendor for every item inthe kit. We would like to give somewell earned kudos to the authors ofthe manual, because they really did atop notch job. Congrats!

OvercomingHydrophobia

The ROV-in-a-box is an elegantlysimple machine. Everything wenttogether so easily that it seemed thatthere had to be more to it. There wasactually more to it — waterproofing. Intruth, though, there was not that muchwaterproofing to be done. The resincastings kept the camera and lightssafe, and the motors were designedfor underwater applications (perhapspumping, as the 500 GPH label mightfanatically suggest). The only critical

ROV CAMERA AND LIGHT.

TSUKASA (L) AND ERIC (R) WORKON THE TETHER.

ROV CONTROL BOX.

TwinTweaks.qxd 7/8/2008 10:43 AM Page 16

Page 17: servo2008 08

Rhyme of the Modern Submariner

points for waterproofing were theelectrical connections, of which therewere not too many. There were fourconnections between the camera, light,and tether, and six connections betweenthe motors and the tether. The kit pro-vided ample materials for waterproofingin the way of epoxy and self-vulcanizingrubber tape. A couple layers of eachdid the trick, even though the tape wasnot exciting as we had anticipatedgiven the name — apparently the vulcanization is pretty low key.

Our previous description may havemade the construction of the ROVseem like a breeze but, in fact, it tookseveral weeks of meetings. So when itfinally came time to test the bot, itwas very climactic. Our first tests wereto see if the motors all functionedproperly, and they spun the propellersso quickly that we were eager to seehow zippy the bot would be in thewater. It was also exciting to see thelight turn on, but we had to find amonitor so we would check the camera. We didn’t have any extramonitors sitting around, so eventuallywe hooked it up to the television inour dorm room (the ROV comes withan RCA plug for output to a monitor).

The camera was downrightimpressive. It was black and white, butthe resolution was excellent and theLED cluster provided perfect lighting.We have worked on other robots withcameras like the POB robot, but theacuity of the ROV would impress anyoptometrist.

Adventures With aLaundry Cart

Everything on the ROV workedlike a charm on the safety of dryground, and despite these encourag-ing signs we have to admit that wewere a little apprehensive aboutputting it in the water. At first, wewanted to test the robot in one ofUCSD’s on-campus pools, but itturned out to be a hassle toreserve the time and space. Plan Bwas pretty much what you mightexpect. If we couldn’t test theROV in a pool, we’d go with thenext best thing — a laundry cart.

It might sound like a wackyidea, but the residential life officeof our beloved Warren Collegehas large plastic laundry carts forstudents to cart stuff around in(probably laundry, most of thetime). It was a bit awkward tomake the request to our collegeresidential life if we could use alaundry cart to fill up with waterand test a robot in it, but thank-fully they are very accommodatingof our robot related idiosyncrasiesand gave us the go ahead to giveour ROV some swimming lessons.

The small scale of the ROV madetesting in the laundry cart a lot lessawkward than it might sound. Beforetaking the plunge, we equipped thebot with an ROV’s equivalent of floaties — floral Styrofoam that wasincluded in the kit.

Our moment of truth turned outto be a moment of triumph, becausethe ROV worked in the water so wellthat it seemed like a fish out of water before. We had to adjust thebuoyancy with some rebar for ballastand more Styrofoam for balance, butafter just a few tries we had an ROVsitting serenely in the water with neutral buoyancy. The kit also includesStyrofoam bits to adjust the buoyancyof the tether, which led us to conclude that the folks at !nventivityreally did think of everything.

Southern CaliforniaFly-Off

Until now, the MATE Competitionhad been only a far-off goal, but

shortly after our laundry cart adventure we had to meet a deadlinethat had the potential of disqualifyingus from the competition. Our teamwas registered for the internationalchampionship, and the MATE organization required that all teamsregistered for the championship prove they have a working robotbeforehand. To do so, we had to attend the closest regional competition to undergo a simple safetyinspection and to show that our ROVcould ascend, descend, and move forward, backwards, left, and right.

The closest regional for our teamwas actually at UCSD, held at theCanyonview West Pool in our veryown Warren College. We showed upto the regional with confidence — therobot certainly wasn’t finished, butafter our laundry cart test we weresure it could handle the qualifying test.

Our little ROV had no problempassing the test, and it was exciting togive the little bot a chance to run freein a big pool. It was also exciting to

SERVO 08.2008 17

BRYCE AND EVAN SHOW THE LIGHT AND CAMERA.

LEARNING TO SWIM.LAUNDRY CART ADVENTURE!

TwinTweaks.qxd 7/8/2008 10:43 AM Page 17

Page 18: servo2008 08

Twin TTweaks ....

18 SERVO 08.2008

see the other teams there. Some werethere to qualify like us, but otherswere there to compete in the regional.

The MATE Competition has twocompetition classes: the Ranger classfor high school teams; and theExplorer class for university teams andqualified high schools. The SouthernCalifornia Regional was actually aRanger class competition, and wewere categorically impressed by thesophisticated robots built by theteams. The missions for the Rangerclass were slightly different than thosefor the Explorer class, but it was stillexciting to see the creative ideas thatteams came up with to pick up thecrabs that their missions demanded.

As for the other Explorer teams, it

seemed that our little ROV was certainlythe smallest of the bunch. But onceagain we wouldn’t let that discourageus — remember the Thunderbirds. Otherteams had sophisticated control stationsstocked with monitors and videogame controllers, and there were plen-ty of colorful ROVs that prowled thepool with ease. We looked forward togetting to know more about our competition at the InternationalChampionship, but before that wehad our own ROV to finish.

So Long and Thanksfor All the Fish

The Southern California Regionalwas an exciting competition that

inspired us to do our bestto add the mechanismsand sensors necessary totransform the ROV-in-a-boxinto a truly competitiverobot. To finish, we neededmore motors, a tempera-ture sensor, and someother miscellaneous materials, but unfortunatelythe kit would no longer beof help — the only partsleft in the kit were someextra Styrofoam bits andsome battery connectors

that we had to ignore in favor of thelug connectors demanded by the competition. The ROV-in-a-box wasactually inspired by an ROV competi-tion — the National UnderwaterRobotics Challenge, held in Chandler,AZ. The pool next door was a lot closer than Arizona, so unfortunatelywe couldn’t make it out to NURC. Itwas at least nice to know that our little ROV-in-a-box had a competitivestreak. !nventivity also shows somegreat community involvement by beingan active supporter of NURC, the MATE Organization, and even FIRST Robotics.

UCSD’s Tau Beta Pi members alsohave a competitive streak, and afterfinishing the ROV-in-a-box they wereeager to go off script. We would all getour chance to be creative, because wehad to design and build mechanismscapable of freeing the OBS, retrieving thedive weights, and taking the temperaturereading. But there’s so much more tocome than additional mechanisms —total redesigns, technical reports,scavenging from other robots, and theclimactic International Championshipall await in the exciting conclusion inthe next Twin Tweaks! SV

SOUTHERN CALIFORNIA REGIONAL. LETTING THE ROV ROAM.

RReeccoommmmeennddeedd WWeebbssiitteesswww.nventivity.com

!nventivity Homepage

www.marinetech.org/rov_competitionMATE Competition

h2orobots.orgNURC

tbp.ucsd.eduTau Beta Pi, California Psi

TwinTweaks.qxd 7/8/2008 10:44 AM Page 18

Page 19: servo2008 08

Full Page.qxd 7/9/2008 10:23 AM Page 19

Page 20: servo2008 08

20 SERVO 08.2008

Q. Our club is making a club robot based on theAtmel ATMEGA168. About half of the membersuse either Mac OS X or Linux, not Windows. What

can we use to program our robots that isn’t Windows only?

A. Many fellow robot makers out there know that I ama Mac fan and go out of my way to do just what youare asking about. Sometimes there is no choice and

for that, I have a Windows laptop. BUT, in this case you do indeed have an option: avr-gcc. Avr-gcc is gcc, the open source C and C++ compiler of choice for many environments, customized for AVR programming. This environment can be used on Windows (usually Winavr),Linux, and the Mac OS. In this column, I’m going to detailwhere to find the parts, how to install them, and how toconfigure it all to program your robots. These packages usually want OS X 10.3.9 minimum; I recommend 10.4(Tiger) to play in. (Mostly because that is what I used —that and Leopard — so I know that it works.)

Setting up a Mac to program AVR microControllers

There are three pieces of the puzzle that you will need to get:

1) Macpack AVR: This is avr-gcc and has all kinds of utilitiesand goodies. Top onthe list is avrdude,one of the most popular AVR programmer programs. You canfind this Mac-friendlyinstall package here:www.obdev.at/products/avrmacpack/download-de.html — get the most

recent version. It will come in a “dmg” package.

2) Eclipse Europa for C/C++ programming. This is a Java-based IDE that can be customized for just about anything.Like gcc, it too is open source based. You can find the latesthere: www.eclipse.org/downloads/. Get the one forC/C++ development. This will be a gzip’d tarball (in theUNIX parlance) that your computer will know about.

3) AVR plug-in for Eclipse. This customizes the Eclipse IDEfor use with the AVR toolchain. You can find it here:http://avr-eclipse.sourceforge.net/. I got the plug-indirectly from the web page; they tell of a way to get it fromEclipse too, but call me cautious, I went for the sure thing.

Installing Macpack AVRTo install Macpack AVR, simply double-click on the

downloaded file; in my case, it was called AVRMacPack-20080514.dmg. It will mount a drive called AVRMacPackon your desktop; in there, you’ll find a readme file and aninstall package. Read the former and double-click on the latter to install avr-gcc (see Figure 1).

The installer is very nicely done and, of course, youmust enter your admin password since this is going to beinstalled in UNIX system directories. In this case, in/usr/local/AVRMacPack. You are now delving into the realmof command line interfaces, so take a deep breath and lookin your Applications/Utilities folder and find “Terminal.”Install it on your dock; you’re going to be using it a bunchnow. Avr-gcc, via AVR MacPack, has the version 3 and version 4 compilers. Lots of the new work is being done inversion 4, but some like to use version 3. I recommend thatyou just issue this command on the command line in yourterminal “avr-gcc-select 4” and use the latest. Figure 2shows how this dialog might look. Remember, all of this isfree, so you won’t get much hand-holding as you do with afull-fledged IDE, but we’re not done setting up. Let’s waituntil we get Eclipse and the AVR plug-in installed before weplay with avr-gcc any more.

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?

byDennis Clark

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

[email protected]

Figure 1. Macpack AVR install volume.

MrRoboto.qxd 7/8/2008 10:08 AM Page 20

Page 21: servo2008 08

Installing Eclipse EuropaWhen you have downloaded the Eclipse install

package, you’ll see that it isn’t the friendly type ofMacintosh installer. It is a gnu zipped tarball. Not toworry, your Mac can handle this package easily. Movethe install file to your Applications directory and double-click on it. After you double-click the install file, a coupleof windows will pop up and then go away. When thoseare all done, you will have an Eclipse directory in yourApplications directory. Inside there you will find theEclipse program. You will want to have easy access tothis program if you do a lot with robotics, so drag theEclipse icon on to your dock next to your Terminal icon.

Installing the Eclipse AVR Plug-inWe have two ways we can install the AVR plug-in.

One is to take the file that we’ve just downloaded andunzip it in the Eclipse directory by moving the file to theEclipse directory and double-clicking on it. This is the direct,brute force method. If you have Eclipse running, thenrestart it after you unzip the file.

The second way is for you to use Eclipse itself to installthe plug-in. Since you’ve just seen the brute force method —which is easy, let’s look at the elegant way — through theEclipse IDE. Click on the Eclipse globe on your dock (you didput it there, right?) and wait for it to start. When it firstcomes up, you will see the screen shown in Figure 3 askingyou where to put the workspace files. It usually wants toput them in the Documents folder; I have no objection, so just press OK.

Next, navigate to Help-> Software Updates -> Find andInstall as shown in Figure 4 to get to the Feature Updatesdialog and click the Search for new features to install button, then click Next. Click the New Remote Site buttonand fill in the dialog box as shown in Figure 5.

There are lots of Next, Finish, and I Accept type of buttons to push; remember to actually select the plug-inwhen you see its checkbox on the screen! When you havenavigated this endless selection of screens, licenses, andwarnings about unsigned downloads and hit your final finish button, you will see the window as in Figure 6.Whew! Now restart Eclipse and let’s get to work!

Using avr-gcc, Eclipse, and theAVR plug-in to write your code

I’ve written a toy program that blinks some LEDs onone of my educational robot boards. All this program willdo is blink two LEDs alternately. This article isn’t about howto write AVR programs — you can learn that anywhere (ifenough ask, I’ll be happy to write such an article) — buthow to use this set of tools on your Mac to do it, so I’mnot going to explain the code beyond using the tools towrite, compile, and download it. Now, let’s create an AVRrobot project!

Creating a ProjectNavigate the File -> New -> C Project and fill in the

Project name asshown in Figure 7.Note that the AVRCross TargetApplication is automatically chosen. We’ll usejust that; pressNext to set everything up. You will get a configurations screen thatshows a Debug and RELEASE configuration. We’ll take thedefaults, but before we’re done here, click the AdvancedSettings button so that we can choose our processor andclock speed. This window will look like Figure 8.

SERVO 08.2008 21

Figure 2. Avr-gcc configure example.

Figure 3. Workspace dialog.

Figure 4. Get a plug-in.

Figure 5. Install the AVR plug-in.

MrRoboto.qxd 7/8/2008 10:05 AM Page 21

Page 22: servo2008 08

In Figure 8, you see that I’ve selected the processortype and the clock speed. Study your product document foryour chosen AVR microcontroller carefully to select its clockspeed and other settings we’ll discuss later. I selected theAVR Target Hardware to set these features. If you look atthe Environment selection (after you click on the triangle toopen the C/C++ Build category), you’ll see that the IDE hasalready found your AVR MacPack directory and has seteverything up for us! Totally cool! We’re ready to make aprogram and project.

When we created our project, a folder was createdcalled Documents/Workspace/Tiny26. Here, you can dropor create your C files for your projects. If you copy filesthere, go to the Eclipse IDE in the Explorer Window andright-click on the project — in this case, Tiny26 — selectRefresh, and the project will pick up the files. If you aremaking new files, then just remember to save them there.When you have everything ready to go, it is time to buildyour project. At this time, the Debug configuration isn’tall that useful since it doesn’t create a hex file. So, makesure you are using your Release configuration. To do this,navigate Project -> Build Configuration -> Set Active ->Release.

To build, you can navigate Project -> Build All, use the<propeller> B hot key, or press the Build All icon on thetoolbar (looks like a page with 1s and 0s on it.) If there areany problems in the build, the errors will show up in theConsole window at the bottom of the IDE window. To goto the error line in your source code, click on the Problemswindow and double-click on the error; the IDE will take youto the line. See Figure 9 for a condensed view of the IDEand those tabs.

You’ll note a tab called AVR Device Explorer; this is a very nice utility that shows you all of the hardware registers, I/O ports, and interrupt sources and their namesfor your chosen microcontroller.

Programming a MicrocontrollerI’ve reached the end of my allotted space now. In my

next installment, I will show you how to configure a programmer board — an AVRISP 2 to be specific — to program your microcontroller, and how to add a tool toyour Eclipse IDE to program at a press of a button. SV

22 SERVO 08.2008

Figure 9. The Eclipse IDE window.

Figure 6. Install complete.

Figure 8. Configure microcontroller settings.

Figure 7. Start a project.

MrRoboto.qxd 7/8/2008 10:06 AM Page 22

Page 23: servo2008 08

SERVO 08.2008 23

Full Page.qxd 7/9/2008 4:02 PM Page 23

Page 24: servo2008 08

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

AAAAuuuugggguuuusssstttt

9 RoboCountryTakamtsu City, Kagawa, JapanROBO-ONE style humanoid robot combat.www.robocountry4.com

23-24 Motodrone AFO CompetitionFinowfurt, GermanyAutonomous Flying Objects (AFOs) compete inseveral areas including the ability to hover inchanging wind conditions, stable flight betweenpoints, capturing photos of targets, recoveringfrom freefall, and automated take-off and landing.www.motodrone.de

29 DragonCon Robot BattlesAtlanta, GAAt this event, remote-controlled and autonomousrobots fight it out at the DragonCon sciencefiction convention.www.dragoncon.org

TBA DPRG Robot Talent ShowThe Science Place, Dallas, TXAutonomous robots demonstrate their talents.www.dprg.org/competitions

TBA Robot Fighting League NationalMinneapolis, MN“Robots” (RC vehicles) attempt to destroy eachother.www.botleague.com

TBA Robots at PlayCity Square, Odense, DenmarkRobots compete to demonstrate playfulness andinteractivity.www.robotsatplay.dk

SSSSeeeepppptttteeeemmmmbbbbeeeerrrr

6 ROBO-ONE Helper Robot ProjectKawasaki City, JapanTeleoperated robots compete at performingcommon household tasks.http://getrobo.typepad.com/getrobo/2008/05/new-helper-robo.html orwww.robo-one.com/robo_help/robo_help.html

17 Powered by SunOstrava, Czech RepublicJust as the name suggests, this is a competition ofsolar-powered robots.http://napajenisluncem.vsb.cz

18-19 Korea Intelligent Robot ContestPOSTECH Gymnasium, Pohang City, KoreaThis competition includes several events forgeneral-purpose intelligent robots and oneevent for specialized cleaning robots.http://irc.piro.re.kr

20 RobotourPrague, Czech RepublicAutonomous robots must navigate in a park.www.robotika.cz

20-21 RoboCup Junior AustraliaScitech Museum, Perth, AustraliaEvents include robot dance, robot rescue, androbot soccer.www.robocupjunior.org.au

27 Elevator:2010 Climber CompetitionTo be announced (see website for updates)Autonomous climber robot must ascend a scalemodel of a space elevator using power beamedfrom the base.www.elevator2010.org

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

24 SERVO 08.2008

Events.qxd 7/9/2008 5:32 PM Page 24

Page 25: servo2008 08

29 Microtransat ChallengeViana do Castelo, PortugalThis event is a transatlantic autonomous robot sailboat race.www.microtransat.org

TBA BotTrot 4Bottle RaceTo be announced (see website for updates)Robot must navigate a figure-8 course. Video ofrobot completing the course must be submittedby the contest date for judging.www.botmag.com/articles/06-10-07_4bottle_robot_race.shtml

TBA RobothonSeattle Center, Seattle, WAEvents include Robo-Magellan, MicroMouse, Line

Following (two categories), Line Maze, WalkingRobot Race, Mini Sumo, and 3 kg Sumo(autonomous and RC).www.robothon.org

OOOOcccc ttttoooobbbbeeeerrrr

24-26 Critter CrunchHyatt Regency Tech Center, Denver, CORobot combat — 2 lbs and 20 lbs eventcategories. Autonomous and Remote-Control.Starting size of 12” x 12” x 12”. Expansion duringevent okay. Weight limit of 20 lbs. Power sourcemust meet OSHA requirements for indoor use.Awards for 1st, 2nd, and 3rd place, as well as“amusing and arbitrary accomplishments.”www.milehicon.org/critrule.htm

SERVO 08.2008 25

Events.qxd 7/9/2008 7:54 PM Page 25

Page 26: servo2008 08

Micro Metal Gearmotor Bracket

Pololu introduces itscompact bracket for

convenient mounting ofthe popular Sanyo-style10x12 mm miniaturemetal gearmotors. The plastic brackets are custommade to securely hold themetal gearmotors in placewhile enclosing the otherwiseexposed gears; the mounting tabs capture the nuts for easy installation.

For further information, please contact:

Solar-Breeze Intelligent SolarRobot Pool Skimmer

The Solar-BreezeIntelligent Solar

Robot Pool Skimmer —manufactured byInvention Concepts —is the first of its kind,hoping to bring poolowners on board withthe idea of having“greener” pools. Solar-Breeze uses a unique solar-powersystem that allows it to skim your pool surface all daywhile the sun is shining, collecting debris from the poolsurface and preventing it from sinking to the bottom.Since it keeps dust and debris from sinking to the bottom of the pool, the time required to run the poolpump is significantly reduced, thus making pools cleanerand clearer, so pool pump usage should go down. AChemical Dispenser (for commercial solid pool chemicaltablets) is included in the Solar-Breeze design since

dispensing chlorine or clarifiers evenly and randomly overthe surface makes the chemicals far more efficient thanwhen spread by other means.

Mr. Clock Radio

Mr. Clock Radio —manufactured by GeeWiz

Entertainment — is the world’s firstanimated talking robotic clockradio. Press the snooze button andhe will tell you the current time,or press the fortune teller button and ask him a questionabout your future. Mr. ClockRadio has working eyes, a multi-directional motorized head, as well as a motiondetector. Aside from AM/FM radio, Mr. Clock Radio canalso play music from other devices using the MP3 playerjack and it comes with 50 different wake-up shows.

For further information on either of these two products, please contact:

LEGO® Education WeDo

LEGO Education — The LEGO Group’s educational division— introduces LEGO® Education WeDo™, a new product

that redefines classroom robotics, making it possible forprimary school students 7-11 years of age to build andprogram their own solutions. Bridging the physical worldrepresented by LEGO models, and the virtual worldrepresented by computers and programming software,LEGO Education WeDo provides a hands-on, minds-onlearning experience that actively involves young studentsin their own learning process and promotes children’screative thinking, teamwork, and problem-solving skills.

“Building upon our successful 10-year history ofbringing educational robotics to middle, high school, anduniversity classrooms with the award-winning LEGO MIND-STORMS toolset, we are excited to extend this expertiseto benefit an even younger audience,” said Jens Maibom,vice president of LEGO Education. “With a progressivelycompetitive global economy, we know it is imperative to

New Products

BRACKETS AND MOUNTS

CONSUMER ROBOTSROBOT KIT

Website: www.robotshop.ca orwww.robotshop.usRobotShop, Inc.

NNNNEEEEWWWW PPPPRRRROOOODDDDUUUUCCCCTTTTSSSS

26 SERVO 08.2008

6000 S. Eastern Ave. Suite 12-DLas Vegas, NV 89119

Tel: 877•7•POLOLU or 702•262•6648Fax: 702•262•6894

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

PololuCorporation

AUG08NewProd.qxd 7/9/2008 7:56 PM Page 26

Page 27: servo2008 08

provide even younger children and their teachers withcurricular-relevant, easy-to-implement educational materialsto spark children’s interest in all manner of subjects.”

LEGO Education WeDo encourages teachers to issuecurriculum-based challenges for students to solve.Working in teams, children invent their own solution bybuilding a LEGO model and programming it to perform acertain task. Cause and effect learning is enhanced bythe models remaining tethered to a computer; similar toscientists in working labs, children can test and adjusttheir programming in real time. After reflecting on whatdid and did not work, students can consult with peers,adapt programming, adjust models, or begin again.Newly-designed software developed by NationalInstruments makes programming easy and intuitive andstudents quickly learn that they can solve real-world challenges by tinkering with building and programming.

Developed to cover a broad range of curriculumareas, WeDo sample topics include Language and Literacy:narrative and journalistic writing, storytelling, interviewingand interpreting; Mathematics: measuring time and distance,adding, multiplying, estimating, using variables; Science:transmission of motion, working with simple machines,gears, levers and pulleys; Technology: programming,using software media and creating a working model.

The complete LEGO WeDo package includes:• 158 brightly colored LEGO elements, including gears

and levers• One LEGO USB hub connects directly to a Mac/PC

laptop, desktop, OLPC XO, or Intel Classmate computer to allow control of hardware input (tilt and motion sensors)and output (motor), thereby bringing models to life

• One motor, one motion sensor, and one tilt sensor• Drag-and-drop, icon-based software that provides an

intuitive and easy-to-use programming environment suitable for beginners and experienced users alike

• CD-Rom provides up to 24 hours of instruction. Teacher notes and glossary are also included

For further information, please contact:

New Powerful, Versatile, andEasy-to-Use Motor Controller

The CS110100 from A-WIT Technologies is a multi-functional, high-current two-axis motor driver

with motion control. It features on-board, over-current protection and over-temperature protection. MaximumDC current per motor channel is 10A. For DC motorswith incremental encoder feedback, the CS110100 isable to drive the motor in velocity mode or position

mode. For DC motors without encoder feedback, theCS110100 is able to drive the motor via PWM. The on-board motion processor allows users to changemotion control parameters, such as PID parameters,motor configuration, etc.

The motor controller has three operating modes: UARTMode — the CS110100 is able to interface with a hostcontroller, such as the C Stamp (sold separately) via theserial port. In this mode, the CS110100 will receive ATcommands sent from the host controller to change its speed,position, etc; I2C Mode — the CS110100 is able to interfacewith the host controller via an I2C port. The I2C address isselectable from 0x70 to 0x7E. The host controller is able tocontrol the CS110100 by I2C commands; Radio Control PWMMode — the CS110100 can be connected to RC receiversdirectly so that the motor speeds can be controlled bythe RC remote controller. In this mode, users may choose to run the twomotors under coordinated mode or independent mode.This mode is especially useful in building RC remoterobots. Some technical specifications are:• Power Supply Voltage: 7V-24V • Power Consumption: 2W (without motors) • Processor Speed: 40 MHz • On-Board Motion Control for brushed DC Motors

(Velocity Mode, Position Mode)• On-Board MOSFET PWM drivers • Able to drive Two DC motors at the same time • MAX DC Current Per Motor = 10A • PEAK DC Current Per Motor = 20 A • On-Board fan for efficient heat dissipation • Protection for Reverse Polarity, Over-Current, and

Over-Heating• Controllable by RC Servo PWM pulses directly • Controllable by a serial interface • Controllable by an I2C interface • User can control the PWM output to the motors directly • Switching power supply for lowest battery power

consumption • Compact size of 75 mm x 65 mm

For further information, please contact:

MOTOR CONTROLLER

SERVO 08.2008 27

656 Ironwood Dr.Williamstown, NJ 08094

800•985•AWIT Fax: 800•985•2948Email: [email protected]

Website: www.c-stamp.com

A-WITTechnologies, Inc.

Website: www.LEGO.comThe LEGO Group

AUG08NewProd.qxd 7/9/2008 7:57 PM Page 27

Page 28: servo2008 08

Featured This Month:

Features28 BUILD REPORT:

Combat Robot: $1.25 a Pound by Tim Wolter

32 PARTS IS PARTS:Power Switchesby Chad New

Events30 May/Jun 2008 Results and

Aug/Sep 2008 UpcomingEvents

30 EVENT REPORT:Mall of America RotundaRumble by Aaron Nielsen

ROBOT PROFILE – TopRanked Robot This Month:33 Touro by Kevin Berry

28 SERVO 08.2008

For many builders, combatrobotics is about pushing the

engineering envelope. You know,how many extra volts can wehammer through the systembefore it flames out? But since Iprimarily work with studentrobotics programs, I have takenthis concept in a different direction. Given the pressure onschool budgets these days, I havebecome adept at “pushing theeconomic envelope.” That is, howtiny a budget, how minimal theshop access, how few work hours can still translate into an

effective fighting machine?Ladies and gents, I think we

have an answer. With our latestbuild, I believe we have attainedclose to Absolute Zero onresources, and still cooked up a30 pounder that went 2-2 in itsdebut competition.

I have been teaching a middle school level robotics program for years, where webuild one and three pound combat machines. It’s an after-school program, so when I proposed doing a bigger build Iknew we would only have a total

of about 15 workhours. Also, the TechEd teacher whohoped to help me hadother commitments,so there would effectively be noaccess to the schoolshop. Fortunately, Ihad a great volunteerassistant, and a talented bunch ofkids sign up; all

● by Tim Wolter

Combat Robot: $1.25 a Pound

BUILD REP RT

SUMO: A robot built on the cheap.

CombatZone.qxd 7/8/2008 10:27 AM Page 28

Page 29: servo2008 08

SERVO 08.2008 29

veterans of my small robot classes,some of them also having experience on my DestinationImagination teams.

The first session I tossed out abunch of stuff from my workshop:cordless drills, cordless screwdrivers,Barbie Jeep gearboxes with andwithout removal of the final gearfor a “speed hack.” I had the kidsweigh them, and test the amp draw running free and at stall. Theyliked the standard Barbie gearboxes,which was fortunate as I had a boxfull of them.

Next, I had them draw up somematerials stats, such as weighingand measuring various thicknessesof plywood, aluminum, Lexan, andfoam; and calculating how heavy a robot would be if it were made of each material and had some plausible dimensions for this project.I suggested a simple pushy/wedgebot for a first build and at the endof session 1, we had a shopping list.

It helps a great deal to have aworkshop full of junk. The expensivecomponents such as speed controllers and batteries were alllying around from years of previousprojects. In fact, I had builtsomething very much like the kids’design a few weeks earlier whenthe high school drama departmentneeded a robotic goat on rathershort notice.

Speed controllers are kind ofthe soul of a robot. That being thecase, it appears that some Easternreligions are correct aboutreincarnation, as electronics for thisproject had lived previous lives aseverything from the 340 pound“Newton’s Claw” down to the candydelivering “Pumpkin Bot” thatscared my trick-or-treaters a fewyears back.

Our basic drive system was apair of Barbie Jeep gearboxes,hubbed to eight inch rubber wheelsthat were about a buck at the localsurplus shop. We added a pair of7.2 volt R/C car batteries wired inseries for 14.4 volts; a mild over-voltfor the motors but no problem for

the Victor 883 speed controllersthat I pulled out of RoboGoat.

One of the kids brought a bigslab of half-inch plywood that madeup the basic frame and base armor.I tossed in a broken snow shovelblade for the pusher.

So far, not much ground breaking technology, but a serviceable machine. We did get abit more creative with the secondaryarmor, which was a tricky compositeof dense foam, 1/32” Lexan in twolayers, and plenty of Gorilla Tape. Infact, two rolls of this stuff at about5 bucks each were the singlebiggest expense of the project.

The new machine — dubbedSUMO for its final pudgy look —was controlled with a 75 MHz JR receiver and an IMX mixer forsimpler handling.

With time to spare, we actuallystarted a second 30 pounder, with a working name of NSP (No SpareParts). This was to have a similardrive system and an active weapon.

But alas, with two sessions togo a problem arose. Spring arrived.Middle school boys are not the mostfocused primates on their best days,and warm weather, track practice,and the attire of middle school girlsall became major distractions. So,we scrapped NSP at the half-builtstage and upgraded SUMO a bit.

Basically, we ended up swapping in 24 volts’ worth of NiCdbatteries, which made SUMO a veryeffective pusher.

In actual combat, lessons were— as usual — quickly learned. The“close enough” fit between the axle

and shaft collar proved to be notquite close enough, and we lost onematch when one hub slipped offthe output gear of the gearbox. Thedesign was a bit tight, making emergency repairs difficult. Thiscould have been avoided, as wewere four pounds underweight.(Note to self: Next time, bring anaccurate scale. The one from theschool nurse’s office must havebeen jumped on too often.)

The composite armor provedmore than sufficient against flail and blade, and with some additionalrefinements will make more appearances in future projects.

The kids all had a fun time, andthe relative success of the project islargely a tribute to their outstandingdriving skills.

Total out-of-pocket costs camein under $40, which at just over adollar a pound must be some kindof record. True, you could claim thatwe cheated by raiding my robotgraveyard/workshop. But I suspectthat with a bit of eBay trolling anddumpster diving, it would be possibleto do the entire project includingelectronics and radio equipment forsomewhere around $150.

SUMO’s drivetrain. The build team pauses for a photo-op.

SUMO the pushybot.

CombatZone.qxd 7/8/2008 10:29 AM Page 29

Page 30: servo2008 08

30 SERVO 08.2008

All in all, a fun project, with lotsof opportunity for creative tinkeringand for on-the-fly troubleshooting

and repair. And at this kind of price,something very possible on a widerbasis. Without an active weapon,

we could have just as easily foughtin the school parking lot as in anexpensive arena. SV

Results May 4 –Jun 15, 2008

SRJC Day Under The Oaks washeld May 4th in Santa Rosa, CA.

Fifteen bots were registered.Presented by SRJC Robotics Club.

Robots Live presented an eventMay 17th–18th at the National

Space Center in Leicester, England.

CCR Memorial Day Qualifier washeld May 24th in Greensboro,

NC. Sixteen bots were registered.Presented by Carolina CombatRobots.

2008 Fighting Robots UKFeatherweight Championships

were held May 24th–25th inBirmingham, England. Presented by Robo Challenge.

RoboGames 2008 was held June12th–15th in San Francisco, CA.

One hundred twenty five combatbots were registered. Presented by ComBots.

Guildford2008 was

held June 15thin Guildford,England. Forty two bots wereentered. Presented by RoamingRobots.

Upcoming Events forAug-Sept 2008

HORD Fall 2008 will be held bythe Ohio Robot Club in

Strongsville, OHon September13th. Go towww.ohiorobotclub.orgfor more details.

Ashow at Midlands MCM Expowill be in Telford, Shropshire,

England on September 13th–14th.Go to www.robotslive.co.uk formore details.

Ashow at the Huddersfield Sport Centre will be held on

September 20th–21st inHuddersfield, West Yorkshire,England. Go towww.robotslive.co.uk for moredetails.

RobothonRobot

Combat 2008will be held byWestern AlliedRobotics inSeattle, WA on September 21st. Goto www.westernalliedrobotics.com for more details. SV

In the post-televised robotic combatera, it’s good to see the sport

can still draw a standing room onlycrowd. Such was the case at theRotunda Rumble held at the Mall of

America in Minneapolis, MN, wherethere were at times four floors ofspectators cheering for more.

The event, sponsored bySynergy Robotics Entertainment and

the Midwest Robotics League, washeld on April 26th and 27th, and itwas divided into two major classes:student and professional. Beyondthat, there was the usual weight

EVENTSResults and Upcoming Events

● by Aaron Nielsen

Mall of America Rotunda Rumble

EVENT REP RT

CombatZone.qxd 7/10/2008 2:49 PM Page 30

Page 31: servo2008 08

class spread starting with the cute‘n cuddly ant weights (one pound)and ending with the “that justmight rip your leg off” feather-weights (30 pounds). As for fightstructure, the 15 pound studentBattle Bots IQ (BBIQ) class fought in classic bracket style, while theremaining classes fought roundrobin.

Taking center stage was theBBIQ half of the tournament whereteams of students — some comingfrom as far as Williams, AZ —displayed their prowess inmathematics, science, andengineering by vigorously applyingit to their opponents in the form ofstored kinetic energy. Whencomparing the tournamentdesignations of “student” versus“professional,” one might be temptedto assume that the “student” classwas somehow inferior. That wouldbe the thought of someone aboutto be resoundingly beaten by something conceived of, designed,

and built by a 10th grader.Even the schools that opted to

stick to the “classic” concepts ofrobot combat (wedges and bricks)managed to bring something newto the table. Billet — a simple brickbot to the untrained eye — featuredmagnets to increase its tractiveeffort. Another bot — dubbedCatapult — boasted the most JamesBond worthy weapon. What I meanis they opted to forgo poweringtheir flipper with a mere tank of airand instead chose to mount a complete working air compressorright on the robot so they couldrecharge on the go. Frankly, I stillhave no idea how that whole apparatus worked, but it did. Eitherway, enough about the event. Let’stalk about results.

The ant weight battles wereless of a tournament and more of aone-on-one brawl for supremacybetween ANTI (vertical spinner) andthe peculiarly named UnderWHERE(horizontal spinner). It was a friendly

rivalry, and there were only two ofthem; thus, they opted to pummeleach other on an exhibition basis.

Moving on to the beetleweights (three pounds), third placewent to Rampage Productions’wedge bot, Screw U, which mightnow hold the title of “bot namethat gets the most snickers whenannounced over the PA.” Secondplace went to Team Bobbing forFrench Fries’ wooden wonder, BoxyBrown, a wooden box with a dowelon the front and a driver with anaffinity for trash picking. After Boxytook a bit of a beating from the firstplace finisher, his driver disappearedfor a bit and, upon his return,proudly declared he had found aplastic bottle in the trash and commenced attaching it to theremains of his bot’s keep-away-stick.First place went to team Python and their bot, Strychnine, which can be best described as threepounds of precision machined, barspinning death.

SERVO 08.2008 31

Humdinger versus Pox. Guess whichof these bots is having a bad day?

Studley Do-Right versus a distressingamount of kinetic energy (Murder-Go-Round).

SUMO and Edge of Madnesspause to ponder one another.

ANTI versusUnderWHERE —two tiny brushlessspinners enter.Only one leaves.

CombatZone.qxd 7/8/2008 10:31 AM Page 31

Page 32: servo2008 08

32 SERVO 08.2008

Jumping up to the 15 poundBBIQ class, the rule for the day wasvertical spinning egg beaters rule,with one exception. That exceptionwas third place finisher No Remorsefrom Valley Middle School in AppleValley, MN. No Remorse was awedge bot that proudly proclaimedit had no regrets (except perhapsnot finishing first or second). Thestory behind second and first placeis a little more amusing. Chucker,from St. Cloud Technical College inMinnesota, and Humdinger 2, fromBuffalo High School (also inMinnesota) were both armed withegg beaters and spent the durationof the Rotunda Rumble putting various items, including themselves,into low orbit. Interesting fact: The creators of Chucker and Humdinger2 used to be on the same team.Thus, when they both found theirway to the finals, the ensuing battlewas the robotic equivalent of Obi-Wan Kenobi facing off with AnakinSkywalker. It was three minutes ofsheer pandemonium to see whowas stronger in the force, but theresults showed that Humdinger 2

was the master and, as such,walked away with $2,500 in merchandise (including a GEARS kitdonated by GEARS) for first place.Chucker would have to content himself with being the apprentice.

Since they were able to make itthrough the entire BBIQ tournamenton Saturday, there was a secondBBIQ tournament on Sunday foranyone who could still cobbletogether a working robot. Takinghome first place ($200) and somevindication for Saturday was noneother than Chucker. In second wasUppercut built by John GlennMiddle School in Maple Wood, MN.In an honorable third was DeathStar deployed by PACT CharterSchool in Ramsey, MN. (I’d trot outanother Star Wars metaphor, butI’m afraid we used them all up inthe last paragraph.)

Among the 30 pound big boysof the event, third place went toTeam Nerd Academy and theirwood, plastic, shovel, Gorilla Tapecomposite push bot, SUMO. (SeeTim Wolter’s build report on SUMOin this month’s Combat Zone.) In

second was team RampageProductions’ Whop Rivet, an articulated flail spinner. And bringing home first place and $500in prizes was veteran driver DickStuplich from Team Killerbotics andhis wedged-wonder, Pyromancer.

Even more impressive was thatPyromancer was fighting with theproverbial arm behind the back, asthe flame based weaponry, and,consequently, his flamethrower wasnot allowed at the Mall of America.If anyone happens to think that’ssilly, I would like to point out twothings. One, every other store in theMall of America sells 100% cottonshirts. Two, 100% cotton shirts burnquite well. (Your honor, the defenserests.)

All in all, it was an impressiveevent which boasted an excellentturnout in terms of both buildersand bot watchers. Better still, plansare in the works for a similar eventnext year. We’re looking forward to it. SV

All the pictures were taken by Deb Holmesof the Midwest Robotics League.

Pox, jealous ofCatapult’s on-board aircompressor, attacks!

This, ladies andgentlemen, is whatyou call a crowd.

The power switch is one of themost overlooked yet critical

parts of a combat robot.Paraphrasing the Robot Fighting

League rule set, all robots musthave an easily accessible power

● by Chad New

PARTS IS PARTS:P wer Switches

CombatZone.qxd 7/8/2008 10:32 AM Page 32

Page 33: servo2008 08

SERVO 08.2008 33

Touro has competed inRoboGames 2006, RoboGames

2007, and 7 ENECA-Recife. Tourodebuted in RoboGames 2006achieving third place. Afterwards, it won Brazil’s III Winter Challengeand VI Robocore ENECA – both in2006. In 2007, Touro won aRoboGames gold medal and keptboth Brazilian competition titles.

Details are:

● Configuration: DrumBot

● Frame: 7050 aluminum— 20 mm (approx. 3/4”)

ROBOT PR FILETOP RANKED ROBOT THIS MONTH

Touro flips Orion 3 during the2007 Winter Challenge final match.

Photo courtesy of Robocore.

switch that can be used to turn onand off the robot safely, quickly,and easily.

During the mad dash of eventpreparation, builders often neglectthis critical component. I have seendozens of fights lost due to a powerswitched being tripped during ahard hit, links falling out because of poor design and placement, and even fights lost simply becauseof not turning the switch to the fullon position.

Given the importance of thiscomponent, it should be factoredinto your robot’s design previous tothe final hours of your build. Powerswitches can be made very simpleor complex; what you decide to gowith will depend mainly on availablespace and budget.

It is my opinion that the twobest options for a power switch area removable power link which anybuilder should be able to easilymake, or the Team Whyachi ready —made power switch line.

A removable power link is easilymade by creating an open on thenegative side of your main powerline which can be closed by insertingthe plug, thus completing the circuitand turning the robot on. Turningthe robot off is as simple as yankingthe plug out which puts the openback onto the line. The link can be

made of whatever youwant. I find, however,it’s easiest to use a setof Deans Ultra Plugs. I simply wire the femaleend into the power anduse the male end as the plug; that’s it. Thisswitch should cost youless than $5.

The other option isto buy a ready-made switch fromTeam Whyachi. They are made verysolidly featuring a UHMW body withcopper contacts inside which youare able to make and break contactwith by adjusting an internal screw.Loosening the screw turns the roboton while tightening breaks the copper contact and shuts the poweroff. They also come in avariety of sizes to fityour needs. If you havethe budget for this item,then it may be a soundinvestment of about $50.

No matter whatpower switch option youdecide to go with, the

most important thing is to put someforethought into it.

Be sure to consider its placement so you have easy access to it and so it is protectedfrom your opponents. Rememberthat one shot to this part can takeyou out of the match, so treat it well. SV

PHOTO 1. A Team Whyachipower switch. Simply insert

the wrench and turn on or off.

PHOTO 2. A removable linkmade from Deans Ultra

connectors. A simple, easy,and cheap solution to your

power switch needs.

● by Kevin Berry

CombatZone.qxd 7/8/2008 10:33 AM Page 33

Page 34: servo2008 08

34 SERVO 08.2008

walls and 8 mm (approx. 5/16”)thick top and bottom

● Drive: Two MagMotor S28-150sand Team Whyachi TWM3M gearboxes

● Wheels: Two Colson 6” x 1.5”tread, mounted on aluminumhubs

● Configuration: Two wheel drive

with tank mixing

● Drive ESC: Two IFIVictor HV-36s

● Drive batteries: Two24 VDC, 3,600 mAhBattlepacks

● Weapon: 12 kg(26.5 lb) 304 stainlesssteel drum, with two1” x 1” S7 tool steelteeth and 1.5” titanium axle

● Weapon power: 6.7 kilojoulesstored @ 6,000 RPM

● Weapon motor: Magmotor S28-400

● Weapon ESC: Team Whyachi C1Contactor trigged by custom-madeelectronics

● Armor: 3 mm (approx. 1/8”)

6Al-4V titanium with Kevlar underneath; also 5 mm (approx.3/16”) 304 stainless steel

● Radio system: Spektrum DX6

● Future plans: Work hard to stayon top

● Design philosophy: As a rule ofthumb, the design is as simple aspossible; our goal was to build acompact, strong, and reversiblerobot. After 2006, it has undergoneminor revisions to become evenmore simple and powerful.

● Builders bragging opportunity:We don’t like to brag, we like to seeour robots in action!

● Future plans: Four wheel driveversion SV

All fight statistics are courtesy of BotRank(www.botrank.com) as of June 14, 2008.Event attendance data is courtesy ofBotRank and The Builders Database (www.buildersdb.com) as of June 14, 2008.

Touro’s inside. Photo courtesy of RioBotz.

Weight Class Bot Win/Loss Weight

Class Bot Win/Loss

150 grams VD 26/7 150 grams Micro Drive 7/1

1 pound Dark Pounder 44/5 1 pound Dark Pounder 23/3

1 kg Roadbug 27/10 1 kg Roadbug 11/4

3 pounds 3pd 48/21 3 pounds Limblifter 12/1

6 pounds G.I.R. 17/2 6 pounds G.I.R. 11/2

12 pounds Solaris 42/12 12 pounds Surgical Strike 17/7

15 pounds Humdinger 2 29/2 15 pounds Humdinger 2 29/2

30 pounds Totally Offensive 43/13 30 pounds Billy Bob 12/4

30 (sport) Bounty Hunter 9/1 30 (sport) Bounty Hunter 9/1

60 pounds Wedge of Doom 43/5 60 pounds Texas HEAT 11/4

120 pounds Devil's Plunger 53/15 120 pounds Touro 10/0220 pounds Sewer Snake 43/12 220 pounds Sewer Snake 11/5

340 pounds SHOVELHEAD 39/15 340 pounds Ziggy 3/0

390 pounds MidEvil 28/9 390 pounds MidEvil 3/0

Rankings as of June 14, 2008

History Score is calculated by perfomance at all events known to BotRank

Current Ranking is calculated by performance at all known events, using

data from the last 18 months

History Score Ranking Touro – Currently Ranked #1

Historical Ranking: #7Weight Class: 120 lb MiddleweightTeam: RioBotzLocation: Rio de Janeiro — Brazil

BotRank Data Total Fights Wins LossesLifetime History 16 14 2Current Record 10 10 0Events 3

Photo courtesy of Robocore.

CombatZone.qxd 7/8/2008 10:34 AM Page 34

Page 35: servo2008 08

CONFERENCE&EXPO,08

NOV. 18-19, 2008

SANTA CLARA, CASANTA CLARA CONVENTION CENTER

Join the International Technical Design and DevelopmentEvent for the Personal, Service, & Mobile Robotics Industry

30+ Cutting-edge, relevant conference sessions covering:

- Systems and Systems Engineering- Tools and Platforms- Enabling Technology- Achieving Autonomy- Design and Development

Keynote sessions delivered by internationally recognized industry leaders

Exposition fl oor featuring what’s new and what’s next in robotics design and development

Valuable networking opportunities that put you in touch with peers, industry experts and up-and-coming talent

WWW.ROBODEVELOPMENT.COM 800-305-0634

USE PRIORITY CODE RDSRV AND

SAVE $300ON A CONFERENCE PASS

For Information on Sponsorship and

ExhibitingOpportunities,

contactEllen Cotton at

[email protected] 508-663-1500 x240

FOR COMPLETE EVENT DETAILS VISIT WWW.ROBODEVELOPMENT.COM

EXCLUSIVE OFFER:

Featured KeynotePresentations

Professor of ComputerScience and ElectricalEngineeringDirector, Artifi cialIntelligence LaboratoryStanford University“Making Cars Drive Themselves”

Sebastian Thrun

Founding Director USC Center for Robotics and Embedded SystemsDirectorUSC Robotics Research Lab

Maja J. Mataric

Jeanne DietschCEOMobileRobots Inc“Opportunities at the Uptick”

JOIN THESE LEADING COMPANIES AT 2008ROBODEVELOPMENT

Analyst, Association & Academic Co-Sponsors

Silver Sponsors

Media Co-Sponsors

Gold Sponsor

BOSTONENGINEERING™BOSTONENGINEERING™

Listing as of July 7, 2008. For acurrent list of participatingcompanies, please visit www.robodevelopment.com.

Founding Sponsor

Plus...

Full Page.qxd 7/9/2008 5:37 PM Page 35

Page 36: servo2008 08

36 SERVO 08.2008

My first serious hobby servo controller was builtaround an LM556 dual timer IC with a potentiometer

at the end of a joystick acting as the hobby servo controller input. After discovering PIC microcontrollers,my next generation of hobby servo controllers got a bitmore flexible as I could control the hobby servo PWM signal — and thus the servo itself — with both firmware

PHOTO 2. This is the real McCoy. There are otherXC2C64A programming alternatives. However,this CPLD and FPGA programming device is fullysupported by the Xilinx ISE WebPACK firmwaregeneration package. You can purchase this toolfrom a number of electronics distributors.

The hobby servo is an amazing device. The typical hobby servo is a collection of plastic ormetal gears driven by a DC motor, which is under the control of a specialized motor driver ICand a feedback potentiometer. Back in the day, one would find hobby servos in most everymodel airplane and model boat. If you really put a brain cell to it, radio-controlled modelplanes, cars, and boats are actually specialized types of robots that depend greatly on the controlled motion provided by a hobby servo. Hobby servos don’t care who drives them aslong as they are driven with a specificallytimed PWM signal. So, it’s not so strangethat the ubiquitous hobby servo has rotated its way into today’s microcontroller-controlled robotic ramblers.

PHOTO 1. This Xilinx CPLD development boardcontains everything you need to put the XC2C64A

on the air. The idea is to put down and test your XC2C64A design on this board before

building up the final hardware that will be dedicated to your XC2C64A project.

Eady.qxd 7/8/2008 11:55 AM Page 36

Page 37: servo2008 08

and a potentiometer. As time passed, PICs got more sophisticated and began to include on-chip PWM subsystems that could be programmed to effortlessly service a hobby servo while doing other things at the sametime. This month, we’re going to add yet another hobbyservo controller type to our list. This hobby servo controllervariant is based on a Xilinx XC2C64A CPLD. If you are CPLDchallenged, fear not. The April and May 2008 issues ofNuts and Volts contain introductions to CPLD hardware andfirmware. In fact, we are going to “reuse” that Nuts & Volts64A CPLD hardware in this month’s discussion. There arelots of details we need to cover. So, let’s get started.

Doing Some Servo MathThe typical radio-controlled servo system consists of a

transmitter, a receiver and multiple servos. Most advancedmicrocontrollers that contain on-chip PWM subsystems onlyprovide up to two independently controlled PWM outputchannels. If you only need to control a couple of hobby servos and your selected microcontroller can drive its PWMoutputs independently, you’re covered. However, if youneed to drive a greater number of hobby servos, you’regoing to need some help. That’s where the 64ACoolRunner-II CPLD comes in.

In the pages of those issues of Nuts & Volts that Isteered you to earlier, we built up the basic CPLD hardwareconfiguration you see in Photo 1 exactly as it is representedin Schematic 1. The pinned-out CoolRunner-II CPLD is programmed via its JTAG port using a Xilinx-compatibleCPLD programming device. To raise the chances of projectsuccess, I like to use the official programming tools offeredup by the manufacturer. For the 64A, those programmingtools include the free Xilinx ISE WebPACK CPLD/FPGAfirmware generation tool and the Platform Cable USB hardware programming tool shown in Photo 2.

A microcontroller uses its system clock to assist in thegeneration of PWM signals. We’ll also need a clock sourceto lock in the PWM signal that the 64A will be sourcing tothe hobby servos. The LTC6900 is configured as a 1 MHzclock source that can have its output frequency divided by10 or by 100 with the positioning of a jumper. Our hobbyservo application will utilize the undivided 1 MHz clock signal. To get 1 MHz out of the LTC6900’s OUT pin, wemust ground the DIV pin (pin 4) with a jumper. The 1 MHzoutput jumper configuration and the LTC6900 along withits supporting circuitry are shown from a lizard’s viewpointin Photo 3.

We need to drive our hobby servos with a positive-going pulse every 16 to 30 ms or so. The positive-goingpulse width must be able to be varied between a minimumof 1 ms and a maximum of 2 ms within the 20 to 30 mswindow. With a center servo rotor position represented bya 1.5 ms pulse width, it’s rather obvious that we must usemicrosecond-based pulse widths to be able to better positionthe servo rotor within its bounds of travel. Microsecond

timing falls into our lap here as each tick of our 1 MHzclock is 1 microsecond (1.0 µs) in length.

Now that we have a solid timebase figure of 1 µs towork with, let’s assign bits fields to our pulse widths thatcorrespond to their numeric size. At a minimum, we’ll need to generate a 16 ms control pulse window whichmust contain a positive-going servo positioning pulse with a minimum pulse width of 1 ms and a maximum pulsewidth of 2 ms:

16 ms = 16,000 µs = 0x3E80 µs = 0b0011111010000000 µs1 ms = 1000 µs = 0x3E8 µs = 0b001111101000 µs2 ms = 2000 µs = 0x7D0 = 0b011111010000 µs

Instead of using ABEL as we did in our Nuts and VoltsCPLD introduction, the programming language of choice forthis project will be Verilog. Verilog is very much like C and isvery easy for most anyone to pick up and run with. Verilogsupports numbers up to 32 bits in length. Judging from ourbinary breakdown of the pulse widths, by stripping off theleading zeros of the most significant bytes of each pulsewidth bit field we can easily represent our largest pulsewidth number (16 ms) with 14 bits. All of the rest of our pulse width values (including the 2 ms servo positioning pulse) can be represented with a maximum of11 binary digits.

Every 16 ms servo control pulse window must beginwith a positive-going servo control pulse, which we knowcan vary anywhere between 1 ms and 2 ms. We can easilywrite some 64A code to produce the timing necessary torealize a 16 ms servo control pulse window. However, fromexperience I know that we must generate extra code toreload the 16 ms value into the servo control pulsecounter at the end of every 16 ms timing period. Ourcoding chore would be a little easier and the code flowmade easier to follow if we could eliminate the necessity to

SERVO 08.2008 37

PHOTO 3. The LTC6900’s undivided output frequency isdetermined by the value of resistor R18. Utilizing the

LTC6900 is a really neat way to put a highly stable and programmable frequency source in a tight space.

The CPLD Servo Driver

Eady.qxd 7/8/2008 11:55 AM Page 37

Page 38: servo2008 08

LED

4

3.3V

R14

390

CLO

CK

OU

T

SWA

R18

200K

SWA

1

3.3V

3.3V

LED

2

R15

390

+C

322

0uF

R1

390

R5

200

VR

2LM

1117

-1.8

IN

ADJ

OU

T

R13

390

R3

200

R8

10K

LED

7

J1

+5VD

C -

+9VD

C

C8

.1uF

C9

.1uF

TMS

LED

4

C1

.1uF

LED

5

LED

3

3.3V

C5

.1uF

R16

390

R17

390

U1

XC2C

64A

1 2 3 4 5 6 7 8 9 10 11

1213141516171819202122

2324252627282930313233

3435363738394041424344

IO1/

GC

IO2

IO3

GN

DIO

5IO

6V

CC

IO1

IO8

TDI

TMS

TCK

IO12IO13IO14VCCIO16GNDIO18IO19IO20IO21IO22

IO23

TDO

GN

DVC

CIO

2IO

27IO

28IO

29IO

30G

SR

IO31

GO

EIO

32G

OE

IO33

G0E

IO34GOEVAUXIO36IO37IO38IO39IO40IO41IO42

IO43GCIO44GC

LED

9

100

R6

200

LED

9

3.3V

LED

3

TCK

R7

10K

R9

2003.

3V

C13

.1uF

R10

390

TDI

LED

7

C11

.1uF

1.8V

SWB

R4

200

LED

6LE

D5

C12

.1uF

C4

.1uF

LED

1

LED

8

R2

10K

10

+C

722

0uF

LED

8

TDO

R11

390

J2 JTAG1 2 3 4 5 6

SWB

C10

.1uF

+C

222

0uF

LED

2

VR

1LM

1117

-3.3

IN

ADJ

OU

T

3.3V

3.3V

LED

6

R12

390

+C

622

0uF

U2

LTC

6900

15

2 34

V+

OU

T

GN

D

SET

DIV

38 SERVO 08.2008

The CPLD Servo Driver

Eady.qxd 7/8/2008 11:55 AM Page 38

Page 39: servo2008 08

reload the servo control pulse counter value. We can followthe easier coding path by selecting a servo control pulsewindow time that lies on a power of two boundary. Thepower of two timing method allows the servo controlpulse counter to run continuously and reset itself withoutintervention.

Ultimately, we want the servo control pulse counter toroll over to zero and restart the servo control pulse widthtiming period automatically. The closest power of twoboundary value that meets our 16 ms servo control pulsewindow timing limitation is 0x4000. Thus, we will assign abit pattern that will allow our servo control pulse counter tocount from 0x0000 to 0x3FFF and roll over to 0x0000. Ourselection of 0x4000 as the servo control pulse windowcount provides a 16.384 ms control pulse window. If wefind that we need more time to service more servos, wecould multiply our servo control pulse window time by twoand use 0x8000 as our servo control pulse count value.Counting from 0x0000 to 0x7FFF would yield a 32.768 msservo control pulse window.

From what I have read, 40 ms is the typical minimumservo control pulse window used by RF-based hobby servosystems and is mandated by the FCC (FederalCommunications Commission) to limit interference. We canservice a bunch of hobby servos in a 40 ms window. Let’sgo with the 32.768 ms servo control pulse window fornow. If necessary, we can always scale the pulse windowtime back to 16.384 ms with the flip of a bit. Here’s the32.768 ms servo control pulse window bit pattern:

32,768 µs = 0x8000 µs = 0b1000000000000000 µs

We will count from 0x0000 to 0x7FFF and roll over. If that doesn’t compute, remember that we clock on zeroand the zero clock counts as one clock pulse. So, we’ll need15 bits — not 16 bits — for our 32.768 ms servo controlpulse counter.

Transposing the Servo MathThe idea is to plant the servo position pulse (1 ms to

2 ms) at the beginning of the 32.768 ms servo controlpulse window. Let’s begin by putting some code togetherthat will center the servo rotor:

module rcservo(input clk_1mhz,output reg pwm_out);

Verilog is module based. Our rcservo Verilog module

has an input and an output. The output is registered,which means it has the ability to emulate a flip-flop. A registered Verilog component also has the means of holding a value just as a D flip-flop can on itscomplementary Q and outputs. The input signal — whichhas defaulted to a Verilog type of wire — is derived fromour LTC6900 1 MHz clock output. Verilog wires cannot holdvalues and can only be driven by an external force such asa register or the output of a gate. Basically, a Verilog wireis just like the copper wire you use to connect electroniccomponents.

Next, let’s associate our pulse width numeric valueswith some human-readable names using the Verilog keyword parameter. Verilog parameters are equivalent to C constants:

parameter minpulsewidth = 1000;parameter servo_vector = 500;

All of our Verilog parameter values are in microsecondunits. The minpulsewidth Verilog parameter should be obvious as to its use. The Verilog parameter servo_vectorrepresents the relative position of the servo rotor. We mustalways have a minimum servo position pulse width of 1 ms.So, adding 500 µs (0.5 ms) to the minimum servo positionpulse width with the servo_vector value of 500 will give usthe 1.5 ms centering pulse we are looking for.

We calculated that we would need a total of 15 bits toimplement our 32.768 ms servo control pulse window.Here’s the Verilog instantiation of our 15-bit servo controlpulse register, which we will call window_32ms:

reg [14:0] window_32ms;

If you lay down a “1” for every bit position in the window_32ms register (bits 14 through 0), you’ll end upwith 0x7FFF hexadecimal, or 0b111111111111111 binary.When the window_32ms register contains 0x7FFF and isincremented, it will roll over to zero. So far, so good. We’ve served up the potatoes. Now, let’s bring the meat to the table:

always @(posedge clk_1mhz)begin

window_32ms <= window_32ms + 1;pwm_out <= (window_32ms <

(servo_vector + minpulsewidth));endendmodule

The Verilog always @(posedge clk_1mhz) statementdoes exactly what it says. Every time the positive edge ofthe LTC6900-provided 1 MHz clock occurs, everythingbetween the begin and end block delimiters is executed.The Verilog endmodule keyword signals the end of thercservo module.

The always @(posedge clk_1mhz) block statement is

SERVO 08.2008 39

< SCHEMATIC 1. The electronic playground is containedwithin U1, the Xilinx XC2C64A. U2 is a 1 MHz clock sourcethat can be divided by 10 and 100 with the movement of a jumper. The LEDs and switches are here because theXC2C64A is part of a XC2C64A development board design.

The CPLD Servo Driver

Eady.qxd 7/8/2008 11:56 AM Page 39

Page 40: servo2008 08

40 SERVO 08.2008

similar to a while(1) C loop that runs continuously. Verilogalways blocks run freely and are triggered every time thecondition in the always block sensitivity list is met. In thercservo module we’ve just coded, the Verilog always block’ssensitivity list contains a trigger for every positive edge(posedge) of the incoming 1 MHz clock signal (clk_1mhz).That equates to the always block’s code between theVerilog begin and end block delimiters executing everymicrosecond.

The “<=” Verilog operator in our always loop code tellsus that the logic associated with this operator is clocked,which means all of the statements using a “<=” operatorare termed “unblocked” and execute in parallel. If you’rehaving trouble with this concept, think of a bunch of D flip-flops with all of their clock lines tied to the same clocksource. When clocked, every D flip-flop will switch its D

input to the Q output simultane-ously. So, everything to the rightof the “<=” operator will executeand the results will end up to the left of the “<=” operatorbeginning with every positiveedge of the 1 MHz clock. Thewindow_32ms <= window_32ms+ 1; Verilog statement is veryeasy to understand as everymicrosecond we are incrementingthe count that is being held within the 15-bit window_32msregister.

The pwm_out <= (window_32ms < (servo_vector + minpulsewidth)); Verilogstatement takes a bit more thought. Associate logically highwith Boolean TRUE and logically low with Boolean FALSE asyou sound it out:

The pwm_out output pin is logically high as longas the window_32ms register count is less than theservo_vector value plus the minimum servo positionpulse width value.

We know that we want to generate a 1.5 ms servoposition pulse with our rcservo Verilog module. So, let’ssound out the pwm_out <= (window_32ms < (servo_vector+ minpulsewidth)); Verilog statement again, but this timewe’ll sound it out mathematically:

When the window_32msregister value is less than1500 decimal, the pwm_outpin is logically high. Whenthe window_32ms registervalue is greater than 1500decimal, the pwm_out pin is logically low. The window_32ms versus servo position value comparison ismade at every rising edge of

SCREENSHOT 1. This pulse width is right on the money. Upon sensing this signal, the rotor of my JR Sport SM8 hobby servosnapped to the central position.

SCREENSHOT 2. My JR Sport SM8hobby servo didn’t chatter whileunder the control of this 32.768ms servo control pulse windowtiming. The 4.8 volt SM8 ran wellusing the XC2C64A’s 3.3 volt I/Osupply voltage. However, I’m sureyou’ll get the most out of the SM8with a +5.0 volt servo supply.Note the rising-edge-to-rising-edge timing in this shot.

The CPLD Servo Driver

Eady.qxd 7/8/2008 11:56 AM Page 40

Page 41: servo2008 08

the 1 MHz clock, or once every microsecond.

As you can see, the pwm_out <= (window_32ms <(servo_vector + minpulsewidth)); Verilog statement usesthe 32.768 ms clock, the servo_vector value, and theminimumpulsewidth constant to create a complete PWMsignal. The proof is in the pudding. One slice of servo driverpie is represented in Screenshot 1, which is the 1.5 mspulse our Verilog code generated. I captured the servorotor-centering pulse for you with a CleverScope.Screenshot 2 is another CleverScope shot of the complete32.768 ms servo control pulse window, including the 1.5ms servo position pulse.

With the XC2C64A code, we’ve put together so far, wecan change the position of the hobby servo rotor by simplychanging the value of the servo_vector parameter. Validservo_vector values range from zero to 1000 decimal, witha zero value producing a 1 ms servo position pulse and avalue of 1000 decimal pushing the hobby servo to its fullopposite extent with a 2 ms pulse. We have easily takencontrol of one hobby servo using only our 64A CPLD. Whynot two hobby servos??

One XC2C64A. Two Servos.You already understand what it takes to move a hobby

servo rotor with an XC2C64A CPLD. So, let’s not waste any time getting some double rotor code down and running. First, let’s add that second PWM output to ourrcservo module:

module rcservo(input clk_1mhz,output reg pwm_out1,output reg pwm_out2);

We’re going to take a different turn here. Instead of loading the servo rotor position manually via theservo_vector parameter, we’re going to instantiate a pair of servo_vector registers to hold our desired servo rotorpositions:

parameter minpulsewidth = 1000;

reg [14:0] window_32ms;reg [9:0] servo_vector1;reg [9:0] servo_vector2;reg servo_direction;

Recall that our servo_vector values can range from zero to 1000 decimal. That means we need 10-bits to hold the maximum servo_vector values. The single bitservo_direction register should give you a clue as to wherethat different turn will take us.

Nothing has changed about the way we generate theservo control pulse window:

//*******************************************************//* GENERATE SERVO CONTROL PULSE WINDOW//*******************************************************always @(posedge clk_1mhz)

window_32ms <= window_32ms + 1;

We will build upon our single servo code to add thesecond PWM output pulse. We laid the ground work forthe extra PWM output earlier in the rcservo module:

//*******************************************************//* GENERATE SERVO CONTROL PULSES//*******************************************************always @(posedge clk_1mhz)begin

pwm_out1 <= (window_32ms <(servo_vector1 + minpulsewidth));

pwm_out2 <= (window_32ms < (servo_vector2 + minpulsewidth));

end

Notice that we replaced the servo_vector constant withour servo_vector register variables.

Up to now, we’ve been seeing double. Let’s drive downthat road we made the different turn onto. I don’t thinkyou’ll have any problem following the idea behind thisVerilog code snippet:

//*******************************************************//* DETERMINE SERVO ROTOR DIRECTION//*******************************************************always @(posedge clk_1mhz)begin

if(window_32ms == 0)begin

if(servo_vector1 == 0 || servo_vector1 == 1000)servo_direction = ~servo_direction;

if(servo_direction)begin

servo_vector1 <= servo_vector1 + 1;servo_vector2 <= servo_vector2 - 1;

endelsebegin

servo_vector1 <= servo_vector1 - 1;servo_vector2 <= servo_vector2 + 1;

endend

endendmodule

Everything we do must synchronize to the beginning ofthe servo control pulse window. So, we must always checkto see if the servo control pulse window counter register isat zero as this is the synchronization point we must adhereto. The idea is that if we have a new servo vector value toenter, it must be entered at the beginning of a new servocontrol pulse window.

The servo_vector values of zero and 1000 decimal force

SERVO 08.2008 41

The CPLD Servo Driver

Eady.qxd 7/8/2008 11:56 AM Page 41

Page 42: servo2008 08

the servo rotor to travel to its opposing extents. If we desireto change direction of the servo rotor after it has travelledfrom one extent to another, we should change the directionof the servo rotor at the current extent of its travel. If adirection change is deemed necessary, we need a methodof storing the current servo rotor direction. That’s exactlywhat the one bit servo_direction register does. We’re goingto move the servo rotor to one extent and then reverseuntil we reach the opposite extent.

So, we don’t care about a clockwise or counter-clockwise value. We can simply swap the logicalstate of the servo_direction register and go from there. Theservo_direction register value can be either positive, zero, ornegative. So, we need only concern ourselves with it beingpositive or something other than positive. In our code, theservo_sector values are incremented or decrementeddepending on the logical value of the servo_direction register. Also, note that the servo_sector1 and servo_sector2 registers are incremented and decremented inopposing directions. The hobby servos we attach to the64A PWM output pins will continually spin their rotors fromextent to extent in opposite directions. We could havekeyed on the value of servo_vector2 instead of servo_vector1 to determine our change of direction points.

Taking Some ControlThus far, we have allowed the XC2C64A to run the

show. Unless your XC2C64A application’s mission is to

continually move the servo rotors in apredetermined pattern, you’ll probablyprogram your XC2C64A to take ordersfrom a host device or respond to anexternal stimulus. You can choose tocommunicate with a supporting CPLDusing RS-232, SPI, or I2C. You can evenmake up your own host-to-CPLDscheme. Let’s keep it simple and puttogether some Verilog code that readsthe logic levels on a pair of XC2C64Ainput pins and commands the servo

rotor to stop, spin clockwise, or spin counter-clockwise. Thelogic levels present on the input pins may originate from amicrocontroller or a set of switches. The idea here is toshow you how to code for handling events on the CPLD’sinput pins:

module rcservo(input clk_1mhz,output reg pwm_out,input [1:0] btn_input);

parameter minpulsewidth = 1000;

reg [13:0] window_32ms;reg [9:0] servo_vector;

To gain control of the servo rotor movement we mustdeclare a pair of input wires (input [1:0] btn_input) that areactually connected to the XC2C64A CPLD’s I/O pins. Sincewe’re only controlling a single servo here, we only requireone servo_vector register to hold our desired servo rotorposition data. We still need to generate the servo controlpulse window and the servo position pulses. So, the codethat follows should not seem strange to you:

//*******************************************************//* GENERATE 32ms SERVO CONTROL PULSE WINDOW//*******************************************************always @(posedge clk_1mhz)

window_32ms <= window_32ms + 1;//*******************************************************//* GENERATE SERVO CONTROL PULSES//*******************************************************always @(posedge clk_1mhz)

pwm_out <= (window_32ms <(servo_vector + minpulsewidth));

The code we will use to process the btn_input inputs isvery much like Basic and C. We’ll employ the Verilog casestatement to decode the btn_input input logic levels:

42 SERVO 08.2008

SCREENSHOT 3. According to this pinreport, our 1 MHz clock is connected topin 43 of XC2C64A. The PWM output isfound at I/O pin 29. The least significantbit of the btn_input pair of inputs([x:0]) is located on pin 38 while themost significant bit btn_input pin([1:x]) is attached to pin 37.

Saelig — www.saelig.comCleverScope

Xilinx — www.xilinx.comXC2C64APlatform Cable USB; ISE WebPACK

SOURCES

The CPLD Servo Driver

Eady.qxd 7/8/2008 11:57 AM Page 42

Page 43: servo2008 08

//*******************************************************//* DETERMINE SERVO ROTOR DIRECTION//*******************************************************always @(posedge clk_1mhz)

if(window_32ms == 0)case(btn_input)2’b01: servo_vector <= servo_vector + 1;2’b10: servo_vector <= servo_vector - 1;2’b11: servo_vector <= 500;endcase

endmodule

The only thing I really need to explain is the Verilogcase structure. Otherwise, the Verilog case block works justlike the C case block. All of the possible btn_input inputlogic levels are represented except 2’b00, whose omissionbrands it as a “don’t care” or “do nothing” logic level. The“2’b” in each case choice represents the number of binarybits in the case comparison argument. The stated numberof binary bits follows. In our application, each bit in thecase comparison arguments represents a particular inputpin. The logic we have implemented stops the servo rotorwhen both btn_input pins are logically low. The servo rotoris centered when both btn_input pins are logically high.

If you’re wondering how we know which btn_input pinis associated with which bit, the ISE WebPACK generates apin list report like the one you see in Screenshot 3 with

every successful CPLD or FPGA design implementation pass.The most significant bit of our register and wire bit range patterns is represented by the left-most bit in the range declaration ([most significant bit:least significant bit]). Nowyou can see how the order of the btn_input bit range declara-tion pattern ([1:0]) relates to the Verilog case comparisonarguments (2’b01, 2’b10, etc.) and to the XC2C64A I/O pins.

Rotating OutDriving hobby servos is only one of the tricks a CPLD

can perform. In addition to turning servo rotors, you canuse a CPLD to expand the I/O capability of your host microcontroller. You can also use a CPLD to replace a number of discreet logic ICs in your next robotic design.

If you see CPLD logic in your robotic future, I’ve providedall of the source code we generated in this discussion as adownload package from the SERVO website (www.servomagazine.com). You can get the hardware scoop on the XC2C64Adevelopment board as a download package from the Nuts &Volts website (www.nutsvolts.com). CPLDs are easy to under-stand and easy to design into your projects. So, gather up acouple of hobby servos, build up the XC2C64A DevelopmentBoard, and drive some servos with a CPLD yourself. SV

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

SERVO 08.2008 43

The CPLD Servo Driver

Eady.qxd 7/8/2008 11:57 AM Page 43

Page 44: servo2008 08

44 SERVO 08.2008

New Robotic StorageSystem has SuperAbilitiesRoboVault ImplementsState-of-the-Art Technology

When we think of the future, weimagine robots, voice-activated

technology, and biometric recognition playing a role in oureveryday lives. It has arrived in SouthFlorida with the construction ofRoboVault — the first high-tech robotic storage facility of its kind.

RoboVault is a fully automatedrobotic container retrieval system thatsafely stores valuables ranging in sizefrom exotic automobiles to preciousartwork and other priceless items(Not to mention wine storage). Itsunique combination of extraordinarystorage capabilities and high-techsecurity features distinguishesRoboVault from all previous storage facilities.

RoboVault developer, MarvinChaney, is a futurist. He envisionedRoboVault by anticipating the needsof those living in and visiting SouthFlorida. Chaney has developed self-storage facilities for over 25 years,first in Detroit and then in Florida.With the help of Westfalia Systems,Inc., (the German company whichproduced RoboVault's advancedrobotics technology), Chaneyembarked on creating the most revo-lutionary storage facility of our time.

What makes RoboVault sorevolutionary?

1. RoboVault is designed to stand upto anything thrown its way — natureor manmade.

The building itself boasts a solidconcrete roof, solid concrete andsteel reinforced tilt-up wall panelexterior for maximum strength andstability, and double pane hurricaneimpact glass. As a result, the exteriorof RoboVault is designed to withstand Category 5 hurricanes,with winds up to 200 mph.

2. RoboVault can think.With Human Machine Interface

(HMI) — a means by which users caninteract with the computer system tocreate specific commands —

RoboVault can quickly respond tosecurity issues and perform rapiddiagnostics.

3. RoboVault can create its ownenergy.

RoboVault's emergency back-upgenerator can support the entirebuilding with 100% back-up of electrical base for building safety and HVAC for a “business as usual”environment for up to 10 days afterloss of local service.

4. RoboVault can morph better thana Transformer©.

Storage containers are made ofstructural steel mesh that allows forproper air circulation and fire safetycodes. There are 456 in total rangingfrom 5x5 , 5x10, 10x10, 15x10, andnon-subdivided modules of 20x10and free-standing positions for largeritems, including exotic cars.

5. RoboVault knows who is there atall times.

Its unprecedented combinationof technology includes:

• 24/7 security monitoring • Retinal scanning• Heart beat detection• Biometric recognition

6. RoboVault is as safe as a Swissbank.

RoboVault has an adjacent roomspecifically for safety deposit boxes.The space implements all of thesame security measures as the storage, plus a few extra perks!

• Private entrance for clients todrive into the building and access thesafe deposit box through another,privately monitored interior entrance.

• Clients have full access to theirsafety deposit boxes 24 hours a day,seven days a week.

7. RoboVault is cultured.The facility also boasts a wine

storage facility on the ground floor.The space allows discriminating collectors to incrementally expandtheir personal cellar capacity.

Check out http://youtube.com/watch?v=cQLdOKklflI for abackground video on RoboVault.

For more information, visit thewebsite at www.robostorage.com.

BloBlow Outw Out

SpecialSpecial

$9.95!$9.95!

WWW.SERVOMAGAZINE.COM

Showcase Aug08.qxd 7/9/2008 3:22 PM Page 44

Page 45: servo2008 08

$146.

Ask for our FREE 96 page catalog

VISIT OUR ONLINE STORE ATwww.allelectronics.comWALL TRANSFORMERS, ALARMS,FUSES, CABLE TIES, RELAYS, OPTOELECTRONICS, KNOBS, VIDEOACCESSORIES, SIRENS, SOLDERACCESSORIES, MOTORS, DIODES,HEAT SINKS, CAPACITORS, CHOKES,TOOLS, FASTENERS, TERMINALSTRIPS, CRIMP CONNECTORS,L.E.D.S., DISPLAYS, FANS, BREAD-BOARDS, RESISTORS, SOLAR CELLS,BUZZERS, BATTERIES, MAGNETS,CAMERAS, DC-DC CONVERTERS,HEADPHONES, LAMPS, PANELMETERS, SWITCHES, SPEAKERS,PELTIER DEVICES, and much more....

ORDER TOLL FREE1 - 8 0 0 - 8 2 6 - 5 4 3 2

THOUSANDS OF ELECTRONICP A R T S A N D S U P P L I E S

RRoobboottiiccss SShhoowwccaasseeRRoobboottiiccss SShhoowwccaassee

SERVO 08.2008 45

Showcase Aug08.qxd 7/9/2008 5:21 PM Page 45

Page 46: servo2008 08

46 SERVO 08.2008

The first issue that you run into is that instead of just astraight DC motor, the Vex motors are controlled with

a pulse width modulation (PWM) signal in addition to thenormal DC power. This is pretty common for servo andstepper motors, but to control it correctly you need toknow both the frequency and the duty cycle that the motorlikes. In general, the longer the pulse, the faster the motorgoes, as illustrated in Figure 1.

So, the first task we had to deal with wasunderstanding exactly what type of signal to feed themotor. We spent quite a bit of time searching the web for

details on the Vex motors, and after coming up withconflicting answers (but with a general consensus), wedecided that it wanted a frequency between 50 and 100Hz with a pulse width from 1-2 ms. We wanted to besure, so we went straight to the source — literally byhooking up the real controller to a scope and measuringthe output as we varied the motor speed with the remote control.

What we found was that the controller generally runsat 50 Hz (20 ms) to 55 Hz (18 ms) with a pulse width ofaround 2 ms to go full forward and around 1 ms to go full

backward. At around 1.5 ms, the motorstands still and anything outside of thatrange produces nicely erratic results.

Building the ControllerWith the data in hand, we needed to

carefully choose from parts which were readily available in our area — hence, wewent through the local RadioShack partsinventory to luckily find that they still carriedthe LM555 timer and all the capacitors andresistors we needed.

With a 555, normally you get a nicesquare wave with the proper resistors andcapacitors, but for this project we neededto have a lopsided wave. To accomplish this,all you need to do is put a diode into thecircuit shown in Figure 2 so that it dischargesfaster in one direction. In the circuit we used,

As part of this year’s Science Olympiadcompetition, the students were tasked withbuilding an electric car that would go a certaindistance and stop. While the Vex Robotics kitfrom Innovation First is ideal for building such avehicle, the competition restriction on batteriesprecluded the use of the 7.2V NiCad that theVex controller uses. Fortunately, this gave anopportunity to experiment with other ways todrive the Vex motor and control the car.

Frequency

Width

Frequency

Width

Shorter Duty CycleMotor Goes Slower (or Reverse)

Longer Duty CycleMotor Goes Faster

FIGURE 1

Build a

to run a

PWM CIRCUITVEX MOTOR

by John Toebes

Photo courtesy of www.boingboing.net.

Toebes.qxd 7/8/2008 10:50 AM Page 46

Page 47: servo2008 08

the calculations for the resistors were pretty simple:

• Time On = R2 * C1• Time Off = R1 * C1

Opting for simplicity, we stuck with a 1 µFcapacitor and the closest we could get withstandard resistors. For R2, this came out to be19.4K which can be made with three standardresistors (10K + 4.7K + 4.7K). However, forthe R1 which controls the duty cycle we needed a bit more accuracy than we couldget with the typical 5% tolerance resistors. For this we knew we needed somewherearound 1.8K. For this, we chose to combine a standard 1K resistor with a 1K, 15-turnpotentiometer.

The only other challenging part we needed was a way to connect the Vex motorto the circuit. If you are using a breadboard tobuild the circuit, the Vex motor cable is onstandard .1” centers and just plugs into thebreadboard. If you put it on a perfboard, there are several options short of actually soldering the motor pins tothe perfboard:

1) Use an IC socket and just push the motor into the socket.This works to experiment with, but isn’t very durable.

2) Get a Vex extender cable (or the equivalent from a localR/C hobby store) and solder it to the board.

3) Use an old IDE, floppy, USB block, or even an internalaudio cable that the Vex motor plugs into — make sure youfind the right wires to connect into the board. Audio cableswork great as you can see in Figure 3.

The circuit is easy to lay out. As you can see in Figure4, the students built the circuit so that parts occupy just thebottom half of the perfboard (the top half hasthe original timer circuitwhich controlled how longthe motor ran for). The circuit isn’t too sensitive toparts placement, so just layeverything out wherever youhave the most room.

The only special thing tonote is that the circuit inFigure 2 has both a +5 and+Vcc indicator. This isbecause we found that intesting the car, sometimesthe noise of the motor

affected the other circuits of the car. To clean this up, wesimply connected the +5 to the battery through a five voltregulator (such as a 7805 — RadioShack P/N 276-1770.

Putting It in MotionOnce you have everything assembled and have

powered up the circuit, you need to adjust the potentiometerto get the optimum speed. You can do this by either watching a scope connected to the outputs or tune it byjust watching the motor. You should be able to see the fullrange of the motor from maximum reverse to idle to fullforward by adjusting the potentiometer.

Building on ItOne obvious improvement to this circuit would be to

SERVO 08.2008 47

2

6

7

1

54

8

3

+1K!

2K!

10K

! 4.7K

! 4.7K

!

1µF0.01µF

0V

+5V

Output

555 VEX PWM Controller

555

BlackWhite

Red

+VccR1

R2

FIGURE 3

FIGURE 2

T

Toebes.qxd 7/8/2008 10:50 AM Page 47

Page 48: servo2008 08

48 SERVO 08.2008

provide a way to control the speed. If you only want a couple speeds, R1 could be selected with a relay or a transistor controlling which values are used for the circuit.

With an adjusted PWM circuit, you can then have thefun of building a vehicle with other Vex parts and watch itrun. Of course, you will need to have a way of starting andstopping the car, but that’s a project for another day. SV

FIGURE 4

• (1) Vex Robotics Motor Vex Robotics P/N 276-2163• (1) LM555 Timer IC RadioShack P/N 276-1723• (2) 4.7KW 1/4 Watt Resistor RadioShack P/N 271-1330• (1) 10KW 1/4 Watt Resistor RadioShack P/N 271-1335• (1) 1KW 1/4 Watt Resistor RadioShack P/N 271-1321• (1) 1KW 15-turn Potentiometer RadioShack P/N 271-342• (1) 1 µF Electrolytic Capacitor RadioShack P/N 272-1434• (1) 0.01 µF Ceramic Capacitor RadioShack P/N 272-131• (1) IN4001 Diode RadioShack P/N 276-1101• (1) Battery Holder for four D-Cell Batteries RadioShack

P/N 270-396• (4) D-Cell Batteries

Parts ListPerform 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

Toebes.qxd 7/8/2008 10:51 AM Page 48

Page 49: servo2008 08

by Jason BardisA Look at the Long Beach Grand Prix

SERVO 08.2008 49

“Robot drivers arebetter than

human drivers.”“Which human?”

“Uh, that would be me.”“What happened?”

“We finished anautonomous run and

we switched out ofautonomous into

manual drive, and ...uh ... kinda kept going.

What we did was wewarmed up the rail on

the straightaway for therest of the drivers. So,we know it’s good. We

tested it — it’s solid.”

April 20, 2008 may be known asthe turning point when robots

became better drivers than humans ...or at least Lockheed Martin AdvancedTechnology Labs engineer AdamSolomon, when he took the wheel ofan unnamed robotic Toyota Prius afterits autonomous run and attempted toguide it back into the pits at the 34thAnnual Long Beach Grand Prix.

Maybe the professional drivers atthe race would have fared better thanAdam. Then again, I’d bet dollars todiodes that none of the professionaldrivers had built any robot cars either,so let’s call it even.

Robots? Engineers? Car race?What? According to the event’s FanGuide brochure, “... we’re also going‘Green, Green, Green!’ in 2008! TheToyota Grand Prix will take a giantleap into the future with an expandedLifestyle and Alternative Energy Expoin the Convention Center and adynamic new ‘Green Power Prix-View,’showcasing hybrid, electric, and possibly even robotic cars on and offthe track, as well as energy-savingdevices for the home and lifestyle.”

“Green” is certainly a key buzz-word these days, around the world, inall industries, and now “robotic” is

right up there alongside green too.Well, it’s almost right up there along-side green — it still has the cautiousqualifier “possibly even” preceding it.

But what was this event really allabout? Three robotic cars took to thetrack that day, all veterans of the DARPAUrban Challenge (not just any oldcompetitors — race fans were treatedto the 1st, 2nd, and 4th place finishersout of the 89 teams that entered and11 teams that actually qualified). Theyshowed off by doing a hot lap of theLong Beach Grand Prix race track.Well, maybe it was more of a warmlap ... okay, how about tepid?

Compared to the deafening blursof Champ Cars averaging 93 mph, the30 mph max speed robotic carsseemed rather tame and pokey atbest, at least to the average race fan.At worst, the average race fan justdidn’t get it: “Those cars must be driven by the people following in thechase cars.” “No, the chase cars arethere just to shut them off in an emergency — those cars are really driving all by themselves.” “Yeah, Iknow, but, still, there’s gotta be somebody driving it!” “Uhhh ... ?”

This year’s Long Beach Grand Prixincluded this resoundingly successful

Look Ma, No Driver!Look Ma, No Driver!

Bardis.qxd 7/9/2008 12:52 PM Page 49

Page 50: servo2008 08

50 SERVO 08.2008

demo that robotic cars have no trouble running a race track.Most SERVO readers know of the DARPA Grand Challengeand Urban Challenge, and are happy to see another successful autonomous course completion. However, mosttypical race fans got their first taste of robot cars and,hopefully, their appetites have been whetted. The fans sawdrivers pilot two green electric race cars and a green (well,it was bright yellow ...) solar-powered car run a lap (a

relatively warmish lap at that!). Sadly, the I-look-far-cooler-than-anything-that-Batman-has-ever-driven Mazda speedalternative energy rotary engine car never got out of thepits. These cars were followed by a big Chevy SUV and aVW wagon navigating the course smoothly, confidently,and precisely. They also saw a little Toyota Prius navigatethe course with some timidity, trepidation, and nervousness. But which one won the race?

Bardis.qxd 7/9/2008 12:56 PM Page 50

Page 51: servo2008 08

Read on as I introduce you to the players:

BOSSNamed After: Charles “Boss” Kettering, founder of GeneralMotors R&D (Nothing to do with Bruce Springsteen.)Former Life: 2007 Chevy TahoePedigree: 1st place in 2007 DARPA Urban ChallengeTeam: Tartan Racing @ Carnegie Melon University, withGeneral Motors, Caterpillar, Intel, and ContinentalBuild Time: 14 months between receipt of the vehicle andthe DARPA Urban ChallengeCost: “Well, the prize for winning the challenge was $2 million. We were very happy to receive that.” “Aaaaand,that went somewhat towards recouping your costs of — ”“WE WERE VERY HAPPY TO RECEIVE THAT!”Turn-Ons: More is better!Turn-Offs: Subtlety

What has room for four programmers, a table withcupholders and power outlets and Ethernet jacks, and 10bays of Intel dual-core processors? Oh, and it goes 30 mph,so the answer is not “the server room down at corporate.”It’s Boss. Aptly named, as it won the 2007 DARPA UrbanChallenge ... by a 20 minute margin. Note that a two-secondlead in a normal car race is a healthy margin! A 6,000 lbChevy SUV with such impressive performance could be misconstrued as a bully, but it ran the Long Beach GrandPrix track almost as smoothly as the human drivers. I spokewith test lead Bot Bittner about the past and future of Boss.

Because they tried so many tests to compare differentsubsystems and components, they didn’t have time to integratethe large racks of components seamlessly into the vehicle.Boss’ future lies in using its successful technology not to makefleets of robotic cars but to integrate various subsystemsinto consumer and military vehicles: “What you’ll see is a lotof the subsets of the technology pulled out and introducedinto the vehicles that we’re driving every day. You’ll end upwith a lot of early warning for accidents ... be able to tell usabout lane departure, accident avoidance, obstacle avoidance,defensive driving ... Right now, I don’t think people are

ready to see a car just driving itself down the road.”How many more DARPA “Blank” Challenges (where you

can fill in “Blank” with some sort of extreme-soundingadjective) are in store for Boss? Carnegie Melon is pursuingmany related projects, but “We don’t expect to see anymore of this type of challenge out of DARPA. But, what ithas done is excited the community, generated an interest invehicle safety, autonomous driving, and all the benefits thatcan come from this technology bringing it to society.” Oneexample is the “panheads” mounted on the sides of theroof, which look downward and left/right. At an intersection,these sensors are used to monitor side traffic and obstaclesand help Boss decide when it would be safe to pull forwardinto an intersection. I am so looking forward to these sensors being commonplace automobile options, stuck upthere on the roof next to the satellite radio antennas!

As a mechanical engineer, I deal in the tangible; havingtrouble grasping the movement of electrons in circuits or

SERVO 08.2008 51

Bardis.qxd 7/9/2008 12:59 PM Page 51

Page 52: servo2008 08

52 SERVO 08.2008

appreciating the elegance of a really efficient gosub routine(heck, they probably don’t even have gosubs in modern programming languages, do they?). So, I asked Bob whatall the cool sensors on Boss’ roof and bumpers were:

• Roof: Three GPS antennas to determine not only locationbut also orientation of Boss; Velodyne HDL-64E 64-laserLIDAR rotating at 10 Hz.

• Roof Sides: Panheads for monitoring side traffic and obstacles.

• Roof and Inside: Big red panic buttons to shut down andstop the car.

• Back Bumper Sides: Two close-range radars.

• Back Bumper Center: Planar LIDAR and long-range radar.

• Front Bumper: More radar and LIDAR short- and long-range sensors.

• Junk in the Trunk: Racks with 10 Intel dual-core processors,data-logging equipment, a Planix that processes the GPS dataand also takes inertial motion and encoder data to determinelocation when GPS signals are not available, the remote killdevice (contrary to the saw blade deployment components ona BattleBot, this box is used simply to pause and unpauseBoss), and a whole lot of cable ties to keep it all tidy.

I asked Bob if they’ve ever gone on joyrides faster thanthe 30 mph speed limit imposed by the DARPA UrbanChallenge rules. I got the boiler plate “I can neither confirmnor deny ...” routine, but he did point out that they’ve setup the hardware and software to work and react at 30 mph.So, we’ve probably got a few years until these smart guyscan get their robot cars up to typical Champ Car speeds.

To make its driving look effortless and professional,Boss uses prior knowledge of the course combined with on-the-fly decision-making. The course can be outlined fromsatellite images or by driving the course prior to the eventand recording waypoint locations. Of course, the more priorinformation known, the more successful the course naviga-tion will be. Don’t roll your eyes — the same applies to usfleshy and indecisive humans too! For the DARPA UrbanChallenge, they were provided with a sparse set of way-points, so Boss proved that it was versatile and robust bystill navigating DARPA’s course (and the Long Beach GrandPrix race course) excellently, although they still deferred to a human driver to drive Boss to and from the track. Bossprobably would not have dealt well with the dozens of people crowding around him, as well as the strange obstacles(tents, strollers, golf karts, swing-out race track entry/exitbarriers, etc.) creating mayhem in and around the pits.

“WE’RE WORKING ON THAT”(No, that’s not its real name — it truly doesnot have a name — call Marketing, quick!)

Former Life: 2006 Toyota PriusNamed After: See abovePedigree: Riding on the coattails of its twin “Little Ben”(fraternal twin, not identical twin, as Little Ben’s brother has only two-elevenths as many sensors as Little Ben), whoplaced 6th in the 2007 DARPA Urban Challenge, unless youask somebody on Little Ben’s team, who points out thatLittle Ben placed 4th out of the teams that finished withinthe rules. “What rules were broken?” “They collided withother vehicles. One in particular had it out for us, it seemed— they tried to hit us twice.”Team: Ben Franklin Racing Team: University of Pennsylvania,with Lehigh University and Lockheed MartinBuild Time: 18 months between initial concept and DARPAUrban ChallengeCost: $250,000 of parts, and “a lot of free student labor”Turn-Ons: KISS (the acronym, not the band with their own army)

Bardis.qxd 7/9/2008 1:02 PM Page 52

Page 53: servo2008 08

Turn-Offs: Human drivers

Adam Solomon, Lockheed Martin engineer and racetrack barrier strength-tester, gave me the scoop on their Prius.

The first thing that jumps out and slapped me in theface is the fact that this car looks so normal! I couldn’t helpmyself: “This car looks kinda boring. But that’s a backhandedcompliment! Honest!” Just as Toyota set to achieve (anddid so) utter normality with the Prius to not freak outpotential customers who fear change and abnormality intheir daily drivers, so did the Ben Franklin team also achieveremarkable normality with their robot car.

This was the backup car (“backup” not as in “it goes inreverse,” but “backup” as in “if we total Little Ben, we’vegot a spare!”) for Little Ben at the DARPA Urban Challenge.Little Ben ran so well that this vehicle wasn’t needed forthat event. In its understudy role, as on Broadway, it wasn’tequipped as well as the top-billed star was in order to put on a standing ovation, throw-the-roses-on-the-stage performance. This car had only two main sensors vs. LittleBen’s 11. This bears repeating. According to Adam, withonly 18% of the hardware bolted to the outside of this car,it could perform at 95% of the capacity of Little Ben. The5% shortcoming is in this robot car’s inability to performsensing of extremely close objects — the Prius’ roof eclipsesthe field-of-view of the one centrally-mounted roof sensor,

casting the area immediately around the car into “shadow.”How is this possible? Software, software, software.

They refined their software over and over, making it moreefficient, more robust, and more powerful, until they hadthis impressive driving capability-per-sensor ratio (Don’t askme what the units are on that value ...). Did I also mentionthat the star of their robot — the software — runs on a plainold consumer MacBook Pro laptop? Their biggest problemwith their whole system was not any of their componentsor code but the laptop’s rechargeable battery, which gradually lost its capacity over the months of testing fromits frequent charge and discharge cycles. They learned theirlesson and now keep the laptop plugged in at all times.Lockheed Martin is also continuing to use this Prius as anactive research vehicle, constantly refining their software.Why? They have plans to transition their refined software toother vehicles, including boats and military tactical vehicles.Could they end up developing a ubiquitous “operating system” for robot cars? Perhaps standardized tests of thefuture will include the following analogy: Microsoft is toconsumer PCs as Lockheed Martin is to robot cars.

Like Boss, Little Ben’s sensor-challenged brother startswith a map of the course and then uses those sensors todetermine exactly when to turn, how sharply to turn, andhow to deal with obstacles that can’t be pre-programmed.Adam’s analogy was your GPS unit in your car. It tells you

SERVO 08.2008 53

Bardis.qxd 7/9/2008 1:05 PM Page 53

Page 54: servo2008 08

roughly when to turn and gives you a semi-detailed set ofinstructions, but it’s up to the driver to perform the fine-tuned actions of stopping at a red light vs. going at a greenlight vs. flooring it at a yellow light, braking when thatteenager on her cell phone cuts you off without using herturn signal, staying in your lane, and keeping on the rightside of the island on that boulevard.

As far as the Prius knows (“knows,” depending on howmany human traits you like to attribute to your car ...), ithas no idea that it was turned into a robot. That MacBookoperates the car’s controls (steering wheel, gas, and brake)with a drive-by-wire system, rather than interfacing into thePrius’ smart hybrid computer brain.

Forget the high mileage boasted on the dealer stickeron the Prius. This vehicle averages 23 mpg in autonomousmode. Probably not too different from the smooth-driving-yet-hefty Boss Chevy Tahoe.

Adam gave me the run-down on the amusingly shortlist of significant sensors bolted to The Prius With No Name:

• Velodyne HDL-64E 64-laser LIDAR rotating at 10 Hz (Yes, I copied and pasted that from the Boss description — I challenge you to find a successful robot car that does nothave one of these spinning domes bolted to its roof!).

• GPS on the roof determines vehicle location.

Also hidden in the car are accelerometers and odometrydata, used when a good GPS signal is hard to find. LongBeach’s skyline, intertwined with the street race course, wasconspiring against the robot cars, but they didn’t seem tomind very much. For the Grand Prix, the team also kickedtheir system up a notch by refining it to cruise at speeds upto 28 mph — up from their previous 15 mph top speed.

So, how did it work? The Prius was significantly slowerthan the other two robot cars, paused at a few turns, tappedthe brakes as much as a cautious octogenarian on a busystreet, and even added some slalom action around some

imaginary cones on a straightaway. “Look! The Prius is heatingup its tires on its warmup lap!” the race announcer musedover the PA. The 23 mpg mystery was solved! Although thePrius’ driving performance was the least impressive of the trio,the fact that it did so much with so little was astounding.Furthermore, it could blend in as well on a normal citystreet as the Google Maps street view camera car or a carbelonging to a serious mountain biking addict.

JUNIORFormer Life: 2006 VW Passat station wagonNamed After: Presumably the little brother of Stanford’sbigger VW Touareg — winner of the 2005 DARPA GrandChallengePedigree: 2nd place in 2007 DARPA Urban ChallengeTurn-Ons: “Intel Inside” stickers on cars, not just PCs!Turn-Offs: FahrvergnügenTeam: Stanford University

Unfortunately, SERVO didn’t get a chance to talk withanybody from the Stanford team. Based on the impressiveoperation of Junior, we’re certain that they’re all reallysmart and stuff.

Even if SERVO Magazine doesn’t give me a free presspass to the 2009 Long Beach Grand Prix, I am so going toattend, crazy ticket prices be damned! It will be worth theprice of admission just to see what sort of evolutionaryleaps these robotic cars have performed during their intensive off-season training program.

What’s next for robotic race cars? Adam Solomongrins: “This year was just a demo. I hear they’re hoping tomake this a race!” SV

Dr. Jason Bardis is a Mechanical Design Engineer for AllianceSpacesystems in Pasadena, CA. In addition to having three giant nuts from his three BattleBots championships, he designed many parts on the Phoenix Mars Lander’s trench-digging arm, which is currently “making its mark” on Mars.

54 SERVO 08.2008

Bardis.qxd 7/9/2008 1:07 PM Page 54

Page 55: servo2008 08

Over the years, I have built several robots of variousshapes and sizes. Most of them were controlled by a

microcontroller of one form or another. I have even built afew that were tethered to a desktop computer. It’s time tobuild a robust robot with an on-board PC computer. Thiswill not be a toy.

In this series, I am going to build two robots aroundthe RS-64 actuator: a six-wheeled robot utilizing six and athree-wheeled robot utilizing only two of them.

The code I use to control these motors will be isolatedinto a set of subroutines so that you may utilize other typesof drivetrains. For instance, you could use a brushless motorcontroller and motors as long as the routines to control thespeed and direction of the motors are named the same.This will allow you to plug them into this system withoutmodification. The same applies to most of the sensors that I am going to use. While I will be using Maxbotix sonar sensors, you should be able to make your own substitutionsas long as you work out the interface and return the distance to your objects in inches.

The reason I am going to build these two types ofrobots is simple. The cost of six RS-64 actuators is over$1,700. The cost for two is $570. The cost difference is thesame if you are using some other motor/controller system.The cool thing is that you should be able to build the three-wheeled robot, then later upgrade to the six-wheeled bot.

Unlike other projects that I built well in advance beforepublishing, this is going to be a work in progress. I will provide you with step-by-step instructions, as well as asource for all the components that I use, and even some

that I haven’t. I will show you various techniques andoptions along the way, so even if you don’t build the exact same robot, you should be able to use much of theinformation that I will provide. Let’s start by writing down afew requirements for the project.

PayloadThe first requirement is payload. It is important that

you look at this requirement early on in the design process.My robot will need to carry the following items:

• Main Controller — 5 lbs• Battery — 8 lbs• Robot Arm and Accessories — 3 lbs• Miscellaneous Extras — 1 lb

As you can see, based on my estimates I will need arobot that can carry 17 lbs in addition to the base, wheels,and actuators. You may have noticed that I set the maincontroller payload to 5 lbs. If you use a Pocket PC, then youwill only need to allocate 0.5 lbs. For a WinCE device, about1.5 lbs will be needed. What I am trying to say here is therewill be a large disparity in weights of various controllers.Keep this in mind.

SizeThe type of controller you use will determine the size

of your robot. If you are going to use a 17” laptop, you will

WARNING!Before you read any further, I feel it only fair to warn you that thisseries is going to be akin to a very fast roller coaster ride.

!

by Michael Simpson

SERVO 08.2008 55

Simpson1.qxd 7/8/2008 11:28 AM Page 55

Page 56: servo2008 08

56 SERVO 08.2008

probably need a much larger platform than you would for aPocket PC. If you create one large base, you can place allyour items at the same level. This give you easier access for modifications. In my case, I will size both robots to fit a small laptop, battery, robot arm, and various other electronics and sensors I might need. Better too large thantoo small.

Base MaterialsUse a material that is readily available and that you

have the right tools and skills for. I plan on using 1/4” hardboard. It’s cheap and easy to work with using bothpower and hand tools. You could use 1/4” acrylic, but it’sprone to cracking and a little harder to work with tools. Ilike a little compliance in my robot and the 1/4” hardboardwill be perfect. As an option, you could also use 1/4” pegboard. Something to keep in mind is that you will probably build a couple variations of your robot. Since thismaterial is so cheap, the cost of going back to the drawingboard will be low. Once perfected, you can always switchto a different material.

RunTimeI want my robot to be able to run for at least two

hours. The type of controller, motors, and batteries willdetermine this. I plan on using a 14-18V battery pack ratedat 12,000-14,000 mAh. This should give me plenty of runtime. This power source should allow you to power apocket PC or WinCE device, but at first glance it may seema little challenging to power a laptop. However, we won’tbe using the screen on the laptop so you should get threeto six hours with that turned off.

Terrain TypeThink about what type of terrain you plan to operate

your robot on. In my case, I want to run the robot onindoor surfaces such as tile or carpet. I also want to operatethe robot on my driveway, which is half paved and halfgravel. The wheel types, number of wheels, and groundclearance will affect the type of terrain you can traverse.

Processing PowerSince I am planning on using a PC, we should have

plenty of processing power to do just about any task. Eventhe WinCE and Pocket PC devices — while not as powerfulas the PC — will perform adequately. Each type PC, PocketPC, and WinCE device will have its own advantages and disadvantages. For instance, the WinCE device runs considerably slower than the PC, but has both power and weight advantages.

The PC with its USB 2.0 ports has the ability to interface with all components using one or moreUSB2Dynamixel interfaces. While the WinCE device does not have the ability to communicate with theUSB2Dynamixel, it does have an RS-485 interface that cantalk to the RS-64 actuators directly. For the Pocket PC, wewill have to create an RS-232 to RS-485 converter.

Again, these are very high level requirements and likeany project, are subject to change. For any robot project ofthis nature, it is important that you do some research onyour own. Here are a few factors that will affect the exactdetails of your project:

• Availability of Components• Availability of Tools• Availability of Funds• Availability of Skills

Let’s take a look at each of these in more detail.

Availability of ComponentsWhile I will provide you with a source of components

that I use on this project, you may or may not decide to use

FIGURE 1

FIGURE 2

Simpson1.qxd 7/8/2008 11:28 AM Page 56

Page 57: servo2008 08

them. If you decide to use different components, you willonly be able to use my instructions as a basic guide. Thiscould be as simple as using a different material for therobot base, which will probably only have minimal impacton the project. You could also decide to use a different programming language for the controller or even a different type of controller. In this case, none of the programs that I provide will work on your robot.

Availability of ToolsIf you are already into building custom robots, then you

most likely have some or most of the tools needed for aproject such as this. Later in this article, I will go over someof the tools that will be needed. So, what if you don’t havethe tools needed for a particular phase of the project? Doesthat mean you can’t build it? Absolutely not! You canalways ask a friend to help you out, or in some cases —such as building the main robot base — you may be able toget your local home center or hardware store to assist you.

Availability of FundsIf you decide to build the robots I present in this series

it will cost you $1,000 to $4,000 depending on the base,computer, and extras you plan on adding to your robot. Ifyou have an old laptop or Pocket PC, you could probablyget started for under $500.

Availability of SkillsIf you build the exact robot I present here and use the

code that I provide, you won’t need much more than basicmechanical skills. If, however, you plan on writing your ownprograms or using a different controller, you will need someprogramming skills. You will also need to be able to use asoldering iron. Contrary to popular belief, you don’t need to be a rocket scientist or an electronic engineer to build a cool bot.

Project OverviewIt’s time to give an overview of the project. At this

point, I won’t go into any of the actual technical or construction details. Think of it as anintroduction to the types of components, tools, and techniques I will be going over in more detail as the series continues.

BrainAs I mentioned previously,

there are three types of computercontrollers that I intend on using onmy robot. The first is a laptop running Windows Vista or XP. I recommend at least a 900 MHz

machine like the HP shown in Figure 1. The second type is aWindows CE device like the CUWIN3500 shown in Figure 2.It has a built-in touch screen that would allow us to providesome sort of human interface to our robot.

The third type is a Windows Pocket PC like the oneshown in Figure 3. I will be using an HP Pocket PC 2003device running at 600 MHz.

I plan on using Zeus for the programming language forthis project. With Zeus, you can create a program that willrun on the Windows PC, Windows CE, and Windows PocketPC platforms with little or no changes to the code. Zeus is avery simple Basic programming language with someadvanced features like built-in GPS processing.

In addition to the main controller, we need to accessour various sensors and motors through some sort of interface. For the XP based controller, we can use the USB device (the USB2Dynamixel) shown, in Figure 4. It’smanufactured by Robotis and sold by Crustcrawler.

Features of the USB2Dynamixel• RS-485 Interface Support• AX-12 TTL Serial Interface Support• RS-232 Interface Support• Shows up as a standard PC com port• Compatible with Windows 2000, XP and Vista• Several USB2Dynamixel interfaces can be used at once• Can be used as a limited USB to serial interface (does not

support control leads)• Built-in library for ZeusPro compiler

If you wish to create your own library using .Net, thefolks at Crustcrawler have developed a .Net Visual StudioProject that will give you a good start. You can downloadthis from their website.

To make life easier, I have added a new library to theKRMicros ZeusPro compiler. It is called USB2AX, and I willbe using it extensively throughout this series.

Since our ultimate robot will be using both RX-64and AX-12s, you will need two USB2Dynamixels attachedto your computer. There is a small switch on theUSB2Dynamixel interface shown in Figure 5. This switch isused to configure the interface for the type of bus thatyou will be using. For all your AX-12s, you will set theinterface to TTL. For your RX-64 and RX-28, set the switch

FIGURE 4

FIGU

RE 3

SERVO 08.2008 57

Simpson1.qxd 7/8/2008 11:29 AM Page 57

Page 58: servo2008 08

58 SERVO 08.2008

to RS-485. Each bus has its own special connector shown inFigure 6. The larger four-pin connector is used for the RX-64and RX-28 actuators. The smaller three-pin connector isused for the AX-12 and AX-S1 actuators and sensors.

Unfortunately, the USB2Dynamixel will not work onWindows CE or Windows Pocket PC devices so we will haveto use a different interface. What this means is that theWindows PC platform will be a little simpler to implementas the hardware interfacing to the various devices has beendone for us. If you plan on using a Pocket PC or WindowsCE device and have access to a laptop, I recommend building your robot with this controller first.

Base ConfigurationI was playing with the Dynamixel RX-64 actuator when

the idea for this project came to mind. The RX-64 shown inFigure 7 delivers a whopping 888 inch-ounces of torque. Itutilizes a RS-485 control system that allows you to daisychain and control up to 254 units. This actuator can run inservo mode or in continuous operation, and can reportposition, temperature, load, and input voltage. This will notonly allow us to detect collisions but the level of our batteries, as well.

The RX-64 has a full metal gear set and utilizes an axisbearing that will insure no efficiency degradation with highexternal loads. It also features an aluminum servo arm. Itsability to operate in full rotation mode makes it perfect forour drive train. It’s my plan to connect a 5.5” wheel to eachof six RX-64s in order to provide the best load distributionfor our base.

The RX-64 has a little brother called the RX-28 shownin Figure 8. The RX-28 has a much smaller footprint than itsbigger brother. It does, however, utilize the RS-485 interfaceand the same protocol so both the RX-64 and RX-28 can beplaced on the same bus. The features on these little gemsdo come at a price. The RX-64 will run you $285 per actuator. The RX-28 is a little cheaper at $200 each.

For the wheels, I plan on using the Du-Bro 550TVwheel shown in Figure 9. These wheels are 5.5 inches in

diameter and have pneumatictires. By adding or removing airfrom the tire, you can set theamount of traction or firmnessdesired. Later in this series, I will show you step-by-stephow to attach this wheel to the RX-64.

I will show you how tobuild a six-wheeled robot byattaching six of these wheels to six actuators. For the three-wheeled robot, we willattach two wheels to two actuators. This is a $1,140 difference in price, so it canaffect your ability to fund this project.

FIGURE 5

FIGURE 6

FIGURE 7

FIGURE 8

FIGURE 9 FIGURE 10

Simpson1.qxd 7/8/2008 11:29 AM Page 58

Page 59: servo2008 08

Robot ArmI want to add a small

manipulator. The manipulator Ihave in mind is the CrustcrawlerAX-12 Smart Arm shown inFigure 10. The Smart Arm utilizes seven AX-12 Dynamixelactuators. For more details,check them out at www.crustcrawler.com/products/smartarm/index.php?prod=12.

It is my plan to place somesensors on the arm, as well as aPocket PC like the one shownback in Figure 3. Even if I useanother controller, I think a facemounted on a Pocket PC controlled by the arm would bevery cool and invite a great amount of attention at the nextRobot Fest I attend.

ToolsBefore I close out this introduction, I think it’s

important that you understand what kind of tools you mayneed for this project. First, you will need both Philips andflat head screwdrivers. I recommend various sizes. Many ofthe machine screws I will use will be #10 and smaller, sosize your screwdrivers accordingly. A set of small wrencheswill also come in handy. In lieu of these, a small crescentwrench will suffice.

There is no way of getting away from it... you have tohave a drill for this project. As a minimum, I recommend anelectric drill like the one shown in Figure 11. Look for a drillwith both variable speed and reverse. If you get one with aclutch, you can use it to drive and remove screws. A drillwith a high/low gear option will give you more speed andpower options. There are times when a drill press like theone shown in Figure 12 will come in handy. They give youmore control over the drilling process and allow you to usevarious accessories like sanding drums. A drill press is not arequirement but may come in handy. Check out your localclassifieds. You may be able to get a bench top model for$15-$25. In addition to the drill, you will also need a set ofbits. You can purchase these one at a time or in sets.

In addition to the drill, I also recommend a rotary toollike the one shown in Figure 13. You can use this for drilling

small holes, but they excel at sanding and cutting. Manyrotary tools come with a complete bit set. There are many additional accessories available like cutoff wheels andvarious grinding bits. Again, this is not 100% required butcan make some tasks easier.

For the electronics, you are going to need a pair ofneedle-nose pliers and wire cutters. In addition, you willneed a soldering iron like the one shown in Figure 14.When purchasing a soldering iron, make sure you get one

FIGURE 11

FIGURE 13

FIGURE 14

FIGURE 15

FIGURE 12

SERVO 08.2008 59

Simpson1.qxd 7/8/2008 11:30 AM Page 59

Page 60: servo2008 08

60 SERVO 08.2008

with disposable tips. Two power settings will also come in handy. If the iron you purchase does not come with astand, you will need to get one. (I own a higher poweredsoldering gun but find that I never use it.)

While you won’t need a 25’ measuring tape, I do recommend a steel rule and set of calipers like the ones inFigure 15. I prefer the digital calipers with both inch andmm readings.

This project will require you to cut various small piecesof plastic or wood. The best tool for this job is the scrollsaw like the one in Figure 16. For instance, we will needto create a special wheel mount that is used for attachingthe wheel to the RS-64. This is a 2-1/4” disk and is easy tocut with a scroll saw. You can also use a small band saw.As a last resort, you could rough it out with a rotary tool,then sand it to the exact size with a sanding drum bit.

You don’t have to spend a lot of money on a scrollsaw. I have seen them on sale at Sears for as little as $49. If you are going to do a lot of robot building, I recommend including one in your arsenal of tools. I did a complete review of scroll saws back in the February ‘05

issue of SERVO Magazine.Once we start adding microcontrollers and sensors to

our robot, an oscilloscope will become invaluable to help usset up and test our components. The Hitachi oscilloscopeshown in Figure 17 is a 100 MHz, four-channel scope that I have used for years and it has served me well. Some PC-based oscilloscopes have recently become available andconnect through your USB port. This helps keep the price down and adds a few nice features. For instance, the Bitscope device shown in Figure 18 is not only a two-channel oscilloscope, it is also an eight-channel logicanalyzer. It can be used as a data recorder and is perfect ifyou need to make hard copies of your captured signals likethe one shown in Figure 19.

BatteriesProbably the heaviest piece of cargo

will be the battery. This will be used topower the wheel actuators, Smart Arm,and various electronics. Originally, I wasthinking of a 12V sealed lead-acid battery,but didn’t think this would be enough todrive the RS-64s for any length of time.

FIGURE 16

FIGURE 17

FIGURE 18

FIGURE 19 FIGURE 20

Simpson1.qxd 7/8/2008 11:31 AM Page 60

Page 61: servo2008 08

After much research, I decided on the use of an external laptop battery. These seem to have the bestweight-to-capacity ratio. The battery shown in Figure 20 will provide 19V at almost 5 amps (around 133 Wh). They are available from AtBatt.com and come with theirown charger and several tips to connect to various devices. I will be going into more detail on this as the series progresses.

What’s NextIn Part 2, we will start the base construction by build-

ing the wheel assemblies for both the six-wheeled andthree-wheeled robots. Well, that’s if for this month. Be sureto check out the Kronos Robotics website periodically forany updates to this project at www.kronosrobotics.com/Projects/megabot.shtml. SV

SERVO 08.2008 61

EX-106

Encoder164

EX-106 14.8

84 106

155

0.182 0.143

NEW

Visual StudioMicrosoft

C/C++

Visual Basic

C#

Dyynnamixxeel SDK

CrustcrawlerAX-12 Smart Arm — www.crustcrawler.com/products/

smartarm/index.php?prod=12

RS-64 —www.crustcrawler.com/motors/RX64/index.php?prod=67

USB2Dynamixel — www.crustcrawler.com/electronics/USB2Dynamixel/index.php?prod=65

USB2Dynamixel .net API — www.crustcrawler.com/electronics/USB2Dynamixel/software/Usb2Dynamixel.zip

AtBatt.comP133 External Laptop Battery —

www.atbatt.com/product/7901.asp

KRMicrosZeusPro — www.krmicros.com/Development/

ZeusPro/ZeusPro.htm

ZeusLite —www.krmicros.com/Development/ZeusLite/ZeusLite.htm

BitScopeBitScope Model 100 — www.bitscope.com/product/BS100/

Comfile TechnologyCUWIN3500 — www.cubloc.com/product/05_01.php

MaxbotixSonar sensors — www.maxbotix.com

SOURCES

Simpson1.qxd 7/8/2008 11:31 AM Page 61

Page 62: servo2008 08

62 SERVO 08.2008

The typical amateur robot is completely autonomous; its own

circuitry controls what it does andwhere it goes. That circuitry can be assimple as moving toward a light in theroom, or as complex as carefully mapping and navigating the roomusing vision and other sensors.

Yet, there is also plenty of call forthe remotely controlled robot. Such“telerobotics” are commonly used forpolice and military functions, and the vastmajority of combat robots are, in fact,controlled directly by human operators.The remote control link is typically viaradio frequency, but other means ofcommunications are used as well, suchas infrared pulses and even hard-wiring.

We’ll look at several popularremote control techniques in thisinstallment of “Robotics Resources.”

Robot Radio ControlRadio control uses the airwaves to

send and receive a signal. Thoughamong the most expensive remotecontrol technologies to use, radio controlis perhaps the most flexible in termsof range and the number of channelsthat can be operated in one signal.With the use of digital radio signals, forexample, it’s possible to communicatea nearly unlimited set of instructionsbetween you and your robot.

Radio communications can be usedin robotics for two primary purposes:

1) To command the robot, either com-pletely for all its discrete functions, or

to provide general commands forbasic operations, such as Run or Stop.General commands may also be usedto select and activate programs alreadyresident in the robot’s computer.

2) To receive data from the robot; usually either a video signal or someform of telemetry.

Radio links are common for discrete function control in combatrobotics. The operator of the robotuses a radio control (R/C) transmitterof a type similar to those for modelairplanes and cars (most such trans-mitters are outfitted with a frequencycrystal for land use, rather than airplaneuse). The operator controls joysticksand/or switches in order to steer orotherwise maneuver the robot.

Typical transmitters for model R/Capplications have four to six channels,with each channel operated by the twinjoysticks, a switch, or other knob on thetransmitter. At a minimum, three chan-nels are used: one each for the right andleft motors; and one for the weapon.

In some cases, it’s necessary toreceive signals from a robot. Video isa typical application for receiving aradio signal from a robot. Video transmitters and receivers that operatein the 2.4 GHz microwave range (suchas Bluetooth) are common and fairlyinexpensive. Range is limited to under200 feet outdoors, or from 20 to 50feet when used indoors.

When selecting a receiver and

transmitter for wireless data betweenyou and your robot, consider the following:

• Power output determines range.Depending on your country’s laws,higher power outputs may require certification of the device, or evenlicensing. In the US, most wirelessdata modems operate at a power output that does not require licensing.

• Range contributes to maximumdata rate. Data rates can be fastestover shorter distances, because thereceived signal is clearer. Over longerdistances, the data rate must bedecreased in order to reduce or eliminate errors.

• The right antenna can greatlyincrease range. Radio frequency signals radiating from a properlydesigned and mounted antenna willtravel further than signals from atransmitter without an antenna. Besure to use an antenna properlymatched for the transmitter you areusing — sometimes, it’s just a simplewire, but consult the documentationon how to position or wrap the wire.

• Use a compatible antenna on thereceiver. The same rules apply to thereceiver as to the transmitter. Be sureto consider the orientation of theantennas on the receiver and thetransmitter — if the units have stickantennas, avoid having one point upwhile the other points sideways.

Robotics ViaRemote Control

Tune in each month for a heads-up onwhere to get all of your “roboticsresources” for the best prices!

RoboResources.qxd 7/8/2008 11:00 AM Page 62

Page 63: servo2008 08

Bluetooth, ZigBee, andOther RF Modules

R/C transmitters and receivers are“channel” based; that is, on one fre-quency the transmitter controls a certainnumber of channels, with each channeldedicated to a specific function. In thetypical model airplane R/C transmitter,for example, a joystick controls the upand down action of a servo connectedto the plane’s ailerons. Another joystick controls the servo connectedto the plane’s rudder, and so on.

Data modems provide for completely digital communication. Ifyou have a laptop PC with a wirelessinternet connection or a Bluetoothheadset for your cell phone, you’realready familiar with modern datamodems. Common types of datamodems used in amateur robotsinclude Bluetooth and ZigBee (the lat-ter sometimes referred to as 802.15.4,after the international protocol thatdefines its standard). Both require aset of transceivers for sending andreceiving data along a two-way link.Depending on the specific device, effective communication range is hundreds of feet in free air; somewhatless indoors where walls, doors, andceilings may obstruct the signal.

Bluetooth and ZigBee modules canbe duplex or two-way — as opposedto R/C transmitters and receivers,which are only one way. Another plusin their favor is that they are based onindustry accepted standards and documentation on their use is widelyavailable from Internet sources andmanufacturers of the products.

There are a number of Bluetoothand ZigBee modules directly suitablefor robotics use, such as the ParallaxEmbeddedBlue Transceiver. All theyrequire is a power source and thedata is provided via a parallel, serial,or USB interface. Not all RF data modules use Bluetooth or ZigBee technology. There are a number of RFmodules that use other technologies,some standard like 802.1 (Wi-Fi) andsome proprietary. You can choose themodule best for your application

based on whether you need such features as longer range, true duplex(two-way) communication, ultra-smallsize, and so on. Check the Sources listing for several companies that spe-cialize in RF digital data transmission.

Alternatives to RFPurchasing an RF transmitter and

receiver module is one way to providea communications link between you andyour robot. In addition, several ready-made products can be hacked for theirRF systems and pressed into use asradio links between you and your bot.

• Walkie talkie. Many toy walkietalkies include a “code sender” buttonfor transmitting Morse code. By connecting the receiving to an ACcoupled interface and 567 tonedecoder, you can add simple on/offcontrol of your robot.

• Garage door opener. Try to find aused one that’s being discarded; theelectronics — the part you want — lastlonger than the mechanics. Hack thereceiver to work as an on/off controlfor your robot.

• “Keyring” (or keyfob) appliance control. You can purchase a radio controlled powered outlet at manydepartment and home improvementstores. Hack the module to work withyour robot. The transmitter is akeyring, with one or two buttons(some control several modules).

• Wireless car alarm kit. Two- andthree-function wireless car alarm kitscan be retrofitted for controlling arobot. You can find them at autoparts stores and weekend swap meets.

Infrared RemoteControl

A radio link isn’t the only way towirelessly control a robot. Anothertechnology for one- and two-way linksis infrared control. This system has thebenefit of low-cost hardware, and it’srelatively easy to interface to most

microcontrollers used in robotics.The major components of the robot

infrared remote control system are:

• Infrared remote. Most any moderninfrared remote control will work, but... remote controls vary considerably inthe signal patterns they use. You’ll findit most convenient to use a “universalremote control” (under $10 at adepartment store). Specifically, you wantthe universal remote to support SharpTVs and VCRs, of which 99.99% do.

• Infrared receiver module. The receiver module contains an infraredlight detector, along with various electronics to clean up, amplify, anddemodulate the signal from the remotecontrol. The remote sends a pattern ofon/off flashes of light; these flashes aremodulated at about 38-40 kHz, inorder to reduce interference from otherlight sources. The receiver strips out themodulation and provides just theon/off flashing patterns.

• Computer or microcontroller. Youneed some hardware to decode thelight patterns, and a computer ormicrocontroller, running appropriatesoftware makes the job straightforward.

In operation, you press a buttonon the infrared remote which sends acoded light signal to the receiver module. The receiver demodulates thesignal and extracts the code sent bythe remote control. The code is asequence of binary 0s and 1s, in thesame way a number or letter is repre-sented in a personal computer. Yourmicrocontroller interprets the binarysequences as a specific button thatwas pressed on the remote control.

Wired RemoteControl

Perhaps the simplest form ofremote control is the wired controller,such as an Atari, PC, or Playstationjoystick. These connect to your robotvia a set of wires. How you interfacethe controller to your robot dependson the type of control.

SERVO 08.2008 63

RoboResources.qxd 7/8/2008 11:00 AM Page 63

Page 64: servo2008 08

64 SERVO 08.2008

• An Atari style joystick is a simpleswitch contact controller. These areamong the easiest to interface to yourrobot. Push the joystick up and the Up

switch closes. Push it to the left andthe Left switch closes. You connectthe wires for each switch to a separate input pin on your robot’s

microcontroller and then read the pinas you would any switch closure.

• PC joysticks use potentiometers toproportionally measure the position ofthe joystick. There are a variety of waysof interfacing these to a microcontroller,including via an analog-to-digital inputpin (if the controller is so equipped),through a resistor and capacitor (asimple form of go/no-go analog meas-urement), or a 555 timer where theposition of the potentiometer changesthe pulse width and/or duration ofthe timer output. All three of thesetechniques are fairly well documentedon a number of websites; use Googleor Yahoo to search for “IBM PC joy-stick interface” (without the quotes).

• Playstation remotes use a controllerfor the Sony Playstation 2. You may usewired or wireless controllers. The controller outputs a complex digitaldatastream that needs to be decodedusing a microcontroller. Lynxmotion sellsa low-cost adapter cable for the PS2remote, so you don’t have to cut off theconnector and solder the wires directly.They also provide a programming tuto-rial on interfacing the PS2 remote withthe popular Basic Atom microcontroller.

SourcesIn addition to the sources listed

below, check out online and local hobbystore retailers that specialize in radiocontrol model airplanes and cars, whereyou can find numerous transmitter/receiver packages for operating R/Cservo motors via radio remote control.

Abacom Technologieswww.abacomdirect.com

Full resource of wireless communications technologies, including data modules (receivers,transmitters, transceivers), antennas,RF remote control, and more.

Bluetooth.comwww.bluetooth.com

Official Bluetooth technologyresource page. Includes several technical papers for downloading.

Abacom Technologies offers transmitters, antennas, and everythingin-between for radio communications.

Lemos International specializes in Bluetooth, ZigBee, and RF data modems,with numerous products in each category.

RoboResources.qxd 7/8/2008 11:01 AM Page 64

Page 65: servo2008 08

Digi-Keywww.digikey.com

General electronics online distributorwith selection of RF communicationsmodules (ZigBee, Bluetooth, etc.).

Innotech Systems, Inc.www.innotechsystems.com

Innotech Systems providesinfrared and RF remote controls andremote control systems. Some partshave a minimum order.

Jamecowww.jameco.com

General electronics online distribu-tor. Offers selection of Bluetooth andother RF communications modules.

Lemos Internationalwww.lemosint.com

Wide assortment of Bluetoothand other RF data communicationsproducts, including a compact USB-based Bluetooth module.

Linx Technologieswww.linxtechnologies.com

“Wireless made simple” technologies, including keyring transmitters and specialty RF modules.

Lynxmotionwww.lynxmotion.com

Offers a Playstation 2 controllerinterface connector, plus programmingtutorials for Basic Atom microcontroller.

Mouser Electronicswww.mouser.com

General electronics online distributorwith selection of RF communicationsmodules (ZigBee, Bluetooth, etc.).

Parallaxwww.parallax.com

Offers educational resource kitsfor exploiting RF communicationstechnology (e.g., Bluetooth), primarily inconjunction with the Parallax micro-controller product line, such as the BASICStamp. Also sells a starter kit for experi-menting with infrared remote control.

PC Remote Control (info page)www.pcremotecontrol.com

Products to control your PC via ahandheld remote control. Interface circuit examples and downloadablecommunications software.

SparkFun Electronicswww.sparkfun.com

SparkFun Electronics carriesa fairly extensive selection of

Linx Technologies provides everything from chip-level RF components to complete evaluation kits.

Among the hobby and experimenter’s boards from SparkFunis a wide selection of Bluetooth and ZigBee modules.

SERVO 08.2008 65

RoboResources.qxd 7/8/2008 11:02 AM Page 65

Page 66: servo2008 08

Bluetooth and ZigBee modules anddevelopment boards, with a variety of interfaces, including RS-232 serialand USB.

Xilor, Inc.www.rfmicrolink.com

Check out Xilor, Inc. for wirelessremote controls (both RF andinfrared).

ZigBee Alliancewww.zigbee.org

ZigBee Alliance is the official

resource page for the ZigBee productstandard. SV

Gordon McComb can be reached viaemail at [email protected]

CONTACT THE AUTHOR

Electronic Parts & Supplies Since 1967

www.c-stamp.com

LO

W C

OST!

CONTROLLERS & ROBOT KITS – SENSORS – DISPLAYS

Free

Expert

Technical

Support

1 (800) 985-AWIT

Ea

sy t

o C

on

ne

ct

LO

W C

OST!LOW COST

Professional SW Dev. Tools

For the finest in robots,

parts, and services, go to

www.servomagazine.com

and click on Robo-Links.

66 SERVO 08.2008

RoboResources.qxd 7/9/2008 2:42 PM Page 66

Page 67: servo2008 08

With all the various programmers, tools, andcompiler options though, he

was getting confused. He wanted tobe able to program blank PICs, notanother company’s chip where youhave to buy from a limited number ofsources. This ruled out the BasicAtom, the PICAXE, and a few others.What I hope to show you in this article is the same thing we emonstrated to the high school. You can put together a great starterpackage for under $25 using mostlyfree samples and free downloads from the Internet.

RequirementsThe BS1 has an 80 command

limit, but the high school teacher stated that many of the projects hisstudents worked on were very simpleand didn’t require a lot of code space.On the other hand, he wanted anupgrade path to offer more space anddefinitely more speed to his advancedstudents. He also wanted to be ableto access the PIC’s built-in features

such as A/D and timers. As a simpletest, he asked if we could recommenda package and offer a simple examplefor driving an LCD module as a basicdemonstration. This took many linesof code in the BS1, so he either neededto use an expensive serial LCD moduleor move up to a larger part like theBS2 to do more with it. He stated thathe’d seen sample code with a singleLCD control command that simplifieddriving an LCD and wondered if thePIC had that option built in. That wasthe challenge he placed before me.Based on these requirements, Itold him that we could show himan LCD example with very littleeffort, using a BASIC compilerthat will easily convert over hisexisting code and offer an easyupgrade path to full professionalPIC programming for his students down the road. He was very interested so he wantedmore detail.

Package DetailsThe package I put together

for him involved several key components:

• PICBASIC PRO compiler, sampleversion

• MicroCode Studio IDE• EZPIC JDM style serial port

programmer• WINPIC programmer software• PIC16F690 microcontroller plus

4 MHz resonator with capacitors• 2x16 LCD module• Breadboard and wires

A high school teacher recently sent me an email asking for advice on the bestpath to move from the BASIC Stamp 1 (BS1) module to Microchip PICs. He hadhis students programming the BS1 Project Board (Figure 1) which is a very niceboard for the price. He was happy with that board as an entry point, but the next

step in the BASIC Stamp world was moving to the BS2 Homework Board, which isa $45 development board. He hoped to keep it below $25. He thought maybeprogramming a PIC microcontroller directly might be the best option since the

BS1 is based on that same family of microcontroller ...

FIGURE 1. BS1 Project Board.

Moving From BS1 to PICby William Smith

SERVO 08.2008 67

BasicBoardRobotics.qxd 7/8/2008 10:38 AM Page 67

Page 68: servo2008 08

68 SERVO 08.2008

• 4.5V battery pack

This project ended up goingbeyond the $25 range, but onlybecause I included all the componentshe needed along with the breadboard, LCD, and battery pack.Those were not part of his original“under $25” description. I put togetherthe demo unit and the sample package and sent it to him. He wasvery pleased with the results, so Ithought I’d share this with the readersof SERVO, as well.

I’ll step through the details.

PICBASIC PROSample Version

The PICBASIC Pro compiler (Figure2) was selected for the compiler part

of the package. It is very easy to useand a great language for someonejust getting started. It uses the sameformat as the BASIC Stamp PBasic language but produces a binary file soyou can program blank PICs. ThePICBASIC Pro compiler has advancedover the years to become just as powerful as any other “professional”compiler. What helped with the package was the fact that you candownload a free sample version ofthis compiler from http://melabs.com/pbpdemo.htm.

The sample version is limited to 31commands but that is more powerfulthan it sounds. Many of the featuresyou want such as driving an LCD orreading a potentiometer with an analog-to-digital port are reduceddown to a single command. That leavesa lot of space in the 31 commands forother things. A sample LCD example Isaw in the BS1 application notes took27 command lines to drive an LCD.That is a lot of space in the BS1 80command limit. I knew this would bethe product for the school.

MicroCode Studio IDEPICBASIC Pro is just a compiler,

though. It needs a developmentscreen to make it easier to write thesoftware. The BS1 has a very niceinterface with a single click compile

and program button. The MicroCodeStudio software handles this for you.You can download this from theauthor at www.mecanique.co.uk/code-studio/index.html, but youdon’t have to because the MicrocodeStudio installation is included with the PICBASIC Pro file you download.When you install the PICBASIC PROsoftware on your computer, it willautomatically offer to install theMicroCode Studio software, as well.After it is installed, you will be set upto write your first program.

Figure 3 shows the MicroCodeStudio screen with the LCDsample.bascode created for the demonstration.

PIC ProgrammerOnce you write the program

and compile it with PICBASIC Pro, you need to send it to the PIC microcontroller. This requires special hardware known as a PIC programmer.The BS1 doesn’t require this since itreceives the tokenized code through aserial connection. Most of the customchip options (like Basic Atom andPICAXE) do something similar withsoftware known as a bootloader.

In the early days of PICs, the hardware programmer was severalhundred dollars. This prompted hobbyists to design their own. Theoriginal “Tait” design was created by aguy named David Tait. His design wasreproduced and sold by many peoplefor years. The Tait design required aparallel port and a high voltage source(16V) to program a PIC.

One of the more popular designsto follow was the JDM design by JensDyekjær Madsen that powers itself offthe PC’s serial port which eliminatesthe need for an external 16V supply.Some laptops don’t offer enough voltage on the serial port, so it is recommended to use the JDM programmer on a desktop PC. This wasnot a problem for the high school asthey were using desktop PCs already.

There are a lot of variations to theJDM design. You can get schematicsand board layouts with a simpleGoogle search of “JDM Programmer.”Beginnerelectronics.com offers aprogrammer kit for $19.95 designed

FIGURE 2. PICBASIC Pro Basic Compiler.

FIGURE 3. MicroCode Studio IDE.

BasicBoardRobotics.qxd 7/8/2008 10:38 AM Page 68

Page 69: servo2008 08

around the JDM programmer withsome modifications. The assembledprogrammer is shown in Figure 4.

This kit makes a great solderingproject for the student that will laterserve as the main programming toolfor using blank PICs in place of theBS1 board. You don’t have to rely on this particular kit either. There are other JDM style programmersavailable from various sources, including many different versionsoffered on eBay.

Programmer SoftwareIn order to use the JDM

programmer, you need software foryour computer to send the PICBASICPro created file to the PIC micro-controller. There are a few choicesavailable but our choice is the WINPICsoftware that can be downloaded forfree from www.qsl.net/dl4yhf/winpicpr.html. This software workedthe best with the MicroCode StudioIDE based on limited testing. Thesetup in MicroCode Studio is very easyalso, so the user can create that oneclick compile/program feature.

When MicroCode Studio is running, you set up the winpic.exesoftware by clicking on the menuoption; View —> Compiler andProgrammer Options to get the window in Figure 5. Next you have toclick on the “Programmer” tab to adda new programmer. You will see thewindow in Figure 6 appear. Select the “Create custom program entry”and click Next.

The “Add New Programmer” window will then pop up (Figure 7).This is where you enter the name youwant to describe the programmer. I chose “winpic” in this example tomatch the software being used but

you can name it EZPIC or anythingelse you desire. After that, you clickNext to move on. The window inFigure 8 is where you enter the executable file name for the programmer. This time, you have toenter “winpic.exe.” Once again, clickNext to move on.

The window in Figure 9 willappear and this is where you tellMicroCode Studio where to find thewinpic.exe software on your computer.I suggest you click on the “FindAutomatically” button to allowMicroCode Studio software to find it.Or, you can click on “Find Manually” if you know exactly where you put the file. Finally, the next window in Figure 10 is where we enter the setupparameters for the WINPIC softwareto automatically read the device andprogram the PIC when you click onthe compile&program button inMicroCode Studio. Set it up with thefollowing line “/device=PIC$target-device$ $hex-filename$ /p /q=5.”(Note the whole line doesn’t show up in Figure 10).

These steps we’ve covered willallow you to write the software andprogram the microcontroller, but nowwe need to select that microcontroller.

PIC MicrocontrollerFor the microcontroller, I

recommended the PIC16F690 mainlybecause it has all the features you

could want in a PIC microcontrollerand it’s supported by the sample version of PICBASIC Pro. The part canhandle a lot more than the 31 command limit with its 7K byte program memory, but it’s a commonpart that is easy to find on eBay,Mouser, or even get a few free samples from www.sample.microchip.com. I recommended theDIP version which is part numberPIC16F690-I/P.

There are many free code examples included with the PICBASICPro sample version. You need to modify some of those sample programs though, to use them withthe PIC16F690. I’ll show you what Imean in the sample code coveredhere. The PIC16F690 has an internaloscillator and also an internal MCLRpin pull-up resistor so all you need is

FIGURE 4. JDM EZPIC Programmer(assembled).

FIGURE 5. Compile and ProgramOptions Window.

FIGURE 7. Add New Programmer Window. FIGURE 8. Programmer Executable Window. FIGURE 9. Programmer Path Window.

FIGURE 6. Add New Programmer Window.

SERVO 08.2008 69

BasicBoardRobotics.qxd 7/8/2008 10:39 AM Page 69

Page 70: servo2008 08

70 SERVO 08.2008

power and ground connections tooperate. To create the demonstrationunit for the high school, we used oneof our breadboards from BeginnerElectronics.com. The breadboard circuitry included the power connections and the connections tothe 2x40 LCD per the schematicshown in Figure 11. We had a largebox of brand new surplus 2x40 LCD’savailable, so we did the demo with

that LCD. (The same software willwork with any two line LCD.)

The software is shown in Listing1. The first section that has all theDEFINEs is required for the way wewired up the LCD. This shows how thePICBASIC Pro compiler handles thesetup in the background to make the code easier to write. The finalexample took 23 command lines, butif we used a different PIC and usedthe default DEFINE settings, then wecould remove the DEFINEs and theprogram reduces down to 13 lines.We are also writing to the LCD severaltimes within those 13 lines so this is more efficient than other BS1 examples I saw.

The unique section of the coderequired to use the PIC16F690 are thespecial register setups shown below.The sample programs may need thesesame lines of code. These settingsmake the pins digital instead of thedefault analog mode. They also shutoff the internal comparator that is onthis part.

‘ Set A/D ports 0-7 as digitalANSEL = 0‘ Set A/D ports 8-10 as digitalANSELH = 0CM1CON0 = 0 ‘ Comparator 1 offCM2CON0 = 0 ‘ Comparator 2 off

The rest of the program is fairlysimple to understand so I won’t gothrough it all. The point is the codewas short and simple enough to fitwithin the 31 command limit withmore space for a few more functions.

What Does All ThisCost?• PICBASIC PRO compiler, sample

version (free)• MicroCode Studio IDE (free)• EZPIC JDM style serial port

programmer ($19.95 kit)• WINPIC programmer software (free)• PIC16F690 microcontroller (free

sample)• 2x40 LCD module ($5.00 special at

BeginnerElectronics)• Breadboard and wires ($12.95)• 4.5V battery pack ($3.00)

FIGURE 10. Programmer ParametersWindow.

Listing 1. PIC16F690 Driving2x40 LCD Software.

BasicBoardRobotics.qxd 7/8/2008 10:39 AM Page 70

Page 71: servo2008 08

If you take out the LCD and batterypack since those aren’t included withthe BS1 project board either, you endup with a total cost of $32.90. Oddsare if you do any electronic work though, you already havea breadboard so taking that out of the equation, the totalcost is $19.95 to get started programming blank PICs inBasic. We sell the programmer assembled for $24.95 soeven if you choose to bypass the kit path, then we still met the $25 target. Figure 12 shows the final package werecommended for those who want to move from the BS1to the PIC. We’ve decided to offer this kit on our website at www.beginnerelectronics.com for anybody getting started. We also plan to include a discount coupon for thefull version of the PICBASIC Pro compiler to make that transition less expensive. Check it out if you get a chance.

ConclusionAt the end of our discussion and review of the LCD

demo, the high school was pleased to have such a simpleoption. The PICBASIC Pro compiler’s many sample programswere a bonus that only required some modifications for thestudents to use directly. We suggested they make a seriesof homework projects to convert those files to fit thePIC16F690. You could do the same to create a library ofcode. This package didn’t stop there, either. The PICBASICPro sample version also supports the eight pin PIC12F683and the 14 pin PIC16F688, along with a few 18, 28, and 40 pin parts. This gave the students several choices if theyneeded a smaller or larger pin part.

The best part of all is the teacher could order one copyof the PICBASIC Pro compiler full version and put that onhis computer. When the students needed more space for

their program, they could use the same language but getmore command lines by taking turns working on theteacher’s computer.

The jury is still out if this will be their final choice, but ifyou are just getting started building a robot or electronicgadget of some kind that needs a microcontroller, I hopewhat we put together for the high school will also help youas you try to make the transition from Stamps to PICs inyour home lab. SV

FIGURE 11. LCD/PICHardware Schematic.

FIGURE 12. PIC Starter Package.

microEngineering Labs — www.melabs.com

Beginner Electronics — www.beginnerelectronics.com

MicroCode Studio — www.mecanique.com

WINPIC Software — www.qsl.net/dl4yhf/winpicpr.html

Microchip Technology, Inc. — www.sample.microchip.com

Resources

SERVO 08.2008 71

BasicBoardRobotics.qxd 7/8/2008 10:39 AM Page 71

Page 72: servo2008 08

72 SERVO 08.2008

Page72.qxd 7/9/2008 4:29 PM Page 72

Page 73: servo2008 08

Robot Builder’s Cookbookby Owen Bishop

This is a book forfirst-time robotbuilders, advancedbuilders wanting toknow more aboutprogramming robots,and students in further and highereducation tacklingmicrocontroller-based practicalwork. They will all find this book a uniqueand exciting source of projects, ideas, andtechniques to be combined into a widerange of fascinating robots. $29.95

FIRST Robots: Rack 'N' RollBehind the Design

by Vince Wilczynski / StephanieSlezycki

The second annualbook highlighting the creativity and processbehind 30 winningrobot designs from the 18th annual international FIRSTRobotics Competition.The FIRST organization,founded by Dean Kamen (inventor of theSegway), promotes education in the sciences, technology, andengineering in collaboration with sponsorsincluding Motorola, Xerox, NASA, Delphi,General Motors, and other companies invested in science education. $39.95

Build Your Own Humanoid Robots

by Karl WilliamsGREAT 'DROIDS, INDEED!

This unique guide tosophisticated roboticsprojects bringshumanoid robotconstruction home tothe hobbyist. Writtenby a well-known figurein the robotics community, Build Your OwnHumanoid Robots provides step-by-stepdirections for six exciting projects, each costing less than $300. Together, they formthe essential ingredients for making yourown humanoid robot. $24.95*

We accept VISA, MC, AMEX,and DISCOVER

Prices do not include shipping and may be subject to change.

The SERVO WebstoreAttention Subscribers ask about your discount on prices marked with an *

LookLookWWhathat’’ssNeNeww

Forbidden LEGO by Ulrik Pilegaard / Mike Dooley

Build the ModelsYour ParentsWarned You Against.

Forbidden LEGOintroduces you tothe type of free-style building thatLEGOs masterbuilders do for funin the back room. Using LEGO bricks in com-bination with common household materials(from rubber bands and glue to plasticspoons and ping-pong balls) along withsome very unorthodox building techniques,you’ll learn to create working models thatLEGO would never endorse. $24.95

SERVO 08.2008 73

SERVO MagazineBundles

Published by T & L Publications, Inc.

$57per bundle

Save $10off thenormalprice!!

Now you can get one year’s worth of allyour favorite articles from SERVO Magazine

in a convenient bundle of print copies.Available for years 04, 05, 06, and 07.

Robotics Demystifiedby 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 effectiveand totally painless way to learn about thetechnologies used to build robots! $19.95

RobotProgrammer's

Bonanza by

John Blankenship,Samuel Mishal

The first hands-onprogramming guidefor today's robot hobbyist!Get ready to reach into your programmingtoolbox and control a robot like never before!Robot Programmer's Bonanza is the one-stopguide for everyone from robot novices toadvanced hobbyists who are ready to gobeyond just building robots and start programming them to perform useful tasks.$29.95

NNEEW!W!

WebstoreAug08.qxd 7/9/2008 4:25 PM Page 73

Page 74: servo2008 08

Linux Roboticsby D. Jay Newman

If you want your robotto have more brains thanmicrocontrollers candeliver — if you wanta truly intelligent,high-capability robot —everything you needis right here. LinuxRobotics gives you step-by-step directions for“Zeppo,” a super-smart, single-board-powered robot that can be built by anyhobbyist. You also get complete instructions

for incorporating Linux single boards intoyour own unique robotic designs. No programming experience is required. Thisbook includes access to all the downloadable programs you need.$34.95

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. Limited time offer. Call 1-800-783-4624.

FREE!FREE!

with anywith any

purchase purchase

over $100over $100

From HomoSapien to RoboSapien Before R2D2 there was R1D1

Oil prices gettingto you, too?!Stay home,

read a book.The online storThe online store @e @

wwwwww.ser.ser vvomagazineomagazine .com.com

To order call 1-800-783-4624

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

74 SERVO 08.2008

The Amateur Scientist 3.0 The Complete Collection

by Bright Science, LLCThere are 1,000 projects on this CD, notto mention the additional technicalinfo and bonus features. Itdoesn’t matter if you’rea complete novice looking to do their firstscience fair project or asuper tech-head gadgetfreak; there are enough projects on the single CD-ROM to keep you and 50 of yourfriends busy for a lifetime! $26.99

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 purposes exactly, because youdesigned it. Written by an accomplishedworkshop bot designer/builder, this bookgives you everything you need. $34.95

Phone-in

orders only!

SERVOMagazineT-Shirts

For men and women

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

WebstoreAug08.qxd 7/9/2008 4:27 PM Page 74

Page 75: servo2008 08

PROJECTS

Recently named as one of the Best Inventions of 2006 by Time Magazine, the H-racer is nowthe best selling fuel cell product in the world. The H-racer is a micro-version of what engineersand scientists have been dreaming about for real cars: combining hydrogen with oxygen togenerate a DC current to power an electric motor. Unlike a gas-powered car engine, the only

byproducts of this electrochemical process are electricity, heat, and pure water. With the H-racer, you can witness the power of new energy technology in the palm of your hand.Horizon has created this unique, patented miniature fuel-cell car and hydrogen refueling station.All you need to do is add water. Only $115.00 plus S/H

BACK ROOM SPECIALS

With this kit, you now can see andfeel the future of energy generationin your own hands!

Bionics for the Evil Geniusby Newton C. Braga

THE EVIL GENIUS TACKLES BIONICS! Step into the future -- (orthe past, if you have atouch of Dr. Frankensteinin your soul) -- with these25 incredibly cool bionicexperiments!Demonstrating how lifeforms can be enhanced, combined, manipulated, and measured with electronicand mechanical components, these inexpensive projects from internationallyrenowned electronics guru Newton Bragaprovide hours of fun and learning. $24.95 Sale Price $ 22.95

Or order online www.servomagazine.com

SERVO 08.2008 75

Fuel Cell Projects for the Evil Geniusby Gavin D J Harper

FUEL YOUR EVILURGES WHILE YOUBUILD GREEN ENERGY PROJECTS!Go green as you amasspower! Fuel CellProjects for the Evil Genius broadensyour knowledge of thisimportant, rapidlydeveloping technology and shows you howto build practical, environmentally consciousprojects using the three most popular andwidely accessible fuel cells!$24.95 Sale Price $ 22.95

The Definitive Guide to Building Java Robots

by Scott PrestonThe Definitive Guide to Building Java Robots is for educators, students, hobbyists,and startups lookingfor Java/hardware interaction. This bookshows you how to useyour PC to buildrobots, and how youcan interface with amicrocontroller to dothe basics. You’ll learnto design your robot to navigate, see, speak,recognize your face, listen to you, and buildmaps. $55.95 Sale Price $ 47.95

123 Robotics Experimentsfor the Evil Genius

by Myke PredkoIf you enjoy tinkering inyour workshop and havea fascination for robotics,you’ll have hours of funworking through the 123 experiments found in thisinnovative project book.More than just an enjoy-able way to spend time,these exciting experiments also provide asolid grounding in robotics, electronics, andprogramming. Each experiment builds on theskills acquired in those before it so youdevelop a hands-on, nuts-and-bolts understanding of robotics. Sale $22.95

TThhee SSEERRVVOO BBUUDDDDYYKKIITT

An inexpensive circuit youcan build to control a servowithout a microcontroller!For more information,please check out your

May 2008 issueor go to our website @

www.servomagazine.comSubscriber’s Price $$3399..5555

Non-Subscriber’s Price $$4433..9955PPCCBB iinncclluuddeess aarrttiiccllee rreepprriinntt..

H Racer video clips can be found in the on-line store product descriptions!!

NNEEW!W!

BBuuyy bbootthh tthheessee bbooookkssttooggeetthheerr iinn tthhee mmoonntthh

ooff AAuugguusstt 22000088

and

aanndd ssaavvee 1100%% ooffff tthhee lliisstt pprriiccee.. PPlluuss ggeett ffrreeee sshhiippppiinngg iinn tthhee UUSS!!!!

CCaallll 880000 778833--44662244 oorr oorrddeerr oonnlliinnee @@ wwwwww..sseerrvvoommaaggaazziinnee..ccoomm

LLiisstt PPrriiccee $$2299..9955 SSaallee PPrriiccee $$ 2266..9955 LLiisstt PPrriiccee $$3399..9955 SSaallee PPrriiccee $$3355..9955

The LEGO Mindstorms NXT Idea Book

Building Robots with LEGO Mindstorms NXT

SSAAVE 10% plusVE 10% plusGET FREEGET FREE USUS

SHIPPING!SHIPPING!

WebstoreAug08.qxd 7/9/2008 4:29 PM Page 75

Page 76: servo2008 08

The real world, what a place! Thesmell of freshly mowed grass, the

breeze against my face, textures, colors, shapes. The real world isincredibly compelling to us. Life, fromplants to animals to other humans,has an incredible draw for us. We’vebeen finely optimized to survive in thereal world. Looking at a beautifullyrendered apple on a screen is a treatfor me, having been a part of thecomputer graphics community forlonger than I care to remember. Butholding, touching, and biting into the apple in my hand is an entirely different experience. Primal and glorious, a feast for my senses.

Though I started out in a machineshop, much of my work life has beenspent in the virtual world. The journeyback to the physical world has beenvery interesting. This, I think, is one ofthe attractions of robotics. RodneyBrooks showed us how to get robotsout of their heads and into their bodies. The real world became themodel; reactions were faster and subsumption provided an inkling ofthe robustness that we see in nature.It was hard not to see cockroaches ina whole new light.

When we strive to create robotsthat can exist in the same messy, ever-changing, complicated world thatwe live in, we are faced with tremendous challenges. And throughthe process of solving these

challenges we get back somethingvery precious in return. We get toexperience awe. In some ways, it isthe childlike awe of a thunderstormbut now we have ‘knowing’ mixed in.

Last summer, I was working on avision problem related to navigation. A tremendous amount of processingpower is required to deal with theper pixel optic flow algorithms that Iwas exploring. Then a fly swept in,neatly avoiding my hand and landingon the edge of my cup — all this in a breeze.

Before my robotics adventures,that fly was just a nuisance to be eliminated. Now I sit amazed by thisself-contained, autonomous creature.It runs on garbage, procreates, navigates using optic flow, and aerobatically escapes predators.Understanding how hard these thingsare to do, I’m left in a state ofinformed but profound awe.

A diverse collection of folks havegathered at Ugobe to tap into bits ofthis inspiring experience of ‘creating’life. Part of the fun of robotics is thatyou get to work with people withvastly different skills. David Calkinscaptured this perfectly in his column(SERVO, June ‘08), “What the Heck isa Robot, Anyway?” The need for us to stretch to understand each other is hard, but once you get through itthe teams are incredible, eclectic, and electric.

Just to give you a taste of this,here are a few of the crafts and disciplines to be found at Ugobe: illustrators, sculptors, animators,model makers, CAD operators,firmware engineers, electronic engineers, computer scientists, performance artists, ethologists, cognitive scientists, synthetic biologists, voice talent, recording engineers, mechanical engineers, writers, testers, spouses, children,cats, and dogs.

Life Forms

At Ugobe, we are working towardrobotic technology that can capturesome of the key elements of life atthe level of a non-human animal.While I’m a great admirer of DavidHanson’s work on conversationalhumanoid robots, we’ve initially set our sights a bit lower on the evolutionary ladder. From a technicalstandpoint, even creating a realisticrobotic mouse is beyond the currentstate of the art. With our life forms,we are working to advance the levelof realism and autonomy of our creatures while still making themaccessible to a wide audience.

Human-robot interaction is avery active field right now. Manyprojects in this area are examiningthe role of affect and the underlyingemotion models. One of the problems

The GreatestPlayground of All

by John R. Sosoka

76 SERVO 08.2008

Appetizer.qxd 7/9/2008 1:47 PM Page 76

Page 77: servo2008 08

in these studies is the lack of aplatform that can express emotionsand intent while providing a richarray of sensory interactions. Wehave been providing a small numberof Pleos (our robotic dinosaur) to universities for use in these studies.This exciting work at UC Berkeley,Georgia Tech, MIT Media Lab, andother institutions will help our largerrobotics community to better understand how robots and humanscan interact.

An interesting thought to ponder is that, for most of humantime, animals were the primarynon-human “robotic technology.”Humans have developed a specialworking relationship with manyanimals such as horses and dogs.The easy and robust interactionbetween a human and a serviceanimal is strikingly different fromthe typical human-computer interaction. Much of our technologyinterface design is centered aroundtelling our technology exactly whatto do and how to do it in the current specific situation. Yet ourinterface with a horse or dog ismostly about executing against ashared understanding of what each will do in a wide variety of situations. Typically, commands onlyneed to occur when there is anexception to the expected action.Often, complex behaviors can beinvoked with motions as subtle as anod. What does this suggest for thefuture of human-robot interaction?

Education

An important challenge thatwe face today is providing aninteresting space to encouragekids to pursue technical andengineering studies. Robotics hashelped with programs such asFIRST and BEST. Yet there are a lotof technically savvy kids who arenot interested in the constructionand competition aspects. As therobotics community expands toencompass more character-basedrobots, there is a new opportunityto pull kids in with performanceart and synthetic personalities.These opportunities may be just

the thing to keep kids engaged asthey cross the “middle school divide”where so many shy away from technology studies.

Our Place

Robotics at this moment in timeis incredibly exciting and diverse.We have the chance to bring ourcreations to “life” in the real world.They must cope with all the richnessand complexity of our messy world.

We can create their personalitiesand give them autonomy. They cansense beyond the range of humanperception and communicateacross the world. And all the whilewe have the opportunity to workin this renaissance environment,frantically grabbing ideas fromdozens of fields. Each day we arelearning things that, in any other job, we’d rarely discover. For me, and I hope for you, this is the greatest playground of all! SV

SERVO 08.2008 77

Appetizer.qxd 7/9/2008 1:50 PM Page 77

Page 78: servo2008 08

78 SERVO 08.2008

I’ve written recently about howrobots have changed over the years

from a historical perspective, but nothow we’ve actually constructed them.Let’s face it, robot stores were certainlynot around 40 years ago, and eventoday, there are only a tiny fraction ofthe stores we’d like to see for ourrobot experimenting as compared withcomputers. There are hundreds ofthousands of computer stores andcompanies around the world but onlya few actual robot stores, and less thana hundred robot companies that dealwith robots for the experimenter. Mostof those companies here in the US andCanada advertise in the pages of SERVO.

As I mentioned in my previouscolumn, we keep hearing about thearrival of the ‘robotics age,’ but manyseem to find that it really is not here,but just around the corner. Militaryrobots, insect-like walking andhumanoid robot kits, and even floor-sweeping Roombas now seem a bitblasé. Some experimenters are alreadyhanging up their soldering irons towait for the next killer app to comealong in another field.

We want working robots right out of the box or an easy-to-assemblekit. The creativeness of electronicsenthusiasts seems to be history. It’s ashame that some are changing theirinterests to other areas of science.Though the economy has taken a dip,robotics truly is making amazingstrides. A great example is Sony’sonce-shelved Aibo that is slated tomake a comeback this year.

Magazines such as SERVO, Nuts &

Volts, and the like, still have greatschematics and circuit board layouts,but the pages of most popular magazines that used to feature build-it-yourself articles no longer haveconstruction articles for mechanicalprojects. Building a desk or gardenshed from scratch is frequently featured in many magazines, but nothow to build a garden tractor or othermechanical projects. Certainly thereare crafty people still around such asthe stars of Myth Busters, but theyare a minority it seems these days.Possibly the slow economy and resulting tightened budgets will resurrect the creative bent in us sothat home-built robots will once againbecome popular.

Building Robotsin the ‘50s

We take for granted all themotors, sensors, high power densitybatteries, and microcontrollers that are contained within today’sexperimental robots. The model airplane servo that so many buildersuse as the base of their robot designswas still in the future 60 years ago. Inthose days — besides a lucky find at awar surplus store — it was hard for arobot experimenter to find good parts.Some of the best sources for robotparts were old appliances such aswashing machines, food mixers, electricfans, refrigerators, record players, and115 VAC power tools. Cars had fans,windshield wiper motors, and variouswiring harnesses. Bicycles had neat

chains, bearings, gears, and evenhardened steel spokes. Boats and boatmotors had some great parts forrobots. Hardware stores had hinges,door and cabinet hardware, plumbingitems, shafts, and threaded rod stock.

Some of the very best parts camefrom jukeboxes and pinball machines.Anything with parts that could bemoved usually had something that wasuseful to robot builders. Growing upin a small town (Mount Olive, NC), myrobot parts sources were empty coffeecans and heating duct sections forrobot shells, plywood structures, andvarious weird things from junkyards. Ialso had access to jukebox parts andother surplus things my brother got inthe big city of Raleigh. When I latermoved to Long Beach, CA near LosAngeles, I was in robot builder’s heaven.

Notice that I did not mention anysort of electronics. Of course, therewere no computers and therefore, noprinters, hard drives, and other similaritmes. Certainly there were no microcontrollers or ready-built motordrivers available to experimenters.Office machines usually consisted oftypewriters, mimeograph machines,and various types of adding machines,and had little usable parts for robots.Entertainment electronics back thenwere radios, TVs, movie projectors,phonographs, and associated amplifiers and speakers for theseitems. Most electronic products werehand-wired from point-to-point andlarge capacitors, transformers, andother components could be removedfor projects. The robot experimenter

TThheenn NNOOWW an

d

ROBOTS — HOW WE’VE BUILTTHEM OVER THE YEARS

b y T o m C a r r o l l

Then&Now.qxd 7/8/2008 4:33 PM Page 78

Page 79: servo2008 08

was usually left to his or her ownimagination when it came to usingthese types of parts for robots.

Early Robot DesignsRobots were frequently built upon

plywood bases, held together withwood screws, nails, and glue in the ‘50s.Most of the earlier robotic creationswere fairly large so wood seemed natural for the shells of robots. Therewere few sources for aluminum angleextrusions so most people used steelfor the inner structures. Wheels mayhave come from lawn mowers, theoccasional scooter, large toy, or rollerskates. Most motors available toexperimenters were not geared downso belt and chain reduction systemsconnected the motors to the wheels.Many of the early robot designs usedthe ‘Ackermann’ type of steering thatis used in all cars instead of the differential type of steering populartoday in robots. In this configuration,the back (or front) wheels were usedfor forward or reverse movement andtwo of the wheels were connectedtogether to steer right or left byanother ‘steering’ motor. Sometimes asingle wheel was steered by a steeringmotor and that single wheel couldalso be powered by a drive motor.Figure 1 shows Grey Walter’s Elmerrobot and the gears that drive thefront wheel in this configuration.

Good old Gilbert ‘Erector Sets’had some of the best parts to experi-ment with mechanical configurations.Figure 2 shows a set from 1949.Notice that it features a remotely-controlled robot and you can see theAC motor sitting in the metal box withthe red gear train behind. The motorsupplied with these sets was not only a gearmotor, but it had severaldifferent geared output speeds. Sinceit was an AC shaded-pole motor, youwere stuck with the speeds on theside of the gearbox. Few robots hadany sort of variable speed control,whether for the base or for any sortof arms or other extremities. Cablesand even fishing line were frequentlyused to transfer motion from one partof an arm to the ends to allow weightydriving motors to be located in areas

easier for the main arm motor to lift.

Early RobotIntelligence

Not all of the earlier robots weredesigned to resemble bipedal humanoidforms as Grey Walter’s tortoise-like Elsieand Elmer typifies. Experimenters inthese early days were just as interestedin Artificial Intelligence as we are today;it’s just that there were absolutely noforms of ‘non-human intelligence’ (i.e.,microcomputers) small enough to beplaced on a mobile platform. In the‘50s and even the ‘60s, computersfilled complete rooms and drew thousands of watts. Any sort of intelligence had to be simulated by using some sort of sensors to feedback into an onboard relay or hard-wired network, or to an externalcomputer.

Available sensors to the earlyexperimenters could be microswitcheswith feelers to detect obstacles or CdSor phototube sensors todetect light sources or ambient light. The intelligencecould be as simple (or complicated) as: “If bumperswitch ‘c’ is in the closedposition, and the CdS cell ‘2’sees enough light to close itsrelay, then send a signal torelay ‘AA’ to drive the steering motor to the left.”

It wasn’t AI as we knowit today, but Walter did someamazing things with twotubes in his amazing littlerobot. Those that followedalso built some surprising

robots with only relays, switches, CdSphoto cells, and lots of hard-wiredwire connections.

Early Robot PowerEarly experimenters did not have

the luxury of today’s vast array of bat-tery chemistries, amp-hour capacities,and low costs. Many robots of thatera used simple dry cells, usually the Dsized carbon-zinc type. AA cells werecalled penlight batteries and therewere no alkaline types at that time. Ccells were smaller and less than halfthe capacity of a D, yet cost the same,so most experimenters used D cells.The other batteries were smaller sixand 12 volt lead acid batteries, usuallythe smallest battery that you couldfind from a farm implement or similar.

There were no easily obtainablesealed electrolyte lead acid batteriesso you just hoped your robot didn’tturn over and eat its innards andeverything in sight with the spilled

FIGURE 2. Gilbert Erector Set #12 and one half.

FIGURE 1. Grey Walter’s Elmer.

SERVO 08.2008 79

Then&Now.qxd 7/8/2008 4:34 PM Page 79

Page 80: servo2008 08

80 SERVO 08.2008

sulfuric acid. Some experimentersopted for 110 volts from a wall plugas AC motors were cheaper and more available. Of course, the poorrobot was tethered to the wall by along cord.

Early Toys and Toy Robots

Toys in the ‘50s began to havebattery-powered DC motors; usuallythree volts. Remotely controlled cars witha wired handheld remote control werepopular. Some toys even had attachedgear trains — great for the slower speedswith the greater torque needed forrobots. It was a real plus if you could startwith one of those tinny imported robotsand peel it apart to modify it withmoving arms and head, or change itswalking mechanism in some way.

There were no LEDs in those days,but many toy robots had little coloredthree volt incandescent bulbs for eyes that could be used in anotherlocation. Of course, the purists wouldscream if the robot was even takenout of its original box and would cryin their beer if it was taken apart.

Today’s Selectionof Robots

Let’s jump ahead 50 years to thepresent without even looking at therobots available 20 or 30 years ago.Money is a bit tight these days for all ofus but that hasn’t stopped entrepreneurialcompanies from developing some amazing robots for experimenters. For that matter, experimenters have,themselves, developed some cutting-edge robots that have been exhibitedat conferences and exhibitions aroundthe world.

Kids as young as kindergarten agehave learned robotic techniques andprogramming that wasn’t even available to university level students afew decades ago. Companies such asLEGO, Robotis, Parallax, and othershave brought affordable and capablerobotics kits to youngsters to teachthem this exciting science.

What were the key ingredientsthat made all this possible? Well, Ibelieve that all of us will probably say

that it was the personal computer andthe ability for the average person toprogram simple microcontrollers tocontrol some fairly sophisticatedrobots. The microprocessor came first as the core of the PC, with the microcontroller making the scene a bitlater. The latter did not require thehigher level languages needed to communicate with humans; only for arobot to understand a suite of sensorsand control some functions by drivinga motor(s). Simple languages and lowprices brought the microcontrollerwithin the budget of even the mostcost-conscious robot experimenter.

You might ask, “What about themechanical aspects of robotics?” Arobot is not a robot without somesort of mechanical means to affect itsenvironment; whether that be to justroam about an area or manipulatesomething with an arm and end-effector. Low cost motors, and especially gearmotors, allowedbuilders to add all sorts of movementto their robots. The model airplaneservo that I mentioned earlier was aboon for those who did not have themechanical expertise to hook up a set of surplus gearmotors to somewheels. These ready-made drivemotors were ideal to drive small table-top robots when they were hacked toobtain continuous rotation.

They also had the advantage ofbeing able to listen to a micro-controller’s generated series of pulsesright out of the box. Inexpensiveactive IR and ultrasonic rangefinders,compass modules, GPS receivers, colordetectors, image recognizing cameras,and a host of other sensors providetoday’s robot experimenters withamazing capabilities.

Combat RobotsAnother real turning point in

build-it-yourself robots was the growinginterest in combat robots — robots thatbattled each other until one finallybeat the other. In the beginning and formany years afterward, there were nokits available for these types of robotsso the prospective robot warrior hadto design and build his or her own.

The earliest combat robots had fairly

weak weapons and many went on towin a contest by simply sliding under itsopponent to prevent it from movingaway. Virtually all of the combat robotswere and are remotely controlled bymodel aircraft types of radio systems,though there are a few purists whohave built some fairly sophisticatedautonomous robots for the combatarena. The sport reached a pinnaclewhen the Comedy Channel aired thepopular BattleBots series. The weightclasses greatly expanded from the initiallight-middle-heavy weights to categoriesfrom ant weight to super heavyweight.

Robots Progressto the Future

So, how have things changedover the years in the way we’ve constructed our robots? We startedout with simple sketches on paperand many of us have progressed toCAD programs and finite elementanalysis software on our computers.Grey Walter’s robot tortoise (amazingfor the time) was a simply constructedthing with a bent tin structure andhousehold-type fasteners. We haveprogressed from mostly plywood andwood with steel inner structures toplastic with aluminum structures, andeven titanium for many combat robots.

Battery technology has advancedfrom the early dry cells and lead acidbatteries of Walter’s time past nickelcadmium to expendable alkaline cellsand lithium polymer, lithium-ion batteries,and even fuel cells. Robot power started with inefficient series-wound DCmotors and evolved to the very efficientrare-earth field and coreless motors oftoday. Relay and hard-wired logic gaveway to microprocessors such as the6502 and the latter microcontrollerssuch as the 68HC11, PIC, and others.

Rudimentary light detection andvision arose from the lowly cadmiumsulfide photo cell to true vision with videocameras and intelligent CCD/CMOScameras such as the CMU cam. Thedream of affordable speech recognitionsystems is now a reality for our robots.

Have we reached the epitome ofrobot evolution? Our robots cannotonly recognize our faces but they canrespond to our voices and commands

Then&Now.qxd 7/8/2008 4:34 PM Page 80

Page 81: servo2008 08

with their own speech. Many can walkupright just like us and have dozens ofmotors/servos to create many motions.Some even move about on two side-by-side balancing wheels or a roller skate-like foot like Rosie (Figure 3) on the oldJetsons cartoon series. It seems as if wedo have the ultimate robot availabletoday... or do we? Well, it’s not quitelike the myth that is often told that thedirector of the US Patent Office over acentury ago handed in his resignationstating that “everything that can beinvented has been invented.”

We have made some amazingstrides in technology, but we have manyhuge leaps and bounds ahead of us.Today’s batteries have incredible powerdensity but they remain one of themajor pitfalls of creating a true homerobot that has the physical power of asimilar-sized human. Honda’s Asimomust walk around with a huge backpack battery in order to operatefor less than an hour (Figure 4) Theenergy crunch of today may actuallyproduce as a side product a very highdensity battery that will have thecapacity to power future robots.

The latest rare-earth field DC motorsare powerful with several horsepoweravailable in fist-sized packages, buttomorrow’s electro-chemical muscleson the drawing boards may be theanswer for future humanoids. Wheelsnot withstanding, most of the functionsand motions on a complex humanoidrobot can more easily be accomplishedby linear actuators much like our muscles.Our shoulder, elbow, head, and similarmotions use our powerful chemicalpowered muscles to produce partial

rotation of our joints.Artificial robot musclesthat have long been adream of scientists andlabs around the worldare now becoming a reality. The availablemicrocontrollers andmicroprocessors arebecoming more versatileand cheaper, but possiblysomething on the order ofIsaac Asimov’s ‘positronicbrain’ may be on thehorizon. Unlike the DRAMmemory that I paid anextra $40 to upgrade my Rockwell AIM-65computer from 1 KB to 4 KB back in the early‘80s, memory is dirt cheap these days.A GB of DRAM is less than $50 andFlash memory is as cheap as $50 for 8 GB — a million times cheaper!

Times may be a bit tough thesedays, but the sky’s still the limit forsome fantastic home-designed andbuilt robots. SV

All Electronics Corp. .........................45, 66

AP Circuits/e-pcb.com ............................48

AWIT ..........................................................66

Boca Bearings .....................................71, 66

Budget Robotics ......................................77

CipherLinx Technologies .........................66

CrustCrawler .............................................19

Electronics123 ..........................................45

Hitec ..........................................................43

Innovation First ...........................................3

Jameco ......................................................12Lorax Works ........................................45, 66Lynxmotion, Inc. .......................................82Maxbotix ...................................................66Mini Robotics ...........................................66Net Media .................................................83Parallax, Inc. ...............................Back CoverPCB Pool .............................................66, 77Pololu Robotics & Electronics ..........25, 66RoboBrothers, Inc. ...................................44Robo Development .................................35

Robotis ......................................................61

RobotShop, Inc. .................................23, 66

Saleae ........................................................45

Solarbotics/HVW .....................................18

solderbynumbers.com ......................13, 45

Sparkfun Electronics ..................................2

Super Bright LEDs ....................................66

Technological Arts ...................................66

Vantec .......................................................48

Weird Stuff Warehouse ...........................45

Advertiser Index

FIGURE 3. Rosie fromthe Jetsons. FIGURE 4. Honda's Asimo.

SERVO 08.2008 81

Looking for a GIFT or maybe just something special for yourself?Check out our website to find all of our other robotic items for sale!

Then&Now.qxd 7/8/2008 4:34 PM Page 81

Page 82: servo2008 08

Full Page.qxd 7/9/2008 4:09 PM Page 82

Page 83: servo2008 08

Full Page.qxd 4/29/2008 4:05 PM Page 83

Page 84: servo2008 08

backcvr.qxd 7/9/2008 10:10 AM Page 84