Tune in each month for a heads-up on
where to get all of your “robotics
resources” for the best prices!
Building Robots
With the Arduino
The name Arduino may sound like
some newly discovered quantum
particle, but it’s actually a small
and affordable microcontroller
development board that is enjoying
a rapid upsurge in popularity.
At least part of this growing
popularity is due to its price: the
standard Arduino board costs under
$35, assembled and tested. It’s ready
to be plugged into a Windows,
Macintosh, or Linux-based PC. The
programming software is free so
you can begin writing programs and
downloading them to the board in a
matter of minutes.
But price is not the whole story
behind the Arduino, or why it
deserves special consideration.
The Arduino is one of only a handful
of commercially-manufactured
microcontroller boards that is based
on an open source (free to copy)
design. In fact, almost everything
about the Arduino product is open
source, including its programming
tools. (Not open source is the Atmel
AVR microcontroller that forms the
heart of the Arduino, or the USB
interface chip that is used to
communicate with your computer.)
The open source nature of the
Arduino has spawned something
of a cottage industry of third-part
support and fans. Though the most
popular version of the Arduino is
made by a company in Italy, others
offer designs that are compatible in
one form or another, hardware and/or
software. Add to the hardware mix a
growing body of add-on boards
that maximize the Arduino and free
resources for programming examples,
add-on code libraries, and step-by-step
tutorials.
In this column, we’ll take a
look at the Arduino and its various
off-shoots, accessories, and software,
and how this unique concept of
open source hardware and software
design might be used to enhance your
robotics projects.
Under the Hood of
the Arduino
The Arduino has been
commercially available for several
years, and has gone through
numerous iterations and revisions. As
of this writing, the most popular of
the current Arduino board designs
goes by the name of Arduino
Diecimila — diecimila meaning “ten
thousand” in Italian, a reference to
the number of boards the founders
of the Arduino concept have shipped.
To simplify the discussion, I’ll describe
the features of the Arduino Diecimila
as the “Arduino,” but know that
other variations exist. Not all of these
variations provide the same hardware
features, but they all use the same
programming development software.
To start: Like any microcontroller,
the Arduino is basically a small single-board computer designed to interface
to external hardware, such as switches,
motors, lights, relays, sensors, and
LEDs. At the heart of the Arduino is
an Atmel AVR ATMega168 microcontroller. Although the bulk of the
components on the Arduino are
surface-mount, the ATMega168 is
provided in a dual inline pin (DIP)
package, to allow you to easily replace
it, should that ever be needed.
Why replace the AVR? Most
anyone who has played around with
a microcontroller has burned out a chip
or two during the experimentation
phase. It’s nice to know that if you
should ever “let the smoke out” of
your Arduino, you need only replace
the central AVR chip (about $6),
rather than scrap the entire board.
Note that the AVR chip provided
in the commercially-manufactured
Arduino boards comes with a bootloader program pre-installed in its
Flash memory. This bootloader allows
you to program the Arduino by using
a simple USB connection to your PC;
you do not need a separate hardware
programmer. When replacing the
AVR, you need to either purchase a
chip with the bootloader software
pre-installed, or if you have the proper
hardware setup, do it yourself.
Instructions for downloading the
bootloader software into an AVR
chip is provided on the main Arduino
information page.
To allow the easiest possible
means of programming, the Arduino
supports on-board USB. You need
merely to connect a suitable USB
cable between the Arduino and your
SERVO 09.2008 61