Radio Control Receivers and PPM Modulation

Radio Control Receivers and PPM Modulation

Radio Control systems control servos, speed controllers etc by means of a pulse which is varied in duration between 1ms and 2ms depending on the tranmitter control stick position. A 1.5ms pulse width would mean the transmitter stick is central and consequently the servo would be in its center position. The pulses are sent at a rate of 50z, and there is one pulse per channel.

The pulses are sent and received one after the other with no gaps between channels, so the pulses (if combined) would look like the following

Radio Control PPM Pulses

If we are creating a robot or other other radio controlled system, we want to intercept these pulse from the receiver, perform some logic functions within our microcontroller based on them and then recreate servo pulses for the control of external servo's and speed controllers.

We can use a microcontrollers built in comparator module to time the duration of each pulse. If your Radio Control transmitter/receiver has an odd number of channels, then all the channels can be individually timed with just one comparator input in your microcontroller. If however, your transmitter/receiver has an even number of channels you may have to use 2 comparators.

If we combine all of the odd channels we get a waveform similar to the one below

Radio Control PPM Pulses Odd Channels

We can use the comparator module to time the duration between start and end of channel 1 to give a value for channel 1. We can also time the duration between the end of channel 1 and the start of channel 3 to give the value for channel 2. The other channels are decoded in a similar manner. So for the even channels we are effectively measuring the gap between odd pulses. This saves us having to use another comparator module on our microcontroller. After all, we may need it for something else.

The problem with an even number of channels is that there is no way to measure the duration of the last even channel as it doesn't appear in the waveform. Imagine the transmitter/receiver above is an 8 channel unit. So, for transmitter/receivers that have an even number of channels we would need to feed the odd channels into one comparator module and the even channels into another comparator channel. In this case we can simply measure the start and end of each pulse.

Combining the Channels

Combining the channels is as simple as feeding each one through a diode and combining the outputs. An extra transistor is shown here. which serves to protect our microcontroller from high input voltages but also allows us to reduce the signal amplitude down to 3.3V if we are running our microcontroller at lower voltages. Note that this will invert our waveform and this will need to be accounted for in our code.

Combining Radio Control PPM Pulses