PUTTING THE SPOTLIGHT ON BASIC STAMP PROJECTS, HINTS & TIPS
■ BY JON WILLIAMS
MORE SURPLUS SUCCESS
I MAY HAVE MENTIONED MY FRIEND BRIAN once or twice. Brian’s a great guy
— a super smart IT professional by day and a bring-down-the house DJ by
night. When I lived in Dallas, Brian was a tad jealous because I had Tanner
(geek heaven) within minutes of my home. So, I move back to Los Angeles a
couple years ago and no more Tanner for me (and I miss them). But, what do I
have? That’s right! All Electronics — another gate into geek heaven. Brian was
beside himself; what luck I have with my proximity to fantastic suppliers.
Both Tanner and All are great about stocking new products as well as a
boatload of interesting surplus. One of the cooler products that All carries —
and at a ridiculously low price — is the VEX Robotics Transmitter and Receiver
Add-on kit; brand new and in the box. You just can’t beat that.
Until you get home, that is, and find out that the
receiver in the box is not capable of [directly] driving
servos. What? You see, the little receiver box was, in
fact, designed to be interfaced with the VEX controller,
so it simply outputs a continuous stream of servo pulse
width data. Figure 1 shows what the output looks like
on a ‘scope.
The pulses are active-low, and each is preceded by
a framing pulse that is about 500 microseconds wide.
Notice that one of the pulses is very wide relative to the
others; nearly nine milliseconds. This is the sync pulse and
■ FIGURE 1. VEX PPM Stream.
by finding this, we can get the position data to the correct
servo. It turns out that using the PPM (pulse position
modulation) is pretty easy. After locating the sync pulse,
we simply wait for a high-going edge and turn on the
first servo. We leave this output on until the signal has
dropped and goes back high again; this is the signal
to move to the next servo. This process continues for
The VEX transmitter has two joysticks that give
complete analog control over channels one through four,
and two push buttons each for channels five and six.
With the last two channels, the servo pulse width will be
1.5 milliseconds (center) with neither button pressed. If
the top button is pressed, the servo output drops to 1.0
milliseconds; if the bottom button is pressed, the servo
output bumps up to 2.0 milliseconds. So while we can
control servos with channels five and six, these channels
are limited to three servo positions.
The circuit for converting the PPM stream to usable
servo outputs couldn’t be much simpler — and you can
see this in Figure 2. This is a very generic SX circuit with a
power supply, and connection for the receiver, and header
for the servos. There are two jumpers on the board: one
for selecting the servo power (+5V DC or Vin), and one
for setting the behavior of servo outputs five and six.
DECODING THE PPM STREAM
The first thing we need to do with the PPM stream is
locate the sync pulse. I measured this to be about 8. 9