FIGURE 2. Pulse cycle time.
FIGURE 3. The three-part PCB.
FIGURE 4. Chassis face drilling guide.
58 SERVO 04.2010
has switches on the upper left and right corners labeled
“Flaps” and “Gear.” When you switch these on and off, the
gear and aux channel pulses from the receiver will jump
back and forth between a long and short pulse. You need
to find something similar to these switches on your
transmitter. (I’ll refer to these as the gear and aux from
To get the signal for the encoder, look at the back of
the switch. On the JR, one side was grounded and the
other flipped between zero and five volts, so I figured that
was the signal line. I tied this to a prop port via a 10K
resistor and found that it modulated the pulse length just
like the switch. Okay, let’s discuss the switch encoder.
Connecting the Switches
to the Encoder
The switch encoder is a very simple circuit and software
piece. It’s especially easy for a processor with the
capabilities of the Parallax Propeller. The reason I chose the
Prop for this was that it has the speed to make this work in
its SPIN language. (Besides, I knew I could always make it
work with the assembly language.) It’s also my processor of
choice these days; I’m comfortable with its design,
programming, and the forum is an incredible asset that
stays up all night long. The Propeller also has the ability to
generate an NTSC signal by adding four resistors; this
makes debugging a breeze.
So, we’ve hijacked two of the transmitter control
channels. One will be a data channel and one will be a
framing pulse which will allow the data channel to be
properly aligned at the other end. Now you need to decide
how long your data sequence will be. How many bits in a
group? For the switch panel and chassis shown here, there
is only room for seven switches so I chose a byte (or eight
bits). The software can toggle the extra bit on every other
frame as a stay-alive and error checking function. For
framing, a sync pulse is sent out on the gear channel 5
before the first bit of data. This lets the receiver/decoder
know when the start of a sequence of data bits is about to
occur. The switch encoder software counts the cycle
periods. Every time it sees ‘n’ periods, it toggles a software
shift register to send out a data bit on the aux channel.
The decoder at the receiver end watches the framing
channel 5. When it sees a high or long pulse, it captures
the next eight pulses on channel 6 as either long/high or
short/low. Because the bits can stretch over multiple cycles,
each bit is followed by a couple of zeros.
How Long is a Cycle?
To measure a cycle, simply hook your ‘scope up to an
output of the receiver. Measure the period of one channel.
In case you weren’t listening in your physics class, a period
runs from the beginning of one pulse to the beginning of
the next. In Figure 2, it is the time from the blue-dotted
vertical line on the left to the time of the red-dotted vertical
line on the right, or 22.1 µs. Figure 2 shows all six channels
but you only need to look at one. It is also important to
make sure your transmitter is ON when you make the
measurement. On a JR receiver, these pulses are all over the
place until it syncs to a transmitter.
Since I had a lot of extra capacity with the Propeller
and its 32 I/O lines, I broke out everything in the
transmitter circuit. Seven ports go to sense switch positions;
nine ports go to LEDs; two are designated for transmitter
outputs; two are used for the EEPROM; and (just for fun
and debugging) four are set up for an NTSC video output
For space considerations, the physical layout of the