You are on page 1of 84

V

o
l
.

6

N
o
.

1
S
E
R
V
O
M
A
G
A
Z
I
N
E
Z
E
N
O

S
U
P
E
R

S
T
E
P
P
E
R

D
R
I
V
E
R

S
P
A
C
E

R
O
B
O
T
I
C
S

N
E
W

L
I
F
E

F
O
R

A
R
T
I

O
N
E

J
a
n
u
a
r
y

2
0
0
8
Cover.qxd 12/6/2007 8:50 AM Page 1
Full Page.qxd 12/5/2007 3:20 PM Page 2
Full Page.qxd 12/5/2007 2:19 PM Page 3
4 SERVO 01.2008
SERVO Magazine (ISSN 1546-0592/CDN Pub Agree
#40702530) is published monthly for $24.95 per year by
T & L Publications, Inc., 430 Princeland Court, Corona, CA
92879. PERIODICALS POSTAGE PAID AT CORONA, CA AND
AT ADDITIONAL ENTRY MAILING OFFICES. POSTMASTER:
Send address changes to SERVO Magazine, P.O. Box
15277, North Hollywood, CA 91615 or Station A, P.O.
Box 54, Windsor ON N9A 6J5; cpcreturns@servomagazine.com
Departments
06 Mind/Iron
21 Events Calendar
22 New Products
23 Robotics Showcase
66 Robo-Links
76 SERVO Webstore
82 Advertisers Index
Columns
08
Robytes by Jeff Eckert
Stimulating Robot Tidbits
10
GeerHead by David Geer
Zeno The First Complete Character Robot
14
Ask Mr. Roboto by Pete Miles
Your Problems Solved Here
61
Twin Tweaks
by Bryce and Evan Woolley
More Than Meets the Eye
the Mighty Morphing V-Bot
67
Dif ferent Bits
by Heather Dewey-Hagborg
Neural Networks for the PIC Microcontroller
Part 4: Self-Organizing Maps
71
Robotics Resources
by Gordon McComb
Small Brains for Your Bot
75
Appetizer by Gerard Fonte
Terms of Endearment
79
Then and Now by Tom Carroll
Robots Take to the Air
PAGE 24
TOC Jan08.qxd 12/5/2007 11:16 AM Page 4
01.2008
VOL. 6 NO. 1
SERVO 01.2008 5
ENTER WITH CAUTION!
24 The Combat Zone
MEET THE MIGHTY MORPHING V-BOT/pg 61
32 The Super Stepper Driver
by Fred Eady
Build an intelligent stepper motor
controller from scratch thats based
on the Allegro MicroSystems A3979.
38 Compute Square
Roots Fast
by Tim Paterson
Square roots have a number
of possible applications in
microcontroller systems.
42 GPS
by Michael Simpson
Part 4: A closer look at the interface
needed for each of the GPS modules
covered in this series.
49 Space Robotics
by Fulvio Mastrogiovanni
This article focuses on the entire
control loop thats used to allow a
rover to safely navigate on Mars
using information from Earth.
54 C Programming for
Microcontrollers
Made Easy
by Sam Christy
This new, no-cost online system
can cut start-up time from hours
to minutes.
56 Reviving a Showbot
by Robert Doerr
Give ARTI ONE a new lease on life.
Features & Projects
TOC Jan08.qxd 12/5/2007 11:16 AM Page 5
Published Monthly By
T & L Publications, Inc.
430 Princeland Court
Corona, CA 92879-1300
(951) 371-8497
FAX (951) 371-3052
Product Order Line 1-800-783-4624
www.servomagazine.com
Subscriptions
Inside US 1-877-525-2539
Outside US 1-818-487-4545
P.O. Box 15277
North Hollywood, CA 91615
PUBLISHER
Larry Lemieux
publisher@servomagazine.com
ASSOCIATE PUBLISHER/
VP OF SALES/MARKETING
Robin Lemieux
display@servomagazine.com
EDITOR
Bryan Bergeron
techedit-servo@yahoo.com
CONTRIBUTING EDITORS
Jeff Eckert Tom Carroll
Gordon McComb David Geer
Pete Miles R. Steven Rainwater
Michael Simpson Kevin Berry
Fred Eady Robert Doerr
Sam Christy Tim Paterson
Gerard Fonte James Baker
Chad New Don Hebert
Bryce Woolley Evan Woolley
Heather Dewey-Hagborg
Fulvio Mastrogiovanni
CIRCULATION DIRECTOR
Tracy Kerley
subscribe@servomagazine.com
MARKETING COORDINATOR
WEBSTORE
Brian Kirkpatrick
sales@servomagazine.com
WEB CONTENT
Michael Kaudze
website@servomagazine.com
PRODUCTION/GRAPHICS
Shannon Lemieux
Joe Keungmanivong
ADMINISTRATIVE ASSISTANT
Debbie Stauffacher
Copyright 2008 by
T & L Publications, Inc.
All Rights Reserved
All advertising is subject to publishers approval.
We are not responsible for mistakes, misprints,
or typographical errors. SERVO Magazine
assumes no responsibility for the availability or
condition of advertised items or for the honesty
of the advertiser. The publisher makes no claims
for the legality of any item advertised in SERVO.
This is the sole responsibility of the advertiser.
Advertisers and their agencies agree to
indemnify and protect the publisher from any
and all claims, action, or expense arising from
advertising placed in SERVO. Please send all
editorial correspondence, UPS, overnight mail,
and artwork to: 430 Princeland Court,
Corona, CA 92879.
INFRASTRUCTURE
A fundamental aspect of robotics is
that the application domain can range
from ocean beds and table tops to the
nooks and crannies of extraterrestrial
dunes. Its no coincidence that the
techniques and technologies described in
the article featured in this issue of SERVO
can be applied to virtually any application
areas. However, if you have a particular
interest in space exploration, then youll
find Fulvio Mastrogiovannis article,
Space Robotics, of particular note.
Fulvio, a PhD candidate from the Mobile
Robotics and Artificial Intelligence at the
University of Genova, Italy, offers a
focused consideration of control theory
applied to the practical challenges
presented by the NASA Mars Explorer
Rover mission. The article also hints at an
often ignored and poorly understood
aspect of robotics that of infrastructure.
Space exploration and transport,
together with development of more
traditional military gear, are responsible for
many of the innovations in sensors,
software, and platform designs that trickle
down to civilian robot developers.
However, even if you have access to
the components and algorithms used by
NASA engineers, youd probably find it
impossible to develop a robot that even
approximates the abilities of the impressive
Martian rovers. The missing ingredient is
infrastructure the robots, conventional
tools, and processes used to develop the
vehicles and robots destined for space.
Consider the array of advanced
robotics used in the construction and
testing of the shuttles external tank. The
shuttles external tank, which has a length
of 55 feet and diameter of 28 feet, is
fabricated at the Michoud Assembly
Facility, near New Orleans. When I toured
the facility, I was amazed at the robots
and other automated equipment required
to achieve the tolerances necessary for
space flight. In particular, I witnessed a
fully assembled fuel tank mounted
horizontally on a motorized spindle in a
way that enabled robots to apply
insulating foam to the aluminum-lithium
tank. I tried to imagine the control systems
and motors necessary to rotate the
58,000 lb tank and maintain a precise
coating depth. Although I havent seen it
first hand, I assume that the robotic
equipment used to create the multi-stage
Boeing Delta II that transported the
Martian rovers is just as impressive.
Sam Christys article on programming
for FIRST controllers and Tim Patersons
article on square roots illustrate a key
invisible component of the infrastructure
required to develop robots. If youre like
many roboticists, you probably have a drill
press, soldering iron, a few boxes of spare
parts, perhaps a library of reference texts,
and a PC. To the uninitiated, the PC may
be simply another artifact in your
workshop. However, if youre involved
with developing control loops, machine
vision, wireless communications, or other
computational tasks, then your PC may be
your primary development tool. In this
regard, traditional tools and components
often fail to capture the enormity of
effort, planning, and time that goes into
developing a robot.
If youre new to robotics, then youre
just beginning to appreciate the depth and
breadth of your development infrastructure
(or lack of it). Whether youre primarily
involved in developing pneumatic weapons
for battle bots or vision recognition
algorithms for a commercial robotic platform,
youll soon discover that a development
infrastructure is a prerequisite for efficient,
unencumbered robot development.
At the start of my robotics career, I
invested almost a year of effort developing
a flexible infrastructure. The major
components include:
Drill Press and Bit Assortment
Vise
Work Bench
Dremel and Accessories
Dual-Trace Digital Oscilloscope
Multimeter
Regulated Power Supplies (3)
Lamp
Glue Gun
Heat Gun
Mind / Iron
by Bryan Bergeron, Editor
Mind/Iron Continued
6 SERVO 01.2008
Mind-Feed Jan08.qxd 12/4/2007 2:39 PM Page 6
Air Compressor
Hand Tools
Glues and Adhesives
Nut and Bolt Library
Clamps
Cables, Wire, and Shrink Tubing
Connectors and Pins
Soldering/Desoldering Station
R/C Unit
Nibbler Tool
PC
Software (Schematic generation, simulation, compilers)
Sensors (US, IR, motion, etc.)
Microcontrollers (STAMP, PICs, ATMEL)
Storage Bins
Breadboard System
Multi-drawer Tool Chest
Im still working on the infrastructure, but at a much lower
level. So, how do you go about building an infrastructure? If
youre fortunate enough to be financially well positioned, then
the anticipatory approach is a viable option. Assuming that you
can accurately anticipate your upcoming needs, then you can
assemble an infrastructure within a few weeks. Even with
equipment in hand, youll need several weeks to learn how to
operate and apply your new hardware and software.
At the other extreme is the as-needed approach, which
entails purchasing tools and test equipment on an as-needed
basis. While easy on the pocket, this approach often results in a
loss of momentum. Stopping a project midway to await delivery
of a drill or torque wrench and then learning how to use the
device can derail an otherwise focused project. There is also the
defocusing associated with taking time to identify the best
oscilloscope, drill press, or other item.
The two approaches arent mutually exclusive. For example,
I use a hybrid approach in which a few major purchases drill
press, multimeter, hand tools, and oscilloscope are added to as
needed. Ive learned the hard way that when you build an
infrastructure, buy the best that you can afford. Dont be lured by
an inexpensive hand tool or soldering iron that will satisfy your
current project. Instead, try to anticipate what youll need over
the next five years. It costs more to buy a cheap tool and then a
more expensive tool a few months later, than to buy the right tool
to begin with. Im a big fan of eBay where if youre patient
enough you can find good deals on equipment that might
otherwise be out of your reach.
Another option is to outsource your infrastructure by joining
a well-stocked robotics club. For modest dues, you can have
access to a supportive infrastructure that may prove invaluable
to your success in robotics. A related approach is
to extend your infrastructure with external services, such as
laser cutting. I use Pololu Robotics and Electronics
(www.Pololu.com) for laser cutting on large projects.
Outsourcing can be expensive, but it allows you to focus on what
you do best.
As a word of warning, as you construct your infrastructure,
remember that its tempting to use robotics as an excuse to
amass a huge collection of fantastic tools and equipment. This is
fine if your intent is to collect tools. However, if your goal is to
produce functional robots, then do your best to avoid the
seduction of gear. SV
Advanced Course 3 Days $1995
Program and Control:
GPS Receivers
RS232, 485 Serial Communications
Wireless Communications
IEEE Zig Bee, Bluetooth
Distance Sensors
RFID Readers and Tags
Motor Control W/Feedback
Minneapolis, MN, Jul. 21-23
Los Angeles, CA, Aug. 18-20
Newark, NJ, Sep. 22-24
San Diego, CA, Oct. 6-8
Check the web for more dates
Intro Course 3 Days $1995
Program and Control:
LED and LCD Displays
DC, Servo, and Stepper Motors
Temperature and Light sensors
RS232 Serial Communications
ADCs and EEPROMs
Timers, Interrupts, & Clocks
Visual Basic Interfaces
Columbus, OH, Jan. 21-23
Los Angeles, CA, Feb. 4-6
Huntsville, AL, Feb. 18-20
Newark, NJ, Mar. 3-5
Check the web for more dates
WoW!
Finally,
Hands-on
Training for
PIC

Microcontrollers
and PIC BASICPRO

!
RCG
Research
Innovative Ideas in Electronics Design
www.RCGResearch.com
Phone (800) 442-8272
PIC and PIC BASICPRO are trademarks or registered trademarks of Microchip Technologies, Inc.
RCG Research, Inc. is not affiliated with Microchip Technologies, Inc.
Extreme Robot Speed Control!
OSMC
6
6
6
6
Monster power!
14-50V
3.15 x4.5x1.5
3 wire interface
160A!

www.robotpower.com
Phone: 253-843-2504 sales@robotpower.com
Scorpion HX
6
6
6
6
Dual (6A pk) H-bridges
fwd-only channel
5V - 18V
1.6 x 1.6 x 0.5
2.5A
12A Plus
$79.99
Scorpion Mini
6
6
6
2.5A (6A pk) H-bridge
5V - 18V
1.25 x 0.5 x 0.25
$119.99
Scorpion XL
6
6
6
Dual H-bridge
5V - 24V
2.7 x 1.6 x 0.5
13A 45A Peak!
6
6
6
6
6
6
6
14V - 50V - Dual H-bridges - 150
Adjustable current limiting
Temperature limiting
Three R/C inputs - serial option
Many mixing options - Flipped Bot Input
Rugged extruded Aluminum case
4.25" x 3.23" x 1.1
80A A+ Peak!
$29.99
$399
Introducing Dalf
6
6
6
6
6
6
6
Closed-loop control of two motors
Full PID position/velocity loop
Trapezoidal path generator
PIC18F6722 CPU
C source for routines provided
See
Giant Servo Mode!
www.embeddedelectronics.net
$250
MADE IN
THE USA
H-bridges: Use with Dalf or with your Micro/Stamp
Simple-H
6
6
6
6
6-28V 25
2.25 x2.5 x0.5
3 wire interface
current & temp
protection
A!

$79
SERVO 01.2008 7
In re-reading my December 2007 Robotics Resources column, I spotted
a small error regarding the light wavelength of the laser diodes used in
DVD players. Most commercial DVD players use 650 nanometer (deep
red) laser diodes, rather than the 780 nanometer (infrared) laser diodes
common in CD players.
Gordon McComb
Robotics Resources
Mind-Feed Jan08.qxd 12/4/2007 2:40 PM Page 7
8 SERVO 01.2008
Goodbye E-Harmony, Hello
Bot-Harmony
You may have noticed (or tried not
to notice) that some robots are becom-
ing a lot more lifelike and even alluring.
One example is Dion, a Chinese babe
who is said to mimic all sorts of human
features, including facial expressions,
skin temperature and elasticity, breath,
and heartbeat. According to the manu-
facturer, she can even be built to resem-
ble the specific person of your choice.
Another deliberately seductive
mechanism is Actroid DER2, developed
at the University of Osaka and manufac-
tured by Kokoro Co. This one is
designed to play an active part for
many occasions as a chairperson with
fluent narrations and booth bunny. You
can even rent her for a five-day outing
for $400,000 yen (about $3,500 US).
I didnt locate any specific infor-
mation about how intimate these yum-
bots are designed to be, but if you are
presently settling for a partner who
has to be inflated for each romantic
encounter, you might be interested in
a recent book by AI expert David Levy.
The good news is that it someday will
be common for people to marry and
have sex with robots. The bad news is
that Levy doesnt expect it to be legal
and acceptable until about 2050. He
also predicted that Massachusetts will
be the first to legalize it.
If you want to follow that line of
logic, pick up a copy of Love and
Sex with Robots: The Evolution of
Human-Robot Relationships, published
late last year by HarperCollins (www.
harpercollins.com). The hardcover
edition will cost you $24.95, or you
can get the e-book for $19.95.
Arm Inspired by the
Real Thing
Ever since the Barrett Hand
a three-fingered manipulator used
extensively by NASA was introduced in
1997, mechanical arms have grown more
dexterous and complex, but still havent
looked or operated that much like the
human counterpart. But an eerily lifelike
one, even without any skin covering, has
been brought to us by Germanys Festo
Corp. (www.festo.com).
The company is known primarily for
its pneumatic and electromechanical
systems, components, and industrial
controls. But perhaps its most interesting
accomplishment is the creation of Airics
Arm. Based on the real thing, it even has
metal versions of the radius and ulna, the
metacarpals, and the shoulder and
shoulder blade. One big difference, how-
ever, is that it is powered by 30 of Festos
Fluidic Muscles, which are tubes of
elastomer reinforced with aramide fibers.
When you fill one with
compressed air, its diameter increases
and its length shortens, thus creating
movement. This actually gives Airic
an advantage over the rest of us:
When the arm contracts, it doesnt
require any additional power to stay
contracted; that is, it can lift some-
thing and hold it in place indefinitely.
Festo intends to further develop
the system by adding vision and tactic
sensors and maybe even giving it a
neck, a back, and a hip. A short video
of the thing in action is presently at
www.youtube.com/watch?v=tVg6
xKHJKY4.
Feeding Robot for the
Disabled
On a more specialized level is the
My Spoon feeding robot manufactured
in Tokyo by SECOM Co., Ltd. Designed
to allow victims of spinal cord injuries,
muscular dystrophy, and other disabili-
ties to feed themselves without a care-
givers assistance, it offers interchange-
able controllers and utensils, and a
selection of operating modes to accom-
modate different disability levels. Its not
quite up to the flexibility of a humanoid
hand in that foods must be served from
specific divisions of a meal tray, and they
must be in bite-sized pieces.
Both users and therapists seem to
be praising its effectiveness, and it was
even nominated as a finisher in the Top
10 Robots listed by Japans Ministry of
Dion, from Beijing Yuanda Super
Robot Technology Co., Ltd., and
Actroid, from Kokoro Co., Ltd.
Airics Arm, perhaps the most
realistic robotic arm yet.
Photo courtesy of Festo Corp.
The My Spoon feeding apparatus.
Photo courtesy of SECOM Co.
by Jeff Eckert
Robytes.qxd 11/30/2007 11:19 AM Page 8
Economy, Trade, and Industry. No price
is given on the companys website
(www.secom.co.jp/english/index.ht
ml), which probably indicates that it will
run you a pretty nice chunk of change.
But the main idea is to give the user
a greater sense of independence, which
is not a bad thing. And it could probably
be fitted with a nice demitasse spoon,
making it useful for a fair number of
Hollywood actors and pop stars ...
Creeper Checks Structural
Integrity
Quite often, even creepy little
robots on tracks can cost an amazing
amount of money. For example, it was
reported that the US Army recently
ordered 40 PackBots from iRobot
(www.irobot.com) at a cost of $8.8
million, or $220,000 each. It is therefore
interesting that Sanyo appears ready to
introduce a model that is rumored to be
priced at a paltry one million yen (about
$8,900). Sure, the military machines are
more heavily equipped and hardened
for rough duty and, sure, were
comparing horses to ponies. But still, at
about 1/25th of the cost ...
In any event, details are spotty, but
Sanyo's new machine so far, rather
generically named the Underfloor
Robot is designed to scamper around
underneath potentially crumbling office
buildings, apartments, and other places
that may be suffering from structural
damage. It runs about two hours on a
charge, performing visual inspections
and beaming back video of whatever it
finds. It is equipped with a zoom lens
for getting down to details and will
automatically create reports and
measure the distance between objects.
Other specs include dimensions
(L, W, H) of 420 x 260 x 200 mm (16.5
x 10.2 x 7.9 in), base weight of 9.6 kg
(21 lb), and the ability to traverse
bumps up to 85 mm (3.4 in) in height.
Power comes from a lithium-ion
battery pack, as usual. More detailed
data should be appearing at www.
sanyo.com by the time you read this.
Watch for Floating Objects
Okay, theyre not the most complex
self-operating devices youve ever seen,
and all they basically do is bob up and
down; measure tempera-
ture, salinity, and velocity;
and relay the information
back home. But the
amazing thing is that the
International Argo Project
(www.argo.net), with
support from more than
40 countries, has
launched more than
3,000 of the things since
2000, and they are scat-
tered all over the globe.
In the operational
cycle, each float spends
10 hours at the surface,
descends to its drifting
depth of 1,000 m (3,281
ft), and stays there for
eight to 10 days, drops
to the profiling depth of
2,000 m (6,562 ft), then
makes its measurements
during a 10 hour ascent.
The objective is to
allow the world, for the
first time, to take the
pulse of the oceans on a
continuous basis and relay the
information to whoever needs it
within hours of its collection. And
whoever includes you.
For the beginners guide to
accessing Argo data, log onto www.
argo.ucsd.edu/Frbeginnersguide.
html. Youll be giving speeches on
climatology in no time. SV
Robyt es
Diagram of an Argo Active Float.
Photo courtesy of the Argo Information Centre.
iRobots PackBot Explorer and Sanyos upcoming underfloor robot.
Photos courtesy of iRobot and Sanyo Electric Co. Ltd.
SERVO 01.2008 9
Robytes.qxd 11/30/2007 11:19 AM Page 9
10 SERVO 01.2008
Z
eno due on the market as a toy
in 2009 is the closest thing to
human that a robot has become.
Its facial expressions are a story all
to themselves, enabling the most
complete robot personality and
human-to-robot emotive interactivity to
date. Want some proof? Read on!
Zeno is a 16-inch, six-pound,
interactive robot boy developed by
Hanson Robotics with help from a
number of vendors including
RoboGarage and roboticist Tomotaka
Takahashi, of Japan, who is responsible
for creating Zenos body.
The body prototype uses 18
servos, enabling the robot to walk, run,
balance on one foot, lie down and
get up, and gesture, as in non-verbal
communication, according to Dr. David
Hanson, PhD, who worked with
Takahashi to produce the combined
robot, Zeno.
Zeno is Born
Only recently completed (September
2007), Zeno, the boy robot, offers every
human facial response. Zeno (animation
software from Massive Software and
Maya software) is the worlds first
complete character robot, according to
Dr. Hanson.
Complete character means Zeno
has facial expressions, walking and ges-
turing expressions, and conversational
capabilities like a complete human
being would have.
Zeno smiles, frowns, and gets
angry. He looks sad, surprised, and
afraid. He can present confusion or
concentration as well, according to Dr.
Hanson. The mouth moves when Zeno is
speaking, the eyelids each work inde-
pendent of the other, and the eyeballs
turn side-to-side, and look up and down.
In the toy, we intend for the ears
to wriggle, says Dr. Hanson. Zeno can
nod, turn, and tilt its head. These
motions can be used expressively, as
well as to affect eye contact with
people and otherwise look around the
robots environment, Dr. Hanson says.
Zeno like other Hanson character
robots interacts with people with a full
range of robotically orchestrated facial
expressions and conversation enabled by
Hansons Artificial Intelligence software
and carried out by Hansons patented
robot mechanics and materials.
Thanks to a company called
Sensory, Zeno recognizes and
understands human speech, according
to Dr. Hanson. Zeno can respond with
substantial verbal exchanges.
Not short on words, Zenos vocabu-
lary is what scientists like Dr. Hanson call
arbitrarily large in size, meaning it is
more than big enough for the job at
hand. As people talk with the robot, the
robot listens especially for words and
phrases most pertinent to the recent
conversation, says Dr. Hanson.
Zeno analyzes human speech to
get the intent of the conversation.
While the robot makes errors in
speech recognition 10-20 percent of
the time, it can still respond to
human commentary, staying on
topic, according to Dr. Hanson. This
mirrors human exchanges, in which
people generally stay on topic but
allow conversation to flow and take
Contact the author at geercom@alltel.net by David Geer
Zeno The First Complete
Character Robot
Human interaction is its main attraction ...
Photos are courtesy of Thomas
Riccio unless otherwise noted.
Even from the start, Zenos head was more
than a hat rack. Here is a shell of Zenos
head with notes and numbers; a part of
the design process.
A clay mock-up of Zeno from
the design phase.
Geerhead.qxd 11/30/2007 11:29 AM Page 10
GEERHEAD
on new directions, Dr. Hanson explains.
Frubber Its All
in the Skin!
Hansons patented Frubber syn-
thetic materials technology makes it
possible to give Zeno and other robots
a wide range of life-like, emotive facial
responses. Frubber enables Hanson
robots to form near-real human expres-
sions with what is the closest to real
skin that robotics materials have come
so far, while requiring a fraction of the
power needed by other solutions.
Hansons structured porosity elas-
tomer (SPEM) uses a hierarchy of pores
that can pack into other pores down to
smaller and smaller scales even to the
molecular level resulting in very skin-
like foam. The robot skin stretches like
human skin and packs like skin to enable
more realistic human expressions.
Frubber stretches to greater than
eight times its original size or compress-
es to fractions of its original form while
using less than .045 percent of the
power required for other robot face
expression solutions. The power reduc-
tion makes it possible to use replaceable
batteries for the facial operations which,
in turn, helps make it possible to create
human-like bipedal robots that run with-
out being tethered to power supplies.
Electronics
Hansons electrical and computing
technologies include the patent-
pending Character Engine AI frame-
work, which works in conjunction with
animation software.
The AI framework and software
enable robotic movement including
human-like qualities that were not
previously transferable from computer
animation to robotic actuation. The AI
and machine intelligence can run on a
single, standard PC, which can control
the robot wirelessly, explains Dr. Hanson.
In our first prototype, we are
using Bluetooth wireless for the motion
control and the sensor data, and ana-
log composite RF for video transmis-
sion. In the final product, we intend to
use Wi-Fi (802.11g), says Dr. Hanson.
According to Dr. Hanson, the
Character Engine framework is a modu-
lar and extensible software architecture
for developing extremely intelligent
characters. This generally means the
software is well designed so its easy to
expand on the programming that exists,
to code other things to go with it.
The modular approach to coding
the software makes it easy to interface
the Character Engine with other AI and
robotics software like MS Robotics
Studio, Intel Open CV, and a variety of
cognitive architectures.
The Character Engine provides a
good framework (programming
structure) for writing personalities into
the individual robots characters. The
Character Engine enables code/
personality authors to quickly create
new personalities with software tools
just for that purpose.
The Character Engine uses Maya
software, as well as Massive software,
which will be familiar to games and
animations programmers, to
control the animated behav-
ior of the robot, so it can
express its personality. So,
what games and feature film
animation language writers
and program developers have
been doing is not simply
bringing characters to life on
screen, but paving the way to
bring them to life in 4D!
The Massive Software
programming serves as the
motor cortex the interac-
tive animation brain for
Hansons robots. Massive is
the right tool for the job, delivering
extremely lifelike character behavior in
response to sensory stimuli, a capacity
well demonstrated in numerous films,
including the Academy Award winning
crowd effects in the Lord of the
Rings movies, comments Dr. Hanson.
The Character Engine software
also combines state-of-the-art comput-
er vision, face tracking, and motion
tracking with other sensory input, so
Zenos personality knows who and
what it is interacting with and respond-
ing to. Zeno uses motion detection and
computer vision to recognize facial
SERVO 01.2008 11
Zeno at WIREDs Nextfest.
Photo courtesy of Kevin Carpenter.
Full-length Zeno. His body is mobile, too.
Zeno complete with depth of character.
Just look into those eyes!
Geerhead.qxd 11/30/2007 11:30 AM Page 11
12 SERVO 01.2008
expressions, human gestures, and
common objects, explains Dr. Hanson.
Modular
Programming Proves
its Worth Again
The flexibility that modular pro-
gramming offers is imperative to
enable researchers and developers to
combine the complex elements of AI
that make it possible to simulate the
equally complex brains in human
beings, according to Dr. Hanson.
We hope this focus on intelligent
characters will foster rapid progress in
sociable AI, helping to give rise to
friendly AI the sort of AI that feels
compassion towards us, and can help
to prevent the nightmarish future of
unfriendly AI so common in sci-fi.
We have authors who construct
the personalities for our robots both as
works of literary art and state-of-the-art
AI, says Hanson. These authors define
the robots motives in doing things,
their intentions, and their will.
Hansons Character Engine pursues the
objectives of the robots will while it
interacts with the world.
Zeno is a social robot. So, it will
respond positively to socially positive
people and back away from rude
people. If a person is kind to the
robot, for example, Zeno will seek to
spend more time with them. If a
person is rude, on the other hand,
Zeno will be cold and distant, and seek
other people to interact with or will
play alone, ignoring that person.
In order to tell the kind people
from those who are rude, Zeno uses a
unique data structure to remember
people; a data structure Hanson calls
People Objects. The People Objects
contain photos of people, their names,
memories of interactions with those
people, facts about them, topics of
discussion and how the robot felt
when interacting with each person.
This way, the robot builds emotional
memories which guide his interactions
and motives, says Hanson.
Zenos Unveiling
Hanson Robotics unveiled Zeno to
the public in September. As a result, an
Associated Press article covering the
fantastic new robot appeared in more
than 200 newspapers with circulations
in the millions.
Zeno has since appeared on Good
Morning America, which has five
million viewers. Zeno has also been on
CNN and NBC and in the pages of PC
Magazine and any number of other
publications. Tens of thousands saw
Zeno at WIREDs Nextfest the WIRED
magazine technology fair. Zenos
estimated exposure as of this writing is
more than 45 million Americans,
according to Hanson.
Zeno has his own storyboard with
other characters of Hansons design so
hes ready to star in his own sci-fi film
production. Plans for Zeno include
mass production at a retail price under
$300 per unit. SV
GEERHEAD
Zeno is a 100 percent artificial
telligence robot running from a PC. The
PC sends motor control signals wirelessly
to Zeno, and Zeno sends sensor data
including streaming video wirelessly to
the PC, says Dr. David Hanson. The PC
processes the video data comprising
he faces of people around Zeno and
the audio data from people talking
around him.
Zeno can do everything that past
Hanson robots can do and more.
Previous efforts include the Philip K. Dick
android a technological portrait of the
famous author which won the
American Association for Artificial
Intelligence first place award in 2005.
Our current Character Engine is
much more powerful than the Philip K.
Dick android software or the software
running our Jules, Joey, and Einstein
robots, says Dr. Hanson.
Hansons robots are fully
autonomous, interactive robots that
relate in a human-like manner. They make
eye contact, recognize people, and hold
conversations.
When the $250 Zeno is available in
2009, it will perform most of these
functions even without a PC, using an
embedded version of our Character
Engine. With the wireless connection to
the PC, though, it will be even smarter,
and with the extended AI on our server
bank, across the network, little Zeno will
be one of the smartest robots in the
world, almost frighteningly smart, Dr.
Hanson says.
ALL AI, ALL THE TIME!
Hanson Robotics
www.hansonrobotics.com
Working with Zeno live
www.youtube.com/watch?v=
q88FK37Q8jU
Other Hanson robots
http://youtube.com/results?search_
query=hanson+robots&search=Search
RoboGarage
www.robo-garage.com/english/
index.html
RESOURCES
Is Zeno portraying a sense of
wonder, of curiosity?
Zeno face close-up, side view.
Geerhead.qxd 11/30/2007 11:30 AM Page 12
Full Page.qxd 12/5/2007 3:08 PM Page 13
14 SERVO 01.2008
Q
. It is my understanding that
the HSR-8498HB servos that
are used in the RoboNova
humanoid robot have position feed-
back capabilities, so I bought a couple
of them from Tower Hobbies. I have
been trying for several days now to
figure out how to get position data
from these servos. From what I have
seen on the Internet, all I have to do is
send the servo a 50 s pulse, and it will
return a position signal that is similar to
the regular pulse width to move the
servo. I am missing something here,
can you help me?
Pete Senganni
A
. Last November, I showed
how position feedback for the
HSR-8498HB servo (see Figure 1)
can be measured by sending a 50
s pulse and then measuring the
pulse width of the signal that is
returned from the servo on the same
signal line. Since this was on the same
data line, a pullup resistor was needed
on the signal line.
At that time, I was planning
on talking about the HMI Serial
Communication Protocol and how
to interface it with a microcontroller.
I had all sorts of problems trying to
get this to work, which is probably
why there is almost no information
to be found on the Internet on how
to do this. So this month, I will talk
about the problems I had trying to
get this to work, and to get all of the
HSR servos from Hitec (www.hitec
rcd.com) to work with a computer and
a microcontroller.
Table 1 shows
a list of several
different specifications for the robotic
servos that are currently available at
Hitec. These servos are programmable
and provide data feedback, such as
their current position, voltage draw,
and current draw. Each servo can be
assigned an ID number and they can
be daisy-changed together; up to 128
different servos can be controlled with
a single data line.
Programming features include
velocity, start/stop, min/max position
limits, center position, dead band,
proportional and derivative gains, and
forward/reverse direction control. All
of these features are available through
the Hitec Multi-protocol Interface
(HMI). The HMI protocol allows the
servos to be controlled with traditional
position control using the 1 to 2 ms
pulse width, position feedback using
the pulse width method, and via serial
data communications which will be
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 you
where you are and what more would you expect from a complex service droid?
by
Pete Miles
Our resident expert on all things
robotic is merely an Email away.
roboto@servomagazine.com
Figure 1. HSR-8498HB demonstrating
two reconfigurable housings.
Figure 2. HMI Servo Programmer user interface.
MrRoboto.qxd 11/30/2007 11:25 AM Page 14
discussed here.
These four servos
currently cannot be pro-
grammed with the HFP-10
digital servo programmer
that is used to program the
other digital servos from
Hitec. These four servos
can only be programmed
via a PC computer or
a microcontroller. The
software for programming
these servos is available for
downloading at the Hitec
Robotics website (www.
robonova.com).
Go to the downloads
section, and the software
subsection. Download and
install the program
HMI_Servo_Programer-
V1.0.2.zip. The current
version of the software at
the time of this writing was
V1.0.2. The version num-
ber may be different by the
time you download the
software, so the program title might be
a little different. Figure 2 shows an
image of the software user interface.
To connect the PC to the servo, a
special cable is needed. Hitec is
planning on selling this cable within the
next few months, but you can build
your own. Pressing the Help menu
item on the HMI Servo Programmer
window will show you a schematic
drawing for the interface cable. I have
redrawn this schematic in Figure 3 and
added some details. Note pins 7 and 8
are wired together.
Here is where my problems began.
Before writing code to get a microcon-
troller to control the servo, I needed to
know if I could control the servo with
the programmer. The reason for this is
so that I could monitor the serial data
back and forth between the servo and
the computer to help me understand
how to control the servo.
With this cable, I was never able to
get the software to control the servo. I
then tried using a RS-232 to TTL
converter that was on the Parallax
Professional Development Board
(www.parallax.com), and I still
couldnt get it to work. For a long time,
I thought it was the servo firmware
version on my HSR-8498 servos. The
ones I had were version 1.08, and the
programmer manual stated that it
required firmware version 1.10.
After a while, it occurred to me
that these servos were designed to
receive true RS-232 logic levels (i.e., a
logic level 1 occurs with a zero or
negative input voltage, and a logic level
0 occurs with a high input positive
voltage). The RS-232 to TTL voltage
converter that is used on the Parallax
SERVO 01.2008 15
1 2 3 5 4
7 6 8 9
3.3 K
DB-9 FEMALE
(WIRING SIDE)
+4.8 - 7.4 V (SERVO POWER)
1
SIGNAL
POWER
GROUND
SERVO
CONNECTOR
DATA CARRIER DETECT (DCD)
2 RECEIVE DATA (RD)
3 TRANSMIT DATA (TD)
5
4
SIGNAL GROUND (SG)
DATA TERMINAL READY (DTR)
RING INDICATOR (RI) 9
8
7
6
REQUEST TO SEND (RTS)
CLEAR TO SEND (CTS)
DATA SET READY (DSR)
PIN RS-232 FUNCTIONS
Figure 3. Serial interface cable for the HMI Servo Programmer.
HSR-8498HB HSR-5498SG HSR-5980SG HSR-5990TG
Operating Voltage 4.8-7.4V 6.0-7.4V 6.0-7.4V 6.0-7.4V
No-load Speed
@ 6.0V
0.20 sec/60 0.22 sec/60 0.17 sec/60 0.17 sec/60
No-load Speed
@ 7.4V
0.18 sec/60 0.19 sec/60 0.14 sec/60 0.14 sec/60
Stall Torque
(6.0V)
102.8 oz-in.
(7.4 kg-cm)
152.8 oz-in.
(11.0 kg-cm)
333.3 oz-in.
(24.0 kg-cm)
333.3 oz-in.
(24.0 kg-cm)
Stall Torque
(7.4V)
125.0 oz-in.
(9.0 kg-cm)
187.5 oz-in.
(13.5 kg-cm)
416.6 oz-in.
(30.0 kg-cm)
416.6 oz-in.
(30.0 kg-cm)
Idle Current Draw
(6.0 & 7.4V)
8 & 8 mA 8 & 10 mA 8 & 10 mA 8 & 10 mA
No-load Current
Draw, running
(6.0 & 7.4V)
200 & 240 mA 200 & 240 mA 300 & 380 mA 300 & 380 mA
Stall Current Draw
(6.0 & 7.4V)
1.20 & 1.48 A 1.20 & 1.48 A 4.20 & 5.20 A 4.20 & 5.20 A
Pulse Range
(
~
180)
600-2350 s 600-2400 s 1100-1900 s 1100-1900 s
Centering Pulse 1500 s 1500 s 1500 s 1500 s
Dimensions
1.57 x .78 x 1.45
(40 x 20 x 37 mm)
1.57 x .78 x 1.45
(40 x 20 x 37 mm)
1.57 x .78 x 1.45
(40 x 20 x 37 mm)
1.57 x .78 x 1.45
(40 x 20 x 37 mm)
Weight 1.92 oz (54.7 g) 2.10 oz (59.8 g) 2.46 oz (70.0 g) 2.39 oz (68.0 g)
Table 1. Hitec robotic servo specifications.
MrRoboto.qxd 11/30/2007 11:25 AM Page 15
Professional Development board uses
the MAX232E chip. The MAX232E
actually inverts the signal, so that a
logic level 1 on the output will have a
+5V signal and logic level 0 will be
at 0V. In essence, the servos were
receiving an inverted signal.
When I inverted the signal with a
4011 NAND gate, the Servo
Programmer was now able to control
and program the servo. Figure 4 shows
the circuit that I was able to use to
communicate with the servos using the
HMI Servo Programmer.
It took a long time to eventually
figure out why the original circuit
shown in Figure 3 would not work
with my computer. It turns out that it
was my USB to RS-232 adapter. The
technical gurus at Hitec couldnt
understand why this wasnt working
on my computer since they were
successfully using USB to RS-232
adapters with their setups. For some
reason, my adapter would not work.
With my adapter, the 3.3K resistor
caused the signal line to always be
16 SERVO 01.2008
1 2 3 5 4
7 6 8 9
DB-9 FEMALE
(WIRING SIDE)
+4.8 - 7.4 V (SERVO POWER)
1
SIGNAL
POWER
GROUND
SERVO
CONNECTOR
DATA CARRIER DETECT (DCD)
2 RECEIVE DATA (RD)
3 TRANSMIT DATA (TD)
5
4
SIGNAL GROUND (SG)
DATA TERMINAL READY (DTR)
RING INDICATOR (RI) 9
8
7
6
REQUEST TO SEND (RTS)
CLEAR TO SEND (CTS)
DATA SET READY (DSR)
PIN RS-232 FUNCTIONS
1
2
3
4
5
6
7
11
8
9
10
12
13
14
4011
+5 V
T1OUT R2OUT
R2IN
T2OUT
R1IN
T1IN
R1OUT
T2IN
C1+
C1-
Vcc
C2+
C2-
+V
-V GND
0.1 F 0.1 F
0.1 F
0.1 F
M
A
X
2
3
2
E
+5 V
Figure 4. Alternate serial interface circuit for the HMI Servo Programmer.
H
I
G
H
S
P
E
E
D
M
I
C
R
O
C
O
N
T
R
O
L
L
E
R
VSS
I/O
VDD
4.7 K
+5V
SIGNAL
GND
4.8-7.4V
+4.8 - 7.4V SERVO POWER
HSR CLASS SERVO AND CABLE
SERVO
Figure 5. Wiring an HSR class servo to a microcontroller.
MrRoboto.qxd 11/30/2007 11:25 AM Page 16
at zero volts. But if I replaced the
3.3K resistor with a simple wire (i.e.,
pins 2 and 3 on the DB-9 connector
are connected/shorted together), I
would get the proper signal and the
servo responded to the HMI Servo
Programmer.
This little trick happens to work
with my computer and my old
generation USB adapter. I would not
recommend that anyone do this
with a regular RS-232 signal since the
purpose of the resistor is to cut the
regular 15V signals from a proper
RS-232 line down to a safe level
that will not damage the servo (i.e.,
current limiting). If the circuit in Figure
3 does not work with your computer,
then I would recommend you use
a circuit similar to the one shown
in Figure 4.
At this point, you can use the HMI
Servo Programmer to test and program
the servo. The first thing you do is
select the COM port your serial cable is
connected to, and press the Connect
button. If the program connects to the
servo, you will get a message at the
bottom of the user interface Connect
OK! - HMI Servo Motor Ver- 110. The
110 means the servo has the 1.10
firmware version.
It turns out that the programmer
will connect to servos that have the
older versions of the firmware, just not
all of the features will work with the
older servos.
Once connected, select the servo
from the menu list, then press the
Read Servo button. This will read all
of the parameters that are currently
stored in the servo. Now you can
change the various parameters on
the servo based on what is available
on the HMI Servo Programmer
software, such as setting a servo ID.
Now, this program does not read
in the current position, voltage, or
current draw from the servo, and
cannot set specific user selected
proportional/derivative gains, or set
the speed of the software.
In the ZIP file that the HMI Servo
Programmer came from is a Visual
Basic example program that will show
you how to change velocity and read
position, voltage, and current. The rest
of this discussion will be based on
using a microcontroller to control the
servos via serial communications.
Figure 5 shows a simple schematic
for connecting one of the HSR class of
servos as identified in Table 1, to a high
speed microcontroller. The serial I/O
line is bi-directional, and the 4.7K
resistor is required for this to work.
The serial communication protocol is
shown below. Note that the communi-
cation protocol uses two stop bits.
19200 Baud
Two stop bits
No Parity
The serial communication proto-
col transmits seven bytes of data. Five
bytes are transmitted to the servo,
and the servo transmits two bytes of
data back to the microcontroller.
Figure 6 illustrates the data stream.
The header is one byte and always
0x80 (128 decimal). The checksum is
the 256 minus the sum of the
first four bytes of data transmitted to
the servo.
The key to getting a microcon-
troller to work with these servos is
the timing between the CHECKSUM
byte transmitted to the servo and the
first RETURN1 byte received from the
servo. The servo will start transmitting
the data almost immediately after
the last stop bit from the CHECKSUM
byte. Thus, the microcontroller
needs to be able to change the data
signal line state from an output to
an input and start looking for the
start bit of the RETURN1 byte. If
the microcontroller takes too long to
make this change, the servo will either
not return the two bytes of data or
timing will be off and the data will
be corrupted.
When it is time for the servo to
transmit the data to the microcon-
troller, it may not transmit any data if
the microcontroller hasnt changed the
signal line to an input. This is why a
high speed microcontroller is needed.
My testing has indicated that the
five bytes of data sent to the servo
can be successfully transmitted using
only one stop bit instead of the
specified two stop bits with no timing
problem. And receiving the two data
bytes from the servo using one stop
bit also works since the microcon-
troller will wait until it gets the first
start bit for each byte of data. The
advantage of sending and receiving
the data to and from the servo using
one stop bit instead of two stop bits
will give the microcontroller a small
amount of time to change the state of
the signal line from an output to an
input. And it gives the microcontroller
some time to start the serial input
process to receive the data. At 19200
baud, each data bit takes 52 ms to
transmit. Thus, the microcontroller
has only 52 ms to transition from
transmitting data to receiving data.
Also, since the data line is connected
to a pullup resistor, the microcon-
troller must pull the data line low
before the first byte of data is trans-
mitted to the servo, and immediately
after the CHECKSUM byte of data is
transmitted to the servo. This needs
to be done so the start bits can
be properly distinguished from the
normally pulled high signal line.
I was not able to get any of the
BASIC Stamps (www.parallax.com)
or the Basic Atom28 (www.basic
micro.com) to bi-directionally commu-
nicate with the servos. I was able to
get the SX28 microcontroller to work
with the servos when I used a 20 MHz
resonator. The 52 ms time limit to
switch from serial output to serial input
may be the limiting factor for the
choice of microcontroller used with
these servos.
Table 2 shows a list of the different
commands that works with the HSR
servos with firmware version 1.10. For
the most part, the commands 0x(#ID),
0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA,
0xEB, 0xEF, and 0xF6 are the ones used
COMMAND PARAM1 PARAM2 RETURN2 CHECKSUM RETURN1 HEADER
0x80 BYTE BYTE BYTE BYTE BYTE BYTE
CHECKSUM = (256 - (0x80 + COMMAND + PARAM1 + PARAM2) MOD 256)
Figure 6. Serial communication data package.
SERVO 01.2008 17
MrRoboto.qxd 11/30/2007 11:26 AM Page 17
to control the servos and obtain
feedback information.
One of the first things that you
should do to test to see if you have
bi-directional serial communications
established with the servo is to read
the servo firmware and ID number
using command 0xE7. To do this, send
the following five bytes of data to the
servo: 0x80, 0xE7, 0x00, 0x00, 0x99.
You should receive the following two
bytes of data back: 0x6E and 0x00. The
decimal equivalent of 0x6E is 110
which is firmware version 1.10. 0x00 is
the default servo ID number. Unless it
has been previously changed, it should
be zero.
To command a servo to move to a
specific target position, the servo ID
number serves as the move command.
The target position is in milliseconds,
much like the regular pulse width
commands. Since the position range is
typically between 600 and 2,400 ms, it
is always greater than 256 ms, thus the
target position becomes a 16 bit word.
This needs to be broken down into
two separate bytes of data to be
transmitted to the servo. The following
two equations show how to break the
target position down into the two
bytes of data:
High_Byte = INT(Target_Position/256)
Low_Byte = (Target_Position) MOD 256
For example, to tell the servo to
move to the 1,500 ms neutral position,
the following set of data is sent to the
servo: 0x80, 0x00, 0x05, 0xDC, 0x9F.
The 0x80 is the header, 0x00 is the
servo ID number, 0x05 and 0xDC are
the high and low bytes of the 1,500 ms
target position, and the 0x9F is the
Checksum. Once this command is sent,
the servo will immediately begin to
move to that position.
To change the speed of the servo,
the 0xE9 command is used. The first
parameter sent to the servo is the servo
ID number, and the second parameter
is the speed. The speed command
appears to be more like a percentage
between 0 and 100%. The servos
speed doesnt get any faster for num-
bers greater than 100. This command
will also return the current position of
the servo. Again, the position is broken
down into two bytes of data that can
be recombined into a single value with
the following formula:
Position = (High_Byte * 256) +
Low_Byte
The HSR servos can be daisy-
chained together so that one serial
data communication line can be used
to control all of the servos connected
to that line. If the servos are wired this
way, then the above two commands
(setting the position, velocity, and
position feedback) are the only
commands that will address a specific
servo, by its ID number. The rest of the
commands address all of the servos at
the same time.
Thus, if you want to address all of
the features of the servos, they will
need to be individually wired to the
microcontroller. This is true for servo
firmware version 1.10. New firmware
versions may change this.
Another command for setting the
servos target position is 0xE6. If the
servos motion has been stopped using
18 SERVO 01.2008
Command Param1 Param2 Return1 Return2 Description
ID Position High_Byte Position Low_Byte 0x00 0x00 Position command for servo #ID
0xE1 Address 0x00 Data 0x03 Read EEPROM
0xE2 Address 0x00 0x03 0x03 Write EEPROM
0xE3 Address 0x00 Data 0x03 Read memory
0xE4 Address 0x00 0x03 0x03 Write memory
0xE5 0x00 0x00 Position High_Byte Position Low_Byte Read position
0xE6 Position High_Byte Position Low_Byte 0x00 0x00 Position command
0xE7 0x00 0x00 Version ID
Read firmware version
and servo #ID
0xE8 0x00 0x00 Current Voltage Read current draw and voltage
0xE9 ID Speed Position High_Byte Position Low_Byte
Set the speed of servo #ID
and read position
0xEA 0x00 1, 2, or 3 0x03 0x06
Select servo performance
group number
0xEB 0x00 0 or 1 0x03 0x06 Stop or restart servo motion
0xEF 0x00 0x00 0x03 0x06 Release servo from serial control
0xF6 Position High_Byte Position Low_Byte 0x33 or 0x63 0xFB or 0xFF Position command for all servos
ID (Servo ID number) Valid Range: 0x00 to 0x7F, Default: 0x00
Table 2. Servo command set.
MrRoboto.qxd 11/30/2007 11:26 AM Page 18
the 0xEB command, the target position
can be changed, and when the servo
has been re-enabled it will move to the
new target position. Command 0xF6
will also do this.
Command 0xE5 will read the
current position of the servo in a
similar manner as command 0xE9. The
difference here is that any servos
position can be read with the 0xE5
command and the 0xE9 command
reads the position of a specific servo
ID number.
Command 0xE8 will read the
current draw and the voltage draw of a
servo. The value ranges from 0 to 255.
When the servo is unloaded and not
moving, the current draw value is
typically 0 and the voltage value is 127.
When I try to force the servo horn to
move by hand, the current draw value
increases and the voltage value
decreases. I dont have any information
about correlating these values to
actual current draw and voltage draw.
At the very least, this information can
be used to help determine optimal
reaction load performance and to
determine if the servos are being
overloaded.
Command 0xEA can be used to
change the proportional and derivative
gains for the servo to make their
motion softer or stiffer. I have not
personally experimented with these
numbers, but I have heard that
changing them could make the servos
respond faster to sudden direction
changes, and it could help reduce
servo jitter under certain loaded
conditions.
An interesting command is 0xEB,
the servo Stop/Start command. When
the servo is commanded to stop
(Param2 = 0), the servo will stop
moving where it is. The rotor will be
locked like it was commanded to move
to this position, and will not let you
forcibly change it. What is interesting is
that once the servo is stopped, its
current position can be read, the
velocity can be changed, the current
draw can be read, and other
parameters can be changed.
When the servo is restarted
(Param2 = 1), the servo will move
from where it is currently located to
its new commanded position. This
command can be easily demonstrat-
ed when the servo velocity is set to
near zero, and commanding the
servo to move from one extreme to
another. Shortly after the servo has
started to move, you command the
servo to stop, then change the end
position or servo speed, then restart
the servo, and you will notice that it
will move to the new position at the
new velocity.
The last motion command is 0xEF.
This command will stop all motion
control of the servo. Unlike the 0xEB
command which locks the servo
position, the 0xEF command will allow
the servo to be moved by hand. Servo
positions can still be read after the
execution of this command. This
feature enables the ability to manually
move servos to specific positions, and
then records these locations so that
they can be played back later. This is
a feature that will simplify the
programming efforts for animatronic
and walking robot routines.
In addition to the basic motion
commands described previously, the
servos can be reprogrammed with a
microcontroller. The key is to know
which memory locations contain which
parameter. This is where the 0xE1,
0xE2, 0xE3, and 0xE4 commands come
in handy. These commands can be
used to read and write to different
memory and EEPROM locations.
Unfortunately, the memory
locations/addresses and their
functions are not published. But has
this ever stopped anyone from getting
the information they wanted? With
the help of a serial port monitor (I like
to use the Free Serial Port Monitor
program from www.serial-port-
monitor.com) and the HMI Servo
Programmer, I was able to determine
several of the EEPROM addresses for
several different parameters. With
these two software packages, I can
monitor the data transmitted to and
from the servo, determine which
memory locations/addresses are
changed, and how they are changed
when I change a parameter in the HMI
Servo Programmer software package.
For example, I was able to
determine that the servo ID is stored at
the EEPROM address 0x29. This can be
read using the 0xE1 command, and a
new value can be used to change the
ID number using the 0xE2 command.
By making a set of systematic changes
in the HMI Servo Programmer, I was
able to determine that every single
change to the EEPROM also changed
the EEPROM address of 0x2C.
The value at 0x2C always seems to
change by the same numerical value as
I changed the other values. This gives
an indication that this memory location
is some sort of a Checksum. The best I
can tell from monitoring the data using
the servo reset function (covered next)
is that the checksum is computed using
the same method for individual com-
mand packets. Thus, the checksum is
equal to 256 minus the mod 256 of the
sum of all of the bytes written to
EEPROM addresses from 0x00 to
0x2B (Param2 using the 0xE2
command or read by Return1 using the
0xE1 command).
SERVO 01.2008 19
Header Command Param1 Param2 Checksum Return1 Return2
0x80 0xE1 0x29 0x00 0x76 0x00 0x03
0x80 0xE1 0x2C 0x00 0x73 0xB3 0x03
tmp = 0x0A - 0x00 = 0x0A (tmp = 10 - 0 = 10)
checksum = 0xB3 - tmp = 0xB3 - 0x0A = 0xA3 (checksum = 179 - 10 = 169)
Table 3
Header Command Param1 Param2 Checksum Return1 Return2
0x80 0xE2 0x29 0x0A 0x6B 0x03 0x03
0x80 0xE2 0x2C 0xA3 0xCF 0x03 0x03
Table 4
MrRoboto.qxd 11/30/2007 11:26 AM Page 19
To make a change to an individual
parameter, read both of the values
stored at the checksum and the
parameter EEPROM locations.
Calculate the difference between the
new parameter value minus the old
parameter value, then subtract this
value from the checksum value. Write
these two new values to the EEPROM.
Remember, if the checksum value
becomes negative, it needs to roll over
to 255 again.
For example, if I wanted to change
the Servo ID from its default value of
0x00 to 0x0A (10 decimal), then I can
write a program to read the two
EEPROM locations as shown here using
the 0xE1 command. (Note the values
shown are from the HSR-5980SG
servo). Then I make the overall
checksum change calculation, also
shown in Table 3.
These two new values are then
programmed back to the same
EEPROM addresses using the 0xE2
command as shown. Remember,
the checksum value calculated above
is the overall EEPROM checksum
value, which is sent as Param2, and is
not the same checksum value that is
computed for each command packet
sent to the servo as described earlier
(see Table 4).
In order for these parameter
changes to take effect, the servo must
be powered down and restarted. If
there was an error in calculating the
checksum, the servo will still work but
the motor will be disabled until the
problem is corrected.
If for some reason the servo stops
functioning properly due to program-
ming problems, the HMI Servo
Programmer software has a servo reset
feature that will reset the servo back to
the factory defaults. All you need to do
is start the program, select the servo
type, and select Servo Reset under
the File menu item. Then press the Yes
button, and the servo will be reset back
to its original condition.
At this point, you should have all
the information needed to control
these servos using serial communica-
tions. By monitoring the data being
transmitted between the servo and the
computer (using a program like the
Free-Serial-Port-Monitor), the specific
parameters and their functions can be
determined. This information can then
be modified to change your servo
performance characteristics.
At some point, someone will take
the time and, using the steps present-
ed here, compile a complete list of all
of the parameters and their functions
for the different HSR servos and
publish them to make our lives easier.
At 19200 baud, it will take about 4
ms of time to send the seven byte data
package. This takes about twice as
long to command a servo than using
the traditional pulse width method. But
the command only needs to be sent
once, the 20 ms servo update is no
longer needed, velocity is now a
control parameter, and with the
feedback information from the servos,
true closed loop positional and velocity
control of these servos can easily
be achieved. SV
20 SERVO 01.2008
HE8EJIFH;<;H>?J;9)0'
The results of an informal poll taken recently at the First
Annual World Domination Symposium are now in. Robots
prefer Hitec servos 3:1 over other servo brands. They know the wide
selection of Hitec analog and digital servos provide them with the power and depend-
ability needed to eventually take over the World. Make your robot happy, use Hitec servos.
12115 Paine Street | Poway | California | 92064 | 858-748-6948 | www.hitecrcd.com
>_j[Y
Ej^[h8hWdZ
.EW2OBOT3ERVOS
HSR-5980SG
Speed: 0.14 sec
Torque: 417 oz/in
Steel Gears
HSR-5498SG
Speed: 0.19 sec
Torque: 187 oz/in
Steel Gears
HSR-5990TG
Speed: 0.14 sec
Torque: 417 oz/in
Titanium
ALL SPECFCATONS AT 7.4 VOLTS
MrRoboto.qxd 11/30/2007 11:26 AM Page 20
Know of any robot competitions Ive missed? Is your
local school or robot group planning a contest? Send an
email to steve@ncc.com and tell me about it. Be sure to
include the date and location of your contest. If you have a
website with contest info, send along the URL as well, so we
can tell everyone else about it.
For last-minute updates and changes, you can always
find the most recent version of the Robot Competition FAQ
at Robots.net: http://robots.net/rcfaq.html
R. Steven Rainwater
J J a an nu ua ar r y y 2 20 00 08 8
8-10 Singapore Robotic Games
Singapore Science Center, Republic of Singapore
A plethora of events including Micromouse,
autonomous Sumo, RC Sumo, robot soccer, wall
climbing, pole balancing, underwater robots,
legged robot marathon, legged robot obstacle
race, and a robot colony contest.
http://guppy.mpe.nus.edu/sg/srg
25-27 TechFest
Indian Institute of Technology, Bombay, India
Lots of events for autonomous and remote
controlled robots including standard Micromouse
and several events unique to TechFest: Pixel, a
contest for vision-equipped bipeds; Full Throttle:
Grand Prix, remote-controlled, internal combustion
powered cars race on a concrete track; Vertigo, a
remote-controlled robot and an autonomous
robot must work together to move blocks around;
Prison Break, remote-controlled robot must
climb out of a pit and survive a fall to escape
robot-jail; U-571, an obstacle avoidance contest
for underwater robots.
http://techfest.org/competitions/department
F Fe eb br ru ua ar r y y
24-28 APEC Micromouse Contest
Austin Convention Center, Austin, TX
Amazingly fast little autonomous robot critters
race to solve a maze in this competition. If
youve never seen one of these events, go see
this one. You wont believe how fast these
things are.
www.apec-conf.org
M Ma ar r c ch h
15-16 Manitoba Robot Games
Tec Voc High School, Winnipeg, Manitoba, Canada
Included in this competition are a mix of events
for autonomous and remote-controlled robots
including Japanese style mini-Sumo, Western style
Sumo, a robot Mini-Tractor Pull, Super Scramble,
line following, and the Robo-Critters contest
for kids.
www.scmb.mb.ca
Send updates, new listings, corrections, complaints, and suggestions to: steve@ncc.com or FAX 972-404-0269
SERVO 01.2008 21
Events.qxd 12/5/2007 11:07 AM Page 21
EZPZ23-HR1 Piezo Motor Servo
Controller + Driver
T
he EZ Piezo Servo from
AllMotion is designed
to allow the rapid
implementation of position
control using the Nanomotion
HR1-1-S3 or similar motor.
The fully intelligent controllers,
measure just 2.25 x 2.25. The Nanomotion HR1 motor,
nine pin DSUB connector plugs directly into the controller.
A single four wire bus, containing two power wires and
two communications wires, links up to 16 such piezo
motor controllers in a daisy chain. Commands can be
issued from any serial terminal program (such as
HyperTerminal) or from the EZ Servo/Stepper Windows
application.
The commands are intuitive and simple. For example,
the command A10000 will move the servo motor to the
absolute position 10000. (This communications protocol
is compatible with devices that use the Cavro DT or
OEM protocol.)
The EZ Servo is also capable of stand-alone operation
with no connection to a PC. It can be set to execute a
preset string of commands upon power-up (i.e., only
power is required in this mode). The commands include
nested loops and execution halt pending a switch closure,
which is useful in stand-alone applications.
Using AllMotion Starter Kits, a first-time user is able to
make the HR1 piezo motor servo in less than half an hour.
Features include:
Single four wire bus linking up to 16 stepper/servo
motors.
HR1 motor plugs directly into the driver controller.
12V 2A supply voltage.
RS-232, RS-485, or USB based communications.
Four quadrant operation.
On-board EEPROM for user program storage.
Stand-alone operation with no connection to a PC.
Execution Halt/Branch pending switch closure.
Pre-wired for OptoSwitch inputs.
Position velocity and torque modes.
Industry standard communications protocol.
Homes to an opto or encoder index with a single command.
Fully programmable ramps and speeds.
Quadrature encoder based feedback for position mode.
Velocity mode possible with only Hall sensors for
feedback.
Switch selectable device address.
Software selectable max currents.
4 MHz max encoder frequency.
Two one amp on/off drivers included.
Optional step and direction mode; 4 MHz step frequency.
Four ADC inputs; Halt/Branch on ADC value.
For further information, please contact:
TReX Jr Dual-Motor
Controller
P
ololu introduces
its new TReX Jr
Dual-Motor Controller, a
versatile DC motor controller
suited for mixed autonomous and
radio control of small- and medium-
sized robots. Three independent interfaces are offered:
radio control (RC) servo pulse interface, analog voltage,
and asynchronous serial. The serial interface can switch
instantly with one of the other two interfaces, allowing
mixed autonomous and remote control. For example, a
robot could be configured to run autonomously most of
the time, but a human operator could override the
autonomous function if the robot gets stuck or into a
dangerous situation. If the serial mode is selected as the
primary interface, high-resolution measurements of all five
RC inputs are made available to the autonomous robot
controller, allowing for complex and unlimited mixing of
operator control and sensor input.
The TReX Jr motor controller operates from 5 to 24 V,
and the two primary outputs provide bi-directional control
with peak currents of 5 A and continuous currents of 2.5
A while a unidirectional auxiliary output delivers over 10 A
(continuous). A fourth control channel for invertible robots
allows improved control if the robot does get turned
upside-down, and the fifth control channel determines
which interface controls the motors. The unit measures
approximately 1.75 x 1.75 x 0.5, and it is available fully
assembled or in kit form.
New Products
MOTOR CONTROLLER
5104714000 Fax: 5104714003
Email: info@allmotion.com
Website: www.allmotion.com
AllMotion
N
N
E
E
W
W
P
P
R
R
O
O
D
D
U
U
C
C
T
T
S
S
22 SERVO 01.2008
JAN08NewProd.qxd 12/5/2007 11:10 AM Page 22
For further information, please
contact:
Advanced Features
for Robot Remote
Control
I
nRob Ltd. a leader in advanced
wireless control systems for
unmanned ground vehicles (UGV),
has announced advanced and
innovative features for its remote
control units for military robots
and UGVs.
These features include:
Secure, clear, and uninterrupted
wireless transmissions in most
operating environments.
Intuitive touch screen for more
efficient operations in the field.
Graphic screen display showing
critical data of the robot, including
fuel level, engine RPM, status of
tools in action, such as cameras, etc.
Networking technology with
option for a single operator to
simultaneously control and coordi-
nate multiple robots.
Advanced safety features for
weapon platforms. This feature
is particularly important for
law enforcement and Homeland
Security use, where the robots may
be used near crowds.
For further information, please
contact:
REMOTE CONTROL
6000 S. Eastern Ave.
Suite 12-D
Las Vegas, NV 89119
Tel: 8777POLOLU
or 7022626648
Fax: 7022626894
Email:
www@pololu.com
Website:
www.pololu.com
Pololu
Corporation
The
Power SchmartModule
will power up your
circuits with your choice
of -9, -12, +2.5, +3.3,
+5, +9, and +12 volts.
$15
Very Schmart!
www.schmartboard.com
The Escape
Robot`s built-in
microprocessor
enables it to
'think on its own.
(KSR4) $29.95
20 second voice recorder/playback
module. The electret microphone is on the
board. One button records, the other button is
momentarily pressed to replay the message.
(pre-assembled) (A96010) $6.60
5mm White
water clear
LED 3.5V
10,000 mcd
(AB287)
$0.56
The Velleman Personal Scope
is not a graphical multimeter
but a complete portable
oscilloscope at the size and
cost oI a good multimeter.
(HPS10)
The robot Irog moves Iorward
when it detects sound and
repeats: start (move Iorward) -~
stop -~ leIt turn -~ stop -~ right
turn -~ stop. (KSR2) $19.95
S
o
l
d
e
r
i
n
g

r
e
q
u
i
r
e
d
Thousands
m
ore item
s on
our w
eb site!
$146.
Ask for our FREE 96 page catalog
VISIT OUR ONLINE STORE AT
www.allelectronics.com
WALL TRANSFORMERS, ALARMS,
FUSES, CABLE TIES, RELAYS, OPTO
ELECTRONICS, KNOBS, VIDEO
ACCESSORIES, SIRENS, SOLDER
ACCESSORIES, MOTORS, DIODES,
HEAT SINKS, CAPACITORS, CHOKES,
TOOLS, FASTENERS, TERMINAL
STRIPS, CRIMP CONNECTORS,
L.E.D.S., DISPLAYS, FANS, BREAD-
BOARDS, RESISTORS, SOLAR CELLS,
BUZZERS, BATTERIES, MAGNETS,
CAMERAS, DC-DC CONVERTERS,
HEADPHONES, LAMPS, PANEL
METERS, SWITCHES, SPEAKERS,
PELTIER DEVICES, and much more....
ORDER TOLL FREE
1 - 8 0 0 - 8 2 6 - 5 4 3 2
THOUSANDS OF ELECTRONIC
PA RT S A N D S U P P L I E S
Robotics Showcase Robotics Showcase
SERVO 01.2008 23
Web: www.inrobtech.com
InRob Ltd.
JAN08NewProd.qxd 12/5/2007 11:13 AM Page 23
Featured This Month:
Technical Knowledge
24 Crushers
by James Baker
Feature
26 So You Think Youre Ready
for a Sponsor? by Chad New
Product Review
27 Eagle Tree Systems Micro
Power V2 E-Logger and
Power Panel LCD Display
by Don Hebert
ROBOT PROFILE Top
Ranked Robot This Month:
29 G.I.R. by Kevin Berry
Events
30 Results and Upcoming
24 SERVO 01.2008
M
any people think that the
opposite of a robot with a
kinetic energy spinner is an
armored push-bot. I disagree. The
KE spinner puts energy into a
rotating mass as it spins up over a
period of time. Once the energy is
there, delivering it is a very crude
affair. Our friend Isaac Newton
tells us that when this spinning
weapon hits the opponent, the
opponent hits back with equal
and opposite force. The classic
immovable object push-bot
meeting our unstoppable force
spinner, thus delivers equal energy
to both machines.
Once impact occurs, it is
out of the drivers control as to
exactly where on the opponent
the energy goes, and how much
energy is used up. In my opinion,
this makes spinners and armored
bots the same. Neither can be
sure of where impact occurs,
neither decides how much energy
is imparted, and both suffer the
same violent, chaotic energy
transfer.
An opposite to this would be
a robot that can choose where on
the opponent it attacks, and can
control the amount of energy it
transfers to that chosen area
over a period of time selected by
the driver. This perfectly describes
the crusher.
Physics
For pure destructive power,
nothing can match the potential
of a crusher. Whether hydraulic or
electric motor based, it is possible
to generate huge forces. A super
heavyweight could easily make
over 100 tons of crushing power
and put it onto a point, which
very few robots if any would
survive. The difficulty comes in
creating a chassis capable of
taking such high forces over a
TECHNICAL
KN WLEDGE
by James Baker
Crushers
CombatZone.qxd 12/3/2007 3:19 PM Page 24
SERVO 01.2008 25
usable range of motion
within the weight limit; 100
tons over one inch is easily
possible, but that is of no
use in combat. In all weight
classes, it is the robot
chassis that sets the limits
for crushers.
Return of the
Crusher
The UK has a long love affair
with crushers. We have had many
heavyweight machines successfully
use crushing weapons. The feather-
weight class however, rarely saw
the type, as effective crushing
weapons are heavy. Circumstances
in the UK at the moment are such
that high kinetic energy spinners
have very few opportunities to
fight. Combined with the extra 1.6
kg now allowed in the featherweight
class, it has opened the floodgates
for robots that could never afford
weight for crushing weapons to
make their entrance. There are
several crushers being built right
now, and Dragons Claw is the first
of many.
Dragons Claw
Tony Booth, a good friend of
mine, decided to build a high power
crusher after winning an eBay
auction for a Linak LA34 linear
actuator. This particular item can
deliver a reliable 10,000 newtons
of force at 24 volts, so its perfect
for featherweight combat robots.
Tony did the right thing
when designing an unfamiliar type
of robot. He asked
everyone he could for
advice, listened to the
advice, and used that
advice when designing
the robot. Its amazing
how many people
refuse to do this.
Based on a welded
aluminium chassis,
Tony never underesti-
mated the forces
involved in crushing your opponent.
He conducted many tests with a
temporary chassis and claw,
before deciding on the current
configuration.
Supplying the actuator with
the (quite modest) current it
needs are two packs of 12V NiMH
batteries (in series giving 24V),
through a simple servo-operated
DPDT switch and failsafe. These
batteries also supply the Robot
Power Scorpion XL speed controller
which, in turn, runs the 18V drill
motor based drive system.
This mix of components is
proving to be very effective. The
robot is fast, turns quickly, and
(more importantly) rotates around
its weapon due to having the drive
right at the front. The electron-
ics are small, light, and over
specification for their current
use. Dragons Claw has been
tested and proven itself to be a
very effective combat robot. It
has successfully pierced 10
mm plastics, 2 mm titanium,
and 6 mm aluminium, to
name but a few examples.
In fun events, it has proven
itself capable of catching its
opponent and bringing the weapon
down to pin or crush. (Catching the
opponent was initially a concern as
the actuator has a speed of just 5
mm per second.)
Dragons Claw is able to control
its opponent once it captures them.
A light squeeze holds the opponent
in place so it can be taken to arena
hazards or for other robots to attack.
Increasing the power to crush the
opponent puts a full 1,000 kg into
the Hardox claw, and onto the target
robot through an interchangeable
titanium tip. In testing this process,
Tony bent the 10 mm steel pivot
pins, so they are now 0.5 inch
titanium.
So, the robot is ready then?
Not quite.
CAD of Dragons Claw.
CAD of claw mechanism.
Dragons Claws frame.
Prototype claw.
Making weight
equals drilling holes.
CombatZone.qxd 12/3/2007 3:20 PM Page 25
26 SERVO 01.2008
S
o you think that you are
ready to get some sponsors,
do you? Have you typed out
your letter and arranged some
nice pictures thinking that you
are ready to rake in the sponsors?
Think again; getting a sponsor,
keeping a sponsor, and most
importantly making that sponsor
happy with you is much more
involved than an email and a few
nice shots!
In this article, I will give
you some basic guidelines which
may help increase your chances for
successfully getting yourself a
sponsor. This will hopefully help
offset the cost of this sport and
also give you equipment that may
be able to take your robots to the
next level.
Too Heavy
The curse of the crusher is that it
needs to be very strong. In this case,
it meant Dragons Claw was a little
overweight and it had no armor yet!
There are many ways this surplus
weight could be removed. Lighter
batteries, smaller actuator, or
expensive alloys being some options.
The cheapest option is to drill
holes, which is what Tony did. A full
kilogram (2.2 lb.) was lost by taking
aluminium away, but you have to be
careful not to weaken the chassis so
much that it cannot handle those big
numbers when you hit the squash
him button.
Thankfully at the same time
Tony was drilling holes, the UK robot
combat governing body (the
Fighting Robot Association)
was changing the rules. The
extra 1.6 kg now allowed,
combined with the many
holes drilled, meant Dragons
Claw was now underweight,
and ready for its titanium
armor. This was bolted in
place to nylon pillars, allowing
flex and deformation. A
beautiful paint job later and
Dragons Claw was ready to enter its
first competition. I have fought
against this robot with my
fun-bots, and as you can see in the
photos, Dragons Claw is a seriously
competitive machine.
Robots are never finished. They
will evolve and change to suit the
environment and their predators or
prey. This assisted evolution means
that Dragons Claw may well have
changed again by the time you read
this article, so you can get updates
and further information about it on
Tony Booths website at www.team
dragon.org.uk. SV
SO YOU THINK YOURE
READY FOR A SP NSOR?
by Chad New
Weapon control.
Lifting works, too.
Paint matters!
Leverage also matters.
Finished Dragons Claw. Crushing the opponent.
CombatZone.qxd 12/3/2007 3:22 PM Page 26
SERVO 01.2008 27
The When
As a newbie robot builder, you
have a very low chance at landing
himself a sponsor. You are unproven,
your name is not known, and chances
are that your robots are not yet up to
par with your competition. It is not an
impossible task, however, your
chances are much greater once you
gain some experience. The appropri-
ate time to seek sponsorship is when
you can prove that you know what
you are doing. Can you build a robot?
Talk about it; tell a person what all the
parts are, what they do, and how
they are going to work better next
time. Have you been to several events
and come home with a robot that you
can still drive, or better yet, a win?
If you can answer yes to these
questions, then you might be able to
realistically consider getting yourself a
sponsor. You have built up some cred-
ibility that you must now project to
the companies which you would like
to attempt to gain sponsorship from.
The Why
Why would anybody sponsor
you? Companies will sponsor who is
willing to work for them. They are
not going to shower you with parts
and money for free, no matter how
good your emails are. Companies
need testers, feedback, good com-
munication, pictures, and marketing
tools. What they need is a person
committed to help sell their product.
When a new product comes out,
they need people that know what
they are doing to test it and give
them feedback, telling them how it
can be made better and the weak
points of the item. When setting up
a booth, they need robots to display
and pictures for their website.
Combat robots are great for market-
ing! If Product X can take the abuse
from a combat robot, then inside an
R/C car it should last forever! If you
make it clear that you are willing to
work for your sponsorship and are
not just looking to be handed some-
thing, then you have a chance.
The How
It all starts with one email or a
phone call. First impressions are the
most important, so you better make it
a good one. If you are going to call,
have a list of facts ready to talk about;
list the points that you want to make
and most importantly how you can
help them. If you choose to send an
email, make it short and to the point.
You do not want the reader to lose
interest and shoot your mail to the
trash bin. Again, list the points that
you really want to emphasize and
what you have accomplished. You
may also include some pictures of
your robots. However, do not attach a
video because that may take a long
time to download. Also, dont forget
to list what you can do for them!
Ready?
Take all of these tips and
combine them into one great email
or phone call. If you are able to score
some free parts, make sure you put
them to good use! Do not take them
and run. Give your sponsors updates,
feedback, and check to see if they
need your help with anything. With a
little effort and some luck, you too
can have parts for the cost of a little
computer work! SV
I
was always very thorough about
monitoring current draw and amp
hours in my robots. Current and
voltage tests can determine the
compatibility of a motor/battery
combination. Studying the results led
me to my favorite voltage/amp
hour/motor combination.
At first, an AstroFlight watt
meter would go for a ride, secured
on top of the robot. Reading the
display while the robot was moving
Quick Tips
1) DO use spell check! You dont
want to sound incompetent.
2) Dont say: Hi, I would like to build
a robot. Please give me parts.
3) DO follow-up on your emails and
calls. Just a simple hey, just checking
to see if you got my message
works fine.
4) Dont send long random emails
that have no point.
5) DO be polite, even if the answer is
no. Next time they need a tester, they
might email you!
6) Dont be a pest! Do not send
people dozens of emails. That is an
assured no!
7) DO be patient. Just because you
dont get an immediate response
doesnt mean the answer is no.
8) Dont give up. Work harder at
it! Build better robots, take better
pictures, and refine your sponsor-
ship pitch.
PR DUCT REVIEW
Eagle Tree Systems Micro Power V2 E-Logger and
Power Panel LCD Display
by Don Hebert
CombatZone.qxd 12/3/2007 3:22 PM Page 27
28 SERVO 01.2008
was difficult. It would move too fast,
so most of my measurements were
done with the wheels up or against a
wall, wheels spinning. Wheels-up
testing detected gearbox problems
effectively. Bad mechanical
conditions showed higher that
normal amps.
This worked okay for most of my
needs. But as my lifter got more
powerful, I found the need for faster
measurement. Some events, like the
1/2 second of the lift, were not
visible in the display of the watt
meter. A data collection device with
sufficient samples per second was
needed. The Micro data logger from
Eagle Tree Systems fit the bill.
The Micro Power E-Logger from
Eagle Tree Systems (www.eagle
treesystems.com) can measure
100 amps and 4.545 volts. It
calculates amp hours and watts. All
this is recorded in memory for
later retrieval. Sampling rate is
10 per second. Data retrieval is
via a supplied USB cable. The
PC software is also provided
(see Figures 1 and 2).
Real-time amps, volts, watts, and
amp hours can be displayed with the
optional Power Panel LCD. Think of it
as a dashboard for the robot (see
Figure 3).
The entire combination is half
the size of the Astro watt
meter. Figure 4 shows installation in
a 12 lb robot.
Preliminary setup prior to first
use is required. The data logger has
many add-on devices. What is
installed like the LCD display
must be declared for them to work.
For my tests, the LCD was the only
extra device. The current and voltage
detectors on the data logger are
always available.
The instructions for what data to
collect is also required. I displayed
volts, current, amp hours, and
wattage. Volts and amps are direct
from the on-board sensors. Wattage
is calculated from volts and amps.
Amp hours are calculated
from amps and time.
With the LCD panel,
you may conduct real
time monitoring such as a
wheels-up test. You do
not have to retrieve the
collected data. If the
buffer gets full data,
collection simply stops.
The real-time display of
displayed volts, current,
amp hours, and wattage
will continue. (Just this is
pretty cool.) The unit is small and will
fit anywhere. I usually use masking
tape to hold everything in place.
A new recording session is start-
ed each time the logger is turned on.
Plug it in to the battery circuit after
the power switch. I find it helpful to
script the sequence of events ahead
of time. Once the data is extracted,
current draw will be your only indica-
tion to tie the section of the trace to
the test event. A wheels-up test at
full power may be indistinguishable
from full speed reversals on the
ground or from wheel spin against
the wall. So noting which test was
done first allows you to link the first
peak in current draw with that test.
After the tests are done, turn off
the power. Remove the data logger
from the robot and bring it to
your computer. Start the software.
Connect to your PC with the provided
USB cable. The connection will power-
up the data logger and connection
will be established. We now have to
explicitly request data from the device.
Until the memory is full, you may
plug the logger again and again to
collect more data. Each power-on is
easily distinguished as a new session
in the graph. For example, I could
save five separate test sessions in the
data logger before I had to clear data
and start over. I saved the data to the
same file name and each time I did
another test, all of the data from the
previous test was still in there. No
problem! The saved file just got larg-
er each time I saved to the hard drive
(see the sample graph in Figure 5).
I encountered one problem after
clearing data memory and running a
few more data collections. I retrieved
FIGURE 1. Micro Power Data Logger.
FIGURE 3. Power panel.
FIGURE 4. Installation
in a robot. This is small!
FIGURE 2.
Main screen.
CombatZone.qxd 12/3/2007 3:23 PM Page 28
SERVO 01.2008 29
the data and saved it to the previous-
ly named file. I expected a concate-
nation of the data already saved and
the new data just retrieved. But the
new data completely overwrote all of
the previous data; the original data
was gone. This was a mistake on my
part, I now know better. But there
are no warnings that you are about
to overwrite data.
There is a live mode that uses
the main screen of the PC as a
real-time display. There are also
additional sensor modules to monitor
RPM and temperature.
In conclusion, I heartily endorse
this product. The MicroPower V2
E-Logger retails for $69.95, and the
Power Panel LCD Display for $39.95.
It records data accurately and meets
my needs. Even if you do not use the
data collection, it is still a handy
little display. SV
ROBOT PR FILE
by Kevin Berry
FIGURE 5.
Graph screen.
Contact the Author
Don can be reached via email at
dhebert562@charter.net
TOP RANKED ROBOT THIS MONTH
Historical Ranking: #1
Weight Class: 6 lb "Mantis"
Team: Chaos Robotics
Builder: Dirk Stonehouse
Location: Saskatoon, Saskatchewan, Canada
BotRank Data Total Fights Wins Losses
Lifetime History 16 14 2
Current Record 13 11 2
Events 6
G.I.R. Currently Ranked #1
New
Section!
CombatZone.qxd 12/3/2007 3:24 PM Page 29
G.I.R. has competed in WBX II,
WBX III, WBX IV, Kilobots IX,
Kilobots X, and Kilobots XI. More
details are listed below:
Frame: 1-1/2 x 3/4 aluminum
channel, milled to reduce weight
and welded
Base plate: 1/16 Garolight
Drive train: Four B62 gearhead
motors
Voltage: 14.8
Wheels: 2 inch 1/10 scale pan car
foam tires
Configuration: Invertible box with
thresher and hinged titanium wedge
Drive ESC: Two Traxxas EVX
Drive batteries: Two 2.1 Ah, 7.4V
Thunder Power lithium packs
Weapon: 1-3/4 inch drum thresher
with six two-tooth blades driven at
the center with a dual O ring belt
configuration
Weapon battery: One 2.1 Ah, 7.4V
Thunder Power lithium pack
Weapon motor: 27 turn stock 540
Weapon ESC: Tekin Titan
Armor: Titanium in the front
Future plans: Upgrade from
the 540 weapon motor to a Hacker
A30-10XL
Design Philosophy
I designed G.I.R. to be a
powerful pusher with the ability to
withstand shell and bar spinners.
Also, to inflict some damage with
the drum and be invertible. So far, it
has proven to be a fairly good design
to be ranked #1. SV
Photo and information are courtesy of
Dirk Stonehouse. All fight statistics are
courtesy of BotRank (www.botrank.com)
as of November 13, 2007. Event attendance
data is courtesy of The Builders
Database (www.buildersdb.com) as of
November 13, 2007.
30 SERVO 01.2008
Results from Oct. 14
through Nov. 11, 2007
2
007 Halloween Robot Terror was
presented by California Insect
Bots in Gilroy, CA on 10/27/2007.
Go to www.calbugs.com for more
information. Results are as follows:
150 Gram Flea Weights 1st:
Crisp, Team Misfit, driven by Orion
Beach; 2nd: Atom Bomb, Team
Misfit, driven by Daniel Chatterton.
1 Pound Ant Weights 1st:
Baron Underbheit, Team Misfit,
driven by Kevin French; 2nd:
Pooky, Team ICE, driven by David
Liaw; 3rd: Mash Potato, Team ICE,
driven by Pui Shan Wong.
3 Pound Beetle Weights 1st:
Unknown Avenger, Team ICE,
driven by David Liaw; 2nd: Impact,
Team Target Practice, driven by Don
Hebert; 3rd: Queen of Kings, Team
Misfit, driven by Shannon Muha.
F
ranklin Institute Robot Conflict
was presented by North East
Robotics Club, Inc., in Philadelphia,
PA on 10/20/2007. Go to www.
nerc.us for more information.
Results are as follows:
Beetleweight (3 lb) 1st: Yeti,
Team Mad Scientist; 2nd: Pure Dead
Brilliant, Team Rolling Thunder; 3rd:
Destructive Crab, Team Green
Machines.
Hobbyweight (12 lb) 1st:
Ntertainment, Team Demolition;
2nd: Ingor, Eater of Souls, Ministry
of Bad Ideas; 3rd: Not a VD, Team
Anarchy Robotics.
Featherweight (30 lb) 1st: Billy
Bob, Robotic Hobbies; 2nd:
TriPolar, Team Brain Damage; 3rd:
The Interloper, Team Interloper.
Sportsmans (30 lb) 1st: Bounty
Hunter, Team Hammertime; 2nd:
Upheaval, Team Mad Scientist;
3rd: Mangi, Team HFA.
H
ORD Fall 2007 was presented by
the Ohio
Robot Club in
Brecksville, OH
on 11/3/2007.
Results are as
follows:
Flea Weights 1st: Little Buzz,
Richard Kelley, Team Kelley; 2nd:
02, Even Gandola, Team Probotics.
Ants 1st: Dusty, the Evil Dust
EVENTS
Results and Upcoming Events
CombatZone.qxd 12/3/2007 3:24 PM Page 30
Pan, Jeff Gier, Team Mechanical
Advantage; 2nd: Heman I, Evan
Gandola, Team Probotics; 3rd:
Rumble, Heman I, Evan Gandola,
Team Probotics.
Beetles 1st: D2, David Timothy,
Team D2; 2nd: The Box, Richard
Kelley, Team Kelley; 3rd: Rumble,
Sweaver, Greg Shay, Team Fishneck.
R
obots Live presented a show in
London for the MCM Expo,
10/20-21/2007. Go to www.robots
live.co.uk for more information.
M
echa Mayhem 2007 was
presented by Chicago Robotic
Combat Association in Rosemont, IL
on 10/19-21/2007. Go to www.the
crca.org for more information.
R
obowars Metro was presented
by RoboWars in Oakleigh, South
Victoria, Australia on 11/06/07. Go
to http://robowars.org for more
information.
Upcoming Events for
January and February
2008
W
AR NW Model Hobby Expo
2008 will be presented by
Western Allied
Robotics in
Seattle, WA on
2/9/2008. Go to
www.western
alliedrobotics.
com for more information.
The event will be held at the
Monroe County Fairgrounds (near
Seattle; www.nwmodelhobby
expo.com/Directions.html). The
event will be held from 11:30am-
6:00pm and safety inspection from
9:00am-11:00am. If a lot of robots
register, they may start safety and
fights earlier. Class: 1, 3, 12, and 30*
pound robots (30 lb spinning-
weapons not allowed). Format:
Double Elimination or Round Robin
(RFL Rules), no ICE or open flames.
Entry Fee: $40 for first 30 lb or 12 lb
robot. $25 for first 3 lb or 1 lb robot.
Additional robots are half price.
Special entry fee considerations for
builders who are under 18. Arena:
12 x 12 with 18 x 18 pit in one
corner surrounded by a 2 high
wall making it very difficult to
accidentally drive into it.
M
otorama 2008 will be present-
ed by North East Robotics
Club, Inc., in Harrisburg, PA, from
2/15-17/2008. Go to www.nerc.us
for more information.
This will be a 150 g to 30 lb
combat event. Fairies and Ants fight
in 8 box on Friday; Beetles through
Featherweights fight in 16 x 16 box
on Saturday and Sunday. All complet-
ed forms and entry fees must be
received by 1/2/07. This is going to
be another awesome event at the
Farm Show Complex!
R
obots Live will present an event
at the Hermitage Leisure Centre,
Whitwick, Leicestershire on 2/2-
3/2008. Go to www.robotslive.
co.uk for more information.
For the first event of the year,
Robots Live heads back to their home
town of Whitwick in Leicestershire.
Not only is this their hometown
but also their birthday! Come and
celebrate two years of Robots Live!
R
obowars has tentatively sched-
uled their national title event in
Oakleigh, South Victoria, Australia
on 1/12-13/2008. Go to http://rob
owars.org for more information. SV
Tormach PCNC 1100 Features:
Q Table size 34" x 9.5"
Q R8 Spindle 1.5 hp variable speed to 4500 RPM
Q Computer controlled spindle speed and direction
Q Precision ground ballscrews
Q Digitizing and tool sensing support
Q 4th axis and high speed spindle options
3 Axis Mill
$6800
plus shipping
When youre serious about hardware, you need serious tools.
Whether milling 0.020 traces on prototype PCBs or cutting
steel battle armor, this CNC mill can do it all. Weighing in at more
than 1100 lbs, the PCNC can deliver the hardware end of your
combined hardware & software projects.
Precision CNC
Machining
Mill includes Control, CAD and CAM
software. Optional stand, coolant system,
computer and accessories are extra.
Product information and online ordering at www.tormach.com
SERVO 01.2008 31
CombatZone.qxd 12/3/2007 3:25 PM Page 31
32 SERVO 01.2008
B
ecause I get to put together all
kinds of neat stuff. And, when
Im done playing with my new
garage-brewed toys, I get to show
them to you and tell you all about
them. So, get your soldering irons
hot and stuff your face into that illumi-
nated desktop magnifier. We are going
to build an intelligent stepper motor
controller from scratch that is based on
the Allegro MicroSystems A3979.
So What??
YIPEE. Another stepper controller.
NOT! This stepper controller is compact
and when properly heatsinked, handles
two ampere motor loads. The Allegro
A3979 is an upgraded version of the
venerable A3977. All of the easy to use
motor control knobs and dials you
were used to on the A3977 are also
present on the A3979 DMOS driver.
We can even use the same external
components in an A3979 design that
we would use in an A3977 design. The
big difference in the two DMOS drivers
is the addition of 16th stepping
capability to the A3979. If you think
youre about to read about a rehashed
version of the A3977 circuits you can
get from various Internet points, sit
down, shut up, and read on.
Getting Small
If you have ever worked with the
A3977, you probably used the 44-pin
PLCC version of the part. The PLCC is big
and relatively easy to put down on a
printed circuit board (PCB). You cant
get the A3979 in a 44-pin PLCC
package; it only comes in a 28-pin
TSSOP package. Instead of dissipating
heat though pins as the PLCC-packaged
A3977 does, the A3979 has an exposed
heatsink pad on its belly. A woodpecker
would see that pad on the underside of
the A3979 in the perspective of Photo 1.
The A3979 can be crammed into
a very tiny space if youre not
driving stepper motors the size of
watermelons. The only design point
that increases the size of the A3979
by Fred Eady
The Super
STEPPER DRIVER
PHOTO 1. Dont think that you cant access this
heatsink pad without special soldering equipment.
A few holes in the printed circuit board under the
belly of the A3979 provides access.
PHOTO 2. This was a challenging build as I
had to be extra careful not to short the
SMT 0805 components on the ground
plane extensions under some of the SMT
parts. A fine tipped soldering iron and an
illuminated magnifier are must-have tools
for this project.
Eady.qxd 12/4/2007 3:42 PM Page 32
PCB is heatsinking. Thus, as you can see in Photo 2,
Ive gone all out on the heatsinking of the A3979 by
laying out a ground/heatsink plane onto the entire
top side of the A3979 stepper driver PCB.
To keep things simple, I also spread out all of the
A3979s supporting components in my design. If you
trash the serial port and squeeze the PIC18F2620 in
towards the A3979, you can push this stepper
driver/controller into a very small form factor.
Lets Get Started
The very first thing we must do is design and lay
out a suitable PCB to support the A3979 and its subor-
dinate components. I want you to be able to build this
stepper controller in your shop. I used ExpressPCB and
their tool suite for the PCB fabrication. To make parts-
gathering easier for you, Ive sourced all of the A3979
motor driver boards components from Mouser and
Digi-Key. The A3979 motor driver board ExpressPCB layout
sans ground plane can be seen in Screenshot 1.
In that the A3979 has a built-in translator, the computing
support requirements are low. Lets stop here and define
translator. Without a built-in translator, we would have to
write every little bit of code required to interpret command
inputs and convert them to motor movements. That includes
writing code to correctly phase and drive the A3979s
H-bridges. We would also find ourselves constructing phase
tables for use in the microstepping process. The phase tables
would be used to modulate a PWM signal that is fed into a
DAC (Digital-to-Analog Converter). The DAC would generate
voltage levels relative to the modulated PWM signal. (Trust
me. We want to use a translator if at all possible.) Thus, a
translator is in this context a combined package of special-
ized hardware and firmware that resides in the A3979 silicon.
The purpose of the translator is to convert incoming motor
commands into motor actions or A3979 control actions. A
REF PFD
RS-232 CONNECTOR
OUT1B
O
U
T
2
B
OUT1A
O
U
T
2
A
TXD
RXD
HOME
DIR
MS2
MS1
SLEEP
STEP
RESET
RXIN
TXOUT
RX
RXIN
TXOUT
TX
VBB
+5VDC
+5VDC
+5VDC
+5VDC
+5VDC
+5VDC
+5VDC
+
C7 220uF
C16
.1uF
C14
.1uF
C10
.22uF
R5
.2
C17
.1uF
C8
.1uF
U1
A3979SLP
7 2
1
4
4
1
2
3
4
5
6
8
9
1
0
11
13
12
14
1
5
2
8
1
6
17
18
19
20
2
2
2
3
2
4
25
2
6
27
A
G
N
D
P
G
N
D
G
N
D
SENSE1
HOME
DIR
OUT1A
PFD
RC1
REF
RC2
V
D
D
OUT2A
MS1
MS2
SENSE2
V
B
B
2
V
B
B
1
S
R
RESET
OUT2B
STEP
VREG V
C
P
C
P
1
C
P
2
OUT1B
E
N
A
B
L
E
SLEEP
C2
.001uF
C15
.1uF
R1
50K
R9
10K
U3
ST3232
13
8
10
11
1
3
4
5
2
6
12
9
14
7
15
16
R1IN
R2IN
T2IN
T1IN
C1+
C1-
C2+
C2-
V+
V-
R1OUT
R2OUT
T1OUT
T2OUT
VSS
VDD
C18
.1uF
R2
50K
OPTIONAL
ACTIVITY LED
OPTIONAL
330
ICSP CONNECTOR
1
2
3
4
5
6
1
2
3
4
5
6
R7
100
C13
.1uF
+
C4 10uF
+
C6 220uF
U2
PIC18F2620
2
3
4
5
21
22
23
24
25
26
27
28
11
12
13
14
15
16
17
18
10
9
1
6
7
8
19
20
RA0
RA1
RA2
RA3
RB0
RB1
RB2
RB3
RB4
RB5
RB6/PGC
RB7/PGD
RC0
RC1/CCP2
RC2/CCP1
RC3
RC4
RC5
RC6/TX
RC7/RX
OSC2/RA6
OSC1/RA7
MCLR
RA4/T0CKI
RA5
GND
GND
VDD
C19
.047uF
BIPOLAR STEPPER MOTOR
C12 .22uF
C3
.001uF
C22
.33uF
R8 1K
C20
.33uF
C21
.33uF
R3
30K
C11 .22uF
C5
.1uF
C9
.1uF
DB9 FEMALE
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
R4
30K
C1
.1uF
R6
.2
SCREENSHOT 1. This is art. However, my wife wont let me put anything
like this up in a frame in the living room. It looks better on a computer
display, anyhow.
SCHEMATIC 1. The A3979s translator
is fully serviced by the PIC18F2620 and
there are still plenty of spare I/O lines
for your use. I added an RS-232 port to
allow you to control motor movement
from a laptop or desktop PC.
SERVO 01.2008 33
Eady.qxd 12/4/2007 3:43 PM Page 33
34 SERVO 01.2008
motor action is the instigation of motor movement such as
clockwise rotation, counter-clockwise rotation, and halting the
motor. The A3979 command inputs STEP and DIRECTION are
used to invoke motor action. A3979 control actions include
putting the A3979 silicon to sleep, resetting the A3979s inter-
nal systems, or enabling or disabling the A3979s internal H-
bridges. Control actions are also spawned by A3979 command
inputs, which are logic levels applied to the translator command
input subsystem. The A3979 translator also provides some use-
ful output in the form of a HOME signal. HOME is defined in
A3979 terms as the initial state of the translator. The translator
will put the step sequence in the HOME position at power-up.
Picking up on the idea that the A3979 doesnt need an
IBM mainframe to operate efficiently, all we really need to
control the stepper motor by way of the A3979 is a small
microcontroller, such as the PIC18F2620. The PIC18F2620
hookup details can be seen in Schematic 1. As you can
see, it has more than enough I/O to support the A3979. The
ability of the PIC to clock itself internally leaves two more I/O
lines (RA6-RA7) at our disposal.
There are only eight A3979 translator I/O lines we need
to deal with. The A3979 ENABLE line is optional here and is
put into a permanent enabled state. That leaves us with only
seven translator lines to tie to the PIC. Since the plan is to
cover the top side of the A3979 PCB with a ground plane, all
of the communication lines between the PIC and the A3979
are routed on the bottom side of the A3979 PCB. Note also
that the translator I/O lines are routed as far away from the
power circuitry as possible.
The largest current carrying trace needs to be 0.025
inches wide, which will transfer two amperes. As you can see
in Screenshot 1, that is a tall order in terms of the A3979 pins.
So, we do the best we can and attach the widest trace possi-
ble as close as possible to the A3979 motor output pins. It is
important to keep the thin traces as short as possible to keep
the trace resistance to a minimum. Once we have attached a
trace to the A3979 motor driver pins, we can increase the
copper area to accommodate the higher currents we may
encounter at the A3979 motor output terminations. I used
large copper planes instead of traces on the bottom side of the
PCB to connect the A3979s motor output pins to the four-pin
motor terminal block. Copper planes are one of my favorite fea-
tures of the ExpressPCB printed circuit board layout program.
The final critical design point is to place the current sense
resistors as close to the A3979s current sense pins as possible.
We also need to consider routing the current sense resistors
ground return paths. The ground return paths to the A3979
from the current sense resistors need to be electrically unhin-
dered. I placed the current sense resistors as close as possible
to their respective A3979 current sense pins and used the
vastness of the ground plane as the sense resistors ground
return path. The A3979 datasheet says to provide a separate
ground path for each sense resistor. However, from experience
Ive found the ground plane method to have no adverse
effects on the operation of the A3979 H-bridge circuitry.
Again, I could have saved some board space by
installing fixed resistor voltage dividers for the PFD and REF
potentiometers. Having the pots here allows you to adjust
the symmetry of the stepper motor current waveform (PFD)
and select the amount of current you want to supply to the
stepper motor (REF) with the twist of a screwdriver.
No project of mine would be complete without an RS-232
port and a standard issue Microchip ICSP programming/
debugging portal. Note that Ive used the ST3232 in a five-volt
configuration in this project. The ST3232 can be used in 3.0
volt and 5.0 volt environments by simply changing the charge
capacitor values. Normally, 0.1 F charge capacitors would be
surrounding the ST3232 in a 3.3 volt project. As you can see
in Schematic 1, the 0.1 F charge capacitors are replaced with
0.33 F charge capacitors and a 0.047 F charge capacitor
between the ST3232s pins 1 and 3.
I used a reflow oven to reflow-solder the A3979 motor
driver boards SMT components. If you dont have access to
a reflow oven, you can assemble the A3979 board with a fine
tipped soldering iron. If the reflow process intrigues you, you
may want to investigate the Stencils Unlimited site
(www.stencilsunlimited.com). There you will find all kinds
of SMT soldering aids. The A3979s pins are fine and require
a stencil setup for reflow soldering. Because I want you to be
able to build the A3979 motor driver board without having
to procure specialized tools, I didnt go the stencil route this
time and used my Metcal soldering system to manually
connect the A3979 pins to the PCB.
The Metcal (www.metcal.com) soldering system is a
quick heating precision solder station. If you dont have
access to hot air soldering equipment, youll need to add
some holes to your PCB layout under the belly of your A3979.
The additional holes will allow you to flow solder through
from the bottom of the board onto the A3979s exposed
heatsink pad, which must be thermally connected to the
ground plane. Ive included the A3979 motor driver board
ExpressPCB file in the SERVO A3979 project download
package at www.servomagazine.com so you can use it
as a base for your custom A3979 project. The A3979
ExpressPCB file will reveal the presence of the ground plane
passing underneath the A3979 providing a soldering point
for the A3979s exposed heatsink pad.
Coding the A3979 Motor
Driver Firmware
Everything depends on the PIC18F2620 clock. At power-
up, the PIC will default to a 1 MHz internal RC clock as we
have specified that it use its internal clocking subsystem.
Ultimately, we want to run the PIC at its maximum clock
speed of 32 MHz. To do this, we must first load the OSCCON
register with 0x70. This will change the PICs internal clock
speed to 8 MHz. Then, we enable the 4x PLL to boost the
clock speed to 32 MHz. This is done by writing a 1 to the
PLLEN bit. Once the clocking has been taken care of, we can
assign the PICs port I/O to input or output according to the
port pins required usage. For the PIC18F2620, a 1 identifies
an I/O pin as an input while a 0 is used to define an I/O pin
as an output. Heres the clock and port I/O TRIS code:
Eady.qxd 12/4/2007 3:43 PM Page 34
//*******************************************************
//* INITIALIZE CLOCK AND IO PORTS
//*******************************************************
OSCCON = 0x70; //run at 8MHz
PLLEN = 1; //enable 4x PLL
TRISA = 0b01010111;
TRISB = 0b11111111;
TRISC = 0b10001010;
For now, we wont be employing the services of the PIC
s analog-to-digital converter (ADC) subsystem. So, well just
turn it off. If you want to use the ADC in your version of this
project, you can do so as portions of the PIC18F2620s
PORTA and PORTB I/O subsystem can become ADC inputs.
Since were not using the ADC, heres the ADC OFF code:
//*******************************************************
//* CONFIGURE A2D AND COMPARATORS
//*******************************************************
ADCON1 = 0b00001111; //all port I/O is digital
ADON = 0; //ADC off
CMCON = 0x07; //comparators off
The ADC OFF code also turns off the PIC18F2620
comparators with a write to the CMCON register.
The PIC is endowed with a multitude of timers/counters.
So, why not use them? Ive coded up timer routines for
TIMER1 and TIMER3. Each of the aforementioned timers will
trigger an interrupt every millisecond. Ive set up TIMER1 as
a general-purpose timer that can resolve milliseconds,
seconds, and minutes. TIMER3 leans towards being a
real-time clock and if you add an LED to RA7, TIMER3 will
drive the LED at one blink per second. The timer setup code
is pretty simple and looks like this for TIMER1:
//************************************************
//* CONFIGURE AND START TIMER1
//* SET TO OVERFLOW EVERY 1mS
//************************************************
TIMER1OFF;
T1CON = 0b00000000;
TMR1H = 0xE0;
TMR1L = 0xC1;
TIMER1ON;
And, like this for TIMER3:
//************************************************
//* CONFIGURE AND START TIMER3
//* SET TO OVERFLOW EVERY 1mS
//************************************************
ihours3 = 12;
imins3 = 0;
isecs3 = 0;
imsecs3 = 0;
T3CON = 0x00;
TMR3H = 0xE0;
TMR3L = 0xC1;
TMR3ON = 1;
Screenshot 3 is a CleverScope capture of the
TIMER3 1 ms clock driving I/O pin RA7. In the TIMER3
interrupt code, I count 1,000 of these to mark seconds,
which clocks the RA7 LED if it is present in your design.
Ive provided the full code package for the A3979 motor
driver board via the SERVO website. If youre interested in the
way the timers interact during an interrupt, you can peruse
the download package source code to study the timer
interrupt service routines in detail.
The final steps of the A3979 motor driver board
initialization process include activating the interrupts and
setting up the stepper motor:
//*******************************************************
//* CONFIGURE EXTERNAL INTERRUPTS
//*******************************************************
enable_TMR1int;
enable_TMR3int;
enable_GLOBALint;
//*******************************************************
//* INITIALIZE STEPPER MOTOR DRIVER HARDWARE
//*******************************************************
quarter_step; //quarter-step mode
step_HALT; //stop the motor
rst_step = 0; //reset the A3979
mdelay1(100); //delay 100mS
rst_step = 1; //bring A3979 out of reset
slp_step = 1; //put A3979 to sleep
step_HALT; //make sure motor is stopped
The millisecond delay routine (mdelay1()) is actually a C
macro and its source code can also be found in the download
code package. The same can be said of the interrupt enable
macros. There are a couple of additional macros (quarter_step
and step_HALT) in the stepper motor initialization code that
need to be defined for you at this time. Check this set of
A3979 translator input definitions against Schematic 1:
#define rst_step LATC5
#define slp_step LATC4
#define dir_step LATC0
#define ms1 LATA3
#define ms2 LATA5
Lets see, theres a RESET translator input, a SLEEP trans-
lator input, a DIRection translator input, and the step resolu-
tion selection (ms1-ms2) translator inputs. Now you can go
SCREENSHOT 2. To get this shot, I simply toggled the RA7 line every time
a TIMER3 interrupt occurred. Using the 1 mS interrupt clock as a time
base, I can count the 1 mS pulses to create timings for seconds, minutes,
hours, and days.
SERVO 01.2008 35
Eady.qxd 12/4/2007 3:43 PM Page 35
36 SERVO 01.2008
back to the stepper motor initialization code and resolve the
usage of rst_step and slp_step. However, you still dont have
enough information to decipher quarter_step. In fact, you
cant decrypt any of the ms1 or ms2 logic combinations until
you fix your eyes on the following truth table macro code:
#define full_step ms1 = 0; \
ms2 = 0;
#define half_step ms1 = 1; \
ms2 = 0;
#define quarter_step ms1 = 0; \
ms2 = 1;
#define sixteenth_step ms1 = 1; \
ms2 = 1;
The step resolution definitions youve just seen are actually
C macros, which assign logic levels to the ms1-ms2 translator
inputs. The macro quarter_step should make sense to you now.
If youre still a bit foggy on the concepts, I suggest getting a copy
of the A3979 datasheet and referencing it as you study the
source code Im presenting. The A3979 logic is very simple and I
guarantee that if you relate what youre reading here to what
you see in the A3979 datasheet, it will all come together for you.
We could write some bit-bang code to feed the A3979
translators STEP input. However, why do that when we can
conjure up a set of never-ending step pulses from the
PIC18F2620s PWM generator? And, using the PIC18F2620s
PWM is easier than writing step code. The first step in getting
a string of step pulses out to the A3979 involves setting up
yet another one of the PIC18F2620s timers for PWM duty:
//*******************************************************
//* CONFIGURE PWM
//*******************************************************
//decrease CCPR1L to shorten step pulse width
TIMER2OFF;
CCP1CON = 0x1F;
CCPR1L = 50;
T2CON = 0x07;
PR2 = 180;
TIMER2ON;
The values I have loaded into the TIMER2 and PWM
registers worked fine to spin my LIN Engineering (www.lin
engineering.com) 5718 series stepper motor. You may have
to juggle the PR2 and CCPR1L values for your particular motor.
The A3979 will accept step pulses as narrow as 1 s. I
obtained a 1.6 s step pulse like the one you see in Screenshot
3 by loading CCP1CON with 0x1F and CCPR1L with 0x00.
CCPR1L and the two least significant bits of CCP1CONs upper
nibble hold the 10-bit PWM duty cycle value. I obtained the
1.6 s step pulse with the PWM duty cycle binary value of
0b0000000001. The PWM duty value you see in the code
example translates to binary 0b0101000001. The lower nibble
of CCP1CON is used to enable or disable the PIC18F2620s
PWM engine as shown in the code snippet that follows:
#define pwm_ON CCP1CON = 0x3F
#define pwm_OFF CCP1CON = 0x00
#define step_CW slp_step = 1; \
dir_step = CW; \
mdelay1(10); \
pwm_ON;
#define step_CCW slp_step = 1; \
dir_step = CCW; \
mdelay1(10); \
pwm_ON;
#define step_HALT slp_step = 0; \
pwm_OFF
If you need to use all 10 bits of PWM resolution, youll need
to alter the two least significant bits of the upper nibble of the
default 0x3F value Ive posted in my example code. Ive also
given the A3979 ten times (10 ms) more wakeup-from-sleep
time (mdelay1(10)) than the 1 ms the datasheet demands.
The A3979 download code package also contains an inter-
rupt driven EUSART driver for the PIC18F2620. A menu system
is incorporated that will allow you to connect the A3979 motor
driver board to a laptop or desktop PC and control the move-
ment of the stepper motor. We dont have the page space here
to talk about the EUSART driver in detail. However, I describe
the EUSART driver down to the bit level in the RS-232 chapter
in my book Networking and Internetworking with
Microcontrollers. The neat thing about the EUSART
driver is that you can easily drop it into any PIC appli-
cation that needs robust RS-232 communications.
Firing Up the A3979 Motor
Driver Board
It is important that you dont adjust the REF pot
to get a voltage above four volts on the REF pin. So,
before you fire up your A3979 motor driver board,
be sure to adjust the REF pots wiper to be nearer to
the grounded pot pin. Its a good idea to simply
center both of the pots as they will produce around
2.5 volts on the PFD and REF pins upon power-up.
Once youve powered up successfully, adjust
the REF pot to put 1.6 volts on the REF pin. This will
limit the stepper motor current to one ampere. The
SCREENSHOT 3. This shot was taken with my CleverScope. This is as tight a
pulse as I could get with the circuitry we are using.
Eady.qxd 12/4/2007 3:44 PM Page 36
stepper motor current formula to determine the REF voltage
for a desired stepper motor current limit value is:
REF voltage = 1.6 * Maximum Current Limit Value
The A3979 is rated to handle a maximum motor current
of 2.5 amperes. Plugging that into our formula gives us:
REF voltage = 1.6 * 2.5 = 4 volts
Now you know why you dont want to exceed four volts
at the A3979s REF pin.
You can experiment with the PFD pot setting as the
voltage on the PFD pin determines the symmetry of the motor
current waveform. Ideally, you want your motor current
waveform to look like the sinusoidal motor current waveforms
in the A3979 datasheet. A trick Ive picked up is to listen to the
motor as you adjust the PFD pot. If the motor sounds like its
trying to kill itself, your motor current waveform is not right.
Adjust the PFD pot to get the smoothest and quietest sound
from your motor at the desired REF voltage. Plug this code into
your main service loop to adjust the PFD and REF voltages:
void main(void)
{
//*******************************************************
//* INITIALIZE
//*******************************************************
init();
//*******************************************************
//* MAIN SERVICE LOOP
//*******************************************************
do{
step_HALT;
sdelay1(2);
step_CW;
sdelay1(2);
step_HALT;
sdelay1(2);
step_CCW;
sdelay1(2);
}while(1);
}
The adjustment code will spin the motor in a clockwise
direction for two seconds, stop the motor for two seconds,
and spin the motor in the opposite direction for two seconds.
This sequence of events will go on until you remove power or
reprogram the PIC18F2620.
Spinning Out
Thats all there is to it. Ill include a BOM (Bill of
Materials) file with the A3979 firmware download so
you can scrounge up the parts youll need to build
your own A3979 motor driver board. Who knows, the
A3979 just may be the answer youve been looking for
to complete those small robotic motor control jobs. As
always, if you have any questions about the A3979 or
the A3979 motor driver board, fire off an email to me.
Have fun! SV
SERVO 01.2008 37
For further reading,
check out this book,
available on the
SERVO website:
www.servomagazine.com
$67.95
Allegro MicroSystems
www.allegromicro.com
A3977 and A3979
Microchip
www.microchip.com
PIC18F2620
STMicroelectronics
www.stmicro.com
ST3232
Saelig Corporation
www.saelig.com
CleverScope
The A3979 motor driver board
code was written with the
HI-TECH PICC-18 C compiler.
Resources
Fred Eady can be reached via email at fred@edtp.com.
Contact the Author
Eady.qxd 12/4/2007 3:45 PM Page 37
M
y particular application as
we discuss here is in filtering
input data used to calibrate
the odometer in a road rally computer.
After computing a best-fit line using a
linear regression on a set of data
points, square roots are needed to
compute the distance of each data
point from the line. If a data point is
too far off the line, it is discarded on
the assumption of human error and the
line is recalculated.
Square Root on a PIC in the
November 06 issue of Nuts & Volts
(www.nutsvolts.com) demonstrated
a simple algorithm for computing
square roots. While the implementa-
tion was very compact, the algorithm
has a significant performance issue it
gets extremely slow as the argument to
the square root function gets large.
This is because the algorithm sequen-
tially computes each square starting
at 1 until it finds the one closest to
the argument.
Lets look at an alternative method
of computing square roots. It has the
advantage of taking nearly constant
time, regardless of argument about
150 microseconds for a 32-bit input on
a 20 MHz PIC18. This makes it practical
to compute square roots in a robot
control loop running 100 times per
second, for example. Code size is
about 35% larger, but still well under
200 bytes.
Algorithm
This algorithm for computing
square roots determines one result bit
at a time, in a manner very similar to
binary long division. In
fact, it is so similar
that a review of long
division decimal and
binary will be help-
ful to set the stage.
Figure 1 shows a
sample long division
problem. The basic
steps for each digit
are:
Make a guess of the digit.
Multiply the trial digit by the divisor.
Try to subtract that product from the
current remainder.
If the product is larger than the
remainder, make a new guess with
a smaller digit.
If the subtraction produces a
result larger than the divisor, make
a new guess with a larger digit.
In the case of Figure 1, the guess
for the first digit (estimated from 628)
initially turned out to be too large. The
first trial digit and product are crossed
out and a new set was tried.
The description for binary long
division is the same, but the only two
choices for the trial digit are 0 and 1.
This makes it very easy to make the right
guess, and also very easy to compute
the trial * divisor
product that is to
be subtracted from
the remainder.
Figure 2 shows
a sample binary
division problem.
By definition
of square root, if
the divisor equals
the quotient, then
we have the
square root of the
dividend. The algorithm for square root
takes the form of binary division where
the divisor is continually changed to
match the quotient.
The square root of an N-bit
number has N/2 bits; in our example,
well be taking the four-bit square root
of an eight-bit number. From our
binary division viewpoint, well be
looking for the square root of the
dividend. We start with a divisor at the
midpoint of the possible result range: a
1 followed by N/2 one zero; in our
case, a 1 followed by three zeros.
Square roots have a number of possible
applications in microcontroller systems ...
Square roots have a number of possible
applications in microcontroller systems ...
38 SERVO 01.2008
by Tim Paterson
6
79
897)62518
6279
-5382
8698
-8073
625
1101
1001)1111001
-1001
1100
-1001
0110
-0000
1101
-1001
100
Figure 1.
Decimal long
division
example.
Figure 2. Binary
long division
example.
Paterson.qxd 12/4/2007 2:42 PM Page 38
The first half
of Figure 3 shows
an example with
the first bit calcu-
lated. Notice in
the figure how
we dont know
the divisor yet, so Ive substituted xxx.
The binary division procedure requires
multiplying the guess by the divisor, so
0 is used for each x for now.
The second half of Figure 3 shows
the partially-completed calculation of
the second bit. We make a guess of 1,
multiply the trial bit by the divisor
(which is 11xx now to stay equal to our
quotient), and subtract from the
remainder. We must also account for
what we should have subtracted when
we computed the previous bit. Back
then, we only subtracted 1000. Now
we have a divisor of 11xx, so we should
have subtracted 1100 before. Ive put
this make-up value to be subtracted on
an additional line. Because were shift-
ed right one bit, its written as 1000,
but you can follow the 1 bit up the
column and see its in the right place.
So at this point, we have two values
to subtract 1100 and 1000 whose
binary total is 10100. This total amount
to subtract is larger than our current
remainder of 1110, so we must con-
clude the trial was too big instead of
1, it must be 0.
The first half
of Figure 4 shows
the second bit set
back to 0, and
the calculation of
the third bit.
Everything is
done the same:
We subtract the
product of the
trial bit and the
divisor, and also
include a line
to subtract the
value of the trial bit had it been set
back when we computed the first bit.
This time, the total of the two values to
subtract (1010 and 1000) is 10010,
while the current remainder is 11100.
The remainder is big enough, so the
trial bit is correct.
The second half of Figure 4 shows
the calculation of the final bit. Note
how that extra value we subtract (to
correct for previously subtracting the
wrong value) has more 1 bits in it.
Each of the 1 bits corresponds to a
subtraction for a previous quotient bit
where we didnt subtract the bit were
working on now. So, for each 1 bit in
the quotient (not counting the trial bit),
there will be a corresponding 1 bit in
the extra value to subtract to account
for not subtracting it originally.
Once more: For each 1 bit in the
quotient, there will be a 1 bit in the
extra value to subtract. This is the same
as saying the extra value to subtract
equals the quotient (and divisor) before
setting our trial bit. So, we subtract the
divisor with the trial bit, and we subtract
the divisor without the trial bit. Adding
that up, we subtract 2 * divisor + trial.
Thats it. Since the divisor and
quotient are always equal, Im going to
start calling them the root. To calculate
each bit of the root, try to subtract two
times the root plus the trial bit from the
current remainder. If it fits, the trial bit
is part of the root; if not, that bit is zero.
Programming
Square Roots
Listing 1 represents this algorithm
as a function in C. You dont need to
know C to understand it if you look in
the sidebar for the explanation of the
operators. This algorithm also includes
the extra step of rounding the result
based on whether the next bit would
be 0 or 1. This function has been
compiled and tested for both Windows
and the AVR microcontroller.
SERVO 01.2008 39
101
101x)01111001
-1000
1110
-0000
11100
- 1010
- 1000
1010
1011
1011)01111001
-1000
1110
-0000
11100
- 1010
- 1000
10101
- 1011
- 1010
Figure 4. Third
and fourth bits of
square root being
calculated.
1
1xxx)01111001
-1000
111
11
11xx)01111001
-1000
1110
-1100
-1000
Figure 3. First and
second bits of
square root are
being calculated.
typedef unsigned long UINT;
#define INT_BITS ((sizeof(UINT)) * 8)
UINT SquareRoot(UINT arg)
{
UINT trial;
UINT root;
trial = 1 << (INT_BITS - 1); // set up 100000... binary
root = 0; // Inside loop, really root * 2
do
{
trial >>= 1; // move trial to next position in root
root |= trial; // combine trial bit into root
if (arg < root) // does trial root bit fit?
root ^= trial; // no, remove trial bit
else
{
arg -= root; // root fits, remove it from arg
root += trial; // double the trial bit
}
root >>= 1; // move both root & trial to next
trial >>= 1; // position within arg
} while (trial != 0);
// Compute rounding
// See if next bit computed would be 1; round up if so.
if (arg > root)
root++;
return root;
}
LISTING 1. Fast square root algorithm in C.
Paterson.qxd 12/4/2007 2:45 PM Page 39
The function starts by initializing
the variable trial which contains the
current trial bit. The function is
designed to be easily targeted for
16-bit or for 32-bit integers (or any
other size), which explains the some-
what complicated-looking expression
that initializes trial. Ill assume were
using 32-bit integers, in which case trial
gets initialized to 0x80000000 a 1 in
the MSB and the rest 0. Note that the
first thing that happens inside the loop
is that trial is shifted right one bit, so
the first trial bit value is 0x40000000.
In the main loop, the variable
named root actually keeps the value of
two times the current root. Combining
trial into root gives us the amount to
subtract from the current remainder
(called arg) if it fits. If it doesnt fit, the
exclusive-OR operation is used to clear
the trial bit in root. If it does fit, we need
to double the trial bit so that, as part of
the new root, it will be root times two.
At the bottom of the loop, root
and trial are each shifted right one bit.
This moves them to the next bit
position for which well be computing
the root. Looking back at Figure 4, you
can see how the subtraction for each
bit is shifted right compared to the
previous bit. Conveniently, when its
time to end the loop, this right shift of
I have never seen any description of
this algorithm published before. I dont
mean that its original with me in fact, I
believe this algorithm is widely used in
floating-point hardware. I became aware
of the algorithm many years ago when
reading about a particular computer
architecture that included hardware
square root.
I have an old Pentium manual that
lists the time to perform a floating-point
divide as 39 clock cycles, and the time to
perform square root as 70 clock cycles
less than twice as long. The only way that
could be happening is if the floating-
point unit implements this algorithm in
hardware.
For a processor that has hardware
divide but no hardware square root, the
most common way to compute square
root is with Newton-Raphson iteration.
This algorithm is very simple:
1) Make a guess at the root.
2) Divide the guess into the argument.
3) Average the quotient with the guess to
make the next guess.
This method converges very fast;
every iteration doubles the number of
digits (or bits) of accuracy. The trick is
to come up with a good initial guess.
This is difficult for integer or fixed-
point arithmetic, where it may take one
iteration to get one bit correct. Then the
subsequent iterations give you 2, 4, 8,
and 16 bits of accuracy typically five
total iterations for a 16-bit root of a 32-bit
number.
When using floating point arithmetic,
its easy to get an accurate initial guess
because of the normalized format of
the numbers. With an eight-bit multiply
and addition, you can come up with a
guess accurate to almost five bits. Then
only three iterations are needed to
achieve single-precision accuracy.
I used this technique when I wrote
the x87 emulator for Microsoft in 1991.
This program provided floating-point
arithmetic back in the days before it was
built into every processor; it hasnt been
needed since the 486SX. It is still widely
distributed, included as WIN87EM.DLL
with every 32-bit operating system
Microsoft has shipped.
While researching for this article, I
found another square root algorithm
on the Microchip website posted in
Application Note TB040 for PICs that
have hardware multiply. The general
idea is to set a trial bit in the root,
square the root, and see if it was too
big. The algorithm calculates the result
bit by bit, with one square (multiply)
operation per bit. According to the
app note, with a 32-bit input this
method would take 200 microseconds
at 20 MHz, and the code size appeared
to be over 200 bytes. So it is both
bigger and slower than the algorithm I
present.
Square Root Algorithms
40 SERVO 01.2008
SquareRoot:
clrf32 root ; root = 0
clrf16 trial ; trial = 0x80000000
clrf trial+2 ; "
movlw 0x80 ; "
movwf trial+3 ; "
bcf STATUS,C; Clear C flag for following rotate
RootBit:
rrf32 trial ; trial >>= 1
ior32 root,trial ; root != trial
cmp32 root,arg; if (arg < root) - C flag set if arg < root
bnc RootFits; "
; Didn't fit, remove trial bit
xor32 root,trial ; root ^= trial
bra ShiftRight
RootFits:
sub32 arg,root; arg -= root
add32 root,trial ; root += trial
ShiftRight:
bcf STATUS,C; Clear C flag for following rotate
rrf32 root ; root >>= 1 - Always leaves C flag clear
rrf32 trial ; trial >>= 1
bnc RootBit ; if trial bit shifted out, we're done
#if ROUND
; Compute rounding. Note that root always fits in 16 bits here,
; but it could round up to 17 bits.
movf arg+2,f ; see if bits 17-23 are non-zero
bnz IncResult ; if non-zero, arg is big, always > root
cmp16 arg,root; if (arg > root) - C flag set if root < arg
bnc Done ; "
IncResult:
inc24 root ; root++
Done:
#endif ;ROUND
retlw 0
LISTING 2. PIC version of fast square root,
built on macros for 32-bit operations.
Paterson.qxd 12/4/2007 2:45 PM Page 40
root is effectively the divide-by-two needed
to convert the root * 2 that has actually
been in root to the true root value.
I hand-compiled this function into PIC
assembly language, partially shown in Listing
2. Following the lead of the previous article on
square roots, I used macros extensively to
encapsulate the 32-bit operations. For
example, the ior32 macro actually requires
eight instructions to perform a logical-OR on
two 32-bit operands. This approach allows you
to see the close relationship between the C and
assembler versions of the program without
getting caught up in the details of 32-bit arith-
metic. The complete program listing with the
macro definitions can be downloaded from the
SERVO website (www.servomagazine.com).
There is one optimization worth noting that is possible in
assembly language but not in C. In C, the loop exits when the
bit in trial has been shifted out and trial is now zero. In
assembler, we can use the fact that the trial bit was shifted
out into the carry flag. This saves us from testing the four
bytes of trial to see if theyre all zero.
In the PIC version, I have put the rounding code in a
conditional block marked with #if ROUND. I wanted to make
clear the optional nature of this section so it could be
omitted if not appropriate for a given application. It adds
very little execution time because it is out of the main loop,
but it does add almost 20% more code. It also has the effect
of allowing the result to exceed 16 bits, rounding it to
0x10000 if the input is big enough, so this must be taken into
consideration if a purely 16-bit result is expected.
Another option youll find in the full source code listing is
to choose to assemble the program for the PIC16 or for the
PIC18. This doesnt show up in Listing 2 because it only affects
the macros. The PIC18 code is typically around 20% faster.
Performance Results
I compared the performance of this square root routine
with the original one described in the November 06 issue. In
both cases, I used PIC18-optimized code. I switched off the
rounding code in my routine since the original didnt round. I
used the Microchip MPLAB simulator with its stopwatch func-
tion to compute execution time, assuming a 20 MHz clock.
The execution time of my program ranges from 136 to
159 microseconds, for an average of about 150 microsec-
onds. The variation is due to the different code paths inside
the main loop on whether the trial bit fits or not. Code size
is 134 bytes (22 bytes more when rounding is included).
The performance of the original square root program is
totally dependent on the size of the argument. With an input
of 500, it takes 155 microseconds; about the same as my
program. For smaller arguments, it would be faster as little
as 12 microseconds for an argument of 1. At the other
end, it can take as long as 445 milliseconds (close to a 1/2
second!). Code size is 100 bytes.
I also compiled the C version of my routine for the AVR
using the free WinAVR compiler package. Assuming a 16
MHz clock, execution ranged from 34 to 37 microseconds.
Code size was 108 bytes.
In conclusion, this algorithm makes computing square
roots entirely practical in microcontroller-based robotic
projects, even in moderately fast service loops. No other
approach comes close to the performance and code size of
this algorithm. SV
Here is an explanation of the operators used in Listing 1:
1 << (INT_BITS - 1) With INT_BITS set to 32, this shifts a 1 bit left 31
bits, producing the value 0x80000000.
trial >>= 1 Shift trial right one bit.
root |= trial root = root OR trial (logical OR).
root ^= trial root = root XOR trial (exclusive OR). Reverses the
effect of root |= trial, clearing the trial bit from root.
arg -= root arg = arg - root
root += trial root = root + trial
root++ root = root + 1
C Operators
SERVO 01.2008 41
Paterson.qxd 12/6/2007 12:57 PM Page 41
42 SERVO 01.2008
EM-406A
The actual connections to the
Dios Workboard are shown in Figure
2. The module comes with a small
connector that is used to connect the
EM-406 to an evaluation board. We
need to modify this cable as shown in
Figure 3 so that we can plug it into a
breadboard or prototype board.
Figure 4 shows the actual pin-out
on the connector from the EM-406
modules point of view. I placed a
small piece of double-sided tape
on the module to hold it in place
on the breadboard as shown in
Figure 5. I then made the following
connections:
EM-406, Pin 1 (GND) DiosPro Vss
EM-406, Pin 2 (VCC) DiosPro Vcc
(5V)
EM-406, Pin 3 (TX) DiosPro Port 8
(UART RX)
by Michael Simpson
FIGURE 1.
Positional data
decoded and
displayed.
FIGURE 2
FIGURE 3
GPS
PART 4
Simpson4.qxd 11/30/2007 11:32 AM Page 42
On the cable that I made, I tied
both pin 1 and pin 5 together.
At this point, you dont need to
connect the PPS or RX pins.
EM-406A Observations
Of all the modules tested, I
found the EM-406 to be the most
sensitive and easiest to use. I
was able to lock on to four or
five satellites in my basement
workshop. At times, even the
WAAS receiver kicked in when
in the basement. In normal
operation outside, I found the
EM-406 to be very accurate
once the WAAS receiver
connected. The only downside
was the lack of an external
antenna connector. There is no
need to send commands to set
up the module, so only the TX
lead is needed for the interface.
I also liked the fact that the
module could be operated at
five volts. This makes the
interface to both the PC and
microcontroller very easy.
Etek EB-85A
I covered the connector
modification in Part 2 of this series.
Connect the pins on the connecter as
shown in Figure 6. Unlike the EM-406,
we need to connect the RX lead as
we will need to send some setup
commands to the EB-85.
Etek EB-85A Observations
The EB-85 operates with five volts
as well, so it is one of my favorites.
While it does support more channels
than the EM-406, I was only able to
lock on to seven or eight satellites at
a time so I did not see any advantage
over the EM-406. The EB-85 does
need some setup to turn off some of
the messages that are not needed
and to turn on the WAAS receiver.
The EB-85 sports a much faster
default baud rate so more data can
be received in a shorter period of
time. This can be a double-edged
sword since you have to service the
UART more often in order to keep
from dropping data.
Holux GPSlim236
The GPSSlim236 micro-
controller interface is sim-
pler than one would think.
The mini USB connector
on the unit is actually a
TTL interface. With this
connector, you can both
power/charge the unit and
pull data from the receiver. I
purchased a $3 mini USB
cable from www.cyber
guys.com (part #131 0995)
for the interface.
Cut off the large
connector and strip the
leads. Attach the red and black
wires to a two-pin header and the
green and white leads to a two-pin
header as shown in Figure 7. The
connection to the Workboard is
shown in Figure 8.
FIGURE 4 FIGURE 5
FIGURE 6
FIGURE 7
SERVO 01.2008 43
Simpson4.qxd 11/30/2007 11:33 AM Page 43
44 SERVO 01.2008
GPSlim236
Observations
While I like this receiver
for its versatility, it does not
support WAAS as indicated
by the manufacturer. Even
the GPS Viewer supplied by
the manufacturer failed to
turn on this feature. That being
said, I used the Bluetooth
interface with my pocket PC
for the last couple years with
great success.
EM-408
The EM-408 module
requires a bit more to interface
to a microcontroller. The
actual connecter configuration
was shown in Part 1 of the
series, but since the module
operates at 3.3 volts, you will
need to add a 3.3V regulator
as shown in Figure 9. Since
the module does not need
to be set up in order to
operate, you can forgo the
RX lead connection and the
two resistors shown.
EM-408 Observations
Of the 3.3V units tested,
I prefer the EM-408. In fact,
if you decide to use a 3.3V
microcontroller, you may want
to use this module. The EM-408
also supports an external
antenna, so it can be located in
a different location than the
electronics.
Copernicus
Like the EM-408, the Copernicus
module needs a 3.3 volt interface as
shown in Figure 10. The Copernicus
module I used came with a header
board that will mount with a bit
of effort on a breadboard as
shown in Figure 11. Several of the
leads on the module need to be
connected to VCC. The actual pinout
FIGURE 8
FIGURE 9
Program Name Description
DiosGPSEM406.txt For use with the EM-406A module
DiosGPSEtek.txt For use with the Etek EB-85A module
DiosGPSHolux.txt For use with the Holux GPSlim236 receiver
DiosGPSEM408.txt For use with the EM-408 module
DiosGPSCopernicus.txt For use with the Copernicus module
TABLE 1
Simpson4.qxd 11/30/2007 11:33 AM Page 44
for the module is shown in
Figure 12.
Copernicus
Observations
The Copernicus module
does not have a built-in
antenna so you must
connect one. The headers
can make hookup easier.
The main disadvantage of
using this module is the lack
of WAAS support. Unlike
the EM-408, the RX leads
and interface resistors must
be used since you have to
set up the module.
Software Interface
I have included five
programs listed in Table 1.
All the programs are
identical except for the baud rate and
the use of a setup function for the
Etek and Copernicus modules.
SERVO 01.2008 45
FIGURE 10
FIGURE 11
FIGURE 12
Variable Description
NEMAhour UTC Hours (Integer) 0-23
NEMAmin UTC Minutes (Integer) 0-59
NEMAsec UTC Seconds (Integer) 0-59
NEMAday UTC Day in Month (Integer) 1-31
NEMAmonth UTC Month in Year (Integer) 1-12
NEMAyear UTC Year (Integer) 1-99 = 2001-2099
NEMAlongdeg Longitude Degrees (Integer)
NEMAlatdeg Latitude Degrees (Integer)
NEMAlatmin Latitude in Minutes * 10000 (Float)
NEMAlongmin Longitude in Minutes * 10000 (Float)
NEMAspeed Speed in MPH (Float)
NEMAdir Heading in Degrees (Float)
NEMAlatdir N/S Indicator for Latitude (Integer) 78=N 83=S
NEMAlongdir E/W Indicator for Longitude (Integer) 69=N 87=S
NEMAfix Fix Mode (Integer) 0=No Fix 1=SPS Fix 2=DGPS/WAAS Fix
NEMAaltitude Altitude in Meters (Float)
NEMAsats Satellites Used in Fix Calculation (Integer)
NEMAcmd Command Received (Integer) 0=None 2=RMC 3=GGA
NEMAstrdat 95 Byte Character String Holding Received Line of Data (String)
NEMAstrtest 80 Byte Character String Used by Library (String)
NEMAstrtemp 80 Byte Character String Used by Library (String)
TABLE 2
Simpson4.qxd 11/30/2007 11:34 AM Page 45
46 SERVO 01.2008
Wire the module according to
the previous section and program the
appropriate program into the DiosPro
using the Dios compiler. Once the GPS
module locks on to three
satellites, the program
will start to display the
positional data shown in
Figure 13.
DiosNEMA
Library
The Dios Compiler has
a NEMA library built in
called DiosNEMA. This
library processes both the
GGA and RMC commands
and populates the global variables
shown in Table 2 when the appropri-
ate command is received.
When a command is received, the
variable NEMAcmd will be set to 1, 2,
or 3, depending on the command
received as shown next.
0: No command received
1: Non RMC or GGA command
received
2: RMC command received
3: GGA command received
In most cases, I dont do any
processing unless the NEMAcmd is set
to a value of 3 (GGA). Once I have a
valid NEMA command, I then check
the NEMAfix variable to see if the
module has a valid fix on at least three
satellites. If it does not, then all the
remaining variables are invalid.
There are a few other consider-
ations you need to keep in mind
when using the library. First, you
must set up the UART using the
hsersetup command shown in
Program 1. In the case of the
EM-406, we have set the baud rate
to 4800. The UART handler built
into the DiosPro is interrupt driven
so data is automatically placed into
a 256 byte buffer for you. It is
important that you call the
procNEMA() frequently, enough to
keep this buffer from filling up.
The Dios NEMA library also has a
command called printNEMA. This
command will allow you to send the
current NEMA text to the debug
window. You pass a single argument
to the function with
the following results:
0: Display current
value for NEMA text
string
1: Display all
processed NEMA
commands
2: Display RMC and
GGA NEMA
commands only
3: Display GGA
NEMA command only
Dios NEMA Proccessor
func main()
clear
hsersetup baud,HBAUD4800,start,txon,clear
print Mode Lat Long Alt Speed Dir
print - - - -
loop:
procNEMA()
printNEMA(9)
if NEMAcmd = 3 then GGA
if NEMAfix > 0 then
print NEMAfix,:,NEMAsats, ,{-6.0} NEMAlatmin, ,NEMAlongmin;
print ,{6.1} NEMAaltitude, ,{4.1} NEMAspeed, ,NEMAdir
else
print No Fix ,NEMAfix,:,NEMAsats
endif
endif
goto loop
endfunc
include \lib\DiosNEMA.lib
Program 1
FIGURE 13
FIGURE 14 FIGURE 15
Simpson4.qxd 11/30/2007 11:35 AM Page 46
9: Display nothing
NEMAlatmin and
NEMAlongmin
Values
The NEMAlatmin
and NEMAlongmin val-
ues are actually whole
numbers. The minute
value is multiplied by
10,000. This is done to
make processing easier
and faster. You can also
take the N/S and E/W
direction indicators and
set the minute values to
negative or positive,
accordingly. However, I
have found this is not
needed for most robot
projects unless you are
near the equator or
Meridian. If you need to
process the actual
degrees, you can use
the NEMAlatdeg and
NEMAlongdeg variables
for your calculations.
In most robot appli-
cations, you will record
or store waypoints in a
set of variables or tables,
then make calculations
based on the current
minute values and
make course changes, as
necessary.
LCD Display
Program
The Dios Workboard
Deluxe supports a two-
line or four-line character LCD. I have
created a series of programs to
display GPS data on a two-line LCD
shown in Figure 14. The folks
at Sparkfun have the perfect LCD
for this project. They even have
the four-line LCDs if you want more
display area.
Attach a 16-pin male header
to the LCD and plug it into the
LCD header as shown in Figure 14.
SERVO 01.2008 47
DiosPro
func main()
clear
Start back light
output 13
low 13
LCD init string
lcdinit 23,25,24,29,28,27,26 RS, E, RW, D0,D1,D2,D3
lcdcontrol 1 cls
hsersetup baud,HBAUD4800,start,txon,clear EM406
print Mode Lat Long Alt Speed Dir
print - - - -
loop:
procNEMA()
printNEMA(9) Change to 1 to display all Messages
if NEMAcmd = 3 then GGA
if NEMAfix > 0 then
lcdgoto 1,1
if NEMAspeed < 10 then
lcdwrite {-2.1} dec NEMAspeed, ,{-3.0} dec NEMAdir, ,{-5.1} dec NEMAaltitude
else
lcdwrite {-3.0} dec NEMAspeed, ,{-3.0} dec NEMAdir, ,{-5.1} dec NEMAaltitude
endif
lcdgoto 2,1
lcdwrite {1} dec NEMAfix,: , {-5.0} dec NEMAlatmin, ,{-6.0} dec NEMAlongmin_
print NEMAfix,:,NEMAsats, ,{-6.0} NEMAlatmin, ,NEMAlongmin, ;
print {6.1} NEMAaltitude, ,{4.1} NEMAspeed, ,NEMAdir
else
lcdgoto 1,1
lcdwrite No Fix
lcdgoto 2,1
lcdwrite
endif
endif
goto loop
endfunc
include \lib\DiosNEMA.lib
Program 2
Program Name Description
DiosLCDEM406.txt For use with the EM-406A module
DiosLCDEtek.txt For use with the Etek EB-85A module
DiosLCDHolux.txt For use with the Holux GPSlim236 receiver
DiosLCDEM408.txt For use with the EM-408 module
DiosLCDCopernicus.txt For use with the Copernicus module
TABLE 3
Simpson4.qxd 11/30/2007 11:35 AM Page 47
Load up the appropriate program as indicated in Table
3. The LCD will display the positional data as shown in
Figure 15.
The program works much the same way as the
DiosGPSxxx programs in the previous example. The only
difference is that I have added a couple of LCD commands
as shown in Program 2. In addition to displaying the LCD
data, the program displays the positional data in the debug
window when connected to the PC. By connecting a 9V
battery to the coax connector, you can take the GPS into
the field for further tests.
Going Further
We covered quite a bit of information in this series.
I hope that I have inspired you to take it to the next
level. Several breadboard components are included
with the Dios Workboard Deluxe, including buttons
and LEDs. Try connecting a couple of buttons to
create the ability to set a waypoint. Then use the LCD
display or a set of LEDs to indicate the direction toward
the waypoint.
I am currently working on a project using the smaller
DiosPro 18 chip and a SD memory card to create a very
small GPS data logger. I hope to create an article featuring
this project in the near future.
Be sure to check for updates and downloads for
this article at www.kronosrobotics.com/Projects/
GPS.shtml. SV
The following is a breakdown of sources
for all the components needed for
Parts 1 through 4 of this project.
SPARK FUN ELECTRONICS
EM-406A GPS Module
www.sparkfun.com/commerce/prod
uct_info.php?products_id=465
EM-406 Evaluation Board
www.sparkfun.com/commerce/prod
uct_info.php?products_id=653
EM-408 GPS Module
www.sparkfun.com/commerce/prod
uct_info.php?products_id=8234
Copernicus Evaluation Board
www.sparkfun.com/commerce/prod
uct_info.php?products_id=8145
Nine-Pin Serial Cable
www.sparkfun.com/commerce/prod
uct_info.php?products_id=65
6V AC Adapter
www.sparkfun.com/commerce/prod
uct_info.php?products_id=737
External Antenna with SMA Connector
www.sparkfun.com/commerce/prod
uct_info.php?products_id=464
SMA to MMCX Adapter Cable
www.sparkfun.com/commerce/prod
uct_info.php?products_id=285
2 Line Character LCD Blue
www.sparkfun.com/commerce/prod
uct_info.php?products_id=709
2 Line Character LCD Green
www.sparkfun.com/commerce/prod
uct_info.php?products_id=255
4 Line Character LCD
www.sparkfun.com/commerce/prod
uct_info.php?products_id=256
KRMICROS
ZeusPro
www.krmicros.com/Development/
ZeusPro/ZeusPro.htm
KRONOS ROBOTICS
EZRS232
www.kronosrobotics.com/xcart/prod
uct.php?productid=16167
DiosPro Chip
www.kronosrobotics.com/xcart/prod
uct.php?productid=16428
Dios WorkBoard Deluxe
www.kronosrobotics.com/xcart/prod
uct.php?productid=16452
CYBERGUYS
Mini USB cable
www.cyberguys.com/templates/
SearchDetail.asp?productID=3312
Parts List
P
erform proportional speed, direction, and steering with
only two Radio/Control channels for vehicles using two
separate brush-type electric motors mounted right and left
with our mixing RDFR dual speed control. Used in many
successful competitive robots. Single joystick operation: up
goes straight ahead, down is reverse. Pure right or left twirls
vehicle as motors turn opposite directions. In between stick
positions completely proportional. Plugs in like a servo to
your Futaba, JR, Hitec, or similar radio. Compatible with gyro
steering 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
48 SERVO 01.2008
Simpson4.qxd 11/30/2007 11:36 AM Page 48
SERVO 01.2008 49
I
n January 2004, two twin rovers
Spirit and Opportunity landed on
different sites on Mars. Newspapers
and TVs showed beautiful close-up
images of the Martian surface taken
from the rovers (see Figure 1).
Biologists around the Earth have
been amazed by the discovery of geolog-
ical evidence of water in Mars past, thus
confirming the intuition that the Red
Planet can sustain future life. As a matter
of fact, MER has been the most success-
ful mission ever: Spirit and Opportunity
operated for three Earth years, each one
exploring over eight miles of Martian
terrain. This means an unprecedented
mobile surface exploration.
Nonetheless, Spirit and Opportunity
were not the first to navigate on Mars:
Pathfinder and Sojourner were there in
1996, even if they were only an
engineering test-bed mission to vali-
date technology for surface mobility.
However, both Spirit and Opportunity
have greatly exceeded most of their
initial requirements.
Among the major MER objectives,
we can identify: (1) looking for past life
through the study of the planet soil
and the discovery of the presence of
water; (2) understanding the climate of
the planet which is supposed to have
been a green heaven in the past; and
(3) performing experiments both in the
field of geology and in studies of
the atmosphere in order to prepare
for future human exploration and
settlements (see Figure 2). In other
words, planetary astrobiology.
These objectives require that tens
of kilometers must be traversed in
order to measure and study biodiversi-
ty. From a rovers perspective, this turns
out to be a daunting task: long
distance mobility and autonomy are the
two major issues in mobile robotics.
Rovers cannot be tele-operated.
From Earth to Mars, there are over 300
million miles and the response times
would cause rover ungovernability
caused by the extremely limited band-
width. Despite that, the MERs mission
assessed a number of key points and
techniques which paved the way for all
future planetary exploration research
agendas: remote planning, command
sequencing and validation on Earth,
data gathering, and reduced independ-
ence on Mars.
This article focuses on the entire
control loop which is used to allow a
rover to safely navigate on Mars
using information processed on Earth,
ranging from data acquisition to low
level command actuation.
A Typical Control Loop
A mission on Mars is limited by the
fact that rover work cycles are tied to the
FIGURE 1
Since 2000, the NASA Mars Exploration Rover mission (MER) has
been the main objective of hundreds of scientists and engineers;
their life being completely dedicated to the mission for years.
Mastrogiovanni.qxd 11/30/2007 11:06 AM Page 49
50 SERVO 01.2008
Martian day (which is called sol), as
their power supply is the sun. However,
there are many contingent and econom-
ic issues which must be addressed:
Activities must occur every sol in
order to maximize scientific return.
The current technology in cognitive
systems does not allow complete
autonomy for rovers on remote planets.
The distance between Earth and Mars
precludes direct tele-operation because
of limited bandwidth and temporal lag.
Therefore, plans must be submitted
from Earth and executed on Mars
without direct supervision from Earth.
Rovers are semi-autonomous between
communication windows, thus requiring
at least self-localization and hazard avoid-
ance capabilities to reach
a given goal position.
When the rover
reaches a new area, the
final pose is subject to
dead reckoning errors.
This requires a data
uplink to Earth to
analyze the state and to
plan future operations.
These issues lead to a
well-defined sequence of
activities which must be coordinated
between Earth and Mars: Earth-side pro-
cessing and filtering of data downlinked
from Mars; analyzing the current rover
state and its surrounding terrain for pos-
sible hazards; locating traversable areas
and features of interests; and finally,
uplinking new commands every sol.
From the rovers side, this implies
the execution of the received plan
schedule (i.e., a sequence of navigation
and scientific activities), the recording
of the relevant information, and then
the communication with Earth. Those
activities are outlined next:
Data analysis (Earth). Images and
rover data are received from Mars. This
step involves browsing images taken
from the various cameras on board the
rover (i.e., to examine the surrounding
terrain and to detect hazards and areas
of interest) and analyzing numerical
values originating from sensors.
Images are first displayed and
merged together, thus producing envi-
ronment panoramas (see Figure 1
again). These images are used to
integrate scientific activity plans, which
act as guidelines for planning
approaches to targets of interest.
In practice, scientists ask rover
operators to move the vehicle accord-
ing to what they see in image panora-
mas. In order to execute a plan, rovers
must be fully operational and operators
need to visualize the rover within the
terrain and analyze interactions with it.
First, the rover status is checked:
telemetry provided by such data
channels as the suspension and
the steering angles and internally
computed quantities (i.e., the robot
pose) are visualized and possible
dangerous situations are inferred.
Second, a 3D model of the rover
environment is built from camera
images (see Figure 3). This is usually
achieved using stereo vision. Stereo
image pairs are processed separately,
and then the left and the right images
are correlated to find matching pixels.
Next, the disparity of each matched pair
is computed, thus retrieving an estimat-
ed distance of the feature pixel from the
stereo camera axis. As a result, a full 3D
model of the rover surroundings is built.
Plan generation (Earth). Once a clear
model of the rover environment is
known, it is possible to specify
command sequences for future
activities. Between communication
windows, rovers are autonomous in
that they operate while out of contact
with ground controllers. Roughly
speaking, a mission is composed by a
collection of actions to be performed
in sequence. In general, there is an
interleaved sequence of navigation and
science activity actions.
Driving the rover (Earth). Using an
interactive 3D visualization software, it
is possible to specify desired rover posi-
tions in various ways. In general, this
can be achieved using point-and-click
FIGURE 2
FIGURE 3
Mastrogiovanni.qxd 11/30/2007 11:06 AM Page 50
techniques or by dragging a cursor
over the 3D terrain using the mouse.
A basic route can be created by
dragging a 3D rover model to each suc-
cessive waypoint in the terrain model.
The operators experience is necessary
to select reasonable routes and to plan
drives with the tight operational com-
munication windows. The operators
must select the appropriate traverse
and localization methodologies.
Once a sequence of desired loca-
tions relative to the terrain is decided,
motion commands can be generated
for path planning using a grid-based
estimation of surface traversability
applied to local terrain. Motion
commands are then stored and packed
to be sent to Mars.
Rover perception (Mars). Reliable
perception is mandatory when the
robot is navigating, because dead reck-
oning information is clearly unreliable,
especially in rocky terrain. Cameras are
used because they provide a lot of infor-
mation if compared to other sensors.
In particular, Visual Odometry is
used when navigating. This algorithm
computes the rover displacement
between two successive camera images.
Specifically, an image is taken before a
rovers movement. After the movement,
another image is taken mostly of the
same terrain area. Features present in
both images are then associated, and
the corresponding displacement is
computed. As a result, an estimate of
the current rover motion is computed.
Rover locomotion (Mars). Given the
rough nature of the Martian surface,
cutting-edge state estimation tech-
niques must be used to precisely allow
a rover to reach a given target position.
In general, reaching a target is a three-
step process: terrain traverse, homing,
and fine positioning. Once a given area
is reached with a sufficient precision,
scientific operations can be arranged,
and the results sent back to Earth.
Planetary Rovers
Nowadays, there is a widespread
agreement in the robotics community
about the morphology and the design
principles of rovers for space explo-
ration. These are necessarily application-
driven. Rovers must adhere to the con-
cept of Robotic Field Geologist, i.e., a
semi-autonomous rover is considered as
a replacement for a team on Earth, able
to do in one day what a field geologist
can do in about 45 seconds.
In other words, the goal is to
create a cyber astrobiologist, deploying
scientific instruments (i.e., the scientific
payload) over wide areas. The
mechanical design and the cognitive
architecture of planetary rovers are
arranged to guarantee the traversal of
uneven and rocky terrain according to
specific requirements.
From the mechanical point of view,
typical key requirements are: (1) the
rover must traverse over obstacles of
25 cm in maximum dimension; (2) the
rover must traverse over slopes of a
nominal tilt of 16 degrees; (3)
moreover, it should cope with hard,
high traction terrains and soft
deformable soils; (4) and with a tem-
perature between -100 and 20 Celsius,
in order to carry the scientific payload;
and (5) each vehicle is approximately
1.4 m long and 1.2 m wide.
Furthermore, lithium-ion batteries
are used for saving mass and volume.
From a mechanical perspective, the
current state-of-the-art locomotion tech-
niques assume that rovers are six-wheel
drive, four-wheel steered vehicles with a
specifically designed suspension system.
In particular, the rover suspension
system is a mechanical assembly called
rocker-bogie that connects the six wheels
to the body of the rover itself (see Figure
4). In order to increase robustness to
possible hardware faults, all six wheels
are independently driven by DC motors.
Moreover, in order to increase the
mobility capabilities, front and rear
wheels are independently steered,
allowing the rover to turn in place, as
well as to execute more complex turns.
The two front and rear wheels are
steered by identical DC motors. A
differential connects the two rocker-
bogie systems to the main rover body.
The rocker-bogie design is charac-
terized by a number of interesting
properties: (1) safe traversal of obsta-
cles whose dimensions are in the same
order of magnitude of the diameter of
the wheels (about 30 cm); (2)
withstanding a tilt of 45 degrees in any
direction without overturning; (3)
absorbing the most of the impact load
during terrain traversal, which is partic-
ularly important for the scientific
payload carried around during mission
execution; and (4) passively keeping all
SERVO 01.2008 51
FIGURE 4
Mastrogiovanni.qxd 11/30/2007 11:07 AM Page 51
52 SERVO 01.2008
six wheels in contact with the surface,
even when driving over uneven terrain;
this allows a maximum speed on flat
ground of about 5 cm/s.
Cognitive algorithms guiding
rover operations must be scheduled
on resource-constrained devices, in
order to maintain high standards of
robustness and reliability. Therefore, an
extremely modular system architecture
must be implemented, which allows
the distribution of the computations
between on-board machinery and
workstations on Earth. Needless to say,
this implies that a communication link
between Mars and the Earth must be
established, on the basis of temporal
communication windows. These
requirements necessarily lead to a
multi-agent design choice, where dif-
ferent modules perform different tasks.
Low level tasks include sensor data
acquisition and actuator command
issues. In particular, sensing devices
include stereo NAVCAMS (cameras for
navigation) and PANCAMS (cameras
for taking panoramic images), used by
ground teams for path planning, IMUs
(inertial measurement units) for atti-
tude determination during motion, and
wide FOV (field-of-view) stereo HAZ-
CAMS (for detecting hazards both in
front of and at the back of the rover).
Actuating devices include the six-
wheel rocker-bogie mobility system and
robotic arms for manipulation and field
operations. State values associated with
devices are recorded in log files and
then used for investigating the overall
rovers behavior in case of either acci-
dents or system faults. In a sense, this is
a sort of parallel telemetry which can
be uplinked to the Earth for further
investigation and mission planning.
High level tasks include activities
for the rover perception, mobility, sci-
entific research, and communication.
During operations, the rover must con-
currently perform a number of tasks:
Accurate position estimation using
various techniques (i.e., dead reckon-
ing, visual odometry, or sun sensing).
Internal state estimation for failure
detection.
Environment perception (i.e., eleva-
tion maps, stereo vision).
Control (i.e., low level navigation
control, adaptive route planning).
In particular, perception, mobility,
and adaptivity deserve special
attention for semi-autonomous rovers.
Rovers Perception
Visual odometry is a technique to
manage rover motion estimation by
feature tracking with stereo imagery.
When integrated with wheel odome-
try, general estimation error is less than
2% of the distance traveled, regardless
of terrain and soil types. In principle,
the overall algorithm is fairly simple.
First, adjacent pairs of stereo
images are processed for image filter-
ing and noise removal. Next, candidate
features are selected and matched
automatically from one image to the
other; misleading or poorly associated
features are not considered further. A
3D motion estimate is generated from
dozens of pairs of matched features.
Finally, the motion estimate is integrat-
ed with an initial guess (odometry).
In practice, there are a number of
critical issues to be addressed: (1) the
application of the technique is limited
to images where distinctive features
can be detected; (2) the algorithm
robustness largely depends on the kind
of features being considered; (3) cor-
rect data association is fundamental;
wrong mappings can lead to unrecover-
able failures; and (4) from the computa-
tional perspective, the real-time applica-
bility is limited due to the high load.
Despite these issues, visual odome-
try is the de facto standard in rover
perception. Furthermore, it has been
successfully used with good results on
Opportunity without ground-based
supervision. Nowadays, a boosting in
related research is provided by the
introduction of the so-called SIFT
features, which allow for a fast global
matching process.
Rovers Mobility
Rovers motion is achieved by instan-
tiating a sequence of motion primitives,
specified on Earth according to the
missions goal and the scientific activity
planners. Commands are arranged into
sequences which resemble subroutines
in a computer program. Among the
most commonly used primitives, we
identify basic and advanced ones.
Basic primitives include Go_Straight,
Move_on_Arc (the rover moves along a
circumference arc of a specified radius),
or Turn (to turn on place, or wih respect
to a given landmark or position).
Advanced primitives are various forms of
Go_to_Waypoint (the rover tries to reach
a given cartesian position specified with
respect to the robot-centered frame),
usually with an integrated approach
to hazard avoidance. This command
generates a trajectory to be safely
followed by the rover on the basis of the
terrain knowledge on the ground.
In order to precisely track rovers
position, closed-loop techniques must
be necessarily used. In particular,
wheel odometry (computing the robot
pose by integrating orientation and
wheel rotation) is acceptable on a rela-
tively flat terrain. However, when the
rover is into a region of high slip, dead
reckoning is not appropriate anymore,
and it is usually fused with information
provided by IMUs and visual odometry.
Maestro software: A demo version of
the mission planner used by NASA
http://mars.telascience.org
CLARAty software: Open source
version of the software framework
running on current rovers
http://claraty.jpl.nasa.gov/man/
overview/index.php
Proceedings of ASTRA,
the official conference of the
European Space Agency
www.esa.int/TEC/Robotics/
SEMABJC4VUE_0.html
Resources
Mastrogiovanni.qxd 11/30/2007 11:08 AM Page 52
Navigation can be divided into
three distinctive phases:
(1) Long traversals: less than 40 m per
sol are navigated.
(2) Target approaching: less than 10 m,
used for approaching interesting areas.
(3) Fine positioning: less than 2 m,
used for establishing a workspace for
manipulation purposes.
In general, the localization process
can dynamically adapt to the terrain. In
areas characterized by small rocks, sim-
ple dead reckoning can be used for tra-
versal; where excessive slippage would
be problematic, visual odometry is
used to reduce dead reckoning errors.
Contingency Planning
When executing a navigation mis-
sion, it is often the case that the rover
has to modify the original path
provided by Earth operators. This can
be done when detecting hazards, for
example. Usually, rovers are designed
to support two hazard detection levels:
Reactive (e.g., tilt check, motor faults);
and Predictive (e.g., stereo vision
used to track potential risks, traversal
analysis, terrain roughness).
Contingency planning consists in
interleaving planning and execution.
Therefore, an initial plan is established.
During the execution, possible plan
faults are identified, in which case, a
novel sub-plan is generated and then
integrated within the initial one.
Future Research
Rovers for space exploration push
the current limits in mobile
robotics, telecommunications, planning
technologies, and mechanical designs.
Fortunately, the techniques supportive
of remote planetary exploration can be
applied on Earth, as well. Antarctic and
volcano exploration are only two of the
possible scenarios. In the coming years,
we will witness fully autonomous
rovers, able to build maps of their
environments and able to decide
where to go and what to see on
Mars. In a sense, theyll range from
geologists to tourists. SV
Fulvio Mastrogiovanni is a PhD student
in Mobile Robotics and Artificial
Intelligence at the University of Genova,
Italy. In the past few years, he gained
experience in planning techniques,
knowledge representation, and reliable
and efficient software architectures for
mobile robots. Currently, he is working
hard to provide planetary rovers with
an increased autonomy and robust
deliberative capabilities.
About the Author
SERVO 01.2008 53
Mastrogiovanni.qxd 11/30/2007 11:08 AM Page 53
120100011110102110001
0011201011
54 SERVO 01.2008
M
any aspiring roboticists take their
first steps in programming embed-
ded controllers with interpreted
languages, such as LOGO and Basic.
These languages are fine entry points for
beginners, but after a short time, their
limitations can become frustrating. To
tackle more sophisticated projects,
sooner or later you will have to move up
to writing code for microcontrollers in C.
With C, your code will run faster
and you will gain access to advanced
chip features, like interrupts and univer-
sal asynchronous receiver/transmitter
(UART) capabilities. C is also designed
to be portable, unlike Basic, whose
myriad varieties can be incompatible
with one another. Moreover, since most
professional developers program
embedded controllers in C, there is a
wealth of C code available on-line to help
get you started on your next project.
Bootstrapping the Old Way
For the novice, making the
transition to writing C code for microcon-
trollers can be daunting. Not only do you
have to learn a new programming lan-
guage, you also have to install a range
of new software tools: a text editor or
integrated development environment
(IDE) for writing and editing your code, a
C compiler that works with your chip,
and a utility for downloading the
compiled code to your embedded device.
Finding all of the necessary software
tools and getting them to work together
properly is a major challenge, even for
experienced developers. Most compilers
provide little or no user interface. They
work mysteriously in the background,
waiting for instructions and files from
the IDE. Within the IDE, command line
options must be set, telling the compiler
which chip is being used and what type
of output file is expected. Likewise, the
downloading software has to be config-
ured with the correct oscillator settings,
or else the code will not run correctly.
Even after the IDE, compiler, and
downloader have been installed and
configured, there is the issue of library
and header files. At this stage, the
novice programmer may have only raw
C about 30 recognized words to
work with. Some C compilers come
with built-in code libraries, but others
do not. So if you are trying to get start-
ed inexpensively, there may be a fair
amount of legwork left to do in order
to establish basic coding functionality,
like delay routines and text output.
All of this just to get to Hello
World, or more likely, in the case of an
embedded controller, a blinking LED!
A Different Approach
Machine Science, Inc., of
Cambridge, MA, has developed a new
on-line system that radically simplifies
the process of developing C code for
microcontrollers. This unique, patented
system enables users to write and com-
pile code using an on-line interface,
rather than a locally installed IDE. The
compiler is installed on a server, and
downloading is accomplished with a
Java applet, so there is no software for
the user to install or configure locally.
To access the system, users simply
log in to the Machine Science website
and write their code in a text window,
which provides useful features such as
editing tools, line numbering, and
color-coded C syntax highlighting
(Figure 1). Users can then compile their
code and send the compiled hex file to
a microcontroller in real time, with a
single mouse click. Since all of the soft-
ware is server-based, the system works
on both PCs and Macintosh computers.
In addition to cutting set-up time,
there are other advantages to using an
on-line development environment for
microcontroller projects. Code files are
automatically stored on the server and
can be accessed from any Internet con-
nected computer. This is particularly
handy if you want to work on the same
project at the office and at home, or at
different terminals in a high school or
university computer lab. As a resource
for users, Machine Science also pro-
vides a suite of code libraries, covering
everything from pulse width modula-
tion (PWM) to controls for liquid crystal
displays and other external devices.
C PROGRAMMING
for Microcontrollers Made Easy
C PROGRAMMING
New, no-cost online system cuts start-up time
from hours to minutes
by Sam Christy
FIGURE 1. Machine Science online
programming environment.
Christy.qxd 12/5/2007 11:17 AM Page 54
12010
11
As an additional resource, Machine
Science has developed a series of
detailed project guides, featuring step-by-
step programming instructions for novice
C coders. Several activities are included,
ranging from simple breadboard-based
projects to more advanced robotics
pplications. Companion activity kits
including off-the-shelf hardware, such
as breadboards, microcontrollers, input
and output devices, and robot-building
components are also available.
The on-line programming system
was originally developed for Microchips
PIC16F877, but Machine Science is
steadily extending the system to work
with additional microcontroller plat-
forms. Atmels Atmega8 and Atmega32
chips are supported, as is the FIRST
Robotics Competition controller. Users
can simply choose which hardware
platform they are using from within
the on-line interface and instantly start
compiling for any supported chip.
In order to streamline the user expe-
rience, certain parameters such as chip
processing speed are pre-set in the on-
line system. With time, users may find
that they are ready to take advantage
of the greater control and flexibility
afforded by locally installed program-
ming software. All of the compilers
integrated with the on-line system are
available at no cost, either as open-
source software or as demo versions.
While the system is designed for
ease of use, it is also very powerful.
Freed from the constraints of inter-
preted programming languages,
Machine Science users have built an
array of embedded controller projects.
These include a computer-controlled
Etch-a-Sketch, mating stepper motors to
the toy controls to create line drawings
of famous figures, as well as a full-scale,
Segway-style portable transportation
device (Figure 2), which was created by
undergraduates at the Massachusetts
Institute of Technology and students
from Boston-area high schools.
To test drive the on-line C program-
ming system, sign up for a free user
account on the Machine Science web-
site. With the barriers to getting started
removed, theres no reason not to make
the move to C today. First-time micro-
controller programmers may even want
to consider starting with C, rather than
devoting time and effort to learning
another programming language, only to
have to make the switch later. SV
FIGURE 2.
Segway
electronics.
Machine Science, Inc.:
www.machinescience.org
DIY Segway: web.mit.edu/first/Segway
Resources
SERVO 01.2008 55
Were
Semi Nuts!
Order 24 hours a day, 7 days a week
www.Jameco.com
Or call 800-831-4242 anytime
Jameco Electronics. *According to their web sites on August 28,
2007. Trademarks are the property of their respective owners.
Jameco offers more major brands of
semiconductors than anyone almost
twice as many as these catalog distributors.*
Its another Jameco advantage.
OTHER JAMECO ADVANTAGES:

More major passive, interconnect


and electromechanical brands than
other distributors.

99% of catalog products ship the same day.

Lowest prices guaranteed, or we pay 10%.

Major brand names and generic equivalents


for even greater cost savings.
Christy.qxd 12/5/2007 11:17 AM Page 55
56 SERVO 01.2008
Checking Everything Out
The first thing to do was check
everything out to become familiar with
the robot. I took some time to see
what was there and more important-
ly what was missing. His name is
ARTI ONE and he is a custom built
robot made by Promotional Systems in
the late 80s. I can no longer find any
information on this company and
assume they may have closed up shop.
(If anyone reading this has any history
on them please, email me.) The only
thing I had heard about this particular
robot is that the original owner used
to work at NASA. With no official
documents to the robot, the next steps
were to examine all the different
components used and reverse-engineer
enough to figure out how he was
supposed to work.
I could see that the robot used a
standard Futaba FP-R4F four channel 75
MHz AM R/C receiver which connects
to a custom driver board for controlling
the robot. That driver board was dated
10/2/87 and was made by Promotional
Systems for their robots. The
custom driver board has the
logic for decoding the R/C
signals that drive a pair of
H-bridges for the main drive
motors. It also controls the
lights on the robot (eyes and
mouth) and the operation of
a tape deck.
The tape deck appeared
to be an add-on version for
an automobile. It is used to play music,
sound effects, or prerecorded messages.
One other gadget onboard is an OHRA
wireless communicator which can
receive voice from the operator and act
as a wireless microphone so the operator
can hear people talk to the robot. This
setup is ideal if the operator isnt near
the robot to hear what people say to it.
A unique feature of this particular
robot is that the charging transformer
was on board with the cord so it was
easy to keep track of and would always
be available.
The robot itself is constructed from
thermoformed plastic similar to the
way the old Androbot robots were
made, but with all the panels glued
together. The arms are made from
aluminum dryer vents which have an
extra support inside. They can be man-
ually moved into the desired position.
The hands have a spring loaded thumb
which could hold a sign or small items.
A neat feature is that the head is
One cool aspect of the robotics hobby is
that there are so many different areas
to explore. This keeps it really interesting!
Recently, I was fortunate enough to pick
up an old promotional showbot which
made a nice addition to my robot collection.
The robot itself seemed to be in pretty good
shape overall. However, it was missing all
the extras like the remote control unit, wireless
headset communicator and, of course, there were no docs ...
Original Futaba
RX and harness.
Reviving a
SHOWBOT
by Robert Doerr
Doerr1.qxd 11/30/2007 11:10 AM Page 56
easily removable and can
be changed, if needed. An
example is an extra head
(McGruff, the crime dog) that
came with the robot. Ill just
need to pick up a trench coat
if we use that extra head.
One of the first things to
do after taking an inventory
of the major components
used is to get an idea of how
everything was connected.
This entails making a sketch of the
connectors on the controller board and
tracing out where the wires go.
The controller board had a 10-pin
connector for the radio receiver, a large
3 x 5 connector near the top, and
another large 3 x 4 connector near the
bottom. A rough schematic was made
of the charging and power sections
since that was one of the first sections
to deal with. Then, the rest of the
connections were mapped out.
If you cant follow the wires directly
or they are hard to see, an ohmmeter is
your friend and can help verify you have
the correct wire. It helps if you can
unplug any connectors so that youll just
be mapping out the wiring itself and not
have to worry about any feedback from
a board or device it may be plugged into.
The 3 x 5 connector provided the
power to the OHRA communicator, the
charge LEDs, cassette power, cassette
audio, headset out, and a couple
unused pins. The 3 x 4 connector has
the main power, charger, left and right
drive motors, and the body lights.
Having at least the basic wiring of
the robot documented helps before
getting into the project.
The power switch has three
positions. If the switch is in the right
position, the robot will be on. When
the switch is in the left position, the
battery will be connected to the
charging circuit. The center is every-
thing off, which keeps the main
battery completely isolated. This center
position would normally be used if
ARTI was going to be stored for a while
or being transported to a show.
We Need More Power
When examining the robot, I could
tell that the battery shipped with it was
the wrong one. It was a 12V battery
with some handmade extensions to
connect it. The battery was much small-
er than the compartment and as a
result, it would slide around. (It is not a
good thing to have a battery freely
moving around and banging into stuff!)
After measuring the battery com-
partment, I found that it was perfectly
sized to accommodate a 12V 17AH
battery. I ordered a new one and it fit
perfectly! When the original one died,
Im sure that someone just picked up a
12V battery and didnt really care if it
was the correct one or not. This larger
battery has the extra capacity needed
for longer performances.
After installing new ring terminals
on the wiring and bolting them to the
battery, that portion was now all set.
An important note of caution here!
Before attempting to power up a
strange robot for the first time, make
sure that the wheels are lifted off the
ground! This way, it wont run over you
or wreak other havoc in your workshop
if it decides to do something unexpect-
ed. Be safe and be smart when
working with mechanical and
electrical gadgets! With the new
battery, the robot would power up, the
eyes and mouth would light, but that
was about it.
Getting ARTI to Move
The original remote was probably
a standard dual stick Futaba four chan-
nel remote. It may have been a hacked
version customized to fit in a bag or
otherwise concealed for the operator.
That way, no one would notice it if the
operator was hanging out with the
crowd around the robot. At first, I was
going to find an old Futaba transmitter
on the surface 75 MHz band and then
swap crystals (if needed) for the cor-
rect channel/frequency. However, after
looking into it a bit more, I discovered
that the original R/C gear was an older
wide band AM unit which probably
shouldnt be used these days, anyway.
Instead, I decided to use an extra
Airtronics VG600 75 MHz FM six
channel radio set that was leftover
from my old Battlebot. This new R/C
gear should prove to be more reliable
and more immune to interference than
the original gear. My radio set also has
two extra channels that could be put to
use later to control other features.
However, it ended up requiring
more than just plugging in the new
receiver into the robot. (Things are
never that easy!) The connectors were
different on the early Futaba receiver
than on the current crop of radio
receivers. Each had male connectors
REVIVING A SHOWBOT
ARTI 1 robot.
New Airtronics
RX and harness.
Close-up of connector
on new RX cable.
SERVO 01.2008 57
Doerr1.qxd 11/30/2007 11:11 AM Page 57
58 SERVO 01.2008
with an odd spacing. I didnt want to
hack off the end of the cable and
install new ends in case the original
transmitter for ARTI was ever found.
Instead, I purchased a set of five 12
servo extension cables. On each one, I
just cut off the male end, crimped on
new female pins, and inserted the pins
into a 10-pin housing that was just like
the original harness. I made sure the
ground, 5V, and signal lines matched
those of the Futaba receiver.
The channels were named on the
Futaba receiver instead of numbered
like the newer receivers. It had (AILE,
ELEV, THRO, and RUDD) which then
had to be converted to the channel
numbers. The only difference was the
location of two channels on the early
Futaba receiver. When plugging in
channels 1 and 2 (Elevator and
Aileron), the two plugs just had to
be swapped on the new Airtronics
receiver to compensate.
Before attempting to power it up,
everything was double/triple checked
to avoid a mistake that could damage
any of the electronics. Doing it right is
much more important than doing it
fast (in my opinion, anyway!).
Getting ARTI to Move
the Way We Want
The first adjustments performed
on the transmitter were to the end
point adjustments for each channel.
This can set a limit on the signal that
would normally drive the servos
which, in turn, limit their travel. On an
electronic speed controller, this can
also act like a governor to prevent the
robot from reaching top speed. I
learned this lesson the hard way.
The first R/C electronic speed
controller I used was a Vantec unit on
my Battlebot Crash Test Dummy. The
robot seemed really fast but hadnt
been going full speed when it was
competing. I was unaware that just
turning those little end point adjust-
ments could make a huge difference.
(Arggh!!) When I figured that out
afterwards, the robot seemed to go
twice as fast! Since then, I check and
recheck every adjustment I can make
when using radio gear like this.
With the new radio gear connect-
ed, it was time to see if and how ARTI
would work. (Again, I want to note
that the wheels were propped up so
they wouldnt touch the ground!) It is a
convention that the transmitter is the
first thing on and the last thing
off. This prevents the receiver from
potentially picking up a stray signal.
The radio was powered on first, then
the robot. ARTI immediately started
making a loud siren sound and the
wheels started to move. If I moved the
joysticks on the transmitter, I could get
the siren to silence and change
the speed of the motors. The controls
didnt respond as you would expect,
but I anticipated there would be some
issues to deal with.
Adjusting the trim tabs on the
radio helped. The siren sound finally
subsided and was quiet, and the
wheels almost stopped with the
joysticks centered. Next was to deter-
mine if ARTI was meant to drive with
conventional tank style steering (dual
sticks) or if the controller would handle
the mixing of the drive and steering
channels for single stick operation.
Since the drive motors only
seemed to respond to the right stick, it
appeared that the controller did handle
the channel mixing for driving with a
single stick. I suppose that made sense
so that an operator could drive with
one hand on the controller, if needed.
With the motors moving, the next
step was to get them calibrated and
under control.
When moving the stick up and
down, the direction the wheels were
turning appeared to be reversed. This
part was easily corrected by flipping the
channel reverse switch on the front of
the transmitter. Some radios have these
reversing switches on the back or hid-
den under a cover. The steering control
acted a bit differently than I was used
to as it only worked with the stick at the
extreme range of the joystick. Had I not
changed the end point adjustment on
the transmitter, I may not have been
able to steer the robot at all.
When the joystick was full right,
the left motor was off and only the
right motor would go forward and
back. With the joystick at the full left
position, the right motor would be off
REVIVING A SHOWBOT
This shows the
correct battery
and the old one.
Robot
controller.
Robot base.
Doerr1.qxd 11/30/2007 11:11 AM Page 58
and the left motor would respond to
forward and back on the joystick.
Although ARTI cant rotate in
place with this steering setup, he is
easy to control.
No matter how the trim tabs on
the transmitter were adjusted, there
wasnt enough range of travel to center
the signal. To fix it, the radio was going
to need some work. (I always seem to
find a reason to take things apart!)
After pulling the back off the
transmitter, I saw that there was an
extra hidden adjustment on each trim
tab (see the photo). These must have
been used by the factory to help center
the signal for their system. By adjusting
these, I was then able to set the correct
center via the trim tabs on the front of
the radio.
Once this was done, the drive
motors were off with the right stick
centered and the steering responded
well at each edge. That took care of
the motion part. Now we just need to
figure out what the other channels
control and how they work.
What Else Can ARTI Do?
Since the robot started making
that siren sound when first powered
up, I knew that moving the left joystick
side to side turned on the siren. It did
that without having to move the stick
too far, but it did nothing when moving
it in the other direction. I thought it
might do something more, so again I
had to adjust the extra trim tab inside
the radio to help center the signal. This
moved the center of the signal and all
of a sudden, the robot would make
another different warbling siren sound
with the stick in the other direction. It
also required the stick be moved a bit
more to enable the original siren
sound, so that it wouldnt be turned on
by mistake. Things were definitely
starting to shape up!
The last channel is controlled by
the up and down movement of the left
joystick and would turn on/off the
onboard tape player. This one didnt
need much adjustment and since the
left stick is normally for a throttle, it
has a detent to stay in place. This was
perfect since you could turn on the
tape deck and wouldnt have to hold
the stick to keep it going.
When the robot was reassembled
and the body screwed back on, I turned
on ARTI and absolutely nothing hap-
pened. If I tapped on the circuit break-
er, he would power on for a second or
two. Since it seemed like it was bad, I
picked up a replacement at the local
electronics shop (Abel Electronics.) The
body was pulled back off the robot and
then the circuit breaker was replaced.
ARTI was turned on again but
nothing happened. Upon closer inspec-
tion, I found there was a bad connec-
tion where the terminal was crimped
on the wire going to the breaker. The
wires had been tinned and then
crimped to the terminals. The crimped
connection loosened up a bit and, as a
result, oxidized between the connector
and the wire which caused an
intermittent connection at that spot.
It would have been better if the
connector had just been crimped to the
wire itself (without tinning it first) or
soldered after crimping. Ive heard
arguments both for and against
soldering crimped terminals so just use
what works best for you whenever
encountering a similar problem.
Replacing that connector and
reassembling the robot took care of
the last issue with the robot itself.
Whenever the robot is powered
on, the eyes will light up in a blue color
and the mouth lights up red. If the
tape player is enabled or the operator
is speaking, the light for the mouth will
flash in time with whatever sound ARTI
is making. This is a great visual aid
when the robot is speaking. Kids have
found it very appealing when we play a
book on tape.
The remaining gadget to tackle
was the wireless communicator used
for the operator. The unit on the robot
was made by OHRA and would both
receive and transmit sound. The one in
the robot was customized a bit to
integrate it into the robot. I would
either have to find the correct match
for it or replace the whole thing to get
that portion to work. It was just a
stroke of good luck that one of the few
(very few) links that turned up was for
a set of OHRA Walkphone full duplex
communicator (OR-200) units still in
the original boxes.
Less than $25 and a week later,
REVIVING A SHOWBOT
Charging
transformer.
OHRA
Walkphone
for operator. Transmitter (with cover removed).
Extra (hidden)
trim adjustment.
SERVO 01.2008 59
Doerr1.qxd 11/30/2007 11:12 AM Page 59
they showed up at my door. They
were supposed to come as matched
pairs Model A with Model B or Model
D with Model E. It was a pleasant
surprise that the pair which arrived
just happened to be on the same
frequency as the one in the robot.
According to the manual, these
are supposed to have a range of up to
1/4 mile which would work fine for the
robot. Just adding a new 9V battery for
the one I was going to use did it! I
could talk through ARTI and hear what
people were saying to the robot. ARTI
only projects the operators voice as-is.
I suspect that they may have
customized the transmitter portion of
the original unit so that it could sound
like a real person or (by flipping a
switch sound) more like a robot. That is
a project I may tackle down the road
after using the robot a bit more.
The Future for ARTI
Reviving ARTI and getting the
robot fully functional again was a real-
ly rewarding and worthwhile project. It
was all done without having to hack up
or modify the original robot. There are
a few upgrades that could be done to
the robot without any major changes.
One is to check out the two
unused pins on the larger 3 x 5 connec-
tor. I have a feeling they may turn on a
device whenever the stick for the throt-
tle is all the way down instead of up for
the tape. This could enable the original
controller to drive one more device.
Another option may be to use the
extra two channels on the new radio
gear to control other features. The
addition of either a large servo or DC
gear motor could allow the head to
turn back and forth. There are a lot of
options for improvements.
Down the road, I plan to use ARTI
to do several interesting things. He is
going to make an appearance at the
local kindergarten class to talk about
robots. ARTI may also help out with the
candy duties for different holidays.
In the meantime, he has been a
huge hit with the kids just reading
some books on tape. In particular, the
read-along Star Wars tape and book
sets have been entertaining and helps
teach kids to read. SV
RobotWorkshop Authors website
www.robotworkshop.com
Airtronics Manufacturer of new
radio used for ARTI revival project
www.airtronics.net
Vantec Supplier of dual R/C
H-bridge drivers
www.vantec.com
Abel Electronics
www.abelelectronics.com
Tower Hobbies Supplier of R/C
gear (Airtronics radio)
www.towerhobbies.com
Web References
REVIVING A SHOWBOT
You know it wants one. Go ahead, spoil your robot. Give it the brain and the brawn to take on other robots.
All modules shown actual size
TReX dual motor
controller $99.95
Orangutan LV-168 $59.95
eX
u
a
o
tr
ller:
T
R

d
l
m
tor
con
o
i
v
e
e
i
a
s
n
s
a

n
n
o
ativ
d
s
g
n
llow
i
t
n
t
s
it
in

tw
en
ra
io
on
ro
w
ch
g
be
e

d

c
t
l
(
C
)
a
l
g

o
t
g

n
d
R

or
n
a
o
v
l
a
e
a

y
h
o
u
s
s
r
a

S
-
3

r
as
n
c
r
n
o

e
i
l
(R
3
2
o

T
L
w
i
a
l
i
u
d

f ad
t
o
l
T
)
th
m
u
t
t
e o

di
i
n
a

f
at
r
s
e
u
e
.
O
ran
g
u
tan
-16
: f
l
-
L
V
8
u
l
fe
u
red
r
t
tr
l
r
at

obo
con
ol
e
erfect
or
lo
-
olt
g
p

f

w
v
a
e
r
s.
A
m
16
8

u
obot

T
eg
a
C
,
2
-ch
n
n
l
H
r
d
g
es
,
a
e
-b
i
2
L
D
,
bu
z
z
e
,
a
d
8
x

C

r

n






e





m
or
.
Find out more at www.pololu.com or by calling 1-877-7-POLOLU. 6000 S. Eastern Ave. 12D, Las Vegas, NV 89119
TReX Jr
$59.95
TReX Jr: all the great features of
the full TReX in a lower-power,
lower-cost package.
60 SERVO 01.2008
Doerr1.qxd 12/4/2007 10:37 AM Page 60
ast time, we had the honor to
present two robots the
Roboquad and Robopanda that
approached the line between toy and
robot from the robot side of the
equation. This month, the V-Bot shows
that a toy can also approach that fine
line between electronic plaything and
seemingly sentient automaton.
Mighty Morphing
V-Bot
After the first trial of any cool toy
getting it out of the box and
equipping it with batteries the V-Bot
is ready for action. The V-Bot comes
with a two joystick controller that also
hosts a number of buttons that prompt
the V-Bot to do everything from karate
chops to transforming between a car
and a humanoid robot.
The V-Bot is no Optimus Prime (its
car form looks something like a cross
between an Xb and a Suburban), but it
certainly sports plenty of attitude. In
addition to the inherent coolness of a
transforming robot/RC car, the V-Bot is
nothing short of a one bot show with
its generous supply of flashing lights
and thumping techno beats. The V-bot
can cruise around at a good speed
in its car form that comes complete
with working headlights, and its also
completely driveable in humanoid
form, where it will karate chop
anything in its way.
The V-Bot would even give the
Robosapien or washed up celebrities a
run for their money in a dance-off it
performs its own dance to its own
music. And if you tire of the V-Bot
dancing to the same old soundtrack, it
has the super cool feature of having an
audio port capable of hooking up to an
iPod. It comes with the necessary cable
and a Velcro strap to keep your beloved
iPod safe, so you could have the V-Bot
dancing or driving around to Muse or
Bjrk in no time.
The humanoid form does not real-
THIS MONTH:
More Than
Meets the Eye
V-BOT CAR. V-BOT GOOD AS NEW. V-BOT BOX.
SERVO 01.2008 61
TwinTweaks.qxd 12/3/2007 3:26 PM Page 61
62 SERVO 01.2008
Twin Tweaks ...
ly compare with the agility and sophis-
tication of bots like the Robonova-1 or
the Bioloid, but the V-Bot puts forth a
valiant effort. The spectacle of its
transformation certainly makes up for
most of the shortcomings in its
humanoid form the V-Bot spins on its
waist, folds up its wings, and lies down
flat in a fairly fluid motion, and all to
the fanfare of flashing lights and music.
With such inherent coolness, we were
almost reluctant to crack it open, but
we quickly got over that.
Modular Art
The humanoid form of the V-Bot
brought back fond memories of the
humanoid robots we worked with in
the past like the Robonova-1 and the
Bioloid. Of course, these robots were
much more sophisticated (and, by the
same token, much more expensive)
than the V-Bot (which will run you
about $160), and that got us thinking
about what it was exactly that created
such classy bots.
We think one of the major design
elements that is conspicuously present
in the Bioloid and to a lesser extent in
the Robonova-1 that allows for such
sophistication is their modularity. The
humanoid form demands a high
number of degrees of freedom to
create a passable reconstruction, and
a modular design seems to be an
effective tool in achieving that end.
The Bioloid was so modular that it
was able to become a host of other
things in addition to the humanoid
everything from a spider to a cat with
a flair for impressionism. With just a bit
of programming, the Bioloid was
also effectively able to become a
transformer of sorts.
That got us to thinking if the
modular Bioloid could be turned into a
transformer, could the transforming
V-Bot be turned into a modular robot?
We thought it could, or at least we
thought it stood a much better chance
than any run-of-the-mill RC car.
The V-Bot does give a rudimentary
emulation of the human form it has
a head, two arms, two legs, and it
moves about in the upright position.
Being a humble RC car, it does take a
few shortcuts to achieve bipedal mobil-
ity. Firstly, the V-Bot doesnt actually
walk the bottoms of its feet are
equipped with wheels, so this bot
simply scoots around on a permanent
set of Heelies. Secondly, the V-Bot only
stands upright with some assistance in
the form of braces with wheels that
protrude from the back of its legs. We
dont begrudge it the crutches though
in our mission to make the Joinmax
robot dog into a bipedal walker, we
also relied on some extra support in
the form of a long tail.
Despite these forgivable simplifica-
tions, we still think the essence of the
humanoid form captured by the V-Bot
lends itself to being modularized.
A remote controlled humanoid, no
matter how simplified, is bound to
have more degrees of freedom than
a run-of-the-mill RC car. The transform-
ing ability of the V-Bot also bodes
well for its list of moving parts. Our
hope was that a lot of moving joints
would mean a lot of parts that could
potentially be split into modules
an arm module here, a leg module
there, perhaps even a hand module or
a foot module.
But its no use counting our
modules before they detach, so it was
time for some demolition.
The Modern Robotic
Prometheus
Our last experience of trying to
pop open a bot (the Robopanda) didnt
prove to be fruitful, but we were
confident that we would be able to
dissect the V-Bot. With the right
screwdriver in hand (a small Phillips),
we were ready to commence surgery.
The V-Bot is held together by a
copious amount of screws, but we did
appreciate the fact that the vast
majority were all the same size so that
we didnt have to go about carefully
documenting where each screw went.
As we dissected the V-Bot, we
were repeatedly impressed with its
sophistication. Our standard for sophis-
tication in RC cars was based on our
experience with cheap ones that we
would outfit with makeshift aluminum
weapons for rumbles. The V-Bot was
certainly more impressive than any of
those, and much of the elegance in its
design reminded us of the polish and
efficiency of the Robosapien clan.
Reflexive motion in the arms and a
busy circuit board equipped with
seemingly color coded sockets was
certainly a cut above your regular RC
car, but we guess we should have
expected it from something that can
play music from iPods.
Our hope with the V-Bot was
that its humanoid form would help to
create distinct appendages that could
easily be detached to form modules.
Things are never quite as simple
as they seem, though, and we soon
discovered that the V-Bot complicated
matters by keeping its brain in its chest
and its stomach in its feet. The poor
anatomical analogy aside, the V-Bot
created problems for us by having
the main circuit board stored in the
chest of the robot and the batteries
(six C cells) stored in the feet. We
can appreciate how the weight
distribution kept the center of gravity
low, but it made modularity more
difficult to realize. We could potential-
ly section off the feet, but then the
robot would need both of its feet
to function at all. In that case, leg
modules seemed hardly feasible.
Thankfully, the arms of the V-Bot
proved to be another story. They didnt
house any critical electronics or power
sources, but they did, in fact, house
their own motors, which made them
more of a meaningful unit. They were
also only connected by a few screws
and could be easily attached and
reattached much more so than the
V-BOT BOARD.
TwinTweaks.qxd 12/3/2007 3:27 PM Page 62
More Than Meets the Eye
bots other appendages. They didnt
have their own power source and were
not independent modules in that
sense, but our lives were made easier
by only having to deal with two wires
running from the arm motor to the
body. It would have been four, but
the wires to the headlights were an
unfortunate and unintentional victim
of the dissection.
The Robot
Connection
For our modules to easily reattach
and detach from the V-Bot, we
needed some connectors. It might
seem like any old plug should do, but
choosing the right connector is an
important design decision that can
have far reaching ramifications for
overall effectiveness and quality. While
a hack on a fancy RC robot might not
seem like the highest class of projects,
we couldnt resist using some classy
connectors.
How classy, you ask? We were
able to get our lucky hands on some
Deutsch Micro AutoSport Connectors,
which are five position connectors
derived from standard mil-spec
(military specifications) connectors and
designed specifically for the motor
sports industry.
The AS connectors are lightweight
and constructed of anodized alu-
minum, and if that coolness wasnt
enough, they have plenty of other
design benefits. These connectors add
strain relief with a longer than usual
tail and an integral knurled area for
ease in use with heat shrink boots, and
they have environmental sealing for
use in real harness applications.
By environmental sealing, we
mean that the connector is completely
sealed and wont allow any moisture
inside. While moisture in the connec-
tors would be the least of our problems
if we left the robot out in the rain, it
was reassuring nonetheless.
A handy tip for using connectors in
general is to make sure that the socket
end is always on the side with power. If
the pins were on the powered side and
something conductive fell between
those pins, you would have a short
circuit on your hands. In our case, the
powered side was the one going to the
main body of the V-Bot, so we planned
to outfit its shoulder socket with a
socket.
Adding modules would take
more than just connectors, so we also
had to consider wiring. An important
thing to note about wires is that in
addition to their obvious electrical
characteristics, they always add a
mechanical component to the design.
In Evans circuits classes, the wires in
circuit diagrams can be stretched and
shrunk without having any effect on
the circuit. While there are obvious
effects on the electrical characteristics
like resistance when using longer or
shorter wires, one cannot forget the
consequences for the mechanics of
the circuit.
The flexibility of the wire and the
size of the wire (both length and
gauge) are important things to consid-
er. Often, electronics are not given a lot
of real estate in a project, so you need
wires that are easy to physically fit
somewhere around your board.
Or maybe the wires need to jump
through some holes or take a corner
around a bit of the frame, so youll
need wire flexible enough to make
the journey.
Or perhaps for some reason you
want to add connectors to the wires
for some harebrained application
AUTO SPORT CONNECTORS AND CRIMP TOOL.
V-BOT ARM. V-BOT CONNECTORS.
V-BOT CONNECTIONS.
SERVO 01.2008 63
TwinTweaks.qxd 12/3/2007 3:28 PM Page 63
64 SERVO 01.2008
then the gauge becomes an issue.
Our Micro AS connectors could handle
a maximum wire gauge of 22, so
we thought we would be fine with
whatever wires the V-Bot might throw
at us.
To our mild surprise, the V-Bot
had very fine gauge wires, probably
about 26 or even 28. Thankfully our
plan was to extend the wires anyway,
but the small gauge just ensured
that soldering them would be all
the more fun.
Robot Cubism
Now that we had the neces-
sary tools, connectors, and wires,
we were ready to start the real
surgery. The first order of business
was to completely separate the
V-Bots arm from its body, which
was achieved by simply cutting
the wires. We cut the wires in
the middle to make the next step
as easy as possible extending
the wires.
We extended the arm wires
with 22 gauge wire. First, we
carefully tinned both tips and then
soldered them together. The small
gauge of the V-Bots wires
demanded caution while soldering
if we werent careful, the insulation
might creep back irretrievably.
Thankfully the insulation decided to
tough it out, and we were ready to
attach the AS connectors.
As most good robot building
bits, our connectors were scavenged.
Scavenged connectors are likely to
already be outfitted with pins and
sockets, so we busted out an
extraction tool to take care of the
stragglers. In many situations,
you might actually want to leave
extra pins and sockets because
only when all five holes are
filled will the connector truly be
environmentally sealed, but we
wanted to conserve pins and sockets.
To use the extraction tool, all
you have to do is dip it in some
lubricant and then pull the offending
pin or socket. The other end of the
extraction tool is actually an insertion
tool, but inserting the pins and
sockets is usually easy enough to do
without any help. Just press in until
you hear the click and presto you
have a connector eager for something
to connect to.
There is actually one more piece of
business to be taken care of before the
connection can be made crimping.
The pins and sockets must be
crimped onto the wires, and mil-spec
connectors require a mil-spec crimper.
Our fancy crimper precisely crimps
the barrel in eight places when done
correctly, those pins and sockets arent
going anywhere.
Once the extended wires were
outfitted with the connectors, all that
was left to do to give the V-Bot back its
arm was to connect them. That being
done, we turned on the bot to see that
our surgery didnt have any unexpect-
edly fatal side effects, and we were
relieved to find that the V-Bot woke up
with just a little bit of soreness.
The real test, though, was to see if
the arm would function when it was
reconnected. We had to notch the
shoulder a bit to give the extended
wires room to escape, but other than
that the V-Bot emerged relatively
unscathed (with the exception of the
aforementioned headlights).
We turned the bot on for the
moment of truth, and we were excited
to see that the arm was working just
fine. The V-Bot may not have been
better, faster, or stronger, but it was at
least somewhat modularized.
Meaningful Modules
While the modified V-Bot may not
have been the best example of a
modular robot, real modular robots are
out there doing great things (or at
least theyre in the lab getting ready to
do great things). In the summer of
2004, we had the opportunity to be a
part of an apprenticeship program at
the Palo Alto Research Center, and we
V-BOT SURGERY.
FUN WITH V-BOT.
V-BOT CONTROLLER.
Twin Tweaks ...
TwinTweaks.qxd 12/3/2007 3:28 PM Page 64
were able to see some modular
robots firsthand.
Modular robots can be used for
everything from search and rescue
operations in piles of rubble to mainte-
nance in pipelines. But what is it that
makes modular robots so useful?
Modular robots have an edge in
robustness, scalability, and adaptability.
Many modular robots are made of
regular modules, more like the Bioloid
than the modified V-Bot. That means
they can be rearranged and recon-
structed to create a variety of different
shapes capable of tackling different
tasks. Perhaps a modular bot can start
out as a wheel blazing across flat
terrain and turn into a slithering snake
to deal with uneven surfaces. Our
modified V-Bot couldnt really do that
perhaps after modularizing a few
more appendages it could give a pass-
able impression of a Picasso painting,
but not too much else (maybe Dal).
Fancy modular robots are also
able to attach and reattach modules
dynamically. Sometimes this is accom-
plished using shape memory alloys at
the interface between modules, or
perhaps even just mechanical latches.
The V-Bot couldnt ditch its arm in a
heartbeat, because screws have to be
undone and the connector disconnect-
ed. But if the V-Bot was to break an
arm by performing a karate chop on
the wrong robot, it would be quick to
amputate the damaged limb and,
assuming we had another module at
the ready, outfit it with a new one.
That gets to the heart of one of the
great advantages of modular robot
design robustness. A modular robot
can simply leave behind damaged
modules, and though that might seem
a bit coldly utilitarian, its certainly a
much more favorable outcome than
having one faulty bit take out the
entire bot.
Another major advantage of
modular robots is in scalability.
Regular modules can basically be
interchangeable parts, so such bots
would be easy to mass produce. It can
also be a great way to prototype
make a smaller version of a final bot
thats smaller in the sense that it just
uses less modules. By the same token,
modular bots are also easy to expand
and modify. To add a sensor, all you
would have to do is add another
module instead of cracking the whole
thing open and wondering how to
make it all fit together.
For all of these advantages, it
would seem like every robot should
be modular, but there are some
design hurdles that also make them
as intimidating as they are appealing.
For one, to make truly independent
modules, they all need to have their
own power sources. When youre
dealing with a lot of modules, that
can start to get a bit hairy. Also, truly
independent modules would all need
their own processors, and if you want
them to be equipped with sensors or
some other sort of mechanical
device, its starting to look like a lot of
things to include in a single module.
The modular unit might be very
difficult to design, but the potential
rewards are certainly enough to have
a lot of very smart people trying to
solve the problem.
So, in the end our modified V-Bot
might not have been a great example
of a modular robot, but that doesnt
detract from its overall coolness, even if
it might be more of a toy than a robot.
The V-Bot does not have any external
sensors, so in that sense it doesnt even
skirt the formal definition of a robot. It
does, however, look like what many
people expect a robot to look like, and
it acts like what many people expect a
robot to act like.
However inaccurate this concept of
robots propagated by childrens toys
and summer blockbusters may be, we
think the V-Bot does a good job of
capturing the essence of that popular
conception. We were also very
impressed by the V-Bots sophistication
and apparent hackability, so we would-
nt be too surprised to see it rear its
head in the magazine in the future (to
thumping techno beats, of course). SV
V-BOT KARATE!!
SERVO 01.2008 65
More Than Meets the Eye
TwinTweaks.qxd 12/3/2007 3:29 PM Page 65
66 SERVO 01.2008
Electronic Parts & Supplies
Since 1967
www.c-stamp.com
L
O
W

C
O
S
T
!
CONTROLLERS & ROBOT KITS SENSORS DISPLAYS
Free
Expert
Technical
Support
1 (800) 985-AWIT
E
a
s
y

t
o

C
o
n
n
e
c
t
L
O
W

C
O
S
T
!
LOW COST
Professional SW Dev. Tools
For the finest in robots, parts, and
services, go to www.servomagazine.com
and click on Robo-Links.
RobolinksJAN08.qxd 12/6/2007 3:09 PM Page 66
A
rtificial Intelligence literature calls this characterization
ability clustering and it is often used for data-mining
and analyzing very complex data sets where a human
cannot easily determine a pattern in the data by simply
looking at a graph. This is a fascinating topic of its own,
but for this months article we are going to look at how a
particular clustering technique called a Self-Organizing
Map can enable a simple microcontroller circuit to learn to
dynamically categorize the data it senses over time.
A Self-Organizing Map is a form of unsupervised
learning which means that there is no teacher present
telling the program whether its answer is right or wrong.
Instead, this neural network model is concerned with finding
patterns in sensory data and classifying them. There is no
correct or incorrect answer in this case, however there is an
inductive bias or embedded prejudice in the network towards
analyzing the data in the specific manner you set up. But
more on inductive bias in a bit.
Self-Organizing Maps are a particular form of
competitive learning referred to as winner take all.
Competitive learning is a class of neural network learning in
which neurons in a given network compete for activation.
Winner take all means that neurons are arranged in a
single layer and only one can fire at a time; hence they
compete for activation.
A two-dimensional Self-Organizing Map can be visual-
ized easily as a graph. Data points show the relationship
between data collected from two sensors, in this case
temperature and light. They are plotted together and, as you
can see, certain patterns or clusters are visible in the data.
A Self-Organizing Map is initialized by creating random
prototype vectors, or points on the graph. Over time as the
learning rule is applied, these prototype vectors move
towards different clusters in the data and come to represent
the general properties of the region. This eventually creates
an emergent data topography which extracts features
from the data and more interesting for our purposes
allows a program to classify new input data in light of
past experience.
The learning method for a Self-Organizing Map is
actually quite simple and intuitive. Once a data set is
acquired, the programmer needs to decide how many
prototype vectors should represent the data space. This is
where the inductive bias I mentioned earlier comes in,
because here you are telling the program how many
categories to look for in the data. If you want the program to
think like you do, this isnt a problem, but if you want to learn
something new from seeing how the program categorizes
messy data, I suggest using more prototype vectors than you
think you might need; extra prototypes will just be redundant
but missing prototypes are harder to spot.
by Heather Dewey-Hagborg
Imagine if your robot could learn to characterize its sensations. Could it evolve its
own language to describe its feelings? They might be literal sensations derived
from sensors rather than self-reflection, but it is still a provocative idea ...
DIFFERENT
BITS
DIFFERENT
BITS
NEURAL NETWORKS FOR THE PIC MICROCONTROLLER
PART 4: SELF-ORGANIZING MAPS
FIGURE 1. A winner take all neural network layout with two
inputs and one prototype vector. Only the winner is activated.
SERVO 01.2008 67
DifferentBits.qxd 12/3/2007 3:34 PM Page 67
DIFFERENT BITS
68 SERVO 01.2008
In our example, I collected light and temperature data
from 30 minute increments over a 24 hour period of time
in a window in my apartment. They are saved to the PICs
internal EEPROM which has plenty of space for this amount
of data. I initialized my Self-Organizing Map with four
prototypes to start, imagining it could discover the basic
boundaries of hot and cold, light and dark. I find the
average sample value for both sensors and then I restrict the
random values chosen for the prototypes to reflect the
actual data collected.
In CCS PIC C code, it looks like this:
// specify the range of random integers
// to generate (050)
#define RAND_MAX 50
//now we have 96 addresses in eeprom
//representing 48 2-d datapoints
//calculate the mean for both sensors
meanX = 0;
for (location=0;location<(samples*2);location+=2){
x = read_eeprom(location);
meanX+= x;
delay_ms(10);
}
meanX /= (float) samples;
meanY = 0;
for (location=1;location<(samples*2);location+=2){
y = read_eeprom(location);
meanY+= y;
delay_ms(10);
}
meanY /= (float) samples;
for (i=0;i<proto_num;i++){
prototypes[i][0] = rand()+round((meanX-25));
prototypes[i][1] = rand()+round((meanY-25));
}
The next step is to iterate through the training data, in
this case, the collected light and temperature readings, and
to begin to update the prototype vector values.
For each data point, we begin by finding the prototype
vector that has the closest value. In the graph in Figure 2,
you can see how for any given data point one prototype is
clearly the closest. We measure this using the standard
distance formula:
In CCS PIC C code, the following two functions calculate
distance between two points:
#include <MATH.H>
float sqr(float x){
return x * x;
}
float distance(int x1, int y1, int x2, int y2){
return sqrt( sqr((float)x1-(float)x2) +
sqr((float)y1-(float)y2));
}
If we had higher dimensional data, for example using
three different sensors, we would just scale up the distance
formula accordingly.
We compare each prototype vector to the current
data point and the one with the smallest distance is our
winner.
The next step is to reinforce this relationship by
bringing the target prototype vector closer to the data
point. To do this, we first need to specify a learning rate;
the amount to change the winning prototype after each
iteration. In our example, I chose a static learning rate of
.025. It is also possible to change the learning rate over
time, allowing you to gradually narrow in more closely on
the ideal position for each prototype vector. To do this, we
FIGURE 2. A graph of the
data set sample values.
FIGURE 3. A
graph of the Self-
Organizing Map
sample values
and the initial
prototype values.
DifferentBits.qxd 12/3/2007 3:34 PM Page 68
would simply subtract a small amount from the learning
rate after each iteration through the data set. In other
words, if we start with a learning rate of .05 and we have
48 data points which we iterate through 30 times, we
might subtract .001 from the learning rate after each
iteration, leaving us with a final learning rate of .02.
We dont subtract after each data point, only after each
run-through the entire set.
Once we have a learning rate specified, we determine
how much to change the prototype vector by multiplying the
learning rate by the difference between both components of
the two vectors. For example, if the learning rate is .05, our
data point is (122, 180) and our prototype is (84, 203), we
would adjust it as follows:
Delta = learning rate * (point 1 x point 2 x)
Delta = .05 * (122 84)
Delta = 1.9
New prototype x value = 84 + 1.9 = 85.9
Delta = .05 * (180 - 203)
Delta = -1.15
New prototype y value = 203 -1.15 = 201.85
Then we round the floating point value off to the
nearest integer to keep our memory consumption limited.
The new values for our prototypes would be (86, 202). As
you can see, the prototype vector has moved a little bit
closer to the data point.
In code, it looks like this:
a function for rounding
long round(float x){
long x2;
if (x>=0){
x2 = (long)(x+0.5);
}
else {
x2 = (long)(x-0.5);
}
return x2;
}
updating both coordinates of the winning prototype
temp1 = (long)x - (long)prototypes[winner][0];
temp2 = c*temp1;
prototypes[winner][0] = round( prototypes[winner][0]+
temp2);
temp1 = (long)y - (long)prototypes[winner][1];
temp2 = c*temp1;
prototypes[winner][1] = round( prototypes[winner][1]+
temp2);
We repeat this update process for each data point a set
number of iterations. In my example, 10 iterations was
more than enough. Now the prototype vectors have moved
to positions representing clusters of data.
If we feed a new input vector into the program, it
will recognize it as one of the four categories. I set my
circuit up to output to one of four LEDs, depending on
which category it was sensing. At this point, you can decide
if you want to halt learning, or allow the program to
continue the learning process in a more restricted fashion.
In my code, I chose to halt learning, but the code to
continue learning with a limited learning rate of .005 is
included in the comments.
You might be wondering how it is possible to map
specific physical outputs to outputs of the Self-Organizing
Map when we dont know ahead of time how it is going
to shape up. This question is resolved by a different type
of neural network called an Oustar which combines a
competitive layer like our Self-Organizing Map with a
supervised output layer like the feedforward neural
networks we looked at in the September issue. By adding a
teacher, we are able to decide which clusters of data will be
represented by which output. This is useful in situations
where you know what relationships you want the network
to learn in advance.
One of the things I find fascinating about the
Self-Organizing Map is the idea that the program can
have a kind of emergent knowledge all its own; something
FIGURE 4.
Graph of the Self-
Organizing Map
sample values
and the final
prototype values.
Source code for the CCS PIC C, a hex file, and the Processing
application are available from the SERVO website at www.
servomagazine.com.
Processing IDE and compiler available for free online at
processing.org
RESOURCES
SERVO 01.2008 69
DIFFERENT BITS
DifferentBits.qxd 12/3/2007 3:34 PM Page 69
I framed but never really specified and could never
predict. One example I like is the idea I mentioned at the
beginning of this article of an emergent language: Over
time, a robot could map different sensations to different
prototypes. These prototypes would then be assigned
random combinations of phonemes as names, gradually
developing into a very primitive vocabulary. A processor
like the Parallax Propeller with an established vocal tract
library makes this project a bit easier to tackle. Imagine,
your robot telling you all about its feelings in its own
invented language! Well, maybe that is a project for a
future article ...
The CCS PIC C microcontroller code and a coordinating
applet from this article are available on the SERVO
Magazine website. The microcontroller code implements
a simple Self-Organizing Map which uses an analog
temperature sensor and an analog light sensor as input.
This should work with any two analog sensors you choose.
The circuit collects data from the sensors every 30 minutes
for 24 hours and outputs the samples in a distinct format
out the serial port. If you want to speed up the data
collection process, just change the timing loop. Once the
data collection period is over, the circuit goes through a
learning phase and then moves into an infinite loop where
it outputs its categorization of new input to one of four
LEDs and prints the sensor data.
The applet is written in Processing, an easy to use
front end for Java. The applet has two modes: first, it just
collects data from the microcontroller (over the serial port)
and displays a time vs. sensed values graph of the data.
It saves an image of this graph as data.png. Then the
application switches into a different mode and displays
a plot of the accumulating input data and the prototype
vectors dynamically updating over time. Press the e key
to exit the application and save an image file of the
graph (SOM.png), as well as a text file (capture.png) of
all the data.
You will need to tweak the Processing code to use the
right serial port for your computer if you arent using COM1.
Also, if you change the number of prototypes in the PIC
code, you will need to update the coordinating variable in the
Processing code.
Please drop me a line and let me know if you use these
ideas or code for any of your own projects. I would love to
hear about them! SV
Heather Dewey-Hagborg can be contacted via email at
heather.servomagazine@gmail.com.
CONTACT THE AUTHOR
70 SERVO 01.2008
DIFFERENT BITS
DifferentBits.qxd 12/3/2007 3:35 PM Page 70
A
s a child, I imagined robots being
governed by tubes and relays not
an unusual image given the science
fiction movies of the time, like Robbie
the Robot in Forbidden Planet. Today,
fictional robots are depicted with minia-
ture microelectronic brains, with emo-
tion chips the size of a fingertip. And
no wonder, because these things actual-
ly exist! Far from science fiction, with
todays technology you can build a robot
with a brain no larger than a caterpillar.
Whats more, these brains are
designed to interface with the outside
world. These so-called microcontrollers are
part computer, part input/output. In one
chip-sized package is an affordable
programmable computer with a multitude
of I/O for connecting to a robots various
motors and sensors. The best news is that
these microcontrollers are inexpensive.
Some are as cheap as a dollar each; ver-
sions that come with a complete develop-
ment kit are $50 to $150. In all, a bargain.
This month, well explore a variety
of options for inexpensive microcon-
trollers suited for small robotics. Though
the microcontroller is basically a
generic, universal device, some of these
products are expressly designed for use
in amateur robots. And those that
arent are still very capable of the job, as
they have the core ingredients needed
to control most any real-world device.
Under the Hood
Microcontrollers are single-chip
computers, capable of running user-
defined programs, accepting input from
switches and other devices, and control-
ling the state of one or more outputs.
Microcontrollers are expressly designed
to be used in so-called embedded appli-
cations, where control of some external
device is the main goal. Typical uses for
embedded chips include the on-board
computer in your car, the smarts in a
modern-day television, even the control
circuitry in a coffee maker.
For the typical robot application,
the microcontroller uses previously
prepared custom programming to read
one or more sensors. Based on the
condition of those sensors, the
controller then activates or deactivates
outputs connected to motor drivers.
For example, suppose youve built a
robot that senses the brightest light in
the room. The robot is trained to go to
that light. Youve built your bot with two
light sensors, both of which point
straight ahead like headlamps on a car.
These light sensors are connected to two
analog inputs of the microcontroller (not
all microcontrollers have analog inputs;
this is just for illustration purposes). The
program which youve written and
which constantly runs in the microcon-
troller reads the intensity of the sen-
sors. The controller will activate either of
the robots two motors in order to steer
the vehicle into the direction of the light.
The brains on board your bot know
the light is straight ahead when the
reading of the two sensors is the same.
At that point, the controller activates
both motors at the same time, causing
the vehicle to move toward the light.
This is just one of many possible
applications for microcontrollers in robot-
ics. As you work with microcontrollers and
various types of sensors be they optical,
ultrasonic, or whatever new and
creative uses for your robot emerge. For
instance, if you can interface an electron-
ic compass to your robot, you can write a
routine for the microcontroller that tells
the robot which direction its facing.
A tilt sensor could be used on a
self-balancing robot (two wheels, like a
Segway); a GPS could inform the robot
where it is on the Earth down to the
nearest few feet; an optical distance
sensor could tell the bot how far away
it is from the nearest object, and so on.
Variations in Design
and Features
Not all microcontrollers are the
same. Sure, they all contain some kind of
computational unit, some place to hold
your program (microcontrollers retain
their programming when switched off or
disconnected from power), and some
working RAM to run everything. But they
do vary in things like the number and type
of inputs and outputs, internal timers,
and the amount of space for programs.
The most basic microcontroller has a
small handful (four or five) of connecting
pins that can be used as either inputs or
outputs. These I/O pins or lines are
purely digital. That is, as inputs, the lines
can be low or high (0 or five volts, respec-
tively). Same if the pins are acting as
outputs. This means you can read on/off
type sensors such as switches, and control
on/off devices such as LEDs and motors.
Many types of sensors are analog;
that is, they dont just provide on or off
states. A good example is the light
Small Brains
for Your Bot
Tune in each month for a heads-up on
where to get all of your robotics
resources for the best prices!
SERVO 01.2008 71
RoboResources.qxd 11/30/2007 11:22 AM Page 71
72 SERVO 01.2008
sensor described in the previous
section. Its output varies from nearly
zero volts, to perhaps the full five volts
of the robots power supply. The instan-
taneous reading of the sensor indicates
the amount of light falling on it. Though
digital inputs can be used to read
analog values (this requires additional
circuitry), the best method is to use a
microcontroller with analog inputs.
Many controllers come with at least
a few analog input pins. In some, the
pins are to an analog comparator; you
can compare the voltage to one pin
against a control voltage. In others, the
pin is connected to an analog-to-digital
converter inside the controller. Your pro-
gram reads the pin, and a digital value
representing the voltage level is returned.
So far, weve mentioned connecting
the microcontroller to a motor, LED, or
other output. The ability of a microcon-
troller to directly interface to a device
depends on how much current it can sup-
ply from its output pins. Most controllers
can be connected to an LED through a
current-limiting resistor, of course. Typical
LEDs dont require more than 10-14 mA
of current to light up, and most
controllers can supply this on a single pin.
This is not often the case with
motors and other devices that require
high currents. If the microcontroller does
not have its own high-current outputs
and most do not then in these cases,
you need to use a driver circuit of some
type. The most common driver circuit for
motors for use in robots is the H-bridge,
so called because it uses four transistors
connected in a kind of H-shaped pattern.
Two outputs of the microcontroller turn
the motor on and off, and determine its
direction. With more elaborate program-
ming, you can pulse the control pin to
control the speed of the motor. This
involves a technique known as pulse
width modulation, or PWM. You can do
an Internet search to learn more about it.
There are other features that differ
from one microcontroller to another,
such as the number and type of internal
timers. You use these timers to do things
like create wait delays, generate complex
signal forms (like PWM), even generate
music. Then theres the amount of mem-
ory reserved for your programs, the max-
imum operating speed of the controller,
the package style (whether DIP or
something else), and much, much more.
The feature set of a microcontroller is
described in its specification sheet.
Thats where you can read up on what
the chip does, and how you might use it.
The large microcontroller compa-
nies (such as Microchip and Atmel)
provide comparison charts that list the
differences. If youre just starting out
with microcontrollers, all these differ-
ences can be mind-boggling. Rather
than guess as to which one is best, go
by the example of others. What are
other robo-builders using? Find out, get
the same chip, and start experimenting
with it. Learn by their example.
Interpreted Language
or Compiled Language
One last major difference between
microcontrollers is how they are pro-
grammed. The two principal methods
are either using an interpreted lan-
guage built into the chip or compiling
your program to a form for direct use in
the controller. In both cases, you devise
your program on a PC, then download
the result to the microcontroller itself.
Lets start with the interpreted
language approach first. These microcon-
trollers are inherently easier for most
beginners. The chip itself contains an
interpreter that accepts programming
instructions typically modeled after the
Basic programming language and
converts these instructions in real time to
something that the chip can use. The ven-
erable BASIC Stamp is a good example of
an interpreted language microcontroller.
In order to use the BASIC Stamp,
you need only a programming environ-
ment for your PC and a cable to connect
from your PC to the microcontroller.
Parallax the makers of the BASIC
Stamp offers a development kit with
all the pieces necessary to get started.
With the compiled approach, the
microcontroller starts out with a blank
canvas. You write a program on your
PC, then compile it to a form that the
controller can use. Once compiled, the
program is downloaded to the
microcontroller via a cable. The form of
the program is most often a series of
hexadecimal (base 16) numbers. If you
were to open one of these program
files in a text editor, it would appear as
gibberish. But to a microcontroller, the
numbers represent specific program-
ming steps and actions.
By and large, interpreted language
controllers tend to be a little more expen-
sive, but they dont require the investment
of a programming language and compiler,
as these are already built into the chip.
Youre given the software that lets you
program the chip for free. The interpreted
language controllers are often easier to
use because the programming environ-
ment is more consistent. Because the lan-
guage is built into the chip, it doesnt
change as much; this leads to more exam-
ples from both the makers of the micro-
controller, and the existing user base of
those sharing their ideas on the Internet.
Your choice of whether to use a
microcontroller thats programmed
with an interpreted language versus a
compiled language is largely a matter
of personal needs and requirements.
Sources
Following is just a small selection
of low-cost microcontrollers suitable
for use in amateur robotics. There are
literally hundreds and hundreds to
choose from, and there simply is not
space to list them all.
Active Robots
www.active-robots.com
Selection of robots and robotic
construction products, including
microcontroller boards designed with
amateur robots in mind.
Atmel Corp.
www.atmel.com
Makers of several lines of
microcontrollers, including AVR a
very popular eight-bit controller used
extensively in amateur robotics.
Axiom Manufacturing, Inc.
www.axman.com
Specializes in single board comput-
ers, embedded controllers, custom
design, and manufacturing solutions.
Products include single board comput-
ers based on the Motorola 68HC1x
microcontrollers, as well as others.
RoboResources.qxd 11/30/2007 11:23 AM Page 72
Basic Micro, Inc.
www.basicmicro.com
Basic Micro produces the MBasic
line of compilers for PIC microcon-
trollers. Among their products are:
development boards, getting started
kits, programmers, BasicAtom micro-
controllers, and prototyping boards.
BasicX
www.basicx.com
The BasicX is a general-purpose
microcontroller with a built-in program-
ming language. You write programs on
the PC using a Basic-like syntax, then
download them via a cable to the
BasicX, including the BasicX-24 an
all-in-one module that is pin-compatible
with the Parallax BASIC Stamp.
BD Micro
www.bdmicro.com
Developers and sellers of the
MAVRIC line of Atmel AVR-based
microcontrollers, designed principally
for use in robots.
BittyBot
www.bittybot.com
Makers and sellers of the MEGAbitty
miniature microcontroller board. The
MEGAbitty is based on the Atmel MEGA
AVR microcontroller. Though small
literally postage stamp sized these
boards offer full function. They are
perfectly suited for mini Sumo and other
size-restricted robot competitions.
Blue Bell Design, Inc.
www.bluebelldesign.com
Blue Bell offers a unique co-proces-
sor dedicated to robotics control. The
co-processor adds servo control, A-D
inputs, switch debouncing, and other
features, and connects to your robots
main microcontroller.
Chuck Hellebuyck Electronics
www.beginnerelectronics.com
Chuck resells the Basic Atom from
Basic Micro, as well as his own custom
boards. His BasicBoard is a general-
purpose microcontroller board with
LCD panel, speaker, LEDs, and other
components built in. Its designed as a
get-it-working-quick solution for a
variety of embedded tasks. Various
single function module boards help
speed the development of common
types of circuits. Modules include switch
I/O, light sensor, and relay control.
Dontronics, Inc.
www.dontronics.com
Dontronics specializes in microcon-
trollers, as well as the SimmStick proto-
typing development board system.
Based in Australia, he ships worldwide.
EMAC, Inc.
www.emacinc.com
Single-board computers and
microcontrollers in a range of sizes
and types. A line of their single-board
computers are PC compatible, and can
run DOS, Windows, or Linux.
Gleason Research
www.gleasonresearch.com
Gleason Research sells the MIT
Handy Board and Handy Cricket
single-board computers. The Handy
Board (see the end of this article) is a
favorite at MIT, and many university
and college robotics courses.
Hobby Boards
www.hobbyboards.com
Offers microcontrollers designed
for simple one-wire connectivity.
Applications include home automation,
home and garden, and weather. Of
course, robotics encompasses many of
these aspects, as well.
Kanda Systems Ltd.
www.kanda.com
Offers programmers for microcon-
trollers for the following microcon-
trollers and sub-systems; the 8051,
Atmel AVR, CAN, Internet/Ethernet,
Scenix, ST7, and Xicor.
Support for the Atmel AVR line is
a specialty. Also sells starter kits,
microcontroller chips and development
boards, project boards, compilers and
programming software (for both Basic
and C), books, and PC interfaces.
Additional offices in the United States.
Kevin Ross
www.kevinro.com
Kevin Ross offers the BotBoard Plus
microcontroller boards, and BotBoard
interface products. Many of the boards
are available in kit or assembled form.
The BotBoard Plus uses a Motorola
68HC11-based microcontroller and pro-
vides various connectors to attach robot-
ic parts to it. According to Kevin, The
BotBoard Plus is widely used by universi-
ties and hobbyists for learning and
experimentation. The members of the
Seattle Robotics Society have been using
the BotBoard design for several years.
Kronos Robotics
www.kronosrobotics.com
Kronos has developed a line of micro-
controllers in various lines (Dios, Athena,
Perseus, and Nemesis) where speed and
low cost are key features. The chips
support code libraries of functions, which
allow you to readily program the chip
without having to re-invent the wheel.
Additional products include various co-
processor boards and adapter modules.
Lorax Works
www.loraxworks.com
Sells a unique microcontroller using
the FORTH programming language.
Maximum Robotics
www.maximumrobotics.com
Controller boards and development
tools for microcontroller-based robotics.
microEngineering Labs
www.melabs.com
microEngineering Labs makes and
sells development tools for the
Microchip PIC microcontrollers, the
PICBASIC Compiler, and other products.
Microchip Technology
www.microchip.com
Microchip makes a broad line of
semiconductors, including the
venerable PIC microcontrollers. Their
website contains many datasheets and
application notes on using these
controllers; you should be sure to
download and save them for study.
MicroMint, Inc.
www.micromint.com
MicroMint offers single-chip con-
trollers with built-in Basic interpreters,
stackable controller boards, PicStic micro
modules, miniature modems, and more.
SERVO 01.2008 73
RoboResources.qxd 11/30/2007 11:23 AM Page 73
74 SERVO 01.2008
National Control Devices
www.controlanything.com
NCD offers microcontroller-enabled
products useful in robotics. These
include: A/D converters, character
displays, graphic displays, input/output
devices, I/O expansion modules,
microcontrollers, motor controllers,
relay controllers, and serial interface.
NetBurner
www.netburner.com
Ethernet controllers for embedded
applications. They offer a complete
development package, or modules for
net-enhancing control electronics.
New Micros, Inc.
www.newmicros.com
New Micros, Inc., is a leading manu-
facturer of microcontrollers, single board
computers (SBC), peripherals, and sup-
port electronics. Robotics is singled out
as an ideal application for the companys
line of DSP-based microcontrollers.
Oricom Technologies
www.oricomtech.com
Oricom develops PIC and OOPic-
based robot controllers, as well as
extension modules, such as Zigbee
wireless. The website includes experi-
mental project info, links, and articles.
Parallax, Inc.
www.parallax.com
The BASIC Stamp revolutionized
amateur robotics, yet the concept is
simple: Take an eight-bit microcontroller
normally intended to be programmed in
assembly language, then instead of
requiring folks to learn assembly, embed
a language interpreter within the micro-
controller so that it can be programmed
in a simpler language, namely Basic.
Additional microcontroller offerings
include the new Propeller chip an
inventive device containing multiple
controllers in one package.
PICAXE
www.picaxe.co.uk
Small and affordable interpreted
language microcontrollers. Available in
several versions, with different I/O pins
and capabilities. Check the Distributors
page for online retailers.
Pololu
www.pololu.com
The Orangutan is a specialty
controller made for controlling small
robots. Offered in several versions
including a compact and inexpensive
baby format.
Rabbit Semiconductor
www.rabbitsemiconductor.com
Rabbit makes a popular eight-bit
microcontroller and associated
developer kits; the Rabbit system is
known for its speed, hence its name.
In addition to bare controllers, the
company also sells core modules
such as Ethernet connectivity built in.
Renesas Technology Corp
www.america.renesas.com
Manufacturer of a large line
of microcontrollers and support
electronics. Check out their web page
for product availability, app notes, and
specifications sheets.
Reynolds Electronics
www.rentron.com
Rentron offers kits and ready-
made products for the electronics
enthusiast and robotmeister, including
PICBASIC and PICBASIC PRO compilers,
BASIC Stamp, Microchip PICs, Intel
8051 microcontrollers, remote
controls, tutorials, projects, RF
components, RF remote control kits,
and infrared kits and components.
Savage Innovations/OOPic
www.oopic.com
Manufacturer of the OOPic micro-
controller line, offering multi-tasking
and built-in objects that simplify
programming. Many of the objects
are directly suitable for robotics. Sold
by distributors.
Southern Oregon Robotics
www.1sorc.com
Specializes in microcontrollers for
Sumo robots. Ready-made or blank
boards available.
SparkFun
www.sparkfun.com
Offers a wide assortment of
microcontroller development boards
and modules. Check out their line
of breakout boards which are small
circuit boards for attaching to the rest
of your robot electronics.
Systronix
www.systronix.com
Embedded control hardware, soft-
ware, enclosures, components, etc. Java
and non-Java systems (such as JStamp).
TECEL
www.tecel.com
Microcontroller boards using
80C251, 80C552, 8051, and 68HC11
controllers. Compiler, assembler, and
loader software included upon purchas-
ing any of the microcontroller boards.
Technological Arts
www.technologicalarts.com
Technological Arts produces
postage stamp sized single board
computers using the Motorola 68HC1x
microcontrollers. A number of special-
purpose application boards are also
offered, and many are suitable for
robotics.
The Handy Board
www.handyboard.com
The Handy Board uses a Motorola
68HC11 microcontroller to build a
sophisticated robotics central brain.
The Handy Board is used in many
college and university robotics courses
(it was originally developed at MIT) and
is suitable for education, hobby, and
industrial purposes. As the website
says, People use the Handy Board to
run robot design courses and competi-
tions at the university and high school
level, build robots for fun, and control
industrial devices.
A great deal of documentation,
user-supplied programs, and other
material exists to support the Handy
Board. But one of the best is a book by
the Handy Boards creator, Fred Martin.
Check out Robotic Explorations: A
Hands-on Introduction to Engineering
(ISBN 0130895687). SV
Gordon McComb can be reached via
email at robots@robotoid.com
CONTACT THE AUTHOR
RoboResources.qxd 11/30/2007 11:23 AM Page 74
Direct Memory Access Final exams
Socket What to do when the TV doesnt work
Bank Switching Looking for the best interest rate
Cellular Communications Nerve impulses
Citizens Band A block watch group
Fax The only thing Joe Friday wants
Oversampled When there isnt enough fudge for the guests
Equalizer A .44 magnum
RAM A male sheep
Dynamic RAM A male sheep in mating season
RAM Chips Whats left in the field after the male sheep leaves
Terminator Arnold Schwartzeneger
Hex Inverter Counteracting a spell
Edge Connector Holding hands
Wow and Flutter Your first kiss
C+ A passing grade
Automatic Gain Control Nutri-System diet
Noise Control Candy
Debouncing Sneaking back into the night club
Hertz A bruise
Megahertz A broken leg
Gigihertz Hitting your funny bone
Terahertz Strip mining
ELF A small mythical human
List Processing Grocery shopping
Object Oriented Language Grounds for a sexual harass-
ment suit
Satellite Dish An attractive groupie
Fine Thread Nice clothes
Floppy Disk The cause of many back pains
Cosine Helping your kids get a loan
Priority Interrupt A TV commercial
External Storage A refrigerator
Internal Storage Fat
Discharge Rate Credit card limit
Charge Transfer Automatic teller machine
Non-coherent Radiation A political speech
Degreasing Low cholesterol cooking
Soft Error Finding out shes married
Hard Error Meeting her husband
Two-part Continuous-roll Forms Toilet paper
Line Error A football officials mistake
Direct Address When she gives it to you
Indirect Address When you have to use the phone book
Hard Copy Your wifes imitation of your mothers cookies
Inductor An Army recruiter
DIP A strange person
Dual-in-Line When you split up to find the fastest check-out
Flip-flop Missing the pancake and it lands on the floor
Hardware A suit of armor
ASCII The usual position for novice skiers
Stack-pointer Someone who indicates pretty girls
Accumulator A junk collector or your kids
Program A show on TV
Load Immediate Drinking on the job
Listing Posture after immediate loading
Run time How long it takes to get to the bathroom
Terminal Message The dying mans last words
Keypunch The knock-out blow
Dropping a bit A small decrease in energy (The tempera-
ture is dropping a bit.)
Head Crash A sleeping hippy
Parity What the cage smells like after the bird is removed
Parity Error A bird that says the wrong things
Parity Test Polly want a cracker?
Interface The resting place for a thrown cream pie
Reverse Polish Notation Telling a joke backwards
Computer Card A funny person who works in IT
Logical Decision Deciding not to visit the in-laws
Bus Design Making a vehicle to take kids to school
Bidirectional Bus A bus that services two schools
Ohm Where you go after work
Resistor At one time you couldnt do this to your wife
CPU The smell of the ocean
Source Program A live TV show
Object Program Charlies Angels
Anti-Alias Face recognition software
Flow Chart Insurance documentation of basement flooding
Long Wave Signaling good-bye from a slow ship
Sky Wave Signaling good-bye from an airplane
Damping Factor Amount of water needed for ironing
Limiter A parent e.g., One more cookie and then its bed-
time.
Julian date A fig-like treat made by Julie SV
Terms of Endearment
What those familiar terms really mean
by Gerard Fonte
SERVO 01.2008 75
Appetizer.qxd 12/4/2007 2:38 PM Page 75
Robot Builders Sourcebook
by Gordon McComb
Fascinated by the
world of robotics but
dont know how to
tap into the incredible
amount of informa-
tion available on the
subject? Clueless as
to locating specific
information on robot-
ics? Want the names,
addresses, phone
numbers, and websites of companies that
can supply the exact part, plan, kit, building
material, programming language, operating
system, computer system, or publication
youve been searching for? Turn to Robot
Builders Sourcebook a unique clearing-
house of information that will open 2,500+
new doors and spark almost as many new
ideas. $24.95
Robot Builders Cookbook
by Owen Bishop
This is a book for
first-time robot
builders, advanced
builders wanting to
know more about
programming robots,
and students in
further and higher
education tackling
microcontroller-
based practical
work. They will all
find this book a unique and exciting source
of projects, ideas, and techniques to be
combined into a wide range of fascinating
robots. $29.95
123 Robotics Experiments
for the Evil Genius
by Myke Predko
If you enjoy tinkering
in your workshop and
have a fascination for
robotics, youll have
hours of fun working
through the 123
experiments found in
this innovative project
book. More than just
an enjoyable way to
spend time, these
exciting experiments also provide a solid
grounding in robotics, electronics, and
programming. Each experiment builds on
the skills acquired in those before it so
you develop a hands-on, nuts-and-bolts
understanding of robotics from the
ground up. $24.95
FIRST Robots: Aim High
by Vince Wilczynski / Stephanie
Slezycki
This book looks at
30 different robot
designs all based on
the same chassis,
and provides in-
depth information
on the inspiration
and the technology
that went into build-
ing each of them.
Each robot is fea-
tured in 6-8 pages providing readers with a
solid understanding of how the robot was
conceived and built. There are sketches,
interim drawings, and process shots for each
robot. $39.95
Mechanisms and Mechanical
Devices Sourcebook
by Neil Sclater / Nicholas Chironis
The fourth edition
of this invention-
inspiring engineering
resource covers the
past, present, and
future of mechanisms
and mechanical
devices. Youll find
drawings and
descriptions of more
than 2,000 compo-
nents that have
proven themselves over time and can
be incorporated into the very latest
mechanical, electromechanical, and mecha-
tronic products and systems. Overviews of
robotics, rapid prototyping, MEMS, and
nanotechnology, along with tutorial chapters
on the basics of mechanisms and motion
control, will bring you up-to-speed quickly
on these cutting-edge topics. $89.95
We accept VISA, MC, AMEX, and DISCOVER
Prices do not include shipping and
may be subject to change.
CNC Robotics
by Geoff Williams
CNC Robotics gives you
step-by-step, illustrated
directions for designing,
constructing, and testing
a fully functional CNC
robot that saves you 80
percent of the price of an
off-the-shelf bot and
that can be customized
to suit your purposes
exactly, because you designed it. Written
by an accomplished workshop bot
designer/builder, this book gives you
everything you need. $34.95
The SERVO Webstore
The Amateur Scientist 3.0
The Complete Collection
by Bright Science, LLC
There are 1,000 projects
on this CD, not to
mention the additional
technical info and
bonus features. It
doesnt matter if youre
a complete novice
looking to do their first
science fair project or a
super tech-head gadget
freak; there are enough
projects on the single CD-ROM to keep you
and 50 of your friends busy for a lifetime!
$25.99
Attention Subscribers ask about your discount on prices marked with an *
N N
E E
W
!
W
!
76 SERVO 01.2008
WebstoreJan08.qxd 12/4/2007 3:40 PM Page 76
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.
SERVO
Magazine
T-Shirts
For men and women
N
e N
ew
Y
w
Ye
a
r
e
a
r s s
S
p
e
c
ia
l
S
p
e
c
ia
l
$
9
.9
5
!
$
9
.9
5
!
From HomoSapien to RoboSapien Before R2D2 there was R1D1
Take This Stuff and Hack It!
by Dave Prochnow
Transform common household items into
really cool stuff. You
don't need to be an
electronics genius to get
started turning everyday
items into high-performing
wonders. With how-to
guru Dave Prochnow's
step-by-step directions
and fully illustrated plans,
even beginners can hack their way to a high-
tech home, cooler toys, and less yard work.
Certain to fire your imagination and start you
plotting new, original, and even more creative
wonders you can make from ordinary house-
hold items, Take This Stuff and Hack It! is the
perfect gift for your inner inventor. $27.95
Building Robots with LEGO
Mindstorms NXT
by Mario Ferrari, Guilio Ferrari
The Ultimate Tool for
MINDSTORMS
Maniacs, the new
MINDSTORMS kit has
been updated to
include a
programming brick,
USB cable, RJ11-like
cables, motors, and
sensors. This book
updates the robotics information to be
compatible with the new set and to show
how sound, sight, touch, and distance issues
are now dealt with. $39.95
Forbidden LEGO
by Ulrik Pilegaard / Mike Dooley
Build the Models
Your Parents
Warned You
Against.
Forbidden LEGO
introduces you to
the type of free-
style building that
LEGOs master
builders do for fun
in the back room. Using LEGO bricks in com-
bination with common household materials
(from rubber bands and glue to plastic
spoons and ping-pong balls) along with
some very unorthodox building techniques,
youll learn to create working models that
LEGO would never endorse. $24.95
N N
E E
W
!
W
!
NEED MORE
INFO?
Go where
SERVE goes!
The online stor The online store @ e @
www www.ser .ser v vomagazine omagazine.com .com
Robot Builders Bonanza
Third Edition
by Gordon McComb / Myke Predko
Everybodys favorite
amateur robotics book
is bolder and better
than ever and now
features the fields
grand master Myke
Predko as the new
author! Author duo
McComb and Predko
bring their expertise
to this fully-illustrated robotics bible to
enhance the already incomparable content
on how to build and have a universe of
fun with robots. $27.95
SERVO Magazine
Bundles
Published by T & L Publications, Inc.
To order call 1-800-783-4624
SERVO 01.2008 77
Now you can get one years worth of all
your favorite articles from SERVO Magazine
in a convenient bundle of print copies.
Available for years 04, 05, 06, and 07.
$57
per bundle
S
a
v
e
$
1
0
o
ff th
e
n
o
rm
a
l
p
ric
e
!!
WebstoreJan08.qxd 12/5/2007 1:47 PM Page 77
BACK ROOM SPECIALS
The Official Robosapien
Hacker's Guide
by Dave Prochnow
The Robosapien robot
was one of the most
popular hobbyist gifts
of the 2004 holiday
season, selling approxi-
mately 1.5 million units
at major retail outlets.
The brief manual accom-
panying the robot cov-
ered only basic move-
ments and maneuvers the robots real
power and potential remain undiscovered
by most owners. This timely book covers all
the possible design additions, programming
possibilities, and hacks not found any
place else. $24.95 Sale Price $14.95
Pub date: August 17, 2005
SERVO'S CUSTOM
EMBROIDERED HAT
This is one good looking hat, with its stone
washed blue cap and bright yellow/gold
stitching. There's no better way to show
everyone that you're well endowed with a
bigger - than - average brain then by proudly
displaying your affiliation with SERVO
Magazine. $ 14.95*
Hydrogen Powered Racer and Hydrogen Station
Recently named as one of the Best Inventions of 2006 by Time Magazine, the H-racer is now the
best selling fuel cell product in the world. The H-racer is a micro-version of what engineers and
scientists have been dreaming about for real cars: combining hydrogen with oxygen to generate
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
Robotics Demystified
by Edwin Wise
YOU DON'T NEED ARTIFICIAL INTELLIGENCE
TO LEARN ROBOTICS!
Now anyone with an
interest in robotics can
gain a deeper under-
standing without for-
mal training, unlimited
time, or a genius IQ. In
Robotics Demystified,
expert robot builder
and author Edwin Wise
provides an effective and totally painless
way to learn about the technologies used
to build robots!
$19.95 Sale Price $13.95
Pub Date October 20, 2004
The Day the Earth
Stood Still
An alien (Klaatu) with his
mighty robot (Gort) land
their spacecraft on Cold
War-era Earth just after
the end of World War II.
They bring an important
message to the planet
that Klaatu wishes to tell
to representatives of all
nations. Directed by: Robert Wise
Actors: Michael Rennie, Patricia Neal
Run Time: 92 minutes $14.95
Forbidden Planet:
50th Anniversary Edition
A starship crew goes to
investigate the silence of a
planets colony only to
find two survivors and a
deadly secret that one of
them has. Dr. Morbius and
his daughter Altaira have
somehow survived a
hideous monster which
roams the planet.
Directed by: Fred M. Wilcox
Run Time: 98 minutes $26.95
Blade Runner
(The Directors Cut) (1982)
In a cyberpunk vision of
the future, man has devel-
oped the technology to
create replicants, human
clones used to serve in the
colonies outside Earth but
with fixed lifespans. In Los
Angeles, 2019, Deckard is a
Blade Runner, a cop who
specializes in terminating replicants.
Directed by: Ridley Scott
Rated: R Violence $19.95
CLASSIC SCIENCE FICTION DVDS!
With this kit, you now can see and
feel the future of energy generation
in your own hands!
Linux Robotics
by D. Jay Newman
If you want your robot
to have more brains than
microcontrollers can
deliver if you want
a truly intelligent,
high-capability robot
everything you need
is right here. Linux
Robotics gives you step-
by-step directions for Zeppo, a
super-smart, single-board-powered robot
that can be built by any hobbyist. You also
get complete instructions for incorporating
Linux single boards into your own unique
robotic designs. No programming experi-
ence is required. This book includes access
to all the downloadable programs you need,
plus complete training in doing original
programming. $34.95 Sale Price $ 29.95
Or order online www.servomagazine.com
78 SERVO 01.2008
WebstoreJan08.qxd 12/4/2007 3:41 PM Page 78
B
ack in December 05, I wrote
about robots that go to war. These
were about robots that are on the
ground, remotely operated from a
distance. In my research, I have found
so many acronyms that are tied to
these types of robotic vehicles.
ROV for remotely-operated vehicle
which is often tied to the underwater vari-
ety, though it has been used to describe
any remotely-operated land, sea, or even
aerial vehicle. AGV for automated guided
vehicle which often describes the auto-
mated vehicles in factories that follow lines
in the floor or other command techniques.
UAV usually means unmanned
aerial vehicle though some have said it
means unmanned autonomous vehicle
for any type of autonomous vehicle with
no human aboard (which seems redun-
dant to me). Some have even called
them RPVs or remotely piloted vehicles.
Typical of the military, some of the
branches have now changed the term,
UAV to unmanned aircraft system, or
UAS, but most still refer to these
types of flying robots as UAVs. It has
been the autonomous and teleoperat-
ed aerial UAVs that have made the
news as of late. Unmanned robot
planes are actually not new; theyve
been around for over 90 years.
Early AUVs
Dr. Archibald Low, who was born
in London, England and grew up in
London and Australia, was much like
Nikola Tesla absolutely great at every-
thing technical. He had inventions for
television fed through phone wires,
rocket guidance systems, audiometry, a
draftsmans curve, and even all types
of race cars. One of his earliest projects
during World War I was called Aerial
Target, really a misnomer as it was
actually a guided bomb.
The British wanted the Germans to
think that they were working on a target
drone to test anti-aircraft gunnery accura-
cy. The Royal Flying Corps wanted the
robot plane in a hurry and Low had his
pick of all types of craftsmen to do the job.
In March 1917, the first plane was
launched from the back of a truck by a
compressed air catapult. He was success-
ful in controlling the plane before it finally
crashed due to engine failure. The UAV
was later upgraded with another first an
electrically-driven gyro navigation system.
After the war, the project was
scrapped typical of many ingenuous
military projects when funding drops
off. A similar early autonomous aircraft
the Kettering Aerial Bomb also
called the Bug, is shown in Figure 1.
This is an American entry into the early
WWI development of the cruise missile
that would mature many years later
into very effective weapon systems.
The German V-1
Fiesler FZG-76
Cruise Missile
Though the German V-1
was one of the most devastating
weapons of World War II, some
of their designs were based on
the work of Low and others.
However, it is this vengeance
weapon that struck fear into the hearts of
British citizens during the darkest days of
the war. The Fieseler FZG-76 with its 900
kg warhead delivered much havoc to ter-
rified Londoners between June 1944 and
the end of March 1945 (see Figure 2).
This unmanned robot buzz
bomb so named because of the
pulse jet propulsion system was
sophisticated, even by todays stan-
dards. Unlike the ramjet that required
higher speeds to operate, the V-1s
pulse jet used a set of venetian blind
type shutters that opened and closed
45 times a second to allow a series
of small explosions to power the
unmanned plane along. The pulse
engine was up to full thrust before the
plane was launched. These rapid open-
a
n
d
ROBOTS TAKE TO THE AIR
b y T o m C a r r o l l
FIGURE 2. V-1 on Display in Greencastle, IN.
FIGURE 1. Kettering Bug at
USAF Museum.
SERVO 01.2008 79
Then&Now.qxd 12/3/2007 3:31 PM Page 79
80 SERVO 01.2008
ings and closings, along with the series
of explosions, caused the feared buzz.
Ive heard model airplane pulse jets
operate and can see why they have been
banned in most populated areas; they
sound a lot like a blaring horn. Much like
the landing of a mosquito in a tent at
night; the worry came when the V-1s
buzz stopped. It proved to be the worlds
first operational cruise missile with it very
unique guidance system (Figure 3).
The V-1 was launched from a steam
catapult (much the same as todays Navy
planes launch from an aircraft carrier)
and could reach speeds of over 580 km
per hour. The V-1 was equipped with an
automatic pilot that utilized a magnetic
compass. Three compressed air-driven
gyrocompasses were also used in the
system. A master gyro controlled the
pitch and roll through rudder and eleva-
tor surfaces by an air-driven servo system
with corrections fed into the system by
the magnetic compass. A weighted pen-
dulum interconnected with the magnetic
compass acted as a fore and aft attitude
sensor, as well as an accelerometer. This
ingenuous arrangement allowed simple
turns to be accomplished by using only
rudder control and no ailerons were
required for banking.
The other two gyros damped out
errors and oscillations in the
flight. Prior to launch, the V-1
crew would pre-set controls
for the required height and
direction of flight, as well as
distance to their target. A vane
anemometer (in reality, a small
propeller in the nose of the V-
1) turned so many revolutions
according to speed and dis-
tance traveled and acted like
an odometer to tell the system
how far the missile had
traveled towards its target.
These turns unwound a preset
mechanical counter that would throw
the V-1 into a steep dive at the target
area by causing the elevator to depress.
Would you believe that they actually
used a tiny guillotine triggered by the
counter to sever the air hose feeding the
elevator, causing it to depress? I would
have thought that a small valve would
have done a better job. This abrupt dive
angle caused the fuel to stop flowing to
the engine in the early models, thus stop-
ping the buzz, and the British knew a V-
1 was soon to strike. Later models pow-
ered themselves all the way to the tar-
get. Almost 12,000 V-1s were launched
against Britain, though only about 25%
actually hit significant targets.
The Unmanned Aerial
Vehicles of Today
There is as much difference in the
UAVs of today compared to Lows and
the Nazis creations as to the Wright
Brothers plane and the Boeing 787.
Endurance, range, speed, sophistica-
tion of sensors, autonomy and, of
course, cost have all spiraled upward.
There are two basic classes of
unmanned aerial vehicles. The first is the
classic combat weapon the cruise mis-
sile. One example is the Tomahawk, the
workhorse of the Navy. This sophisticated
cruise missile proved itself in the Gulf War
of 1991 when it was programmed to find
its way from the submerged submarine
that launched it, all the way to downtown
Baghdad. News reporters were amazed
to see it fly down a street and make a
right turn to head to its final target. These
weapons are like flying torpedoes; their
purpose is to explode and destroy an
intended target and never return home.
Some people may even include the
unpowered smart bombs in this catego-
ry. They are dropped from a plane, miles
from a target, and guide themselves
through varying control surfaces to a tar-
get that is illuminated by a laser beam.
This beam can be from an overhead
plane or from a soldier on the ground.
Another part of the combat
category is the target and decoy missile
that provides ground and aerial
gunnery a target that simulates a real
enemy aircraft or missile.
The second type of UAV includes the
aerial scout such as the Predator, an AUV
that returns to its home base. These
vehicles can be autonomous or remotely
controlled. The control can be from some-
thing as simple as a suitcase-sized console
used by a single ground soldier or as com-
plex as a trailer with several controllers.
These AUVs are not weapons in
themselves, but can be loaded with small
missiles or bombs and be fired or
dropped by remote command. Most of
this category, however, is relegated to
passive spying or surveillance tasks. These
can be reconnaissance AUVs that provide
battlefield intelligence. There are also
UAVs specifically designed for cargo and
logistics operation. Government agencies
use UAVs for research and development
to further develop UAV technology.
There are so many variants of UAVs
today that they can range from tiny vehi-
cles under one ounce in weight to vehi-
cles weighing many tons. Figure 4 shows
a tiny AUV not much larger than a drag-
onfly, and there are operational vehicles
even smaller. Figure 5 shows a member
of the military hand-launching a vehicle
that contains a video feedback system
that it about the size of a typical R/C
model airplane. It is known as the Small
Unmanned Aerial Vehicles Advanced
Concept Technology Demonstration
(SUAV ACTD). These small AUVs bring
battlefield awareness to small unit
commanders. AUVs such as this can
cover many miles in distance, and more
importantly, send back images of many
square miles of terrain without risking
military personnel to hostile action.
The Navys Cruise
Missile Programs
Governments around the world
FIGURE 3. V-1 Drawing.
FIGURE 4. Micro UAV.
Then&Now.qxd 12/3/2007 3:32 PM Page 80
develop weapons of war with the hopes
that they never will be used in battle. The
US has developed a long series of cruise
missiles and the Regulus is an example of
one of the first operational nuclear
tipped cruise missiles that began develop-
ment back in 1947 for the Navy. Figure 6
shows a Regulus prepping for launch
from the deck of the U.S.S. Toledo, a
Navy cruiser. The almost seven ton, tur-
bofan jet powered Regulus could deliver
a 1-2 megaton W27 thermonuclear
warhead up to a range of 500 nautical
miles from a submarine or surface ship.
Unlike todays submarine launched
Trident ballistic missiles that can be
launched while the sub is submerged,
the Regulus was launched from the deck
of the vessels. A later version the
Regulus II was developed and tested
that could hit a target 1,200 nautical
miles away at a speed of Mach 2, but the
Polaris program of submerged-launched
ballistic missiles superseded further
development. The Regulus had a major
shortcoming for an unmanned missile; it
required radio control guidance to its
target. The missile inertial guidance and
terrain-following technology was not yet
fully developed in the mid 50s.
The Tomahawk
Cruise Missile
The BGM-109 (Boosted Guided
Missile) Tomahawk Land Attack Missile
(TLAM) is one of the few battle-tested
long-range missiles, having seen exten-
sive use in the first Gulf War and more
recently in Afghanistan when US war-
ships launched over 60 of them in the
hunt for Osama bin Laden (Figure 7).
Iraq has also seen its share of
these intelligent robot planes sail down
the streets of cities and make several
quick turns into their targets. They can
be nuclear tipped with a 200 kiloton
warhead, but all of the Tomahawks
fired in war have carried 1,000 pounds
of high explosives (TLAM-C) or submu-
nitions called bomblets (TLAM-D). They
all have a range of 1,400 miles.
Powered by a Williams International
600 pound thrust turbo fan jet engine,
the subsonic (550 mph) missile weighs
2,650 pounds and is 183 long. The
weapons are delivered to the various
ships and subs as an all-up-round
containing the missile, the 550 pound
solid state booster, and a capsule for
subs or a canister for ships that serves
as the launch tube. Full production was
initiated in 1981 (Figure 8).
What makes these things intelli-
gent? The first Block II Tomahawk used
terrain contour matching (TERCOM), a
radar altimeter, and a digital scene
matching correlation (DSMAC) computer
terminal guidance system. The missile
required previous extensive knowledge of
the terrain of the enemys target areas,
not always possible in time of war. The
second generation or Block III systems
added GPS and inertial navigation to sup-
plement the terrain and scene computer
navigation systems, much the same as
the DARPA Grand Challenge vehicles that
recently navigated the simulated urban
environment. Block IV and V variations
have vastly improved the system. The
new Tomahawk Baseline Improvement
Program (TBIP) provides UHF SATCOM
and a man-in-the-loop data link to
enable the missile to receive in-flight
targeting updates, to transfer health and
status messages, and to broadcast battle
damage reports back to base.
The RQ-1 Predator UAV
It was early one Tuesday morning
in April 2006 when a teleoperated
robot plane was scanning the ground
at the Mexican border in southern
Arizona. Suddenly, the planes engine
quit and it made a crash dive into a hill-
side near some homes. This Customs
and Border Patrol UAV Predator B had
accidentally had its fuel supply cut off
by an erroneous command from the
remote control console (see Figure 9).
The biggest loss was not the crash
or the loss of a multi-million dollar plane,
but the loss of confidence that the US
government and society might have in
unmanned planes sailing our skies. An
investigative panel revealed that the
operator said that the control console
froze up and he didnt realize
that it was set to shut off the
UAVs fuel supply. Figure 10
shows the Pilot and Payload
control console for the Predator;
only a part of the typical 30 foot
long control trailer that also con-
tains two synthetic aperture radar
consoles, a mission planning console,
and several satellite ground stations.
Im highlighting the Predator over
the thousands of other varieties as it is
one of the most visible UAVs, with its dis-
tinctive bulbous nose and inverted V
tail. The Predator contract was awarded
to General Atomics Aeronautical Systems
in January 1994 by the US Air Force. The
Predator system first flew in that year
and entered production in August 1997.
Over 125 Predators have been delivered
to the USAF. The Predators have been
operational in Bosnia since 1995 for
NATO and US operations. In 2002, a
Predator UAV actually released a Hellfire
missile in Yemen that destroyed a civilian
vehicle carrying suspected terrorists.
Thousands of UAVs fly above war
zones in Iraq and Afghanistan,
accumulating well over 300,000 flight
hours. Powered by a 101 HP Rotax
engine (similar to a snowmobile
engine), the Predator is 27 feet long
SERVO 01.2008 81
FIGURE 5. A Hand Launched UAV.
FIGURE 7. Tomahawk Block IV Cruise Missile.
FIGURE 6. Regulus Cruise Missile
Prepped for Launch.
Then&Now.qxd 12/3/2007 3:32 PM Page 81
with a wingspan of 49 feet. Various
versions have an altitude capability of
25,000 to over 50,000 feet and ranges
from 400 nautical miles to well above
1,000 miles in classified ranges.
The RQ-1 Predator variation is a
long-endurance (40 hours plus)
medium-altitude UAV designed for
surveillance and reconnaissance
missions. Imagery gained from synthet-
ic aperture radar, video cameras, and a
Forward Looking Infrared (FLIR)
camera can be sent to the front line sol-
dier and his commanders or by satellite
communication links around the globe.
The MQ-1 variation armed with
Hellfire missiles is the multi-role version
that is used for surveillance and armed
reconnaissance. The newer MQ-9
Predator B Reaper Hunter/Killer allows
a much longer time over an area of
interest without continual monitoring
from the ground,
secure air traffic control voice relay, and
an Air Force Mission Support System
autonomy. It was a Department of
Homeland Security version of the
Predator B version that crashed in
Arizona. Two Predator C versions with
turbo-fan jet engines are expected to
be test flown by the Air Force in 2009.
Sensors for the
Predator
An unmanned aerial vehicle is of no
use if it has no sensors to take the place
of a pilot. The large Global Hawk and
other totally autonomous UAVs must uti-
lize a host of sensors to provide real-time
feedback to an onboard processor. The
Predator, though mostly controlled from a
remote location with people in the loop,
must also have real-time sensors to give
the controlling humans a total grasp on
the environment around the robot vehicle.
The synthetic aperture radar is
used for all-weather surveillance
viewing of both aerial and ground envi-
ronments and has a resolution of one
foot objects. A multi-spectral targeting
system and a moving target
indicator are used on some
models and provide night IR
and daytime zoom TV feed-
back, as well as laser designa-
tion (illuminating) capability.
Countermeasures are available
to protect the vehicle, as well.
Flight Summary
I have centered this article on the
military versions of various UAVs as most
funding has gone to improve and update
these very versatile robot vehicles. As
you can see, not all are used for wartime
purposes. Most of the Predator UAVs are
not fitted with offensive weapon sys-
tems. Civilian and peace-time uses pro-
vide companies and local governments
with extremely valuable data, impossible
to obtain without far more expensive
and hazardous flights by manned planes.
These sophisticated vehicles have
many uses beyond those of the military.
Aerial mapping, high altitude air
sampling, traffic monitoring, geological
and water surveys, and urban planning
are just a few. Autonomous AUVs such
as the Global Hawk can be given a mis-
sion; the AUV can take off and fly to its
target area, upload (and download) vast
amounts of information, and fly home
and land, all without people in the loop.
In my research on AUVs, I had
amassed over 47,000 words of data
from the Internet covering 42 different
vehicles. Most had some amazing
feature that would make an experi-
menters mobile robot quite a bit more
capable or useful. I was astounded by
just how unique and multi-tasking these
things are. If anything can be viewed as
a truly intelligent and autonomous
robot vehicle, it is todays AUVs. SV
Tom Carroll can be reached via email
at TWCarroll@aol.com.
CONTACT THE AUTHOR
All Electronics Corp. .........................23, 66
AP Circuits/e-pcb.com ............................21
AWIT ..........................................................66
Boca Bearings .....................................41, 66
CrustCrawler .............................................13
Electronics123 ..........................................23
Futurlec .....................................................66
Hitec ..........................................................20
Images Co. ................................................66
Jameco ......................................................55
Lorax Works ........................................23, 66
Lynxmotion, Inc. .........................................3
Maxbotix ...................................................66
Net Media .................................................83
Parallax, Inc. ...............................Back Cover
PCB Pool .............................................65, 66
Pololu Robotics & Electronics ..........60, 66
Rabbit, A Digi International Brand ............2
RCG Research .............................................7
Robotis Co. Ltd. .......................................53
Robot Power ...............................................7
RobotShop, Inc. .................................70, 66
Schmartboard...........................................23
Solarbotics/HVW.....................................37
Technological Arts ...................................66
TORMACH .................................................31
Vantec .......................................................48
Advertiser Index
82 SERVO 01.2008
FIGURE 8. Cutaway Drawing of Tomahawk.
FIGURE 9. Predator UAV.
FIGURE 10. Predator Control Console.
Then&Now.qxd 12/5/2007 1:38 PM Page 82
Full Page.qxd 12/5/2007 3:28 PM Page 83
backcvr.qxd 12/5/2007 2:05 PM Page 84

You might also like