[Autopilot-website] CVS: htdocs pcm.html,NONE,1.1
Status: Alpha
Brought to you by:
tramm
From: Trammell H. <tr...@us...> - 2003-02-03 18:53:52
|
Update of /cvsroot/autopilot/htdocs In directory sc8-pr-cvs1:/tmp/cvs-serv11097 Added Files: pcm.html Log Message: Started writeup on the PCM decoding --- NEW FILE: pcm.html --- <h1>PCM vs PPM</h1> <p> [ Image of PPM signal ] The PPM radio protocol is a very simple serialization of the servo PWM commands, separated by a 10 ms or longer syncronization pulse. In order to decode it, simply wait for the sync pulse then clock the times between the falling edges until the next sync pulse. Code to do this is in <a href="http://autopilot.sourceforge.net/cgi-bin/source?onboard/rev2/ppm.h">onboard/rev2/ppm.h</a>. <p> However, PPM fails very badly due to local RF noise such as spark plugs or turbine ECUs. These can introduce spikes that cause servo jitter or even erroneous servo commands. At long ranges the analog pulse widths are less accurate as well, leading to jitter. The PPM radio receivers typically have no onboard computers and rely totally on the transmitter to generate the servo pulses. If you lose the transmitter, the servos stop holding their positions. For all these reasons, a better protocol is required. <p> [ Image of PCM signal ] PCM replaces the pulse widths with a serial bit stream that encodes the servo commands as a binary value. An onboard microcontroller reads the bit stream and generates its own servo commands from it. This MCU can hold the servos in position if the transmitter is briefly out of contact with the receiver and even set the servos into a preprogrammed "fail safe" position if the transmitter is not heard from again after some timeout period. <p> The actual encodings are considered trade secrets of each manufacturer and they are not compatible across different brands. We have reverse engineered the Futaba PCM1024 protocol and present our analysis here. This was done in a "clean room" fashion using a Futaba 8U transmitter and a modified HiTec RCD3500 receiver to extract the bit stream. The receiver is actually a PPM unit, but the RF front end is the same as the PCM model. Screen shots are of the Tek TDS2012 scope used to analyze the bit stream. <p> The PCM frame consists of four fields, each 28 ms long. Each field starts with a 2.7 ms sync pulse of either high or low polarity, follwed either six or eight bytes of frame ID, then by four data packets of 40 bits each. Each of these data packets consists of four 10 bit words that are encoded with a 6B10B system, to produce 3 bytes of actual data per packet, 12 bytes per field and 48 bytes per frame. <p> The bit clock is 150 us. There does not appear to be any syncronization mechanism other than the accuracy of the onboard clock. Bits are sampled roughly 25 us after a transition and there never appears to be a single bit alone (minimum pulse width is 200 us). |