PDA

View Full Version : Discussion Simple PPM Question


melka
Jul 29, 2008, 02:25 AM
Hi there
I'm new to this board, so I hope I don't post an already answered question, even though my search didn't return any result...

I've designed a simple PPM Encoder circuit using a 4017 and a 555, like a lot of people ^^
By what I read on the PPM "protocol", each control pulse for each servo must be between 1 and 2 ms HIGH long, with 1.5ms being the middle position of the servo. Between each servo control pulse, I have a really small low pulse (around 35us I think). A 2ms minimum LOW pulse is used to tell the receiver that all the data has been sent and a new frame is starting.
Usually, a frame is 20ms long, so 20-2=18 > 9 servos can be controlled.

My question is about this frame duration... Let's say I have 4 channels on my system and that I turn all my servos to the left, so I'll have 4x1ms HIGH pulses.
First thing : Do I have to add a 1ms LOW after each pulse so that each servo control pulse is 2ms long ?
Seconde thing : Does my frame must be 20ms long ? In this case, I'll have to add a 20-(2*nb of servos)ms LOW pulse to achieve it.

Can't I just go with control pulse HIGH / small LOW pulse / ..... / 2ms Synchro LOW pulse ?

Thanks a lot of every infos ^^

AndyOne
Jul 29, 2008, 04:47 AM
Melka,

I can't see any reason why a variable frame rate would be a problem for most receivers that use a dumb decoder circuit but some use DSP which might have a problem with this as they use certain characteristics of the frame to recognise the controlling transmitter and reject others. Normally the protocol for PPM is to have a 20ms frame and a maximum of 8 channels making 8 x 2ms = 16 ms the maximum length of all the control pulses leaving 4ms to reset the decoder. I would say 2ms reset pulse may not be long enough. The low going pulse length is not particularly critical because the control pulse length is measured from the beginning of one to the beginning of the next not beginning to end of the same pulse. I've measured the low going pulse at 150us on commercial gear.

Andy.

phil_g
Jul 29, 2008, 07:16 AM
Hi, theres a bit of confusion here between 'servo pulses' and 'encoder pulses'.
You're right, each servo expects a 1-2ms pulse every 20ms or so (not critical) BUT
the encoder does not directly output 1-2ms pulses. The encoder output is a stream of narrow (0.15ms - 0.3ms) pulses which are spaced at 1-2ms. The encoder output can sit 'high' with .3ms pulses to ground, or can sit at ground with .3ms pulses to vcc.
When applied to the varactor in the tx oscillator this produces negative or positive frequency shift (no more than a .3ms 'blip') which is your FM modulation. Some manufacturers use pos shift, some use neg.
The conversion from these short pulses to the 1-2ms servo pulse is done in the rx decoder, which times from the edge of each pulse to the edge of the next one.
Variable frame rate (ie all channels at 1ms + sync vs all at 2ms + sync) is not a problem, in fact its unavoidable in some encoders.
Hope this helps
Phil

melka
Jul 29, 2008, 04:46 PM
Thanks to you ^^
Andy_one : As I will also build my Rx circuit, I guess that the variable frame rate is not a problem either, as long as I have a long enough pulse to separate frames. I mean it won't be the "standard" RC circuit but if it works... ^^
Phil_g : So I guess my circuit is working fine. I have narrow LOW pulses (around 100us) spaced by 1 to 2ms HIGH, and a 4ms HIGH at the end of the frame. I just have to tweak the pots and components values to achieve the best timing possible.

Now to the transmission circuit ^^

phil_g
Jul 29, 2008, 04:57 PM
That sounds fine, 100us is a little on the low side, but should be ok.
4ms for sync is pretty short too, mine are nearer 10ms.
Here's my first homebrew kit:
http://www.rcuniverse.com/forum/fb.asp?m=7304771
Cheers
Phil

melka
Jul 29, 2008, 05:22 PM
Nice ^^
For the time being, I'm working with electronic simulation under isis/spice, I'll go breadboarding / soldering as soon as I find the time to buy the components and I have my soundcard oscilloscope ready.
Any advice about how I should build the transmission circuit ? (I'm a real newbie in the RC electronic field ^^)

phil_g
Jul 29, 2008, 08:03 PM
I'd suggest looking at magazine DIY articles, RCM&E did a 35 mhz FM set some years ago, also a UK firm called Micron do kits & parts...
http://www.micronradiocontrol.co.uk/
You'll find that the RF aspect is far more complex than the logic!
Cheers
Phil