Navio: PPM to PWM on Raspberry Pi

To be used in autopilot applications Navio needs to decode RC input. Measuring each PWM channel requires multiple connectors and plenty of wires. PPM sum signal combines all PWMs from the receiver in one sequence, which could be transferred over single wire.

Most modern receivers output PPM, but if you have an older RC gear with only PWM output an encoder can be used. For the S.Bus receivers we are preparing a separate driver, however a S.Bus to PPM converter exists.

In case you want to run the code on Raspberry Pi without Navio please note, GPIOs on Raspberry Pi are not 5V tolerant. A divider is required to lower the voltage of the signal.

We use pigpio library that is capable of sampling GPIO with 1 microsecond resolution over the DMA. The application makes time marks of all edges both rising and falling and measures the delta time between them. If that time is the size of a sync pause, then it is the start of the cycle. After the start of the cycle it measures pulse lengths and stores them.

The acquired PWM values can be used in an application or transferred to the Navio’s onboard PWM generator as it is shown in the video.

PPM decoder GitHub

Navio Indiegogo campaign(Only 6 days left!)

Views: 464

Comment by Mike Downey on July 2, 2014 at 1:35pm

gotta love those saleae logic analyzers!

Comment by Emlid on July 2, 2014 at 2:36pm

Mike, we do love them - they are very handy and easy to use.

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2014   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service