Vex Radio Decoder

This is a PPM signal splitter for use with the VEX radio transmitter/receiver kit sold at All Electronics

For $30 at All Electronics, you can buy a 6 channel radio transmitter and receiver. The transmitter is excellent for $30, trim, scaling, mixing are all programmable on the transmitter itself and it stores several configurations. The receiver only has one output pin, which outputs a PPM signal which needs to be split into individual channels in order to be able to control servos.

If you put the receiver right side up and with the socket facing you, the pin on the far left is the Vdd pin, connect this to a regulated 5 volt power supply, the middle left pin is the PPM output pin (it is open collector so a pull up resistor is needed), and the middle right pin is the Vss pin, connect this to your circuit's ground, the far right pin is not connected to anything inside the receiver.

The 6 channel PPM signal has 7 periods of high and low pulses, each of these pulses all start with a high period of 500 microseconds, and a low period of varying lengths. The first low period is a sync pulse with a fixed low period of about 7 milliseconds, this exceptionally long low period indicates the next rising edge of the PPM signal will indicate the pulse start for channel 1. The period from the rising edge to rising edge of the a pulse is equal to the period of the high pulse that should be sent to the servo.

Here's the logic analyzer session file of the decoder in action. You will need to use the software provided for Logic (use version 1.0.28) to open and view this file. All the timing data will then be available for you to measure. The start of the recording is triggered by the transmitter being powered on.


Screenshot of the logic analyzer session

Source Code and Schematic (click on view raw file)

I've recently rewrote the code from scratch, this is actually version 2. This new version eliminates any timing errors because everything is handled by the 16 bit timer's input capture feature. Timer overflows help determine whether or not the transmitter is missing, and if it is missing, the port is disabled.

The serial port can be used to retrieve the pulse width of the channels. The baud rate is defined when you compile the code. First send the channel number, then wait for a three byte reply, the first byte will be 0x01 if the data is good, or 0x00 if the transmitter is missing, the next two bytes is the width of the channel pulse as a 16 bit integer, most significant byte being sent first. Pulse width is given in clock cycles and thus it varies based on the clock frequency you choose to use.