1
\$\begingroup\$

I'm working with ESC controllers which receive PWM signals that are very similar to those that control a standard Servo motor, i.e. a 50 Hz PWM signal (20 ms period) with duty cycle of 5-10% (1-2 ms on-time).

My question is why do servo motors (and most ESCs) use this particular protocol for setting the position (speed for ESCs)? Why not choose a faster frequency, something like 1kHz? Is there some fundamental reason for all servo motors to have agreed on this slow frequency?

I'm using an STM32 microcontroller to send the control signal to the ESCs so I can send some pretty fast and crazy looking signals, but even something as simple as an ATTiny85 operating at 8MHz can output a 1kHz PWM signal

\$\endgroup\$
4
\$\begingroup\$

I can send some pretty fast and crazy looking signals,

It would not help. Send smart slow signals.

Why do servo motors ... use 50 Hz? vbl. duty cycle pulse @ 50Hz PWM rate

  • it's an old standard

The surge load current depends on the rotary position seek, step momentum load and rate. The inductance L/R rate is much faster, so it's not inductance.

  • mechanical inertia extends the seek time and surge current considerably up to 10x a rated linear or rotary motor load but then only for short durations.
  • 20ms is a good short duration for small servos, but maybe much less for low-mass-servos and much more, for heavy, servo-loads.

Reducing the step rate to 50Hz reduces;

  • the overhead on the uC to change pulse duration commands to set position
  • increases the duration for surge currents to provide torque to seek and settle quickly
  • allows the internal compensation filter to regulate arrival stability and better than the host.
  • 20 ms is a fast as a hobby servo can seek
    • so there is no benefit to executing PWM seek rates any faster.
  • if you wanted the servo to be <20ms instead, you may have to modify the deadtime inside the servo.
  • if you wanted the servo to be FM wireless, < 20ms may exceed the FM sidebands limited for Servo channels and adjacent channel interference so that violates the FCC specs on servo FM channels for remote control.

- send shorter seeks every 20ms to reduce surge current for a long robotic move, so it takes longer.

  • everything is a tradeoff between seek time and surge current.
    • This includes peak acceleration and braking, peak velocity, seek torque and seek time.

schematic

simulate this circuit – Schematic created using CircuitLab

Since the early 1990's servos have used a de-facto standard pulse width modulation technique to control the position of the output shaft. Although the invention may have been much earlier. Small Floppy and HDD's used a serial pulse Step count and direction interface for servo starting in the 70's which required 2 signals and a seek_complete response.

\$\endgroup\$
  • 1
    \$\begingroup\$ The hobby servos that this post probably refers to do not achieve any possible position in 20ms. Far from it. So the servo will get multiples of the same position before reaching it, anyways. Is there something inherent in a higher freq that would force higher surge currents? RC servos go full power for as long as it takes, no matter the distance to the new position \$\endgroup\$ – loonquawl Sep 24 '18 at 14:59
  • \$\begingroup\$ 20ms was a typo 50ms is probably the fastest stable short seek but based on the OP's previous question, battery surge current is an issue that causes uC to reset. I was an HDD servo test engineer for a long time so I understand \$\endgroup\$ – Sunnyskyguy EE75 Sep 24 '18 at 15:01
  • \$\begingroup\$ Make that the late 1970s at least. \$\endgroup\$ – Brian Drummond Sep 24 '18 at 20:06
  • \$\begingroup\$ Yes for production, R&D took a few years. For 8” but IBM started in ‘67 \$\endgroup\$ – Sunnyskyguy EE75 Sep 24 '18 at 20:07
  • \$\begingroup\$ Tony - I'm thinking that you may have misunderstood the question. You keep referring to "50ms" in your answer - standard RC servo pulse train has a period of approximately 20ms (50 Hz). This period has absolutely NOTHING to do with the actual PWM (if any) driving the motor - it simply contains the control signal pulse that controls the servo. \$\endgroup\$ – Dwayne Reid Sep 25 '18 at 0:05
6
\$\begingroup\$

It is old, old standard that predates cheap microcontrollers, and in fact predates consumer integrated circuits!

The very early proportional radio remote controls used timing based on unijunction transistors in ring oscillator style arrangements, and the standard has not turned out to be poor enough to make agreeing a replacement worth the trouble.

Before the PPM stuff there was a system using baseband frequency division modulation using banks of tuned metal reeds to separate the tones modulated onto an AM radio link.

\$\endgroup\$
2
\$\begingroup\$

As mentioned by Dan Mills, the standard RC hobby servo control signal dates from many years ago.

The signal period of 20ms (50 Hz) was chosen simply because it was a convenient number that fit the technical requirements. Each control channel takes a maximum of about 2ms. There are several control channels - the most that I've ever seen is 6 channels which can occupy a maximum of 12ms to 13ms. The remaining time is used as a sync pulse that synchronizes the receiving decoder to the transmitter multiplexer.

Thus: the signal from the transmitter is a repeating sequence of channel information (of varying widths) followed by a sync pulse that occupies the remaining time in the 20ms frame.

This allows for a very simple decoder / demultiplexer at the receiver: a simple shift register. A digital "1" is shifted into the first bit (only the first bit) of the shift register. The leading edge of each received pulse walks that "1" down the length of the shift register. The width of the pulse at each output of the shift register is thus controlled by when the start of the next pulse is received.

The Signetics NE544 is the first IC that I am aware of that was designed to control hobby servos. I still have hard-copy Signetics data books that go into great detail about how the whole RC control system was designed and how it works. That information is most likely still available online.

Pounding "Signetics RC Servo" into Google brings up the construction manual for a RC Servo kit from Ace: Ace Servo Kit Manual which has a bit more detail.

The bottom line is that the current PWM control signal that hobby servo motors use was designed long ago. The fact that it remains a standard to this day shows that the design of the protocol was sufficiently robust to remain a standard.

One final thing to keep in mind: the RC servo signal was primarily an analog signal in that the width of each channel's pulse was derived from monostable timers in the transmitter. The individual potentiometers in the transmitter simply adjust the width of the output pulse for that channel as each channel's timer was triggered in sequence.

The closed-loop electronics in each servo was also analog in nature: the feedback pot on the output shaft of the servo controlled the pulse width of a monostable timer. The servo electronics simply adjust the position of the feedback pot to match the pulse width of the timer to that of the incoming pulse. As the feedback pot is adjusted, so is the position of the output shaft.

Ingenious and very-well thought out techniques!

\$\endgroup\$
0
\$\begingroup\$

Simple answer is that because the load is inductive the impedance increases with frequency so to push through the same average current you need correspondingly higher voltages to drive it.

\$\endgroup\$
  • \$\begingroup\$ Also one could have a 1kHz servo link and possibly send 10% to 90% instantly, the motor inductance is not the limiting rate which may be xxx microseconds, rather it would be the average momentum and energy vs motor/ battery surge power that limits response time. In fact, a lower inductance motor with the same L / DCR =T time constant could deliver more power. ( so -1 \$\endgroup\$ – Sunnyskyguy EE75 Sep 24 '18 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.