The RC Transmission!

This text explains what kind of signals are sent from the TX to the RX of an "FM" radio control set, how they are decoded, and ideas about producing it yourself. I had posted this to the comp.robotics.misc newsgroup.

Baseband Signal?!

A radio control set may have many channels, but the (radio) link between the TX and the RX can be thought of as a single pipe (serial link). Therefore, the multiple channel information of stick positions of a TX need to be coded into a single stream of information so that they can be sent to the RX.

In FM sets, the control sticks are connected to potentiometers which convert stick positions into voltages. There is a dedicated IC that reads these voltages, and produces the coded signal. This coded signal is called a "baseband signal". The baseband signal then goes into the RF module (radio frequency module), where it is modulated into a higher frequency. The reason for modulation is to improve efficiency of the transmission; the baseband signal is low frequency, so large antennas are required to transmit it (antennas that are kilometers long...). The RF modulation is of course FM. (Note that even in PCM sets (Pulse Code Modulation), the RF modulation is still FM; it is the baseband signal that is PCM. In AM sets, the RF modulation is AM (Amplitude Modulation), but the baseband signal is the same as FM.)

The baseband signal in my Futaba Challenger FM set (and any standard FM set for that matter), is a series of pulses of fixed duration. The stick position information is coded in the delay time between the pulses. The signal for a 5 channel set looks like this: (disregard the "RX" part for the time being)

TX:
    _     _     _    _   _    _         _     _     _    _   _
 __| |___| |___| |__| |_| |__| |_______| |___| |___| |__| |_| |......

       1     2    3    4   5    Framing    1     2    3    4   ....
       

RX:
    _____                               _____
1__|     |_____________________________|     |__________________

          _____                               _____
2________|     |_____________________________|     |____________

                ____                                ____
3______________|    |______________________________|    |________


ETC...

There are a total of 6 pulses. The first 5 delay times (labeled 1~5)in between these, correspond to the positions of sticks 1~5. The 6th delay is for synchronization. It is called a framing pause, and has a fixed duration, much longer than the others. The RX is designed such that if it does not receive pulses for longer than a certain length of time (which is a bit less than the framing pause), it resets and the first pulse received thereafter is assigned to servo No1. The signal between two framing pauses is called a frame. It should help to view the real signal with an oscilloscope if you have access.

On the RX side, the RF signal is first demodulated to get the baseband signal. At that point, the signal is identical to that shown as "TX" above. Then, this signal is divided and sent to each servo in turn, as shown above as "RX", "1","2" etc. (This division can be done using a simple counter, with the signal labeled "TX" attached to the clock input. A retriggerable monostable multivibrator(RMM) is connected to the reset pin. The pulses keep the RMM from resetting the counter while activating consecutive outputs. But the RMM times out at the framing pause and resets the counter.) The number of outputs that this counter has, determines the number of channels of a RX. However, it is expensive to manufacture a different counter for each type of RX, so even if the RX says "2 Channel", it is usually equipped with a counter for 7 or more channels. (My Futaba 5Ch RX was "converted" to 7Ch simply by removing the plastic caps that covered the slots for channels 6 and 7! It is similarly easy to increase the number of channels in old radios that use the NE5044 and NE5045 chipset.) You might want to try the same on your own radio if you like.

For information about how servos use the signals labeled "RX", see the servo basics page.

How Do I Produce These Signals?

It is quite easy to produce the baseband signal using some kind of counter-timer chip, and interrupts (see my home page and walking robot Gokiburi; it drives 12 RC servos off a Z80, with very little overhead. The driver program runs in the background). It is also possible to produce the baseband signal from a PC, and inject it directly into the RF module of the TX, e.g. from the trainer socket(Hurrah! I can control my RC airplane from my PC!). Note that the PC was not designed to be a real-time control computer; the timer interrupt and other background processes of most PC operating systems prevent a simple counting loop to be precise enough for servo control. Also, the dynamics of an RC airplane is so complicated that the servo control problem will be of no significant importance compared to the rest of the development work involved (this is not to discourage people, but to save the lives of some poor airplanes!).

What is more interesting about the information above is that it is a simple way to produce pulses to drive the servos directly too... To drive many servos, simply connect each servo to a pin of a parallel I/O port. Then use this algorithm:

The outputs will resemble those labeled "RX" above. You can control as many servos as you like; simply make sure that one frame is less than about 30ms in the worst case (when all servos are commanded to the 2ms position). I have successfully used 12 servos in this fashion, and had no timing problems.

Of course connecting one I/O pin to one servo is too wasteful in terms of I/O pins, since only a single one of them is in use at any time. Another way to connect servos to your microcontroller is to hang them off from the outputs of a decade counter as explained above(something like 4017), connect the clock and reset lines of the counter to the microcomputer. Now you can:

This is a simple modification and saves I/O pins in many applications. Note that binary counters won't work, and decade counters don't come with more than 10 outputs (strangely enough!)...

One frequent question is whether the frame length should be fixed or not. Some people add a dummy pause to each frame, so that it is exactly 30ms. This is not necessary, since in a real TX, the frame length is not fixed, so the OFF time of each servo varies from frame to frame. Therefore, there is no need to use a dummy wait pause in a microprocesor application either.

Another control method that many people try to use and get really frustrated is this: (each servo is connected to an output pin)

The problem with this approach is that the microprocessor gets too busy when switching off the pulses, and might not be fast enough for the job. However, the rest of the time, it is idling. Also, it is necessary to arrange the timing to take care of pulses that are exactly the same length etc. Not very efficient as you can see... I consider this "the wrong approach"! The only advantage of this approach is that there is no effective limit to the number of servos that you can drive, as long as there is enough computing power. In the former method, you can control up to maybe 16~20 servos, before reaching the servo timeout limit.

Back to my home page

Hosted by www.Geocities.ws

1