From
http://ali-almukhtar.blogspot.com
Page 1
0 7>
7:36 PM
6/4/2008
Cover.qxd
Vol. 6 No. 7 SERVO MAGAZINE ROBOTICS HISTORY • ENCODER MATCHING • BIG MAMA GEAR MOTOR • CES ROUNDUP July 2008
Full Page.qxd 3/5/2008 4:10 PM Page 2
»Sharing Ingenuity
SP A R K F U N.C OM
Free
Book
with Kit
TOC Jul08.qxd 6/4/2008 3:41 PM Page 4
PAGE 12 Columns
08 Robytes by Jeff Eckert
Stimulating Robot Tidbits
58 Twin Tweaks
by Bryce and Evan Woolley
There’s a New Humanoid on the Block
64 Robotics Resources
by Gordon McComb
Stocking Up with Surplus Electronics
67 Different Bits
by Heather Dewey-Hagborg
Random Bits
74 Appetizer
by Kym Graner
Dusting Robots
4 SERVO 07.2008
TOC Jul08.qxd 6/4/2008 3:42 PM Page 5
07.2008
VOL. 6 NO. 7
39 Encoder Matching
by Robert Doerr
Scaling and inverting encoder values
to fit your particular application.
PAGE 44
PAGE 39
SERVO 07.2008 5
Mind-Iron Jul08.qxd 6/4/2008 2:22 PM Page 6
Published Monthly By
T & L Publications, Inc.
430 Princeland Court
Corona, CA 92879-1300
(951) 371-8497
FAX (951) 371-3052
Webstore Only 1-800-783-4624
www.servomagazine.com
for evaluation purposes, I could easily envision a challenge in creating a suitable IR rangefinder with
spider-sized eight-legged walker, powered by 16 standard components. A typical IR LED alone is about the
skeleton-mounted Squiggles. size of an insect’s head. And the available ultrasound
The size of the peripherals that accompanied the rangefinders require even more volume. Clearly, when it
motor — a wall wart power supply, a USB driver card, and comes to microsensors for autonomous microbots, it’s time
a three-foot USB cable — not to mention the desktop PC for a new generation of SMT devices.
and software — explains why the robotics shops aren’t Although autonomous microbots made completely of
offering autonomous robots sporting Squiggle-based commodity — read affordable and readily available —
grippers and actuators. Even a six-pin DIP dwarfs the components may be a few years away, there are myriad
Squiggle, much less a PIC or BASIC Stamp. However, the applications of micromotors in other areas of robotics. The
control issue should be partially solved by the time you most obvious applications range from the manipulation of
read this. New Scale has a miniature ASIC driver under camera optics and R/C mini helicopter control surfaces, to
development that could form the heart of a Squiggle control of microvalves in implantable drug delivery devices
spider robot. to surgical robots. Although I expect to see the first
Power issue is another matter. The smallest battery large-scale applications of micromotors in the consumer
packs that I’ve used are thin-film lithium-polymer cells electronics industry, the medical applications will likely
designed for miniature indoor R/C aircraft. The thin, have the most profound effect on quality of life.
dime-sized cells power a single-motor aircraft for about Consider that current surgical robotics rely on
five minutes. As such, an autonomous eight-legged standard-sized motors connected to scalpels and other
Squiggle spider would likely have a lifespan measured instruments through cables. Although these robotic
in seconds with current battery technology. Even so, systems enable surgeons to operate with greater efficiency
in some applications, 20-30 seconds of operation and effectiveness than traditional methods, because of the
could be worth the cost of a swarm of insect-sized physical arrangement of cables and instruments, the
microbots. working area is constrained to only a few inches across.
On the topic of microsensors, with the exception of The use of micromotors connected directly to instruments
Hall-effect devices, I haven’t seen any commercial sensor would allow for a much larger work area for tele-surgeons,
offerings that come close to the level of miniaturization as well as lighter, mechanically simpler surgical robots. Size
required for an insect-sized microbot. I’d like to have an and weight can be critical factors if the remote patient
affordable ultrasonic or IR rangefinder comparable in happens to be an astronaut on Mars, or a critically injured
relative size to the Squiggle. However, consider the US soldier in a remote area of the world. SV
SERVO 07.2008 7
Robytes.qxd 5/29/2008 2:20 PM Page 8
8 SERVO 07.2008
Robytes.qxd 5/29/2008 2:23 PM Page 9
Robytes
SERVO 07.2008 9
Robytes.qxd 5/29/2008 2:24 PM Page 10
Robytes
can also pan, zoom, or modify the tank. Reportedly, using
view in any direction. For a video specially developed
demonstration that may affect your antibacterial detergent,
ability to keep lunch down, visit Dasubee can shine up
www.prosurgics.com/prosurgics_ a fouled privy in only
endoassist.htm. 10 seconds.
If you’re still
reluctant to buy one,
consider that Kanai
Uribot Tends Kobe Airport has included “a
Finally, the strangest application vacuum function to
of robotics of late would be Dasubee, breathe in a scraper
a bot designed specifically to clean and the water of the
urinals. One is already operating in floor to be able to
the Kobe, Japan airport. An astute wash the dirt scattered
observer will note that it resembles to the floor together
an elephant. Designer Susumu Kanai on the function side.”
revealed that this design was inspired (Something may have
by the pachyderm’s trunk, which been lost in the
resembles the powerful water cannon translation.) You can
employed by the bot. The ears are pick one up for only
handles, the eyes are the start and one million yen (about
stop buttons, and its little yellow hat $9,500). SV Dasubee, the urinal bot and its proud operator.
is the filler cap for the 13 gal (50 l) Photo courtesy of Impress Watch Corp.
GEERHEAD
Results
Among other things, researchers
determined that the robot should
have a sort of bi-modal capability. If
someone is trying to interact with it,
it should stop what it is doing and
interact with those people, taking
their pictures where possible. If no
one is trying to interact with the
robot, it should blend into the
background and continue to take
candid shots. This version of the robot
is only capable of blending in. So, the
robot will ignore people who want to
interact with it or who specifically look
to have their picture taken.
People will be more likely to
interact with the robot on some level
if they know what it is up to. What’s
SERVO 07.2008 13
Geerhead.qxd 5/30/2008 10:51 AM Page 14
GEERHEAD
RESOURCES
Lewis, the Robot Photographer
www.cs.wustl.edu/MediaAnd
Machines/Lewis
14 SERVO 07.2008
Page 15.qxd 6/4/2008 3:26 PM Page 15
New breed of robots could soon She developed a program that lets the SnoMotes negotiate
with each other and “bid” on which site to investigate, allowing
wander Antarctica them to decide for themselves how to dole out their assignments.
The next challenge, though, was to come up with
By GREG BLUESTEIN, Associated Press Writer navigation for the rovers. Other probes tend to use distinguishing
obotic rovers have patrolled deep space and the deepest seas,
R but scientists are still struggling to create drones that can
overcome the multiple challenges of exploring Antarctica.
characteristics like rocks to chart their paths. But such features
can be hard to come by in vast icy expanses.
On a field trip to a Colorado glacier, Howard's team
Georgia Tech researchers think the SnoMote — a small robot discovered they could use microscopic fissures in the ice and
designed like a snowmobile — will be able to deal with the nasty snowbanks to guide their way.
weather and with slippery terrain that constantly cracks and “If you can come up with a way to classify these uniquely,
shifts. They envision dozens of SnoMotes roving Antarctica's you can come up with a way to navigate,” she said.
vast expanses to add to data already collected by satellites Simulations so far have proved her team's formula effective,
and a handful of weather stations and sensors. Ayanna but plenty of challenges await when the robot is put to the test
Howard, an associate professor at Georgia Tech in Atlanta, on the glaciers of Alaska.
has worked for two years under a NASA grant to perfect the With Penn State University researcher Derrick Lampkin,
two-foot-long robots. Howard has designed a shell that weighs 60 to 70 pounds, can
Her initial designs with spider-like legs proved too withstand harsh winters, and eventually could include heaters to
cumbersome to navigate snowbanks. So, she and her colleagues keep computers and wiring running in the cold.
leaned on others' designs, outfitting a snowmobile designed for Lampkin said his goal is to develop a "scale-adaptable,
kids with sensors, gauges, and cameras, and then programming it. autonomous, mobile climate-monitoring network."
The researchers hope the robots will ultimately cost around
$10,000, relatively cheap for governments, researchers, and
The Mechanicrawl • Saturday, July 12, 2008 others seeking to document changing conditions in the world's
Spend a summer day exploring the mechanical marvels along most remote places.
San Francisco's North Shore! See giant running steam engines, turn The more the better: Howard said in order for scientists to
of the century automata, mechanical computers, an eight foot high say with certainty how climate change is affecting the ice, they
need plenty of accurate data points to create climate models.
mechanical planetarium, and more. You'll be able to map your own
She envisions a field of 40 to 50 of the SnoMotes wandering
route for the event and spend as much time at each location as you'd icy plains, a small army gathering data to shed light on global
like. You can walk, bicycle, or use public transport for Mechanicrawl; warming and other quandaries without breaking the bank.
maps, routes, and additional info are listed under Map Your Crawl on “The whole concept is: How do you do this in the most
the website. For all the details, go to www.mchanicrawl.com. affordable way?” she said.
HE8EJIFH;<;H>?J;9)0'
.EW 2OBOT 3ERVOS
>_j[Y
Ej^[h8hWdZ
$//63(&,),&$7,216$792/76
7KHUHVXOWVRIDQLQIRUPDOSROOWDNHQUHFHQWO\DWWKH)LUVW
$QQXDO:RUOG'RPLQDWLRQ6\PSRVLXPDUHQRZLQ5RERWV
SUHIHU+LWHFVHUYRVRYHURWKHUVHUYREUDQGV7KH\NQRZWKHZLGH
VHOHFWLRQRI+LWHFDQDORJDQGGLJLWDOVHUYRVSURYLGHWKHPZLWKWKHSRZHUDQGGHSHQG
DELOLW\QHHGHGWRHYHQWXDOO\WDNHRYHUWKH:RUOG0DNH\RXUURERWKDSS\XVH+LWHFVHUYRV
3DLQH6WUHHW_3RZD\_&DOLIRUQLD___ZZZKLWHFUFGFRP
SERVO 07.2008 15
MrRoboto.qxd 5/30/2008 11:21 AM Page 16
NEW
Our ∧ resident expert on all things
robotic is merely an email away.
roboto@servomagazine.com
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
Dennis Clark
IR encoding schemes out there. Wikipedia tells us that there Description ON Time OFF Time
are literally hundreds of IR protocols! Fortunately for us, there
are three that are by far the most common: SONY SIRC, Lead In 2.4 ms 0.6 ms
NEC, and Phillips RC-5. If you pick up any odd remote at Logic 1 1.2 ms 0.6 ms
your house, it will most likely be using the SONY or NEC Logic 0 0.6 ms 0.6 ms
formats. Let’s discuss each of the “big three.”
Table 1. SONY timing values.
SONY SIRC Format
Significant Bit is first and the Most Significant Bit (MSB) is
First off, here are a couple of links that discuss this last. The packet format includes some kind of a Lead Out as
format. There is a lot of useful information in these; I well, but it is really just a guarantee of some time spacing
disagree with a few things that they say (more on that later), before the next packet is sent. Don’t bother to look for it
but since some of the data that I used to write my code since its length depends upon the data just sent; it doesn’t
came from these links, most of what they say is accurate: seem to be consistent (see Packet 1).
When you code for this protocol, you need to
www.hifi-remote.com/infrared/IR-PWM.shtml remember to assemble the bytes by putting the bits in
This site gives a lot of information on how to read the reverse order! Remember, they are LSB first.
universal IR remote entries that you use to program your When you press a button on a SONY remote, it will
universal remotes. The author calls this “PWM,” or pulse simply repeat the command packet every 45 ms for as long
width modulation. It is more accurately called “PPM,” or pulse as you hold the button. Some buttons on my remotes
position modulation, rather like R/C radio communications and would only send a command once when you let up off of
what we deal with when controlling hobby servos. the button, but the rest just kept repeating endlessly.
SERVO 07.2008 17
MrRoboto.qxd 5/30/2008 11:24 AM Page 18
and here:
http://home1.stofanet.dk/hvaba/fprc5rx/index.html
The last of the big three formats that I’m going to talk
about is the Phillips RC-5 protocol. Rather than using PPM
encoding like SONY and NEC, the RC-5 format uses Bi-Phase
encoding. This means that the transition from a logic ‘1’ to
a logic ‘0’ and vice-versa is shown by a change in the bit
phase. If you are like most of us, your eyes just glazed over
at that description. This is one time that a picture is pretty
Figure 2. Bi-Phase encoding. much needed to explain what I mean (see Figure 2).
Note that it isn’t the timing that shows what the bit is,
but there the similarity ends. The packet format looks like but rather the phase of the timing. But how — you ask — do
that in Packet 2. By ~Device ID and ~Command, I mean you know what a ‘1’ is and what a ‘0’ is? You know because
that it is inverted, or 1’s complement of its respective the bit stream of RC-5 starts out with two 1 bits and then a
Device ID and Command. To check for a proper reception, toggle bit, which on the first press of the button is a 0. Figure
all you need to do is AND the byte with its respective 3 shows how a transmission is formatted. An RC-5 packet
complement; if it comes up all zeros, then you have a good consists of the preamble of 1 1 0, then a five-bit address and
reception. When you hold down a button on the NEC then a six-bit control. RC-5 packets are encoded with the MSB
remote, it does not send out the same command over and (Most Significant Bit) first. Because you know that the first
over; it sends out a special signal called the Repeat Code. bit is a 1, then any bit transition from that point onward
The NEC protocol has four timing values that we care you can track to know what the current bit is — a 1 or a 0.
about, and one we don’t (the Lead Out). Table 2 shows the Figure 3 may look a little odd because I put both same
ones that we pay attention to. and switch phases in every bit cell except for the start bits.
Just to make it more confusing though, I’ve read that the
Phillips RC-5 Format start bits can be either 1 1 or 1 0. I hope not; it’d make it
hard to figure out the 1 startup. The RC-5 protocol will
Some useful information on the Phillips RC-5 format repeat the button press every 113.8 ms, but every packet
after the first one will have the Toggle bit toggled
Figure 3. RC-5 packet. differently than the last start bit.
Part Description
C1 110 μF 25V capacitor
Figure 4. IR detector schematic. C2-C4 .1 μF 25V capacitor
R1 10K 1/4W 5%
R2 2.2K 1/4W 5%
R3 1K 1/4W 5%
D1 Green LED
S1 N.O. button
U1 PIC16F688 DIP
U2 7805 regulator
U3 PNA4602 IR demodulator
J1 Power connector
J2 Four-pin male .1” connector
J3 RJ-11 six-pin connector
can we use the IR transmissions from our remotes in our set-up of the interrupt routine that will capture the times
robots? To see what is going on, I built a special IR between pulses by measuring between falling edges on
decoder board that has a Panasonic PNA4602 (38 kHz) IR the INT line. When the IR transmitter is On, this will be
demodulator, a PIC16F688, a power plug, regulator, detected by the PNA4602 and it will drop its output low.
programming header (Microchip ICD2 six-pin type) and a This is why I chose falling edges; the output of the device
plug for the Acroname RS-232 converter board. Figure 4 is normally high, or Off. Before I go into my logic for
shows the schematic and Figure 5 is a photo of the finished detecting pulses and parsing them out, let’s get an idea of
board with everything plugged in. This board was wired how I set the PIC up to look for these transmissions. To do
together with a bunch of wire that I had lying around, so it that, let’s look at how to initialize this PIC. The code snippet
isn’t very sensitive to how you put it together. I just wanted below shows how I set up the timers:
an experimenter board that would show me the IR
codes and allow me to experiment with decoding the IR //Turn off comparator
transmissions. Different remotes use different modulation setup_comparator(NC_NC_NC_NC);
frequencies, but the Sharp PNA4602 will work with
frequencies between 36 kHz and 40 kHz just fine. I chose //We will be doing interrupts
setup_timer_0(RTCC_INTERNAL | RTCC_DIV_128);
the PIC16F688 because it had an interrupt line, a hardware //16ms timer
USART, two timers, and an internal RC oscillator that runs setup_timer_1(T1_INTERNAL | T1_DIV_BY_4);
at 8 MHz, all in a 14-pin package. These were all of the //Gives 131ms max timeout
hardware interfaces that I needed. Unfortunately, for some ext_int_edge(H_TO_L);
reason Microchip requires some kind of dongle to debug //IR IRQ on falling edge
this chip which I didn’t have, so I debugged using “printf”
statements in the code. CCS does a good job of hiding the ugly details of the
The board isn’t particularly sensitive to the components hardware from you, but you still need to read your data
that you can use. My previous list just came from my parts sheets to understand what they are hiding! Here we turn
bins. The power connector was a barrel socket that fit the off the comparators because these pesky things default to
various wall warts that I had lying around. I chose the pin on in the PIC and will get in the way of those I/O lines.
out of the RS-232 connector to match the Acroname Serial We’re going to use TMR0 to time our pulses because it
Interface Connector that you can get from www. is an eight-bit timer and we don’t want all that much
junun.org/MarkIII for about $10. Finally, the resolution in our times. This “slop” allows us to quickly
programming connector is chosen to fit the cable on check a bit time and save it away; the coarseness of the
my Microchip ICD2 so that I can just plug in and program measurement allows us to read remotes that are close, but
the board without constantly taking the part out of a not perfect to the specified times. We know that the pulses
programmer board and plugging it back into my test board. in SONY and NEC are between 1.2 ms and 13.5 ms (see
If your programmer allows In Circuit Serial Programming Tables 1 and 2 again) so we want this timer to have a
(ICSP), then get a connector that matches its cable. maximum time before it rolls over that is near that
Figure 5 shows what my board looks like. I put little maximum time. Since our PIC is running on its internal
rubber feet on the bottom to make it extra spiffy looking. I 8 MHz clock (which is divided by four internally), we know
put a small three-pin socket on my board so that I could that if we use the prescaler on TMR0 at divide by 128, we
swap around IR demodulators that have the same pin-out will have a maximum time of:
as the Panasonic units, should I so desire.
Now that we understand the formats and we have a (1/(2MHz/128))*256 = 16.384 ms
board to look at the signals, how can we decode them?
The answer is software, of course. I like to use C as my Figure 5. IR detector board and Acroname serial connector.
programming language, but the logic that I use here can be
ported to any compiler language that you feel comfortable
with. I should qualify that statement — any compiler that
allows interrupts to be used is required. In this case, my
compiler of choice is the CCS C compiler for the Microchip
14-bit cores (the PIC16Fnnn series.) I am not going to go
into the gory details about how to program a PIC; whole
books have been written on that subject and that isn’t my
intent with this column. However, you can benefit from my
line of reasoning for doing things how I did them and move
these procedures to your compiler or even your other
microcontroller if you wish. I’m only going to show SONY
and NEC decoding in my code. This is because I don’t have
any RC-5 remotes; all of mine were SONY and NEC formats.
My test code has two sections in it. The first is the
SERVO 07.2008 19
MrRoboto.qxd 5/30/2008 11:24 AM Page 20
That is pretty close to 13.5 ms. Why are we using I can hear the groaning now! I’ve used PIC assembly
TMR1? When we start saving times to measure for our language! In CCS C, the compiler flag “#int_global” means
data bits, we need some way to stop looking if the signal is that CCS will not handle the saving of registers that need
interrupted, otherwise we’ll just appear to “hang” and do to be saved during an ISR call. This means that we need to
nothing. TMR1 will be set to values that are just a little do it. Really, the only reasonable way to do this is with
larger than the inter-packet repeat rate. For NEC, this is some simple assembly code. This function needs to be
108 ms; for SONY, it is 45 ms. TMR1 is a 16-bit timer and it FAST and we do that by keeping it lean. I combine this
only has four prescales to choose from, so I took the one lean ISR with the definitions at the top of the program that
that got me close to 108 ms. Finally, I set the INT interrupt looks like this:
to trigger on a high-to-low transition for my measurements.
Here is the code for the actual interrupt service routine: unsigned char save_w; //These next 3 bytes
//are saved on interrupt
#int_global #locate save_w=0x7f
void isr(void) unsigned char save_status;
/* #locate save_status=0x7e
* Lets handle all ISR save/recovery functions, the unsigned char save_FSR;
default isn’t lean enough for #locate save_FSR=0x7d
* an ISR that is highly time critical. unsigned char wBits=0; //To make access to
*/ //these variables fast
{ #locate wBits = 0x7c //Keep them in common
#asm //memory for ISR use
//store current state of processor unsigned char t1h;
MOVWF save_w #locate t1h = 0x7b
SWAPF status,W unsigned char t1l;
MOVWF save_status #locate t1l = 0x7a
SWAPF FSR,W /*
MOVWF save_FSR * Give me direct access to several SFR’s that CCS
BCF status,5 //Set to page 0 for SFR’s doesn’t handle the way I want.
BCF status,6 */
#endasm #byte TXREG = 0x15
#byte T1CON = 0x10
//We only have two interrupts, so if it isn’t #byte INTCON = 0x0B
this one, it’s the other. #byte FSR = 0x04
if (bit_test(PIR1,0)) //Timer1 overflow IRQ
#byte status = 0x0
{
#byte TMR1L = 0x0E
bits[wBits++] = 255; //timed out
#byte TMR1H = 0x0F
bit_clear(PIR1,0); //Clear TMR1 int flag
#byte PIR1 = 0x0C
bit_clear(T1CON,0); //Turn TMR1 off until...
#byte TMR0 = 0x01
}
if (bit_test(INTCON,1)) //CCP1 capture IRQ Those confusing compiler directives tell the compiler to
{
bits[wBits++] = TMR0; //save the pulse time
put certain variables into “access RAM” that is available in
bit_clear(INTCON,1); //clear external all data banks. This means that I don’t have to waste time
//interrupt flag switching banks to save our timing measurements or our
TMR1H = t1h; //reset the timeout saved registers. Make sure you look this up in the CCS
TMR1L = t1l; manual. You don’t have to do this in other micros that
bit_set(T1CON,0); //turn TMR1 back on so don’t use banked data memory.
//we can time out
TMR0 = 0; //clear out the timer Now look at the ISR from above. When we get an
} interrupt from INT, we record the value in the TMR0 register
in the next available data slot in our ring buffer (called ring
if (wBits == MAXBIT) //rollover the bit because it rolls over to 0 when it reaches the end of the
//buffer “ring”). If we time out on TMR1, then we stuff a 255 into
wBits=0;
the buffer telling the decoding routine that we timed out
#asm and we should ditch the entire set of numbers and wait for
// restore processor and return from interrupt the next start to be detected.
SWAPF save_FSR,W The second part of the program will decode the times
MOVWF FSR saved in the buffer and turn them into 1s and 0s. It uses its
SWAPF save_status,W own pointer into the ring buffer and knows when to look
MOVWF status
SWAPF save_w,F
for a value when the read pointer is different from the
SWAPF save_w,W write pointer. I’ve put lots of comments into this code, so
#endasm I’m not going to go over it line-by-line. Here is what the bit
} decoding routine looks like:
20 SERVO 07.2008
MrRoboto.qxd 6/4/2008 4:58 PM Page 21
if (whichOne == NEC)
{
if ((val <= NEC_ONE+FUZZY) &&
(val >= NEC_ONE-FUZZY))
ret = 1;
else if ((val <= NEC_ZERO+FUZZY) &&
(val >= NEC_ZERO-FUZZY))
ret = 0;
} Figure 6. A selection of IR remotes.
else if (whichOne == SONY)
{
if ((val <= SONY_ONE+FUZZY) &&
(val >= SONY_ONE-FUZZY)) Conclusion
ret = 1;
else if ((val <= SONY_ZERO+FUZZY) &&
(val >= SONY_ZERO-FUZZY))
Figure 6 shows my collection of IR remotes that I used
ret = 0; to test my program. I found interesting departures from the
} established standards in some of them; no doubt you will, too.
return ret; I’ve given you a powerful tool that you can use to
}
discover IR codes and a basic template that you can use
to embed the ability to control your robot using a common
There is more magic in DecodeCode() that shows how household device: the IR remote. Have fun and be creative.
to recognize the start of a transmission and how to end If you have any questions about this program or how I
one. This little routine above simply shows the decoding of “figured it all out,” send your questions to roboto@servo
a single data bit. Notice the + and – FUZZY settings. IR magazine.com — I’m happy to answer! SV
specs allow for about a 10% slop in the standard times.
This FUZZY setting gives us that. You can experiment with NEWS FLASH! At the last possible moment I discovered
how large you want that FUZZY to be since it is a #define this site. It is an excellent compendium of various IR
at the top of the program. I’ve found that a setting of 2 remote formats: www.rhoads.nu/bjorn/hp48/remote.
works well.
My code will “auto” detect NEC
code if you hold the button down.
This is because NEC uses the repeat
code frame that is distinct from any
other transmission. You don’t have to
do that if you don’t want to, and
you’ll need to reset the PIC to get it to
pay attention to SONY codes again
regardless. I have two modes of
operation that can be selected by the
setting of the TEST define. If this is set
to 1, then the program will only print
out the times. This is useful for when
you are trying to understand a new
format. If TEST is set to anything else,
then the program will decode either
SONY or NEC, and print out the
device and control codes when they
are received. The entire program
source can be found on the SERVO
website www.servomagazine.com).
It is called IRdecoder.c.
SERVO 07.2008 21
Events.qxd 6/4/2008 9:37 AM Page 22
Send updates, new listings, corrections, complaints, and suggestions to: steve@ncc.com or FAX 972-404-0269
22 SERVO 07.2008
Events.qxd 6/4/2008 3:06 PM Page 23
August
23-24 Motodrone AFO Competition
Finowfurt, German
Autonomous Flying Objects (AFOs) compete in
several areas including the ability to hover in Extreme Robot Speed Control!
changing wind conditions, stable flight between
points, capturing photos of targets, recovering
idewinder 6
6
14V - 50V - Dual 80A H-bridges - 150A+ Peak!
Adjustable current limiting
from free fall, and automated take off and S 6
6
Temperature limiting
Three R/C inputs - serial option
landing. 6
6
Many mixing options - Flipped Bot Input
Rugged extruded Aluminum case
www.motodrone.de $399 6 4.25" x 3.23" x 1.1”
other. OSMC
$2
SERVO 07.2008 23
Showcase Jul08.qxd 6/4/2008 2:08 PM Page 24
24 SERVO 07.2008
Showcase Jul08.qxd 6/4/2008 2:11 PM Page 25
7KH(VFDSH
5RERW¶VEXLOWLQ
PLFURSURFHVVRU
HQDEOHVLWWR
³WKLQN´RQLWVRZQ
G
.65
L U H QJ
TX UL
U H R O GH
6
7KHURERWIURJPRYHVIRUZDUG
ZKHQLWGHWHFWVVRXQGDQG
UHSHDWVVWDUWPRYHIRUZDUG!
VWRS!OHIWWXUQ!VWRS!ULJKW
WXUQ!VWRS.65
PP:KLWH
ZDWHUFOHDU
/('9
PFG
$%
VHFRQGYRLFHUHFRUGHUSOD\EDFN
PRGXOH7KHHOHFWUHWPLFURSKRQHLVRQWKH
ERDUG2QHEXWWRQUHFRUGVWKHRWKHUEXWWRQLV
PRPHQWDULO\SUHVVHGWRUHSOD\WKHPHVVDJH
SUHDVVHPEOHG$
7KH9HOOHPDQ3HUVRQDO6FRSH
LVQRWDJUDSKLFDOPXOWLPHWHU
EXWDFRPSOHWHSRUWDEOH
RVFLOORVFRSHDWWKHVL]HDQG
FRVWRIDJRRGPXOWLPHWHU
+36 $146.
QGV
7KRXVD RQ
P V
PRUHLWH LWH
Z H E V
RXU
Robotics Showcase
THOUSANDS OF ELECTRONIC
PA R T S A N D S U P P L I E S
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....
O R D E R TO L L F R E E
1-800-826-5432
Ask for our FREE 96 page catalog
SERVO 07.2008 25
JUL08NewProd.qxd 6/4/2008 4:41 PM Page 26
New Products
N E W P RO D U C T S
computer (IBM PC or compatible). The interface connects
CONTROLLERS & PROCESSORS to the PC’s USB port. The software for the interface
permits real time control and contains a built-in
Baby Orangutan B-168 interactive script writer. A user may write a script that
contains up to 99 individual robotic arm functions
Robot Controller (including pauses) into a single script file. Script files
26 SERVO 07.2008
JUL08NewProd.qxd 6/4/2008 4:42 PM Page 27
SOFTWARE
T he Cadex C8000 is an advanced battery test system
capable of performing complex lifecycle tests. These
tests may include discharging a battery with GSM,
Flowcode for ARM CDMA, or other pulses of choice. Replicate battery
Microcontrollers runtime of a power tool, digital camera, or computing
device by first capturing the current profile and then
SERVO 07.2008 27
CombatZone.qxd 5/29/2008 2:26 PM Page 28
Events
28 SERVO 07.2008
CombatZone.qxd 5/29/2008 2:28 PM Page 29
FIGURE 3
FIGURE 4 FIGURE 5
FIGURE 6
Parts List
ITEM QTY PRICE
• Victor 883 speed controller 2 $139.99
• GB42 gearbox 2 $85.99 (no longer available)
• Mini-EV motor 2 $8.99
• 18V 1,650 mAh NiMH battery pack $62.50
• Spektrum DX6 with BR6000 receiver 1 $199.99
• 3” Colson wheel with hub 2 $25.00 (no longer available)
(www.cncbotparts.com)
• GWS elevator/aileron mixer $14.99
• S-BEC Super BEC 5V $46.99 (being replaced
with receiver battery pack
for future events)
• MS-05 power switch 1 $48.00
• 45A powerpole connectors $1.39/set
• #8 ring terminals $1.99/25
• Deans Wet Noodle Wire — 12 awg $1.25/ft
• Raw metal, nuts, and bolts (www.mcmaster.com and www.onlinemetals.com)
• Wood and plumbing pieces for battery mount — local hardware store
• Machining (www.teamwhyachi.com)
FIGURE 7 NOTE: All items are from www.robotmarketplace.com unless noted otherwise.
SERVO 07.2008 29
CombatZone.qxd 5/29/2008 2:30 PM Page 30
MANUFACTURING
High-Performance Drill Motor Modification
● by Bryan Ruddy
PHOTO 1. The 36-volt DeWalt DC900KL
contains a gearmotor rated for 750 watts of
power and is capable of a bone-crushing 200
foot-pounds of stall torque in low gear. On
C ordless drills are among the
richest sources of affordable
gearmotors for the robotics hobbyist;
paper, this gearmotor should be capable of
moving a 200 pound robot at about five miles from inexpensive, low-power imports
per hour in a 4WD configuration.
(such as the drills offered by Harbor
Freight) to high-performance, name-
brand drills (particularly DeWalt).
Unfortunately, drill gearmotors lack
convenient mounting features, often PHOTO 4. As shown on the left, the first-stage
ring gear (part #628002-00) is free to rotate as
have minimal bearings, and generally part of the clutch mechanism. To lock this gear
in place, we can machine it down to a square,
contain slip clutches, making them as shown on the right. The modified gear
unsuitable for use in robotic drive presses into the motor mount.
and mobility applications without
modifications. While there are
commercially-available modification
kits for some drill gearmotors, most
motors must be modified by the
hobbyist. The photos here document
my modifications to
DeWalt’s newest and
most powerful drill
motor. SV
PHOTO 6. The stock gearbox
output has an overrunning
clutch to prevent back-driving.
Since this can cause the output to
lock up under some conditions,
it must be disabled by removing
the five pins and outer ring.
30 SERVO 07.2008
CombatZone.qxd 5/29/2008 2:31 PM Page 31
ROBOT PR FILE
TOP RANKED ROBOT THIS MONTH
● by Kevin Berry
Totally
30 pounds
Offensive
43/13 30 pounds Billy Bob 12/4
30 (sport) Bounty Hunter 9/1 30 (sport) Bounty Hunter 9/1
Wedge of
60 pounds
Doom
43/5 60 pounds Texas Heat 11/4 Historical Ranking: #9
120 pounds Devil's Plunger 53/15 120 pounds Touro 10/0 Weight Class: 30 lb Featherweight
220 pounds Sewer Snake 43/12 220 pounds Sewer Snake 11/5
Team: Benson Labs
Builder: Brian Benson
340 pounds SHOVELHEAD 39/15 340 pounds Ziggy 3/0
Location: Winchendon, Massachusetts
390 pounds MidEvil 28/9 390 pounds MidEvil 3/0
History Score is calculated by Current Ranking is calculated by BotRank Data Total Fights Wins Losses
perfomance perfomance at all performance at all known events,
events known to BotRank using data from the last 18 months Lifetime History 16 12 4
Current Record 16 12 4
Rankings as of May 10, 2008 Events 5
SERVO 07.2008 31
CombatZone.qxd 5/29/2008 2:32 PM Page 32
PARTS IS PARTS:
Mag Mot r Upgrades
and Repairs
● by Nick Martin
FIGURE 2. Replacement
case screws. (Insert:
The replacements have
far stronger heads.)
32 SERVO 07.2008
CombatZone.qxd 5/29/2008 2:33 PM Page 33
Position the front plate you combine this tip with the just turn the case, rotate the
accurately on your drill press using stronger case screw tip, you will case left until the screws touch a
a tapered pin made from the shank have one tough motor. magnet. Mark the position of your
of an old drill (see Figure 3). This line on the rim of the endbell. Now
will keep the new mounting points Neutral Timing rotate the case left until the screws
accurately in position; important if stop on the opposite magnets.
you have a pre-made gearbox to fit. Mag motors can be timed Mark this position on the endbell
Drill each of the mounting holes slightly advanced or retarded, rim. The marks on the rim represent
out to fit your preferred screw size; although I find that advanced timing the extremes of forward and
5 mm for M6 and #17 for 12-24 makes hardly any difference so I reverse timing; draw a line midway
sized screws. leave them neutrally timed. If you between your two extremes
Tap the new holes and take want to experiment or need to and this is your neutral timing
extra care to remove all the swarf adjust the timing after repairs, here position — too easy! SV
from the inside of the plate; you is the quick way to do it. Mark a line
don’t want conductive chips falling along the case so it meets the rear
into the armature! Re-assemble the end bell, as shown in Figure 1. With You can contact Nick via his build thread at
www.robowars.org/forum/viewtopic.php
motor as detailed in previous tips; if the case screws loosened enough to ?t=74&start=0.
EVENTS
Results and Upcoming Events
Results Apr 14 –
May 12, 2008
Miami Beach, FL. One hundred
thirty-five bots were entered. T he North East Robotics Club will
present House of Benson –
Barnyard Brawl in Winchendon, MA,
H ORD
Spring
2008 was held
R oaming Robots presented
Fenton Manor 2008 on May 4th
in Stoke On Trent, England.
on July 26th. Thirty-six bots were
registered at press time. For more
details, go to www.nerc.us.
in Brecksville,
OH on April Upcoming Events for
19th. Twenty- July-August 2008
five bots were registered.
W ar-Bots
Xtreme
Gloucestershire, England on July
12th and 13th. For more details, go
S mackdown in Sactown IV
was held on April 27th in
will present
WBX-V
to www.roamingrobots.co.uk.
SERVO 07.2008 33
Larson.qxd 5/30/2008 12:08 PM Page 34
CES 2008
Robot Roundup
by Ted Larson
Photo 1
A
s usual, in the second week of January,
consumer device is
over 100,000 technology lovers converged represented at CES ...
on Las Vegas for the 41st annual
... including car audio, home audio, cell
Consumer Electronics Show (CES). The show phones, DVD players, laptops, digital
went on from 8 AM to 5 PM for four days, and photo and video recorders, and of
course, massive plasma TVs. There was
even then, it was almost impossible to see a 150 inch TV at the Panasonic booth
everything. CES took up 1.8 million square that was the talk of the show. Imagine
a TV as big as a queen-sized bed
feet of trade show space, spanning all of the hanging on your wall? Seems like one
major convention centers in Las Vegas. So much would have to reinforce the wall just to
keep it from falling down.
walking is involved for the attendees, you can Most of the booths that are
technology specific are organized into
easily blow out your feet unless you are wearing Tech Zones, such as USB, ZigBee,
running shoes. Blu-ray Disc, HDMI, Mobile Internet and
WiMAX, IPv6, Sustainable Technologies,
34 SERVO 07.2008
Larson.qxd 5/30/2008 12:08 PM Page 35
SERVO 07.2008 35
Larson.qxd 5/30/2008 12:09 PM Page 36
Photo 4
Erector set. The four new robots in the line are Spykee Cell, several Spykee Micro kits. I brought two assembled units
Spykee Miss, Spykee Vox, and Spykee Micro, three of which home, and had great fun with my four-year-old daughter
are designed to cradle your iPod, and allow it to be voice having robot races in the hallway with them.
controlled and give it some personality (Photo 4). Spykee About 50 feet from the Robotics Tech Zone was the
Cell can be controlled from your cell phone via Bluetooth iRobot booth. Among all the consumer robots they showed,
and is targeted at both boys and girls. Spykee Miss is an the two that were the standouts were the iRobot Looj
emotional electronic friend targeted at girls that gives you Gutter Cleaning Robot (Photo 5) and the new iRobot
advice when you ask her a question. Spykee Vox is also Roomba 500. The Looj has piqued my interest ever since it
voice controlled, an interactive friend, and can be either a was announced, although I had never seen one in person
hero or a villain. It is targeted primarily at boys. Spykee before. I have heard many rumors about what it can and
Micro is a small, little remote controlled robot that looks cannot do, so I thought I would ask the tough questions,
similar to its larger counterparts, but is primarily just for and see if I could clear some things up. In a nutshell, the
driving around and making noise. Again, all the robots are Looj is a remote controlled robot that is designed to be put
kits — in the spirit of the ERECTOR brand — and some are in a gutter and run up and down to dislodge any debris,
easier to assemble than others. When we were packing up using a rotating rubber agitator. The idea is you climb up
at the end of the show, the Meccano people were looking the ladder to the corner of your house, put the Looj in the
to lighten their load for their trip home, so they gave us gutter, and run it up each gutter section, thus minimizing
Photo 5
Photo 6
36 SERVO 07.2008
Larson.qxd 5/30/2008 12:10 PM Page 37
SERVO 07.2008 37
Larson.qxd 5/30/2008 12:12 PM Page 38
38 SERVO 07.2008
Doerr.qxd 6/3/2008 1:08 PM Page 39
by Robert Doerr
One of the joys of the robotics hobby is mastering the art of interfacing. A lot of the parts are
already in front of us and we just need to make them work together. Recently, I ran into a
problem with a pair of quadrature encoders for the drive train on one of my robots. The
encoders themselves worked fine and were generating perfect quadrature outputs. However,
they were sending out data faster than the controller could handle at higher speeds. As a
result, the encoder readings were worthless and could not be trusted.
I was watching the Encoder processor board (component side). Encoder processor board (solder side).
encoder counts while running
some robot drive motors.
During the initial bench
testing, the motors weren’t
running at full speed and the
results I saw were just as
expected. However, things
got interesting when I started
ramping up the speed. A very
peculiar thing started happen-
ing. The encoder counts
started to rise as expected
but as the motors sped up,
SERVO 07.2008 39
Doerr.qxd 6/3/2008 1:10 PM Page 40
Methods of Correcting the single SX28 chip which costs under $3. A few more
Problem features were then added and the code cleaned up to
make it more presentable.
There are a few different methods of fixing this One of the extra features is the ability to allow a host
problem. In a nutshell, we just need to reduce the number controller to change the scaling factor on the fly. Since it
of transitions of the encoder per revolution. Obviously, the will accept commands via serial connection, I also added a
encoder itself could be swapped out with a lower resolution resonator for the clock timing to ensure the serial communi-
one. If feasible, it may be possible to replace just the cations would be reliable. This microcontroller will be
encoder disk with one that has a fewer number of holes. installed in between the existing encoder and the controller.
Another option is to change the physical placement of the This way, it can monitor the encoder, condition the signal,
encoder within the drive train. When it is directly attached and output a virtual encoder signal to the host controller.
to the armature of the motor, it may send out too many
pulses. If it was moved downstream to the wheels Quadrature Encoders 101
themselves or at some point in the gear train, it would slow
down the speed of the encoder. It will still be sending the Many of you already know how tachometers and
same number of pulses per revolution of the encoder but it quadrature encoders work, but for those who don’t, here is
will be rotating slower so we get the effect we’re after. a quick review. A tachometer signal only has one signal and
Instead of altering the mechanics of the encoder — which therefore only provides speed information and not any
isn’t always an option — we can look into electronic means directional information. It will only tell how fast something
of scaling the values. At first, I considered making something moved but not any details about the direction of travel. It
up with standard logic ICs but an easier and more flexible can be used to get an estimate on distance traveled as long
option was to use a small microcontroller to help match up as the direction is known ahead of time. However, a problem
the readings. Whatever method is selected, we would like can come up if the tachometer stops at a transition (edge).
the encoder to supply as high as possible a resolution If there are any vibrations, it can toggle state back and forth
without sending them too fast for the controller to handle. and mistakenly give the impression that it is moving. It is
more suited to regulate the speed of a motor where distance
Microcontroller to the Rescue /direction are not important; just the speed is critical.
Adding a second channel makes all the difference! A
I’ve run into this problem with other encoders and quadrature sensor will have two signals 90 degrees out of
controllers. I wanted a flexible solution so I decided to use a phase. These two signals are commonly referred to as
small microcontroller to scale the encoder readings. This Channel A and Channel B. With these, both position and
ended up being an excellent solution that can be used for direction can be determined. The direction is determined by
other projects, as well. I selected an SX28 processor and comparing if Channel A is leading Channel B or if Channel
wrote all the code in SX/B. This development went really B leads Channel A. The distance can be computed by
fast. I started building the encoder scaling board one keeping track of the counts and factoring in the direction
evening and had a working prototype with the core of movement. Velocity can be calculated by counting the
functionality the next day. Everything is handled by the number of pulses per second. I’ve seen some references to
encoders that state: “If A leads B, for example, the disk is
Encoder assembly on robot base. rotating in a clockwise direction. If B leads A, then the disk
is rotating in a counter-clockwise direction.”
That may be true for some encoders, but needs to be
verified for the particular encoder being used. I prefer to
just think of them as two channels of information and look
at which one is leading, then match that to the actual
direction of how it is installed in the robot. The clockwise/
counter-clockwise description isn’t something that lends
itself well to straight quadrature encoders, so keeping it
generic works out well. After all, it shouldn’t matter if it is
clockwise/counter-clockwise, right/left, up/down,
forward/back, etc. The important part is that two distinct
directions can be determined; the rest is relative.
Look at the examples of output from quadrature
encoder, through a few cycles.
Chan A 0 1 1 0 0 1 1 0 0 1 1 0
Chan B 0 0 1 1 0 0 1 1 0 0 1 1
40 SERVO 07.2008
Doerr.qxd 6/3/2008 1:11 PM Page 41
Notice that if you follow the chart from left to right values from the encoder to host as they are. After all, any
and then from right to left you’ll see that one channel will number divided by 1 is the same number. For any other
lead the other and that is what can be used to determine value (2-15), the encoder reading will be scaled by that
direction. amount. In other words, if we have a DIP switch setting of
3, then it takes three transitions of the real encoder to
How the Encoder Scaling make one transition of our virtual one on the output of the
Program Works SX28. A setting of 15 means it would require 15 transitions
of the real encoder to make one transition of our virtual
Using a microcontroller really makes this solution one. The scaling factor goes like this:
flexible. As a starting point for this program, I used the
example in the SX/B help file for reading an encoder and DIP Switch Description
displaying it on a set of seven-segment displays. Since no 0 Encoders off
display is involved, all code relating to the display was 1 Encoders passed as-is to host
removed. The remaining code to watch an encoder became 2-15 Encoder scaled down by number specified
the basis to build upon. Instead of just incrementing and
decrementing a counter for the encoder, we just need to There are also two DIP switches used to specify the
keep track of a small count which ends up being the direction of the encoders. This is useful if the encoder is
number we’re scaling the encoder value by. This will then going in the wrong direction. Instead of swapping any of
be used to walk up and down the virtual Channel A and the wiring for Channels A and B, the DIP switch for that
Channel B of our scaled encoder output. Whenever we encoder can be flipped to correct the direction. This feature
rollover our count of the scale factor, we then update was easy to implement and makes this an even more
(either up or down) the count of our virtual encoder on flexible gadget.
the output. All of the heavy lifting is done in the ISR (interrupt
Upon start-up, the program does a bit of housekeep- service routine). The main program looks for commands
ing. It will check the status of four DIP switches to get the coming in from the serial port to either change the scaling
initial scaling factor. If the scaling factor is 0, then no factor or reset it to the ones specified by the DIP switches.
encoder processing occurs and nothing gets passed to the When looking at the source code in the ISR, we can
host. It made sense because micros don’t like dividing by focus on half of it since the code for the second encoder is
zero. This can be useful, more for troubleshooting, though. exactly the same with the exception of the pins used to
If the scaling factor is 1, then we end up just passing the watch the encoder and the output pins of the virtual one.
SERVO 07.2008 41
Doerr.qxd 6/3/2008 1:12 PM Page 42
A Look Into the ISR the XOR’d value with a DIP switch. This way, if the encoder
is going the wrong way, a flip of a switch will correct it! No
The initial ISR code deals with receiving serial data in the wiring changes or coding changes will be required.
background and buffering it. After that code is done, the
first thing that is checked is the scaling factor. If the scaling Awh, You Count Funny
factor is 0, then nothing needs to be done and we just exit
the ISR. Otherwise, we call the code to check and process Whenever we decrement our counter so it rolls over or
the encoders. There are a couple of important points here. increment it past our scaling factor, we need to update our
First, whenever you put code within an ISR routine you virtual encoder values on the output. When I did this, it was
must make sure there is enough time to execute the code. late and I just updated a simple counter from 0-3 and sent
It must all run within the ISR interval allocated to the ISR that value out as the scaled value. When I tested it, the
routine. If you have too many instructions in there, you’ll encoder output would only change by one up or down but
have to find ways to optimize your code or make the interval that was it. Upon looking at the code, I realized what I had
longer so that you can execute more instructions in the ISR. done. I forgot about counting funny. At least that is what my
In the program presented here, it may seem odd to see kids would say. Instead of counting 0, 1, 2, 3, the proper
a GOSUB within the ISR. The code that is called still count was more like 0, 1, 3, 2, etc. This was due to the
executes within the ISR but needs to be moved to another gray encoding where only one bit can change status at a
bank of memory due to the way SX/B structures the time. This was easily fixed by using my counter as the index
compiled program. By moving things around, it resolved an for a LOOKUP command. This would then take the value that
SX/B error on Pass 2. “Address xxx is not within lower half was looked up and present that at the output. This results in
of memory page.” I’ve had good results with SX/B so far, the correct gray code as the output for our virtual encoder.
and when errors like this crop up they can often be resolved The processing of the second encoder is identical. It
by re-organizing some of your program. starts out slightly different, however, because the second
The code to process the encoder starts out by reading the encoder is on a different set of pins. To accommodate that,
current value of the encoder port and masking off the bits so it has a slightly different mask of %00001100 to isolate the
that the current states of Channel A and Channel B on the two bits we need. Those two bits are then shifted right two
first encoder are used. Then, this value is XOR’d with the bits which will put them in the proper position so all the
previous encoder state. If there is no change in state, then the calculations are the same as for the first encoder. The result
value will be zero and we end up dropping down to check is then presented to the host controller on a separate set of
the next encoder. If there was a change of state, then we pins for the second virtual encoder.
need to figure out what the direction of the change was.
This is again accomplished with our friendly XOR instruction. The Extras
In this case, we shift over the old state by one bit before
performing the XOR. We just need to compare bit 0 of one Whenever I have leftover pins available on a microcon-
channel to bit 1 of the other. It doesn’t matter which one you troller, I always seem to find a use for them. One of the
use as the base, as long as you understand that using the features I wanted to add is the ability to alter the scaling
opposite set of bits will switch the direction of the encoder. factor on the fly. To accommodate this, one pin is used to
In the original program, it would see if the result from the receive serial data from the host controller. The command
XOR operation was 1 which would specify to decrement structure follows the AppMod style for compatibility with
the counter. A 0 would then mean the counter should be other modules. The header is “!ES” for Encoder Scaler
incremented. Instead of using a hard coded value, it compares followed by an address 0-3 and then the command. The
address must match those selected
High resolution encoder disk. HP encoder assembly. by a pair of jumpers connected to
RC6 and RC7. If the address
doesn’t match, it will ignore the
command and wait until something
is directed toward it. The exception
is an address of 255 which would
broadcast out to all the modules of
this type, regardless of their config-
ured address. At the moment, there
are only two commands supported.
The command “S” is a scale value
followed by a binary number 0-63.
Anything higher than this gets
limited to the highest scaling factor
42 SERVO 07.2008
Doerr.qxd 6/4/2008 5:24 PM Page 43
s Co Mot
r
ete
s or xis erom
3-A cel ntr or
n
Se
Ac 9.95
$1 oll
ers
R
QT ce 4.9
5
n $1
ct .49
a
e fle r $3 y
rra !
R so TReX Jr
Se
n o
s n
en -se
r A sing Robot Controllers Dual Motor
e S l ine Controller:
c r voltage dual H-bridge Instantly switches
tan fo
f l ec reat regulator trimmer pot between radio control
Re G (on ADC7) (RC) or analog voltage and
R
QT power LED asynchronous serial (RS-232
(green) or TTL), plus a multitude of
Solder Paste Stencils red user LED
additional features. $59.95
Use our low-cost
solder paste stencils
From $25 (on PD1)
programming
to quickly assemble
your surface-mount
ATmega48/168
microcontroller
connector Custom Laser Cutting
designs. 20 MHz clock From $25
Baby Orangutan B-48 and B-168
starting at $24.95
by Fred Eady
There are times when a standard hobby servo just won’t do the job.
The same goes for small DC motors. Sometimes parts of aluminum
humans require a bit more torque than servos and low-load DC
motors can provide. In these cases, a hefty DC motor fills the bill.
However, a meaty DC motor needs a beefy DC motor driver.
Fortunately, there is inexpensive and easy
to use DC motor driver technology that is
available to us that will drive heavy iron.
his month, we’ll pull together what it takes to design, The BDPG-60-110’s maximum diameter at the motor cylinder
T build, and code a heavy duty DC motor driver module.
First, we’ll look at the electrical theory behind the DC motor
is 2.36 inches.
The BDPG-60-110’s name tells much of its story. All of
driver electronics. Then, we’ll build up the DC motor driver the planetary gear motors in the BDPG-60-110-24V-3000-
module’s “intelligence” and meld it with the DC motor R326’s class share the same part number including the “R.”
driver’s “brawn.” If all of that passes the smoke test, we’ll The numbers that follow the R provide us with more
code a simple RS-232 interface, which will allow you to information about the planetary gearmotor. The R326 is
control the big DC motor with simple serial commands. the most powerful gearmotor in the bunch as it can provide
The DC motor driver IC of choice for this project is the 4,166 ounce-inches of continuous torque. The BDPG-60-110
Allegro MicroSystems A3959. The A3959 is a DMOS Full- can peak at twice the amount of continuous torque. The
Bridge PWM Motor Driver IC. Before we begin our DC motor 326 also tells us what the gear ratio is. In our case, the
driver IC walk-thru, let’s take a look at the problem at hand. BDPG-60-110-24V-3000-R326 has a gear ratio of 326:1. At
326:1, the BDPG-60-110 rotates its shaft at a brisk 9.2 RPM
Big Mama Gearmotor unloaded. If you work the gearmotor, the shaft rotation will
fall to a loaded value of 7.7 RPM. Those RPM figures may
The behemoth you see in Photo 1 is an Anaheim seem too low to perform any real work. However, when
Automation BDPG-60-110-24V- you add external gearing to the
3000-R326 DC brush planetary BDPG-60-110, I can assure you
gearmotor. This motor is really that heavy loads will move about
not a “problem.” It’s actually our relatively quickly. The 3000
project design point. The BDPG- number in the BDPG-60-110’s
60-110 weighs in at four pounds, part number is the speed of the
10 ounces. From shaft to tail, the motor before the gearbox.
BDPG-60-110-24V-3000-R326 I initially gave you the
measures in at 8.08 inches. The BDPG-60-110-24V-3000-R326’s
planetary gear section is 2.65 dimensions in terms of inches.
inches in length while the shaft However, in reality the BDPG-60-
adds 1.10 inches to the overall PHOTO 1. This is one heavy 110 likes to be described
length. The actual motor cylinder duty motor all packed up in metrically. The body diameter is
comes in at 4.33 inches in length. a relatively tiny package. called out in the part number as
44 SERVO 07.2008
Eady.qxd 6/4/2008 9:52 AM Page 45
60 mm. The motor cylinder length PHOTO 2. This is a shot of the “brawn”
is also part of the part number of our DC motor driver. Before
we’re done, we’ll add homebrewed
and is specified as 110 mm. intelligence to this picture.
The 24V in the part number
calls out a 24 VDC gearmotor I have also freed the magic smoke
operating voltage. By the way, of many a power supply compo-
BDPG = Brushed DC Planetary nent in my years of working with
Gearmotor. Now that we know electronics. The A3959 relies on a
all about what our “problem” is, charge pump to help keep its
let’s move to the next step and internal H-bridge conducting and
learn about our “problem solver.” the motor shaft turning. To
provide a measure of safety when
The Allegro it comes to the power source,
MicroSystems the A3959 monitors the supply
voltage and the charge pump
A3959 voltage for undervoltage condi-
I’m experimenting with the tions. When a problem occurs,
BDPG-60-110-24V-3000-R326 and the A3959 goes into shutdown
likewise with the A3959. So, and disables the H-bridge drivers.
instead of building up a Okay, we’ve read the sticker
professional printed circuit board on the A3959 window. Now, let’s
(PCB) in the dark, I decided to base the initial tests on kick the tires and open the trunk and look under the hood.
official Allegro MicroSystems A3959 electronics. We will be I’ll add some important detail to Figure 1 as we walk around
working with the hardware you see in Photo 2. Before I the A3959. Since the A3959 is in a DIP configuration on our
describe the Photo 2 basic circuitry to you, let’s take a close A3959 demonstration board, all of our references to its pin
look at the A3959 itself. locations will be based on the DIP package from here on out.
The A3959 in many ways is a pumped-up A3979. Recall The A3959 SLEEP function is controlled by pin 22. Just
that the A3979 output current is limited to ±2.5 amperes with because the A3959 handles monstrous motor winding
a maximum motor voltage of +35 VDC. The A3959 doesn’t currents doesn’t mean it can’t be included in a low-power
contain all of the A3979’s internal logic as the A3979 is application. By driving the A3959 SLEEP pin logically low,
designed to drive stepper motors. However, the A3959’s we command it to enter SLEEP mode. The majority of the
power grid is much heftier than the A3979’s. The A3959 is A3959’s internal circuitry including the regulator and charge
designed to drive DC brush motors at voltages up to +50 VDC. pump will be disabled while it sleeps. If we choose not to
The maximum current capability of the A3959 is ±3.0 amperes. employ SLEEP mode in our application, we must drive the
Like the A3979, the A3959 is capable of controlling its A3959’s SLEEP pin logically high using a 4.7K pullup resistor.
attached DC brush motor using pulse width modulation To understand the functionality offered by the EXT
(PWM). And again, like the A3979, the A3959 can be com- MODE pin — which happens to be pin 15 of our A3959 —
manded to operate in slow, fast, and mixed
current-decay modes. The current-decay modes all
work in conjunction with the A3959 internal fixed
off-time PWM current-control timing circuitry.
I’ve used a bunch of motor control ICs. I’ve
also released my share of motor control IC magic
smoke. To help avoid the release of the A3959’s
magic smoke, its designers have outfitted the
A3959 with internal circuit protection. If the
A3959 gets a bit too hot under the collar (165°
C), it will shut itself down. To avoid hiccupping
on and off as it cools off, a bit of hysteresis is
built into the thermal shutdown protection.
In the course of building custom motor drivers,
one also has to build a suitable power supply
for the motor and the motor driver electronics.
we must first have a firm grasp on the ENABLE pin. If we External Slow Decay Mode is invoked and both of the sink
wanted to control the speed of a motor, we would feed the drivers are activated during the chopped cycle.
PWM speed control signal into pin 10 (ENABLE) of the A3959. All of the switching of the H-bridge source and sink
When the incoming ENABLE PWM signal swings logically drivers generates current spikes. The A3959 contains
high, the A3959’s selected H-bridge sink and source pair are circuitry to synchronize the activation of the source and
activated. The H-bridge sink and source pair is selected with sink drivers versus the current drawn through the motor
the logic level present on the PHASE pin. The A3959 PHASE winding. A current spike could erroneously reset the source-
input is located on pin 3. By driving the PHASE pin logically enable latch. To filter out the current spikes, the A3959
high or logically low, we select alternate sink and source simply ignores its motor winding current sensing circuitry
H-bridge DMOS pairs and dictate the rotational direction of for a period of time when the spikes are known to occur.
the motor shaft. Driving the ENABLE input logically low will Driving the BLANK pin logically high provides twice the
switch off the source driver or both the source and sink blanking (ignoring) time of driving the BLANK pin logically
driver depending on the logic present at the EXT MODE pin. low. The BLANK timing is set via the A3959’s pin 12.
When the ENABLE pin is at a logically low level, this is How much BLANK time is twice as much? Well, that all
called the chopped cycle. The EXT MODE input logic depends on what we hang off of the A3959’s ROSC pin.
determines the current path during the chopped cycle. The datasheet recommends an internal oscillator frequency
For instance, when EXT MODE is driven logically low, the of 4 MHz. To utilize the services of ROSC, we simply hang a
opposite pair of selected drivers will be enabled during the resistor from pin 4 to VDD. Here’s how we come up with
chopped cycle. This is called External Fast Decay Mode. the 51K ROSC resistor value you see in Schematic 1 that
Conversely, when the EXT MODE pin is driven logically high, provides the basis for the 4 MHz clock:
C9
R2 1K .1uF
+5VDC
C6 10uF
+
R6 R7 C7
51K 4.7K C10
U1 .22uF C11 .22uF
1 *MCLR RB7 40
2 39 .22uF
RA0 RB6 U2
3 38
20
24
RA1 RB5
9
4 RA2 RB4 37
5 36 22 C12 .22uF
VBB
VCP
CP1
CP2
VDD
R4 .1uF .1
5
6
7
8
PIC18F4620 13K
P1
C5
.1uF R5 5
5.6K 9
4
8
U3 3
7
2 T1IN T1OUT 5 2
1 T2IN T2OUT 18 6
3 R1OUT R1IN 4 1
20 R2OUT R2IN 19
12 DB9 FEMALE
V-
V- 17
C2+ 11
NOTES: 15
C2+
1. LED1 AND LED2 - MOUSER 606-4302F5-5V C2- 16
2. SP233ACP 20-PIN DIP C2- 10
+5VDC
VCC 7
C14
6 .1uF
GND
GND 9
SP233ACP
46 SERVO 07.2008
Eady.qxd 6/4/2008 9:53 AM Page 47
fOSC = 204 x 109 / ROSC also require a 0.22 μF capacitor connected between them
4 MHz = 204 x 109 / ROSC to assist in the charge pump operation. The charge pump
ROSC = 204 x 109 / 4 MHz generates a gate supply voltage that is greater than the VBB
ROSC = 51K motor winding supply voltage. The gate supply voltage
drives the A3959’s H-bridge source drivers. Another 0.22 μF
Applying our clock frequency to the BLANK pin logic capacitor is tied from the CP pin to ground to act as a
level results in the following: reservoir for the H-bridge source drivers. CP1 and CP2 are
represented as pins 2 and 1, respectively, on the A3959 DIP
When BLANK = 0 tblank = 6/fOSC package. CP functionality can be found at pin 24. Access to
When BLANK = 1 tblank = 12/fOSC the motor winding voltage input (VBB) is at pin 20.
A3959 load current regulation is a function of the internal
I’ll let you do the BLANK math. Recall that I mentioned fixed off-time PWM control circuit working in conjunction
earlier that the A3959 used internal fixed off-time PWM with the external sense resistor, which hangs from the SENSE
current-control timing circuitry. Well, now that we know pin. When the OUTA and OUTB outputs (pins 16 and 21,
what the internal oscillator is doing, we can compute the respectively) are activated, current flows through the motor
fixed off-time interval. The A3959 is factory set for a fixed winding. The motor winding current increases until it reaches
off-time of 96 cycles of the internal oscillator. That comes to: a predetermined trip value. The current trip value is a direct
product of the value of the external sense resistor and the
Fixed off-time = 96 x (1 / 4 MHz) = 24 μs voltage applied to the VREF pin. The A3959’s sense comparator
resets the source-enable latch when the current trip point is
The PFDx pins control the function of the A3959’s reached. As a result, the H-bridge source driver is deactivated.
Internal Current-Control Mode. Those switching spikes we Recall that we use blanking to prevent the source-enable latch
just discussed are detected at the SENSE pin. The SENSE from being reset at the wrong time by a current spike. Once
input is responsible for monitoring the motor winding current the source driver is turned off, the motor winding current
and feeding that information into the A3959’s internal current recirculates for a time equal to the fixed off-time interval.
sensing/control circuitry. When an overcurrent event is During the recirculation time, the logic levels at the PFDx pins
detected at the A3959’s SENSE pin (pin 17), the selected determine which internal current-decay mode (slow, fast, mixed)
internal current-decay method is invoked. The internal current- is invoked. The current trip value is calculated as follows:
decay method is determined by the logic levels of pins 13 and
11, which are PFD1 and PFD2, respectively. We already know ITRIP = VREF / 10RSENSE
what the internal current-decay modes are. So, applying
logical low levels to both of the PFDx pins selects slow decay Let’s calculate the ITRIP value from the values you see in
mode. Conversely, when both PFDx pins are driven logically Schematic 1:
high, we have selected fast decay mode. In slow decay mode,
both of the A3959 H-bridge sink drivers are turned on for Using good old Ohm’s Law against the VREF pin:
the entire fixed off-time, which we computed as 24 μs. Where VDD = +5 VDC
A combination of logic inputs on the PFDx pins provides I=E/R
us with two mixed decay mode selections. Driving PFD1 I = 5 / 18.6K
logically high and PFD2 logically low will invoke fast decay I = 268.8 μA
mode for 15% of the fixed off-time with slow decay taking
up the rest of the fixed off-time interval. Driving PFD1 Voltage at VREF = 268.8 μA x 5.6K = 1.505 Volts
logically low while driving PFD2 logically high will produce
fast decay mode for 48% of the fixed off-time and slow ITRIP = 1.505 x (10 x 0.1) = 1.505 amperes
decay mode for the remaining 52% of the fixed off-time
interval. We can crank up ITRIP if we want to as our BDPG-60-
If this all seems a bit too much on the theory side, don’t 110 can eat 2.2 amperes of current. What we have is fine
worry. We’ll have total program control over all of the A3959’s for now. In the process of computing ITRIP, we covered the
inputs. That way, we can experiment with the logic levels only pin of the A3959 we have not yet addressed: VDD. Pin
until we find a combination that suits the BDPG-60-110. 9 needs to be sourced with +5 VDC.
If you had the opportunity to check out my SERVO A3979 The A3959 DIP package is 24 pins deep. So, that leaves
article, you already know about the A3959’s VREG pin and the a total of six pins we haven’t covered thus far. We can end
A3959’s charge pump as their functionality across devices is our A3959 walk-around right here as the remaining six pins
identical. We need only hang a 0.22 μF capacitor from the are all GROUND pins. Any internal heat that is generated is
VREG pin (pin 23) to ground. The voltage associated with VREG dissipated through pins 6,7,18, and 19, which should be
is generated internally and is used to operate the A3959’s directly attached to a heatsink pad.
H-bridge sink drivers. The charge pump pins, CP1 and CP2, The circuit for the A3959 motor driver is already laid
SERVO 07.2008 47
Eady.qxd 6/4/2008 9:54 AM Page 48
down for us on the demonstration board. So, let’s build up The names I’ve assigned to the PIC18F4620 PORTB I/O
our A3959 controller. pins should be very familiar to you. It would be nice if we
reduced the complexity of the PFDx selections, as well:
PICing an A3959 Motor Driver #define decay_slow PFD1 = 0; \
Controller PFD2 = 0;
#define decay_mixed_15 PFD1 = 1; \
I’ve chosen the PIC18F4620 to perform the A3959 PFD2 = 0;
controller duty. If you’ve ever designed with a PIC micro- #define decay_mixed_48 PFD1 = 0; \
PFD2 = 1;
controller, there’s nothing new for you here. In fact, the PIC #define decay_fast PFD1 = 1; \
controller hardware is so easy, I could simply tell you to look PFD2 = 1;
the circuit over in Schematic 1 and be done with it. As you
can see in Photo 3, the PIC hardware is so simple, I Using C macros to put human-readable names on the
hand-wired the PIC A3959 controller circuit on a perfboard. PFDx selections will make life a bit easier if you want to
I elected to leave the SLEEP pin alone and tie it to an experiment with the PDFx settings. The same holds true for
inactive state. I also chose to use the lesser PWM Blank the EXT MODE selections as well:
time (6 / fOSC ) by tying the BLANK pin to ground.
#define ext_mode_fast MODE = 0
There are plenty of I/O pins to spare. So, if you want to #define ext_mode_slow MODE = 1
experiment with the control lines I’ve chosen to logically tie
to a static state, don’t be afraid to hook up the SLEEP and The reason we are here is to turn the BDPG-60-110
BLANK control lines to the PIC. If you use my existing motor shaft. So, it would be fitting to put together some
control line code as an example, you won’t have any motion macros:
problems coding in the extra control lines.
The real work involved with building up an A3959 #define CW 1
motor driver controller is in the firmware. With that, let’s #define CCW 0
begin our firmware build by associating the A3959 control #define motion_CW ENABLE = 1; \
pins with their PIC18F4620 counterparts: PHASE = CW;
//*******************************************************
//* INITIALIZE A3959 MOTOR DRIVER HARDWARE
//*******************************************************
decay_mixed_15; // PFD1 = 1 - PFD2 = 0
ext_mode_fast; // MODE = 0
motion_HALT; // ENABLE = 0
Spinning Out
My version of the A3959 motor controller is shown
attached to its demonstration board in Photo 4. When
you’re ready to put the A3959 to work in a real-world
I Controller Board
n Part 1, we studied Loki’s mechanical construction from
PCB (printed circuit board) material. The controller board
mounts on top of the body. Almost any controller board and processor can be
Part 1 also mentioned that I was inspired to build Loki used on a robot this size. I had several bare QwikFlash
because of his antics in walking and posturing. Another boards on hand I had purchased from the PICbook website.
reason I had for building Loki was to investigate subsumption This website (www.picbook.com) supports the book
and behaviors. Simply put, behaviors are the actions taken Embedded Design with the PIC18F452 Microcontroller
by a bot with given inputs. Loki will avoid an obstacle in its written by John Peatman. I’m currently using the 18F4620
path. Another behavior would be to follow (or avoid) a light PIC, although the 18F452 discussed in John’s book can be
source. Subsumption is the inhibiting of one behavior by used, and possibly even an old 16F877, as well (untested
another. However, more in-depth discussions of behaviors and limited). See the CA1.PDF document on the PICbook
and subsumption are beyond the scope of this article. I do website for construction, bill of materials, block diagram,
intend to port these ideas as ‘C’ functions into my hexapod and a schematic of this fine board. Note that no hex file or
(Shelob), as well. code is planned for the ‘877 chip at present. A hex file is
currently available for the ‘4620 PIC implementation.
QwikFlash board populated with LCD (on Shelob).
The Book
John’s book on the ‘452 is an excellent tutorial for
learning the workings of the 18F452, as well as the
18F4620 I used. And having a board to try out code on is
very helpful. Although John’s book uses assembly language
to test out the inner workings of the PIC, It is still quite useful
for C language developers and experimenters. Microchip
thought enough of the book to give out copies of it as
prizes for their seminar classes at the recent Embedded
Systems Conference. Other prizes were the ICD2 in-circuit
debugger and PIC start boards. (Now I have an additional
copy to pass along to my oldest son, who is also a
hardware engineer and is interested in the PIC.)
The QwikFlash board with a ‘4620 PIC runs at 40 MHz,
has 64K of Flash, 3986 bytes of RAM, and 1,024 bytes of
EEPROM. Plenty of I/O bits, counters, and timers too for
our use! To control Loki — or any other small bot — I added
connectors for four R/C servos, two Sharp GP2D12 IR
50 SERVO 07.2008
Marconett2.qxd 5/30/2008 2:14 PM Page 51
Controller Board
Construction
To build the QwikFlash
controller board, you can
follow the instructions in the
CA1.PDF document found on
the previously mentioned
PICbook web page. Some Schematic 1. Drawing
comments are in order. If of Loki sensor, servo,
you use a Bluetooth module, and battery wiring.
SERVO 07.2008 51
Marconett2.qxd 5/30/2008 2:15 PM Page 52
Schematic 2 H2
VDD GND1 Expansion header
(See Appendix A2)
CON1
Modular VDD GND 1 2 RB5
connector U3 RC3 3 4 RB4
PIC18F452 RE2 5 6 RB3
1
40 VDD 7 8 RB2
3 (RB7)
hardware
2 (RB6)
in-circuit 38 RC1 11 12 RB0
debugger 4 RB5 H1
37 RC2 13 14 RC5 Terminal
RB4
PORTB
C10 0.1 F 15 4 7 3
VDD
2 17 C6 0.1 F
CCP1 RC2 C2/CCP1
C11 0.1 F GND
Protection circuitry
CCP
1
VDD
C4 0.1 F 3 D7 R12 1 k H3 QwikFlash
16
4 CCP2 RC1 C1/CCP2 instrument input
C2 0.1 F D8 R11 47 k GND (bottom of board)
5
15
6 RC0 VDD
C3 0.1 F 7
POT1
AN4 (RA5) 5 k
D2 R8 1 k C9
*RTS & CTS can be 6 potentiometer
RA4 VDD Alive LED 0.1
connected to unused F
PIC18F452 pins
5 R7 1 k D4
PORTA
4 D5
data transfers. RA2 Center LED
3 R5 1 k D6
RA1 Right LED
SW2 VDD
R4 R3 R1 470 TMP1
RESET AN0 (RA0) 2 Temperature
47 k 470 C1 0.1 F
VDD sensor
10
AN7 RE2 E2/AN7
PORTE
VDD 22
RD3 SW3
VDD 32 21 Pushbutton switch
VDD RD2 Unused
REG1 C16 VDD
CON3 0.1 F 31 R9 10 k
GND
Power 20 RPG1
RD1
connector VDD R10 10 k Rotary pulse
D3
19 generator
C5 C14 RD0 (24 inc./rev.)
33 F 33 F SW1
9 V in, 5 V out
52 SERVO 07.2008
Marconett2.qxd 6/4/2008 8:55 AM Page 53
Sensors
Loki has three sensors currently. The two IR distance
sensors (also called proximity sensors or rangefinders)
have analog outputs. The processor reads the IR sensors
with the A/D and is controlled by interrupts. The IR data is
conditioned and results in left and right range values in
inches. The ultrasonic sensor is interfaced by I2C and
SERVO 07.2008 55
Marconett2.qxd 5/30/2008 2:16 PM Page 56
THIS MONTH:
There’s a New Humanoid
on the Block
H
umanoid shaped servo robots are with a hefty price tag. We’ve been dance off, kung-fu, or soccer against
some of the coolest robot kits lucky enough to review two such kits the Robonova and Bioloid? That’s
around. They are generally simple for SERVO so far. The surprising what we aim to discover.
to build, and the finished product is nimble Robonova-1 from Hitec will run
agile and undeniably entertaining. you over $1,000, and the versatile Like The Six Million
Robots this cool, however, often come Bioloid kit from Robotis comes with a
price tag of about $900. These prices Dollar Man With a
ROBOPHILO KIT. likely put these bots out of the reach 99.995% Discount
of many casual hobbyists, which is a
shame because they have so much The second half of Robophilo’s
to offer. The construction of these cryptic name stands for Programmable
robots is an excellent lesson in shrewd Humanoid In Lifelike Operation. If the
engineering design, and there are other servo module humanoids that
numerous competitions that cater to we’ve gotten our hands on are any
this unique type of bot at events like indication, this moniker is certainly not
RoboGames. an exaggeration of its abilities. But for
This month, we have the pleasure us to check on that, we first need to
of introducing the Robophilo from build the thing.
Robot Brothers, Inc. The Robophilo is The Robophilo can be acquired as
pitched as the most the pre-built Ready-To-Walk form or in
ROBOPHILO TEAM. affordable of the kit form, and we were fortunate
humanoid servomotor enough to get the Robophilo in
bots, and it certainly pieces. The Robophilo kit comes with
makes good on that a CD that contains all of the necessary
claim with its scant software and an electronic instruction
$400 price tag when manual in pdf form. The kit also
compared to its comes with a rechargeable battery
competitors. But does pack and charger.
affordability sacrifice And, in case there was any doubt
quality, or is the about whether or not the Robophilo
Robophilo agile enough was meant to be treated as a high
to hold its own in a tech plaything, the instruction manual
58 SERVO 07.2008
TwinTweaks.qxd 6/4/2008 4:16 PM Page 59
Robophilo includes a
variety of decals to give
the bot some pizzazz,
and also as a way to tell
one Robophilo apart from
the other.
The Robophilo can be
controlled by an infrared
remote that bears a
stunning resemblance to
a TV remote. The rascally
robot was even seemingly
designed with team ROBOPHILO SERVO. ROBOPHILO TORSO (APART).
sports in mind, because
the receiver can be adjusted in such a pictures of servomotor androids tall and 30 kg, so our three androids
way so as to operate four Robophilos decked out in makeshift jerseys easily make the cut. Another three-on-
with four separate remotes and kicking around tiny soccer balls. three soccer event, however, seems to
without interference. The Robophilo Sometimes these events are referred only cater to the smaller and lighter
also has motion and pose editors so to as “Huro” events (RoboGames even Robonova with a height limit of a
users can create their own unique features a HuroCup), which we can mere 30 cm and a weight restriction
actions. There is even an option to only guess is a playful portmanteau of of 600 g.
assign the user created motions to the words human and robot. The HuroCup still offers a
buttons on the remote. By the time of this printing, plethora of events for intrepid
The Robophilo also has an option RoboGames will have already taken roboticists. The mission of the
for a software upgrade that would place in June, but it always seems like HuroCup is actually quite high
allow users to program their own a great way to analyze the versatility minded. According to the Laws of the
motions in C. We always like to see and effectiveness of a robot is in the HuroCup, “The goal of the HuroCup
this kind of versatility in robot kits, but context of a competition. league is to encourage research in
for our purposes we stuck with the The Robophilo, Robonova, and practical, autonomous, highly mobile,
easy to use GUI. Bioloid all easily pass the height and flexible, and versatile robotic
After all of the frustration and weight requirements for three-on- platforms.” That may sound like a lot
tedium, seeing the Robophilo move three soccer and for the variety of of work and a daunting task, but
around is a well deserved reward. The events that make up the HuroCup. the thrill of competition and exciting
weaker servos don’t give it quite the The main constraints on these events variety of events are sure to make it
agility of the Robonova or the Bioloid, are height, weight, and footprint as much a pursuit of fun as one of
but it still gets around just fine. In a dimensions. The wide open HuroCup progress.
dance-off between the Robophilo and allows robots that are up to 150 cm Track and field style events like
the Robonova the Robonova
would be more like the Korean ROBOPHILO TORSO (TOGETHER). ROBOPHILO WORK.
pop star and the Robophilo the
late night comedic pundit, but the
Robophilo certainly puts up a
valiant effort.
Rock’em Sock’em
Huros
By now, we had accumulated
three different “androids” as they
seem to be referred to in the
competitive robotics community,
and three seems to be the magic
number for a number of events.
The classic team sport of
competitive robotics is soccer, and
a quick online search of humanoid
soccer will return numerous
SERVO 07.2008 61
TwinTweaks.qxd 6/4/2008 4:19 PM Page 62
Recommended Websites
For more information, go to:
www.robophilo.com
www.robogames.net
SERVO 07.2008 63
RoboResources.qxd 6/3/2008 11:11 AM Page 64
Stocking Up With
Surplus Electronics
J ust because one person doesn’t
want it doesn’t mean it isn’t
valuable. That’s the case with surplus.
surplus shopping. We’ll get to mail
order buying in a moment, but before
logging into your PC, consider any
mostly on mail order to get what you
need. Many of the better online
stores are listed in the Sources section
Simply put, surplus is excess stock local surplus stores in your area. Don’t that follows, but don’t forget to use
for resale. Sometimes it’s used, have any? You’d be surprised at your favorite Internet search tool to
sometimes it’s new. Occasionally, it’s what’s out there. Look in the Yellow find more. Google, Yahoo!, MSN, or
worthless junk, but very often, surplus Pages under the heading of other web search engines let you
has a beneficial use to someone, Electronics. Sometimes you’ll find find items of interest from among the
somewhere. And just as importantly, what you’re looking for under a millions of websites throughout the
surplus means the item isn’t being Surplus heading, but these tend to be world. Add the keyword “surplus” to
thrown away in the trash, so it’s not military/camping surplus outfitters, the search terms to help narrow the
clogging up a land fill. rather than electronics surplus. hits you get.
Why bother with surplus? For Referrals are a great way to find Keep in mind that the Internet –
starters, it usually costs less, often a out-of-the-way businesses. If you and all mail order – is world wide.
lot less — there are exceptions, such attend a local robotics or other user’s You may find some retail stores that
as rare or antique items, but we’re group, ask members where they like are not located in your country. Many
not talking about that kind of stuff to shop. And when you find one businesses ship internationally, but not
here. The downside to surplus is store, ask the sales clerks if they know all do so, and the added shipping
limited selection and quantity. You of others in the area that might be of costs can all but negate the cost
may not find exactly what you’re interest to you. Most are willing to savings of surplus. Read the fine print
looking for, so you have to be point you to the competition, since in of the website to determine if the
prepared to improvise. And don’t the surplus world, if one store doesn’t company will ship to your country,
expect unlimited supplies of an item. have it, another one might. Customers and note any specific payment
Surplus is often one-of-a-kind, or at are gladly shared among the area requirements. If a check or money
least restricted quantity. stores. order is accepted, the denomination
You can find just about anything Local thrift outlets are another usually must be in the company’s
at surplus — cars, jet engines, elevator good source for surplus. Many have native currency.
parts, you name it. But the kind we’re sections devoted to old electronics Many surplus electronics outlets
most interested in this time around is such as TVs, VCRs, and radios. You’ll sell a mixed bag of new and surplus
surplus electronics and related gear — need to do your own dismantling to wares. In fact, it’s often difficult to
ICs, resistors, capacitors, small motors, get at the parts, but for many, that’s know what’s new or prime products,
jacks and plugs, and just about half the fun! Some thrift stores test and what is surplus. These stores
everything else you might need for their electronic goods and charge sell new products in order to keep
the average robot. more if they are working; for a stable inventory. What this means
cannibalizing surplus parts you won’t is that the store may be able to
Where to Go for care if they’re working or not, so just re-order some of the product, but
Surplus go for the cheapest you can find. not others.
Odds are, even if your area Remember that most surplus is a
The Internet — and by extension, supports just a couple of nearby retail “get it while you can” commodity.
mail order–is an ideal playground for surplus stores, you’ll probably rely Once it’s sold, it’s sold, and the stores
64 SERVO 07.2008
RoboResources.qxd 6/3/2008 11:11 AM Page 65
move on to the next item. Should you can. Be realistic in your expectations for new and used robotics compo-
need a larger quantity of a particular and be prepared to deviate from nents. Prices and selection are good.
part, inquire to see if additional your original project plans to suit the Walk-in stores in the Los Angeles area.
quantities are available, and whether materials on sale at the time. For Product line includes motors, switches,
it is a standard stocked item or limited example, if your robot calls for 2-1/2” discrete components, semiconductors,
availability surplus. diameter wheels, but you’ve found a LEDs, infrared and CdS sensors,
great deal on 2-3/4” ones that can batteries, LCDs, kits, and much more.
What to Stock Up On save you money, consider changing Specifications sheet for many
the specifications to accommodate the products are available on the website.
Because the availability of surplus different wheel size. Online store, Web catalog, and
comes and goes, you will want to take printed catalog.
advantage of a product offering while Sources
you still can. But that involves buying Alltronics
things you may not need at the Following are numerous online www.alltronics.com
moment — which could end up being outlets that offer electronics surplus, New and surplus merchandise.
not needed ever! It’s prudent to either exclusively or as part of a Among their product line useful in
exercise caution in ordering surplus broader selection. Several have printed robotics are DC and stepper motors,
merchandise that you have no catalogs for offline review, but bear in stepper motor controllers, power
immediate plans for. I like to limit non- mind that because surplus product MOSFETs, small CCD video cameras,
essential purchases to a certain dollar comes and goes, you’ll always want to and tools. Online sales with Web
amount per month or per quarter. I check the company’s website for the catalog.
often use surplus to refill depleted latest deals.
inventory. This includes basic items Bear in mind that many other American Science & Surplus
such as wire and switches. types of online resellers such as www.sciplus.com
For project-specific purchases – robotics specialty stores carry surplus AS&S sells surplus of all types,
such as motors and gears – I will electronics. These aren’t listed for the including some you’d normally find in
refrain from buying these until I need sake of space constraints. The moral: an Army/Navy surplus store. But they
them. Yes, this does mean sometimes It pays to study the Web catalogs of also carry motors, gears, batteries,
losing out on a great opportunity, but your favorite online retailer to be sure switches, and some electronics.
if you’re not careful it’s easy to you’re finding all the best deals.
over-buy, and end up with a garage APEX Electronics
full of components you may never A-2-Z Solutions, Inc. www.apexelectronic.com
use. This has happened to me, and I www.a2z-solutions.com Military and industrial surplus,
ended up donating several hundred A-2-Z Solutions carries new and with a major emphasis on wire of all
pounds of unused inventory to some surplus electronics. Mostly computer types and sizes. Huge selection, but
local robot user groups and schools. equipment (PCs, monitors, scanners, the retail store is not well organized,
As surplus electronics often and so forth). Online sales with Web in my opinion. Limited online sales
involves small parts, it is advantageous catalog. (only some components listed on
to organize your inventory so that you the site).
can find what you need quickly. AE Associates, Inc.
Plastic divider drawers sold at home www.ae4electronicparts.com Apex Jr.
improvement stores are a good AE Associates carries new and www.apexjr.com
option. For odd-size items, I use heavy used electronics, including switches, Surplus electronics and
duty self-sealing plastic bags, and connectors, electronic components mechanicals. General electronics,
write down the contents using a thick (resistors, capacitors, diodes, transformers, and “movie props.”
felt marker. I then put the filled bags transistors, etc.), and test equipment. Online store with Web catalog.
in shoe boxes. It only takes a moment Searchable database. Also sells a small
to sift through the bags to find just number of compact black and white Ax-Man Surplus
the part I need. and color video cameras. Local store www.ax-man.com
Of course, the real benefit of in Van Nuys, CA; online sales with Local (St. Paul, Fridley, and St.
shopping the electronics surplus Web catalog. Louis Park, MN) electronic and
outlets is the savings on things you mechanical surplus.
need right now. When you start a All Electronics Corp.
new project, get into the habit of www.allelectronics.com B.G. Micro
checking the surplus traders first. That All Electronics is one of the www.bgmicro.com
way, you’ll save money where you primary sources in the United States B.G. Micro is a haven for the
SERVO 07.2008 65
RoboResources.qxd 6/3/2008 11:12 AM Page 66
electronics tinkerer and robotics more. Online sales with Web catalog. motors is fairly small, but they make
enthusiast. Much of the stock is up for it with a wide selection of
surplus, so it comes and goes, but Electronic Surplus, Inc. other common (and some not-so-
while it’s being offered, it has a good www.electronicsurplus.com common) products.
price attached to it. Electronic Surplus has a wide
Online sales through Web selection of test equipment and MECI — Mendelson’s
catalog; printed catalog available. electronics parts. Liquidation Outlet
www.meci.com
BMI Surplus Electronix Express Surplus electronics, motors, and
www.bmius.com www.elexp.com even a special section for combat
Electronic surplus, much of it New and surplus electronics, robot parts — large motors, batteries,
high-end industrial or scientific; including passive components, motors, that sort of thing. Online sales with
opticals, laser. Online sales with relays, and more. Online sales with Web catalog.
Web catalog. Web catalog.
Quickar Electronics
Brigar Electronics Excess Solutions www.quickar.com
brigarelectronics.com www.excess-solutions.com Quickar carries surplus electronics
Handy selection of electronic Surplus electronics. Local store and tools. Online sales with Web
components, including unique and online sales. catalog.
sensors, construction hardware, and
motors, along with the usual Fair Radio Sales Skycraft Parts & Surplus, Inc.
transistors, resistors, etc. Online sales www.fairradio.com www.skycraftsurplus.com
with Web catalog. Though specializing in surplus Skycraft Parts & Surplus, Inc., is
for ham radio, Fair Radio also offers a “surplus mall” offering power
CTR Surplus plenty of general electronics and supplies, transistors, relays, ICs, wire,
www.ctrsurplus.com test equipment. Online sales with cable, heat shrink, transformers,
Surplus electrical, including Web catalog. A printed catalog is motors, fiber optics, test equipment,
motors, test equipment, and power available. resistors, diodes, and more. Local
supplies. Online sales with Web store in Florida, plus online sales with
catalog. Gateway Electronics, Inc. Web catalog.
www.gatewayelex.com
Electro Mavin Gateway Electronics is a general Timeline, Inc.
www.mavin.com electronics mail order and retailer. www.timeline-inc.com
Electro Mavin carries electronic Among their products are passive Surplus of all kinds: electronic,
components, motors, batteries, optics, and active components, motors, computer peripheral, laser, motors,
and test equipment. Online sales with electronic kits, gadgets, books, and LCDs, and more. Online sales with
Web catalog; retail store in Los tools. Some of their goods are new; Web catalog.
Angeles area. others are surplus.
Unicorn Electronics
Electronic Dimensions Hosfelt Electronics www.unicornelectronics.com
www.el-dim.com www.hosfelt.com Unicorn Electronics has a large
Electronic Dimensions carries General electronics. New and selection of electronic components,
military and industrial surplus, surplus. including passives, transistors, logic
electronics, radio receivers, ICs, relays, and more. Online sales
transmitters and parts, electron tubes, HSC Electronic Supply with Web catalog.
test equipment, and ham gear. Retail www.halted.com
store in Washington state, and online Online mail order sales, with Weird Stuff Warehouse
sales with Web catalog. walk-in retail stores in northern CA. www.weirdstuff.com
Halted offers a mix of computer and Weird Stuff Warehouse sells
Electronic Goldmine electronics surplus. surplus, including electronics. Retail
www.goldmine-elec.com store in Sunnyvale, CA. SV
Electronics Goldmine carries new Marlin P. Jones & Assoc., Inc.
and used electronic components www.mpja.com CONTACT THE AUTHOR
(LEDs, potentiometers, resistors, MPJA sells both new and surplus
heatsinks, transistors, etc.), robot electronic and mechanical products. Gordon McComb can be reached via
items, electronic project kits, and Their assortment of items such as email at robots@robotoid.com
66 SERVO 07.2008
DifferentBits.qxd 6/4/2008 1:54 PM Page 67
DIFFERENT
BITS
by Heather Dewey-Hagborg
RANDOM BITS
Throughout this column, we have relied on the idea of randomness to seed all of our
unconventional computing experiments. In this month’s article, we will take a brief
detour from code and hardware to examine just what the concept of “random”
actually means, how our microcontroller is implementing it, how this differs from a
computer, and some schemes for creating “true” random number generators.
F
irst, a little history. The concept of chance appears in therefore, of throwing two sixes in 24 throws is 1/36 x
most ancient cultures, dating back at least as far as 1/36 x 1/36 … 24 times or 0.4914. So it was not advisable
the ancient Egyptians use of the “talus,” an early for Chevaler de Mere to bet on throwing two sixes within
predecessor to the die. Fashioned from the knuckle or heel 24 throws after all, and probability theory was born!
bone of a hoofed animal, the talus had four possible So what does any of this probability stuff have to do
outcomes. It has been found alongside tomb illustrations with random number generation?
and scoreboards in Egyptian sites lending support to the Games of chance are, as Hacking called them
idea that playing dice and gambling were popular pastimes. “randomizers.” They are a way of abdicating responsibility
In the words of Ian Hacking, a historian of probability, for decision-making to the world of probabilities. In turn,
“It is hard to find a place where people use no randomizers results returned from such activities are random outcomes.
yet theories of frequency, betting, randomness, and At any given moment of the game, you cannot predict with
probability appear only recently. No one knows why.” certainty which number will appear next. And a set of ran-
An intriguing mystery! And indeed it is not until 1654 dom outcomes produces a sequence of random numbers
that what we know as probability today began to take containing no repeating patterns — a sequence which
shape. French nobleman Chevalier de Mere had a gambling Algorithmic Information Theory would call uncompressable.
problem. He wanted to know if it would be profitable to
bet that double-sixes would appear at least once in a set of AIT and Compressibility
24 dice throws. Luckily for him, he was a friend of one of
the most brilliant mathematicians of his day, Blaise Pascal. As Gregory Chaitin, founder of algorithmic information
De Mere posed the problem to Pascal and the theory of theory describes it, compression occurs if data can be repro-
probability emerged from the ensuing correspondence duced by a computer program with a smaller number of bits
between Pascal and his good friend Pierre de Fermat, than the original data contains. In other words, if I have a
another brilliant mathematician. data set of 500 one-byte measurements, the data contains
What Fermat and Pascal realized is what we all learned 500 * 8 = 4,000 bits. If I can find a repeating pattern in that
in grammar school — that with each throw of the dice, data, I can simplify it by creating a simpler symbol to represent
each possible outcome is equally likely. The possibility of each repeating subset of the sequence. I can then code an
throwing a six is therefore 1/6. They further realized that algorithm to process the input string and replace the
probabilities could be multiplied, and the probability of symbols based on a key. In this way, I can shrink the size of
throwing two sixes was 1/6 x 1/6 = 1/36. The probability, the data itself without losing any of the original information.
SERVO 07.2008 67
DifferentBits.qxd 6/4/2008 1:55 PM Page 68
DIFFERENT BITS
Example: random number, so how do they do it?
Original dataset
70, 15, 111, 32, 56, 70, 15, 70, 15, 7, 1, 3, 5, 20, 67, 54, rand() and srand()
42, 29, 113, 7, 1, 3, 5
Most likely, if you are reading this magazine you
Compressed dataset have also done at least a little programming and have
a, 111, 32, 56, a, a, b, 20, 67, 54, 42, 29, 113, b encountered some version of the rand() function or random
class. Almost every contemporary computer language and
Key platform has had some variant of this, from microcontroller
a = 70, 15 C to Java to Python. These functions generate what are
b = 7, 1, 3, 5 known as pseudo-random sequences of numbers. Why
pseudo-random? Well, for one thing, the random number
The more you can compress the data, the more generator in your computer is actually just an equation.
patterned or predictable it is, the less information it Most computer languages (including C and Java) contain
contains, and the less random the sequence of numbers is. a version of the classic algorithm, the linear congruential
By contrast, if the data cannot be compressed at all, “if the generator, as the source behind rand(). A linear congruential
smallest program for calculating it is just as large as it is ... generator works by computing each successive random
then the data is lawless, unstructured, patternless, not number from the previous, starting with a seed, X0. The
amenable to scientific study, incomprehensible. In a word, seed is generally what you supply to the algorithm by calling
random, irreducible!” (Chaitin, p. 64) srand(seed_value) before requesting a number from rand().
So randomness is equivalent to information. The more
information a sequence contains, the more difficult it is to Here is the formula:
compress, and the closer it is to randomness. In this light, Xn+1 = (aXn + c) mod m
white noise becomes pure information and a perfect source where Xn is the output set of random numbers
— in addition to games of chance — for generating random m is the modulus value
sequences. Anywhere noise is present, for example, radio a is the multiplier value
waves and the atmosphere, we can tap into it to extract c is the increment value and X0 is the initial seed value
random sets of numbers. (ex. supplied by srand)
DIFFERENT BITS
a different random number generating algorithm known as their EX_EXTEE.C example for more details.
the Mersenne Twister. This algorithm has been proven to Other possible solutions for getting a good random
generate significantly more random data (the period is sequence on a microcontroller involve either developing
219937 – 1), but it requires more memory for implementation hardware specific to this task, or connecting to the Internet
and is therefore not suitable for microcontroller or space and querying a site like Hotbits (mentioned previously) or
intensive implementations. random.org.
If you do want to build your own dedicated random
What About Microcontrollers? number generating hardware, there are a few tried and
true methods. The first makes use of the principle that a
CCS (www.ccsinfo.com) reports their rand function to reverse-biased PN junction generates completely
be the following: unpredictable output known as “avalanche noise.” Lots of
details about making a random number generator using
unsigned int16 rand(void) this technique, as well as interfacing it to the PIC, are
{ available online from Rob Seward’s art project
_Randseed = _Randseed * 1103515245 + 12345;
return ((unsigned int16)(_Randseed >> 16) % ‘Consciousness field generator’ at http://robseward.com/
RAND_MAX); itp/adv_tech/random_generator/.
} The basic idea is to sample the weak avalanche noise
signal and amplify it dramatically. This value is then sampled
This is clearly derived from the ANSI C example we looked by a microcontroller either by sampling the time interval
at above, as you will recognize the linear congruential between spikes or simply choosing a constant sampling rate
function, simply separated into two steps. Notice also that and accumulating 1s and 0s each iteration. Because
the a and c values are identical to the ones above, and the succeeding bits may be more correlated than is desirable,
only difference between the two functions is that in the different unbiasing techniques exist. One popular technique
CCS version, m is the user defined value RAND_MAX rather called the Von Neumann method samples two bits at a
than 232. Note that this makes explicit the relationship time, discards them if they are equal, and keeps the first
between the maximum period of the random number one if they are different. Another method known as the
generator RAND_MAX and the modulus value m. XOR corrector samples two sets of pairs of bits and then
(Hitec did not respond to my query about their random performs an XOR operation on them and uses the output.
number generation technique, but it is probably safe to More information on the PN junction technique is
assume it is similar.) available at www.cryogenius.com/hardware/rng/.
Another method for hardware random number
A Better rand() generation makes use of the radioactivity method described
earlier. The basic premise is to use a Geiger-Müeller tube
If you have read some of the examples from earlier to count instances of individual atom’s decay in a given
installments of this column (neural networks, genetic isotope. Again, the time interval between decays can be
algorithms), you have undoubtedly noticed plentiful use of used, or a fixed sampling period can be established and the
the rand() function. And if you have actually implemented number of decays per unit of time can be counted.
any of these examples, you have also noticed that the A detailed description of this idea is available on Bernd
methods used to seed the PIC random number generator Ulmann’s blog at www.vaxman.de/projects/rng/
are less than satisfactorily random. I will conclude this rng.html.
month’s column by briefly explaining some possible Finally, if you can’t do the user keypress, EEPROM, or
methods for generating better random seeds on the PIC external hardware techniques, you can try sampling a
and providing some links to more details. floating pin on the analog-to-digital converter of your PIC,
CCS recommends measuring the time in microseconds and accumulating the least significant bit each sample. To
between power up and the first user keypress, and then maximize your randomness on this technique, test out one
using the least significant bits of that measurement. In terms
of code, this involves using a hardware timer to generate
interrupts and counting the number of intervals between
SUGGESTIONS FOR FURTHER READING
device initialization and the user’s keypress. An example of • Gregory Chaitin: Meta Math!
this is available on the CCS website at www.ccsinfo.com/
content.php?page=compexamples#seconds. • Ian Hacking: The Emergence of Probability: A
Their suggested workaround solution for when user Philosophical Study of Early Ideas about Probability,
input is not possible is saving an initial seed in EEPROM and Induction, and Statistical Inference
then incrementing it each time the processor is reset, and
saving the new value in place of the old. CCS has read and • Peter J. Bentley: The Book of Numbers: The Secret of
write EEPROM functions available for doing exactly this; see Numbers and How they Changed the World
SERVO 07.2008 69
DifferentBits.qxd 6/4/2008 1:56 PM Page 70
DIFFERENT BITS
of the unbiasing techniques just mentioned. computer generated version are available online at
To close on a completely random note, I will leave you http://sunsite.univie.ac.at/Mozart/dice/. SV
with a fun example of a very early musical piece that took
advantage of true random number generation. In 1787, CONTACT THE AUTHOR
Mozart composed a set of instructions for a ‘musical dice
game’ — a method of using consecutive dice throws to Heather Dewey-Hagborg can be contacted via email at
generate a minuet! Lots more information about this and a heather.servomagazine@gmail.com
Easy to Connect
!
ST
CO Free
LO
W Expert W
LO Technical CO
Support ST
LOW COST !
www.c-stamp.com
1 (800) 985-AWIT Professional SW Dev. Tools
70 SERVO 07.2008
WebstoreJuly08.qxd 6/3/2008 8:29 AM Page 71
Lo
W h ao k
The SERVO Webstore
Attention Subscribers ask about your discount on prices marked with an *
t
New ’ s
SERVO Magazine
Bundles
SERVO 07.2008 71
WebstoreJuly08.qxd 6/3/2008 8:34 AM Page 72
to you, too?!
amount of informa-
tion available on the
subject? Clueless as
Stay home,
to locating specific
information on robot-
ics? Want the names,
read a book.
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
you’ve been searching for? Turn to Robot
Builder’s Sourcebook — a unique clearing-
The online store @
house of information that will open 2,500+ www.ser v omagazine .com
new doors and spark almost as many new
ideas. $24.95
NEW
! FREE!
with any
e
Robot purchas 0
Programmer's over $1 0
Bonanza -in
Phone ly!
by orders o
n
John Blankenship,
Samuel Mishal
The first hands-on SERVO
programming guide
for today's robot hobbyist! Magazine
Get ready to reach into your programming
toolbox and control a robot like never before! T-Shirts
Robot Programmer's Bonanza is the one-stop From HomoSapien to RoboSapien For men and women Before R2D2 there was R1D1
guide for everyone from robot novices to Get your very own limited-edition SERVO Magazine T-shirt. Shirts come
advanced hobbyists who are ready to go
in sizes S, M, L, and are available in either black or white.
beyond just building robots and start
programming them to perform useful tasks. All shirts are 100% preshrunk cotton.
$29.95 Limited time offer. Call 1-800-783-4624.
72 SERVO 07.2008
WebstoreJuly08.qxd 6/3/2008 8:38 AM Page 73
Bionics for the Evil Genius The Definitive Guide to Fuel Cell Projects
by Newton C. Braga Building Java Robots for the Evil Genius
THE EVIL GENIUS by Scott Preston by Gavin D J Harper
TACKLES BIONICS! The Definitive Guide to FUEL YOUR EVIL
Step into the future -- (or Building Java Robots URGES WHILE YOU
the past, if you have a is for educators, BUILD GREEN
touch of Dr. Frankenstein students, hobbyists, ENERGY PROJECTS!
in your soul) -- with these and startups looking Go green as you amass
25 incredibly cool bionic for Java/hardware power! Fuel Cell
experiments! interaction. This book Projects for the
Demonstrating how life shows you how to use Evil Genius broadens
forms can be enhanced, combined, your PC to build NEW your knowledge of this
manipulated, and measured with electronic robots, and how you ! important, rapidly
and mechanical components, these can interface with a developing technology and shows you how
inexpensive projects from internationally microcontroller to do the basics. You’ll learn to build practical, environmentally conscious
renowned electronics guru Newton Braga to design your robot to navigate, see, speak, projects using the three most popular and
provide hours of fun and learning. recognize your face, listen to you, and build widely accessible fuel cells!
$24.95 Sale Price $ 22.95 maps. $55.95 Sale Price $ 47.95 $24.95 Sale Price $ 22.95
PROJECTS
H Racer video clips can be found in the on-line store product descriptions!!
The SERVO BUDDY
KIT
Dusting Robots
One Woman’s View of Life
With an Electronics Hobbyist
by Kym Graner
When you were five, 10, or even 15 years old, what did you want to be when you grew up?
I’m betting those career aspirations changed with your interests until you eventually became
whatever you are today. Maybe you wanted to be a fireman-superhero-doctor, or maybe
a veterinarian-cheerleader-cop. I wanted to be a mom. From the time I was about 12,
I knew that was the job for me. Nothing showy, nothing extremely technical or requiring
decades of schooling. I just loved kids, cooking, crafts, and the outdoors. I couldn’t think
of anything better than being a stay-at-home mom.
76 SERVO 07.2008
Then&Now.qxd 6/4/2008 10:02 AM Page 77
Then NOW
a n d
ROBOTICS — A HISTORICAL
PERSPECTIVE
b y T o m C a r r o l l
demonstration of a championship Yet, the March 27th edition of robotics interests you most. Outside
Robo-Magellan or a 20-servo Electronic Design had a picture of of the usual timelines, every “history
humanoid walker brings a bored “ho Star Wars’ C-3PO on the cover with of robotics/robots” that I Google
hum” from the average bystander. Do the article title under it stating: “The always seems to have a different
they really want a full-size Honda Droid War: Cost, Lack of Industry slant on the subject. I would very
Asimo as a servant in their homes? Focus Clouds Robotics Future.” The much appreciate some of you readers
Does this hiccup in interest signify article actually paints a rosier picture of SERVO to email me with your
another turn in the history of robotics? of the state of robotics in the actual feelings about the future trends of
Possibly. Have we failed as robotics essay, with an emphasis of LEGO’s robotics, for it is you who will
enthusiasts? No way! The history of Mindstorms NXT robotics kit and ultimately change the directions of
any technology has always gone National Instrument’s LabVIEW experimental robotics with your
through these cycles of interest and software package. purchases, designs, exhibition
acceptance. The steam engine was a So, you see, there are always attendance, and comments at
marvel until it drove trains, ships, and multiple sides to any historical subject, meetings and on the web. SV
factories everywhere. The common whether a part of the Civil War or
light bulb that lit the world as the the subject at hand we all love so
Tom Carroll can be reached via email
marvel of a century ago, is so much. It just depends on your point
at TWCarroll@aol.com.
commonplace that it is ignored today, of view and what particular facet of
soon to be replaced by LED lamps.
The amazing $2,000 cell phone of
two decades ago is now given away
and is in the hands of most school
children.
Advertiser Index
All Electronics Corp. .........................25, 70 Jameco ......................................................75 Robot Craft ...............................................70
AP Circuits/e-pcb.com ............................10 Lorax Works ........................................25, 70 Robot Power ............................................23
AWIT ..........................................................70 Lynxmotion, Inc. .......................................11 RobotShop, Inc. .................................70, 76
Boca Bearings ....................................23, 70 Maxbotix ...................................................70 Skycraft Surplus ........................................25
Mini Robotics .....................................63, 70
CipherLinx Technologies .........................70 Solarbotics/HVW .....................................14
Net Media .................................................83
CrustCrawler .............................................82 solderbynumbers.com ............................25
Parallax, Inc. ...............................Back Cover
Electronics123 ..........................................25 PCB Pool ..............................................21, 70 Sparkfun Electronics ..................................2
Endurance Robotics ................................70 Pololu Robotics & Electronics ..........43, 70 Technological Arts ...................................70
Hitec ..........................................................15 Rabbit, A Digi International Brand ............3 Vantec .......................................................10
Images Co. ................................................70 RoadNarrows Robotics ...........................24 Weird Stuff Warehouse ...........................25
SERVO 07.2008 81
Full Page.qxd 6/2/2008 10:33 AM Page 82
Full Page.qxd 4/29/2008 4:05 PM Page 83
backcvr.qxd 6/2/2008 10:30 AM Page 84