The land-based portion of the control system,
consisting of battery box (with solar charging
controller), Vex controllers, and tether interface
with video and audio jacks.
current flowing through it, depending on the
motor direction. If either comparator detects an
overcurrent condition, it pulls the wired-OR
FAULT signal low which tells the controller to
turn off the current to the motor in question
until it drops to a safe level.
Each comparator input has a low-pass filter
to measure average current. The time constant
is three PWM cycles. This ensures that the
average current of the motor is being
measured, rather than any switching transients.
The controller is implemented in a complex
programmable logic device (CPLD). This device was chosen
because it can be configured to perform multiple tasks
simultaneously. A microcontroller executes only one
program at a time, so it’s very difficult to write software to
decode a PWM input while simultaneously generating four
A CPLD, on the other hand, can easily
contain four motor control circuits, a couple
servo output circuits, an input PWM capture
module, and whatever else is needed. Since it
doesn’t execute a program, all these modules
are active at all times.
The Xilinx XPLA3 series was chosen due
to the author’s familiarity with this device.
The controller CPLD contents are described in
the following section. The source code for
the CPLD is written in VHDL — a hardware
description language. It isn’t a program to be
executed line by line, but rather it is a
functional description of Boolean logic
implemented in configurable hardware.
The VHDL source code is available at the
ESC4 website listed in the sidebar.
The Vex transmitter sends a six-channel
pulse train with seven sequential pulses
including a sync pulse, four motor speed
pulses, and two on/off switch pulses. A 1.1 ms
long pulse signals full reverse, a 1.5 ms pulse is zero
motion, and a 1.9 ms pulse is full forward. The sync pulse
is 9 ms long. The above pulse times include the 400 µS
SERVO 02.2010 55
The PWM current-sharing technique. Each motor uses one
eight microsecond time slot. The total supply current never
exceeds that required for one motor.