Navio: PPM to PWM on Raspberry Pi

3689603892?profile=original

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!)

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

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

  • gotta love those saleae logic analyzers!

This reply was deleted.