PPM ---> Channel Levels

Satiagraha

New Member
Does anybody know how to convert a PPM signal (like the one sent over a multi-channel RF Tx/Rx) to the individual channel data?

It's not modulated on the RF frequency, that was just an example of the PPM signal shape :p It's really at a frame of about 19 milliseconds.




Edited by - Satiagraha on 29/03/2007 00:28:55
 

BeanieBots

Moderator
There's tons available via Google.
http://www.aerodesign.de/peter/2000/PCM/PCM_PPM_eng.html#Anker144123
explians how/what it is.
 

Satiagraha

New Member
Well, I was refering to the actually decoding of the PPM pulse form into separate pulse channels. In other words, the logic of breaking down the pulses and separating them into individual channels or outputs. I was thinking that perhaps someone had perhaps some sample code or electrical schematic.

All I find is an explanation of what PPM signals look like, and not how to interpret them into separate channels. (For example, the website referenced has a logic box "PPM oder PCM Dekodierung", or "PPM or PCM decoding" and doesn't actually describe the process)

Edited by - Satiagraha on 01/04/2007 03:00:50
 

Michael 2727

Senior Member
Taken from the link above.
Paragraph under the first block diagram -

< of the 35 Mhz-HF-carrier (in this example). The channels have a 10kHz spacing, e.g. channel 68 with a nominal frequency f = 35,080 MHz uses a band from 35,076-35,084. Channel 69 again from 35,086-35,094. Between channels there is a 2 kHz Buffer. The transmitter in this case is a binary (2-state) FSK-transmitter (Frequency Shift Keying), meaning it only sends two frequencies, above (f+b), and below (f-b) the channel center. This means the modulation hub, 2*b, is about 3 kHz. Thus the demodulator in the receiver only has to choose between those 2 frequencies. >

I'm not into RF but it looks as if you may need dedicated decoder or chip for the job.
 
You might want to look at:
http://homepages.paradise.net.nz/bhabbott/decoder.html

http://homepages.paradise.net.nz/bhabbott/decoder/rxdec6.asm
 

BeanieBots

Moderator
Well, the link I gave shows the waveform and how it encoded. That is much clearer than any amount of text typed here could ever be. The clue is in the acronym PPM (pulse position modulation).
The frame will start with a pulse that can be distinguished from data by either being too short or too long to be a valid data pulse.
Susequent pulses are then data pulses.
It REALLY IS that simple.
Use pulsin to detect the frame start, then use pulsin to read the data pulses.
You can then either count the data pulses to see if you have reached the end of the frame or just use the pulse width.
Have a look on a 'scope to see the waveform yourself.
For simple RC gear, there are two common standards of PPM. PPM7 and PPM9. PPM7 only sends 7 pulses per frame and PPM9 sends 9.
 

Wrenow

Senior Member
What BB said. Just set a short loop test for signal on your input pin - if signal during the loop, don't start decoding sequece, repeat until you hit the sync pulse/pause.

There is some BASIC code that illustrates this for the SX chip here: http://forums.parallax.com/forums/default.aspx?f=7&m=175498
(he is using it to decode the Vex Robotics RX pulse stream, which is a standard Futaba, neg shift, I believe).

Depending on your application, might be easier/cheaper to just use an inexpensive RX with the decoder built in and just read the channels with pulsins sequentially. Seems to work fine for 2-3 channels at standard (4mhz) speeds. For 6 channels, you are running into timing constraints for doing the maths and outputs, as you have to get it all done in the sync pause.

6 channels be done this way and manipulated with an SX chip (see the Crawler code on the Parallax site), but it is a lot faster.

I am currently working on decoding 3 channels with an 08M (on the Servo controller board) to get information to change or pass through the signal going to one of the 3. Works pretty well, but the first pulsin is a little flakey yet. You do need to pick up the pulses in order doing it this way, or you will be getting every other pulse streams.

Oh. Another thing. Micron in England makes decoder boards with DSP for under 7 quid. just built one up, but haven't tested it with my Vex RX yet. Nice little board - 2 flavours.

Hopefully that made sense.

Wreno

Edited by - Wrenow on 01/04/2007 14:41:07
 

Satiagraha

New Member
Wow, beautiful. These are exactly the kinds of things I was looking for!

Thanks everyone, this is immensely helpful!
 
Top