by CHRIS SAVAGE
GETTING CONTROL
WITH THE
Propeller
PART 4:
Propeller
Multi-Controller
This month, we wrap up our four part series by
covering practical use of PWM on the Propeller using
our multi-controller board. In last month’s article,
Kevin McCullough covered stepper motor control and made
schematics available on the project web page. These
schematics use the L293D Quad Half-H Driver IC which
provides bi-directional drive currents of up to 600 mA from
4.5V to 36V. We will use the L293D in this article for both
motor control and light dimming. This IC is included on the
Propeller™ Professional Development Board as well, so those
who have the PPDB can follow along even if they haven’t
built a multi-controller board.
Control Methods
Controlling the speed of a motor or dimming a light
can be done by varying the voltage going to the device.
More voltage and the motor goes faster or the light gets
brighter. Less voltage and the motor slows down or the
light gets dimmer. Using analog control is inefficient for this
because power is typically wasted while the driver (usually a
34 SERVO 12.2008
BJT or MOSFET) operates in its linear (or active) region
when not fully on or off. When this happens, the driver has
to supply necessary current while limiting the voltage on
the output. The power dissipated is wasted in the form of
heat which could also be harmful to the driver or other
nearby components, and often requires large heatsinks.
By using the driver as a switch, it is either on or off at any
given time. This reduces the voltage drop across the device and
therefore the amount of power dissipated as heat. In order
to control the speed of a motor or the brightness of a light,
we have to modulate the output to vary the power to the
load. PWM can accomplish this and reduce the total amount
of power to the load without the losses typical of resistive/
analog means. In the off state, the driver is not conducting any
current; in the on state, there is little voltage drop across it.
PWM Control
Using PWM, we will essentially modulate our signal at a
fixed period with a varying duty cycle. By varying the duty cycle,
we will be varying the ratio of on-time to off-time at a given