Wednesday, July 16, 2014

How to Extract RC radio receiver pulse width data (all channels) with only ONE digital microcontroller pin (Part 1)

So you're running out of gpio ports on your microcontroller and you have an 8 channel receiver you'd like to use for your super cool Quadcopter project. What do you do?


There are several ways to go about this. The radio signal comes in through the antenna, passes through a series of low pass filters and low noise amplifiers, eventually reaching a series of flip flops that basically separate each of the pulses to their respective channels (with the help of a reference xtal oscillator).


PPM signal decomposition by internal Flip Flops

It's possible, and very easy to extract the signal right before it reaches these flip flops (PPM signal) by soldering a wire to the pin that contains the PPM signal, and simply parse the data yourself through code. The other way, which I will explain in more detail doesn't require soldering or opening your precious receiver and it's silly simple by using OR gates. Yes, remember OR gates from your logic design class in college? I sure do ^_^


Just connect the channel outputs of your RC receiver to a simple OR gate circuit (shown below) in order to recreate the PPM signal. Furthermore, it is very easy to cascade multiple OR gate ICs together if your application requires more than the 5 channels shown below.

Circuit diagram with single Quad OR gate IC

The PPM signal line (above) should be connected to any digital pin of your microcontroller, which you can then parse via Pin Change Interrupts in your software. I will explain the software part on a different post since it's rather long.

No comments:

Post a Comment