My PhD work is focused on
teaching STEM, that is, science,
technology, engineering, and
mathematics. What better way to
teach STEM than a microcontroller-
based project like a robot. One
of the problems schools face,
however, is the cost involved
teaching technology curricula.
My first attempt (and certainly not
my last since I have a bunch more
ideas) to address this issue is the
inexpensive robot controller I’ll
describe in this article.
The CheapBot- 14 Controller
The CheapBot- 14 is a flexible robot controller
that doesn’t limit you to a single robot design. It’s
fully programmable, has inputs and outputs, and can
operate two independent motors. One big reason the
CheapBot- 14 is so affordable is at its heart is the
PICAXE-14M microcontroller. The second reason is its
motor controllers: Toshiba TA8080Ks.
The CheapBot- 14 has six outputs or six ways a
robot can react to the world around it. The first
four of the outputs are to the CheapBot’s two motor
controllers. The remaining two are its output ports:
Output 0 and Output 1. Both outputs have three pins
each: ground, + 5 volts, and a connection to the
PICAXE-14M. The outputs are receptacles that accept
three pin headers with 1/10th inch spacing. The
receptacle/header combination is easy to work with
and is inexpensive.
There are five inputs on the CheapBot- 14.
Again, that represents five ways the environment
can influence the robot. The inputs — called Input 0
through Input 4 — are also built like the two output
ports. Since they are constructed this way, it’s easy to
interface sensors to the CheapBot- 14 robot controller.
Motor and logic power are separate from each
other in order to prevent motor noise and current
draw from affecting the PICAXE. This also allows
different voltage levels to operate the logic and the
motors (I use six volts for each, but the motors could
run up to 16 volts). Logic and motor power, LED
power indicators, and the switches to control them
are attached to the controller through cables,
allowing them to be mounted to the robot in a
convenient location. Strain relief for each wire is
included in the design of the CheapBot, so there’s
very little chance the wires will break off with
normal use.
Theory of Operation
Even if a microcontroller can sense the world,
it can’t react until it has a way to control the
motions of the robot. The CheapBot- 14’s PICAXE
microcontroller sends two signals to each of its two
H-bridges to control the rotation of the robot’s two
motors. I really like the Toshiba motor drivers; they
were introduced to me by the good folks at Surplus
Gizmos. Go to their website and download the
datasheet for this motor driver (http://surplus
gizmos.com/datasheets/TA8080K_datasheet.pdf).
Up to one amp of current can be controlled with
the TA8080K.
Controlling the rotation of the motor lets the
robot travel forward and backward, turn left and
right, and stop. The two controlling signals to an
H-bridge are either +5V (a logic 1) or ground (a logic
0). A signal of 0 and 0 causes the TA8080K’s to stop
motor rotation and the motors to wind down. When
the signals to an H-Bridge are 1 and 1, the H-bridge
stops its motor from rotating by applying the brakes.
When the signals are 0 and 1, the motor rotates one
way and when the signals are reversed to 1 and 0,
the motor rotates in the opposite direction. If both
motors are commanded to rotate in the same
direction, the robot travels straight (either forward
or backward), and if the motors are set to spin in
opposite directions, the robot turns (either clockwise
or counter-clockwise) in one place.
The H-bridges each have their own 10 µF
capacitor to maintain a more constant motor voltage.
They’re needed because when the motors spin, they
can generate electrical noise. To prevent the noise
from interfering with the operation of the TA8080Ks,
the capacitors act as tiny batteries to push up the
voltage when it sags and (like discharged batteries)
to absorb extra current when the voltage spikes.
The LEDs in the CheapBot- 14 are power
indicators and each has its own current-limiting 330
ohm resistor. The only function of these LEDs is to
light up when the power switches for the motor and
logic are turned on.
The 22K ohm resistor next to the program
header limits the current flowing into the PICAXE- 14
while it’s being programmed by the PC. The 10K
resistor next to the programming header is a
pull-down resistor that ensures the PICAXE sees zero
volts when the PC is not sending a signal to it.
The LM2940 voltage regulator takes the
gradually decreasing voltage from the logic battery
pack and drops it to the constant five volts that the
PICAXE prefers. The regulator is low drop-out, so it
can continue to function
SERVO 06.2009
43