PWM and PPM Difference and Conversion

Introduction to PPM and PWM

PWM and PPM are two of the radio receiver protocols used to transfer data from RX to the flight controllers. PWM stands for Pulse Width Modulation and PPM stands for Pulse Position Modulation. PWM is a technique used to relay data in the form of a varying pulse width. In PPM (Pulse Position Modulation) the analogue sample values determine the position of a narrow pulse relative to the clocking time.

RC Devices that use PWM Pulses:

  • Servos
  • Electronic Speed Controllers
  • R/C receivers
  • Data loggers
  • Autopilot/Stabilization systems
  • Servo Controller

RC Devices that use PPM Pulses:

  • R/C transmitters
  • R/C receivers
  • Autopilot/Stabilization systems
  • PCTx

pwm-ppm-signal-example

Pulse Width Modulation

In PWM each RC channel has it’s own cable. If we want 9 channels we must wrie all 9 cables along with the power and ground. The value of each channel is represented as a 1 millisecond (ms) to 2ms “ON” signal and this signal repeats (or updates) every 20 milliseconds. It goes high for the 1-2ms, then it falls to Low. The length of time it is high is the value for that channel. We see this in the GUI directly as 1000-2000, so we are seeing the raw ON time in microseconds.

pwm-signal-ppm

The whole frame is 20ms long, the important part of the pulse is the time the pulse is on; 1-2ms. Although the time between pulses is not as important it does play an important role. Usually keeping the time between pulses around 20ms is best. If the delay is longer, a servo for example will lose holding power. A pulse can be generated much faster but 20ms is best for most situations.

Pulse Position Modulation (PPM)

Think of PPM as several PWM signals lined up back to back (not really, but that’s what it does). In PPM, the same signalling is used but each channel is sent successively, then a delay, then it loops back to channel 1.

ppm-signal-pwm

In normal PWM there are 50 updates sent per second (50Hz) which means each update takes 20 milliseconds. So if each channel takes up to 2ms, then we can do 10 channels within that 20ms before which we need to loop back to ch1. So we don’t even have a downside of multiplexing all the channels down to 1 wire and yet we have less wiring, and in our case 2 extra AUX channels! If you can do PPM, it’s better!

However PPM is not the most popular because many radios don’t support PPM. If you don’t have a PPM transmitter and receiver you can use a little device that converts between regular PWM and PPM. The MultiWii supports PPM input. Just define the appropriate option SERIAL_SUM_PPM in config.h and wire the PPM signal into the Throttle channel. The rest of the transmitter inputs like roll, pitch, and yaw are now free for other things. It is also possible to obtain PPM from PWM by using a mono-stable multivibrator circuit.

Conversion example

Here is a DIY project that uses Arduino to convert PWM into PPM signal.

10 thoughts on “PWM and PPM Difference and Conversion

  1. Hybris

    Actually, it IS correct that PPM is a series of PWM lined up back to back, they are just inverted too. Actually, that is how transmitters modulated the RF back in the day: They digitized each channel into the length of a space each, one at a time, with a short pulse in between. To signal the start of the pulse train, a longer pulse preceded the first space. This was also the very signal sent between transmitters when you used a trainer cable. In the receiver end, the same signal was available right after the super heterodyne receiver, before it was fed into the last chip, which inverted the signal and output each of the pulses on a different pin. For the electronics buffs, the last chip was a decade counter, being reset by an RC filter tuned to the length of the leading pulse.

    Reply
  2. roger

    “In normal PWM there are 50 updates sent per second (50Hz) which means each update takes 20 milliseconds. So if each channel takes up to 2ms, then we can do 10 channels within that 20ms before which we need to loop back to ch1.”

    I find this wording slightly confusing… I understand it like this: “In normal PWM there are 50 updates sent per second (50Hz) which means each update takes 20 milliseconds. With PPM, each an update for a channel takes 2 ms, so we can do 10 channels in that 20ms period, before looping back to channel 1.

    Additionally you say “channel is sent successively, then a delay,”… so how does that delay fit in this 20ms period? There must be some time reserved, so you wouldn’t be able anymore to update 10 channels of 2 ms ?

    Reply
  3. Bob

    Thanks for this, its just what I wanted to know, and for your analogy of PPM being like a train of PWM is not confusing at all. I know its not an exact analogy but it does allow someone who understands PWM to visualise the difference.

    Reply
  4. Brian D

    Hi Oscar,

    Sorry, but your comment that “PPM basically is several PWM signals lined up back to back” is technically incorrect. PPM and PWM are two different ways of encoding information into a data stream. I am not sure why you keep repeating this error. You seem to understand what PPM and PWM are. One varies the width of the pulse (PWM), and one varies the timing. One is not a series of the other.

    Reply
    1. Donal

      Actually, ‘pulses’ are simply another way of expressing timing. The “back-to-back” comment is correct: the lengths of the PPM pulses are proportional to what they would be in PWM, expressed in a different frequency domain.

      Reply
  5. Justin

    Hi Oscar
    Thanks for this write up. Trying to figure out all this stuff as I’m tinkering with R/C and Arduino/IOIO applications.

    Reply
  6. DP2Web

    This is great information, But i would be complete if you have added how can we convert PPM to PWM and vica versa.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Are you Robot? *

I only check blog comments once or twice a week, if you want a quick reply you can post your question on this forum IntoFPV.com... You might get a faster response from me there (multirotor related only).