PHOTO 9. Revision 4 receiver/decoder board.
code comments.) That way, you can calculate holding if you
leave a servo to hold something in a certain position. You
can also determine when peak loads might be happening
and reorder your events to reduce battery drain.
There is a 12-bit, eight channel ADC on the board. This
reads 0 to 3. 3 volts, or the exact supply level of your
voltage regulator on every channel. It is hard-wired to
sample the power level inputs from the receiver and video
power source. It’s designed primarily to watch battery
levels. It also watches the output voltage on the servo
power rail. All inputs to the A-to-D channels are routed
through voltage dividers on the board. The base resistors
are all 3.3K and the sample resistors can be adjusted to
accommodate your desired voltage range. (That’s why
several of the resistor values are question marks in the
In the code comments, I’ve noted some of the
common resistor values for voltage ranges in the code. To
make it simple, the base resistor is 3.3K to match the
supply 3. 33 volt level. I’ve also provided the divisors for the
12-bit sample for each value in the code. The remaining
inputs are good for sampling battery voltages, sensor
outputs, or pot positions.
This implementation of the ADC is not the optimum.
There is noise on the power supply and analog reference
line. In the ADC1285022 datasheet, there is a better noise
canceling arrangement which would make for a quieter
implementation and take better advantage of the 12-bit
resolution. Due to board space restrictions, I decided to just
deal with the noise by sacrificing some resolution and
62 SERVO 04.2010
On the receiver/decoder side, the software is a bit
more complex, but takes advantage of the multi-core aspect
of the Propeller. The frame and data channel (aux and gear)
are routed into a cog running SPIN code which builds and
returns a byte representing the switch positions on the
transmitter. The four remaining receiver channels are routed
into a cog running a SPIN program available on the Parallax
object exchange ( http://obex.parallax.com) by David C.
Receiver/Decoder Parts List
Legend Description Digi-Key Part Numbers
C5-C7 1 µF 511-1453-1-ND
C8 10 nF
C9-C12 1 µF 511-1453-1-ND
C12 0.1 µF
D2 Red Green LED
D3 PWR LED
M2 AT24C512 EEPROM
R45 1.000 1W
R50-65 10K P10KACT-ND
Reg2 3.3V regulator
Reg3 5V regulator
Reg4 12V regulator
U2 Propeller processor
X2 5 MHz
Gregory. This returns the width of the signals in
microseconds for each channel. A third cog is used to run
my assembly routine which provides the PWM signals to the
16 servo outputs.
With these cogs running, the main program has the
numerical input data from the four transmitter joysticks and
the switch position information. It can manipulate and
route that joystick data to any or all of 16 different outputs.
This can be a lot of fun. Servos can be adjusted and held in
a position while a control is shifted to another servo. Servos
can be ganged or slaved to other inputs, or switched from
autopilot to manual control modes. The AV switching
software is about as simple as it gets and is handled as a
single PUBlic routine in the main program. Send it a camera
number between 0 and 3, and it sets the bits accordingly.
The RG object is actually used on both the receiver and
transmitter sides to drive the red-green status indicator LED.
Finally, a cog is used to drive the NTSC video output.
On the decoder side, this is very useful as you can watch
values change and see exactly what you are working with.
In the downloadable code, I have provided some well
formatted screens that will help you set up your software.