Servo control

From OpenCircuits
Revision as of 07:51, 3 September 2014 by DavidCary (talk | contribs) (rough draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Many (perhaps most) radio control transmitters multiplex all the "RC PWM" channels into a single physical wire, using a system called "RC PPM" (radio-control pulse position modulation). [1] [2] [3] [4] [5] [6] [7]

Often this "PPM" signal is transferred from the a student's RC transmitter through the buddy box wire to the teacher's RC transmitter.

The "combined signal" -- the "RC PPM signal" -- looks something like this (based on diagram from Richard J. Prinz[8]): [9] [10] [11] [12] [13]

   Sync    1       2     3     4        5    6    7   8   Sync...
   ---+ +----+ +------+ +-+ +-------+ +--+ +--+ +--+ +-+ +----...
      | |    | |      | | | |       | |  | |  | |  | | | |
      | |    | |      | | | |       | |  | |  | |  | | | |
      | |    | |      | | | |       | |  | |  | |  | | | |
      +-+    +-+      +-+ +-+       +-+  +-+  +-+  +-+ +-+
       *      *        *   *         *    *    *    *   *
    * - low separator pulse, always 0.5 ms
    1..8 - high "RC PWM pulse" for channels 1..8      0.5 – 1.5 ms

The long "sync pulse" between frames is typically at least 5 ms long. All the other pulses are no more than 2 ms long. Most transmitters have a fixed frame rate somewhere in the range of 40 Hz to 200 Hz.

When the pilot moves the positions of the joysticks on the transmitter, the width of the corresponding "RC PWM pulse" for that channel will grow proportionally longer or shorter.

The corresponding radio control receiver decodes the radio signal to a RC PPM signal on a single physical wire. Often the receiver includes either a 4017 decade counter[14] or a 4015 shift register -- that chip decodes the RC PPM signal at its CLK input into to several independent "RC PWM" outputs. The various RC servos[15] are connected to those outputs with standard 3-pin connectors with 0.1" spacing. The RC PWM signal on the "signal" wire of the 3-wires coming out of the servo has a pulse width that typically varies from 1.0 ms to 2.0 ms (proportional to the position of the joystick), but only one pulse for each frame.

(The standardized "RC PWM" works differently enough from the PWM used to control DC motor speeds that some people say that RC PWM signals "are not really PWM signals" [16] [17] [18] [19] [20]. Alas, none of those people give any suggestions as to what we *should* call these signals, so I call them "RC PWM signals" for lack of a better name. Perhaps I should call them "RC control signals"[21] ?).

If two transmitters are transmitting at the same time, then yes, there will be an overlap of pulses. However, people at RC flying parks are very careful to assign each pilot (and the transmitter and receiver he uses) a different "frequency channel", so that the receiver in each airplane can easily pick out the signal from its own transmitter and ignore the radio signals from every other transmitter.

A 6-channel receiver uses only one "frequency channel", but it has 6 output channels (6 servo channels), i.e., it has 6 rows of output pins for up to 6 servos to plug into -- typically one channel each for pitch(elevator), roll(aileron), yaw(rudder), throttle, and some optional AUX channels.

During a single RC frame, the a 6-channel receiver cycles through every every servomotor, putting one "RC PWM" pulse at a time on each of its 6 outputs. Only one of its outputs is ever active at any one time -- there is no overlap of its pulses.


((Add illustration of the below text here))

With a typical 50 Hz 6-channel transmitter and receiver, the first "separator pulse" occurs at a fixed width and position every 20 ms. All the other pulses start wherever the last pulse left off, which changes every time the control stick for that previous pulse(s) moves.

With a typical 50 Hz 6-channel transmitter, when all the control sticks are pushed to turn all the servos all the way counterclockwise, the receiver spits out

  • a 1 ms pulse on channel 1, then -- as soon as that finishes -- a 1 ms pulse on channel 2, for all 6 channels -- a total of 6 ms -- and the (relatively long) sync pulse is however long it needs to be to fill out the rest of the 20 ms frame.

When all the control sticks are pushed to turn all the servos all the way clockwise, the receiver spits out

  • a 2 ms pulse on channel 1, then -- as soon as that finishes -- a 2 ms pulse on channel 2, for all 6 channels -- a total of 12 ms -- and the (much shorter) sync pulse is however long it needs to be to fill out the rest of the 20 ms frame.



Further reading

  • While servos are convenient low-cost modules that generally do what you tell them to do, some people have an insatiable curiosity about what's really going on inside that mysterious black box, or perhaps you want to add some electronics to some big dumb motor to make it "act like" a servo -- if you are one of those people, perhaps you would be interested in the motors and motor driver articles.