( www.phidgets.com) which manufactures a sizeable
number of USB connected low-level device and sensor
interface products. I’ll have lots more information on their
products later on in this article, but don’t skip ahead just
yet! Check out the ads here in the magazine for more
suppliers of “ready to use” controllers.
Should you decide you’d like to roll your own
low-level hardware controllers, the two most popular
microcontrollers to use to handle this are the Microchip
PIC and Atmel AVR. Both of these manufacturers have an
enormous following and a huge amount of information on
the web that is available free via Google. Both of these
microcontrollers are very capable and very inexpensive
hardware. Where the rubber meets the road is the
assemblers, compilers, and programmers for each of them.
In both cases, you can get the manufacturer’s IDE for free
from their websites. For the PIC, you will want MPLAB,
which is available at www.microchip.com. For the Atmel
AVR, you will want AVR Studio, which is available at
www.atmel.com. In both cases, you get a development
environment, an assembler, and programmer software.
To use these microcontrollers, you will need to be
able to program them with special hardware. Both
manufacturers provide programmer hardware directly,
and both manufacturers have third-party developers that
provide programmer hardware as well, typically for less
money. If you want to program in a higher-level language
than Assembly, both the PIC and the AVR have a good
selection of third-party suppliers of C, C++, and Basic
compilers. The price range of these tools runs the gamut
of cost from free (in the case of avr-gcc for the AVR) to
expensive (for the professional development packages.)
The AVR has a slight advantage in that its programmer
hardware is usually cheaper and the Open Source avr-gcc
project has a very good gcc based compiler that runs on
any OS platform. The Microchip and Atmel supplied
development environments only run on Windows, but
there are some third-party compilers for each that are
OS agnostic.
I’m only touching on this subject; I could write a
whole article on the wealth of tool chains for both of
these microcontrollers! I use a variety of tools for both
of them extensively and both have very high quality
capabilities and support. By way of suggestion, I would
recommend that you use the PIC 24F/24H or 18F parts
and the ATMEGA series of parts for your projects;
don’t bother with the lesser capable devices. With both
products, the prices are typically in the $3 to $7 range in
quantity one purchases. If you were going to manufacture
a gazillion widgets, my advice would be different, but you
are doing hobbyist projects so individual part costs are not
going to be on your radar; you don’t need to save ten
cents on each piece.
I have two big warnings for those who are used to
programming big iron machines:
1) An embedded program cannot throw an exception and
recover; the compiler won’t usually tell you when you
are running out of stack/heap space, and these devices
are Harvard — not Von Neumann machines — which
means that the DATA and PROGRAM address busses are
distinct. This will change how you think about storing and
using data.
2) Because the program and data storage on these devices
is small (usually less than 64K and 8K, respectively), you
need to think small, efficient, and paranoid when you
write a program. Timing is most important and typically
you are interested in maximizing response time, not
throughput. Program accordingly.
Robot Construction
To me, there are two directions that a robotics
engineer can design to: the robot as an autonomous
agent “in the wild” and the robot as a semi-autonomous
helper. Your project leans to the latter category I think.
With your project in mind, I suggest that you look into a
couple of companies that have parts or kits that may
come close to meeting your robot arm needs. Of course,
these kits may be thought of as starter kits since they
most likely won’t completely meet your needs, but they
will help you get your feet wet. These companies have
either good building blocks for a robot arm or actual robot
arm kits. There are more out there, of course, but these
are the ones that I felt might have hardware that you in
particular would be interested in:
• www.lynxmotion.com has robot arm kits and servo
erector set parts that you can use to build your own robot
arm using R/C hobby servos. Lynxmotion also sells serial
servo controllers that you can use to control those robot
arms through your serial port. They have quite a variety of
kits; even quite a few robot arm kits.
• www.robotis.com has the Bioloid kits that use
sophisticated servos that can give feedback to their
controllers. They sell from their site but they also have
other distributors.
• www.crustcrawler.com sells Bioloid kits and has
their own robot arm kit that uses the Bioloid servos.
CrustCrawler has several kits, parts, and individual servos
that they sell, as well as the ability to control them from
your computer.
Robot Source Materials
I have read a few books on embedded programming
and not found any that were particularly useful in a
general sort of way. The topic is just too huge.
However, when it comes to robot construction there are
introductory tomes that I feel can give you a good
grounding in construction, programming, and even,
jargon. A linguist might say that these books will help you
to develop a “common universe of discourse” with the
SERVO 05.2009
15