by DAVID CARRIER
GETTING CONTROL
WITH THE
Propeller
PART 2:
Controlling Servos
When designing a product that will sell millions of
units, every cent counts, so engineers will often
use very creative methods to program a single
microcontroller to handle multiple tasks. These tricks can be
difficult to comprehend, let alone implement. For one-time
projects — especially for hobbyists — programming a second
inexpensive microcontroller to perform the task achieves the
same results but requires significantly less time. To simplify
programming even more, many manufacturers sell
controller boards based on microcontrollers that are preprogrammed
to perform a single task. Even
though the cost of creating an
entire circuit board is much higher
than the cost of an extra microcontroller, these boards are quicker
to set up, are reusable for other
projects, and more than pay for
themselves in saved time. If multiple controller boards are needed
for a single project though, the
40 SERVO 10.2008
costs really do add up, so the best option would be to have
one board that performs multiple functions.
Controlling a Servo
In last month’s article, Chris Savage discussed the
hardware design for the multipurpose controller board
shown in Figure 1. The board, based on the Parallax
Propeller™ chip, will perform the functions of an R/C
servo controller, a stepper motor
controller, and a PWM controller.
All three motor control signals have
specific timing needs, so with a
traditional interrupt-based microcontroller it would be difficult to get
the timing correct. Because there
are eight processors — or cogs — in
the Propeller, these tasks can easily
FIGURE 1. The Propeller
multi-controller board, built by
Chris Savage last month.