PHOTO 7 and PHOTO 8. Configuration screens.
transmitter. One 1/4” x 20 bolt 1” long attaches the
encoder to the top of the square bar. Coming out of the
side of the case, it provides a rotational adjustment to get it
just right.
The Transmitter Software
The encoder software is incredibly simple (and well
commented in the SPIN code). It counts the clock cycles.
On every eighth pulse, it sends a framing marker and sets
up the next data bit. Each data bit and framing marker is
held in place for at least one complete cycle. Switch
positions and LED status are updated at the beginning of
each bit cycle. This all resides in one cog. The NTSC
generation happens in another cog but unless a video
display is added to the transmitter above the switches,
there is not a lot of use for this beyond debugging. Since
the encoder is so incredibly simple, there is not much to
display. In the code, there are remarks to point the switches
and LEDs to the ports you have chosen.
The red-green LED driver is fun too. It’s off if you send
it a zero; a number between one and 255 will give you a
combination of red and green — one being
all green and 255 being all red. All of the
code is available in the download package
on the SERVO website.
limited with 10K resistors. The output level of the signals
will vary with the power supply of the receiver, but they do
go to zero when low. The resistors compensate for the
upper voltage variance.
The audio and video switching section is facilitated by a
SN74CB3Q3253 2 x 4 to one analog multiplexor. One of
four separate A/V inputs can be selected and routed to a
transmitter or the tap connector. Channel 0 is hard-wired to
the audio and video outputs of the Propeller and is the
default position of the selector. Channel selection is
accomplished electronically by the bit configuration of Av0
and Av1.
The servo output section of the board is pretty cool.
Two 74HC595 serial-in, parallel-out shift registers have been
cascaded into 16 outputs. These outputs drive the signal
pins on 16 servo connectors. (It takes five Propeller ports
and a little PASM code to create 16 PWM output channels.)
You’ll note that the power rail for the servo connections is
routed from the receiver through a one ohm, five watt
resistor, R45. This provides a voltage difference between
the supply and the power rail which facilitates a current
calculation for the servos. (The math is noted in the SPIN
The Receiver Circuit
The receiver side is more complicated
than the transmitter side because it handles
more processing and switching. It is divided
into functional groups in the schematics
but it all resides on one board. Functionally,
there is the EEPROM and CPU power, the
PWM receiver inputs section, the servo
output section, the audio/video switching
and 12V power, an NTSC signal generator
DAC, an audio output, an eight-channel
ADC, and finally, some indicator lights for
power and activity. The block diagram
rounds all of this up at a higher level. The
EEPROM and crystal circuits are copied
directly from the Propeller demo board.
The PWM receiver inputs are all current-
SCHEMATIC 5.
A-to-D
converter
section.
SERVO 04.2010 61