Tune in each month for a heads-up on
where to get all of your “robotics
resources” for the best prices!
A Brain For All Seasons
With a “brain,” your robot becomes more than just a simple automated machine.
To be a true robot, the brain processes
outside influences whether they be
light sensors, accelerometers, or lowly
bumper switches. Then, from these
senses, the robot determines a proper
course of action.
In most robots, a computer of
one type or another is the most
common type of brain. A robot
control computer can be — but is only
occasionally — like the PC on your
desk. Rather, the modern-day robot
uses a specialized form of computer
called the microcontroller or single
board computer, both of which are
small, lightweight, and relatively
inexpensive. Of course, not all robot
brains are even computerized. As we
discussed in the September ‘09
installment of Robotics Resources, a
perfectly good robot brain can be
a simple assortment of electronic
In this month’s column, we’ll
provide a quick review of the major
types of “brains” available for your
robot. In choosing the right kind of
brain for your bot, you balance the
computational power you need with
size, weight, and power consumption.
We already covered creating
robot brains out of discrete
components (transistors, resistors,
linear and digital ICs) last September,
so we won’t spend much time with
the subject here. But in summary,
you can create a perfectly agile and
workable robot using the simplest of
electronics. In fact, this is the concept
of the BEAM robotics philosophy.
Simple functions such as seeking or
avoiding light, or reacting to contact
sensed by a mechanical bumper
switch need only a simple circuit.
You may need to augment the
basic electronic designs with relays or
power transistors in order to control
larger motors. However, this is a
requirement of most any control
circuit, even one based on the latest
microprocessors. Most robot brains
operate at 3. 3 to 5 volts, and their
components are rated to handle only
minimal currents — most up to tens of
milliamps. Anything more and you run
the risk of burning things out. Relays,
power transistors, and other power-handling components allow the
low-current components to operate
even the largest of motors.
Since the early 1990s, a preferred
method of endowing a robot with
smarts is the microcontroller.
Microcontrollers are stand-alone
programming computers that are
designed to connect with external
components. They are inexpensive,
have simple power requirements
(usually just five volts or less), and
most can be programmed using software on your PC. Once programmed,
the microcontroller is disconnected
from the PC and operates on its own.
Microcontrollers are, in effect,
programmable integrated circuits.
Using a standard programming
language, you define how the various
inputs and outputs of the chip
behave. Following the cues of your
program, the microcontroller accepts
input, analyzes it in one way or
another, and outputs some value.
This is fundamentally the same as
any computer, except that a
microcontroller is primarily designed
to operate things (motors, relays,
lamps, etc.) rather than interact with
people through the use of a keyboard
and display monitor.
Assembly language is a common
method to programming microcontrollers, but it is by no means the only
method. At least for amateur robotics,
a high-level language such as C, Basic,
or Pascal is used to program the chip.
This process involves using a compiler
that converts the syntax of the high-level language to a machine readable
form, which is then downloaded from
the PC to the controller.
There is also another popular
programming approach some
microcontrollers use. With these, a
high-level language interpreter is built
into the chip. You still write your
program on a PC but, in this case,
your instructions are loaded into
the chip, and a resident program
interprets your program one step at
a time. This is the method use by the
venerable BASIC Stamp, for example.
A key benefit of this approach is
SERVO 11.2009 71