Electronic – Staggering PWM waveforms for servos to minimize current spikes

pwmservo

If I'm controlling multiple hobby PWM servo motors, is there an advantage to staggering the pulses sent to each servo?

By which I mean, each servo needs to see a pulse of width ~1ms every 20ms. Let's say I have 20 servos. If I send a 1ms pulse each ms to a different servo, then will that change the spikiness of the current draw, or otherwise improve the circuit?

Intuitively it seems that sending the 1ms pulse to 20 servos all on the same 1ms tick could cause a synchronized current spike, thus maximizing the chances of tripping a fuse in my power supply.

Is this a real concern?

(I ask because the Adafruit PWM python library has the capability to specify rise and fall times for pulses to a given servo, rather than just specifying the frequency. I can see no reason to build the API this way unless you'd want to stagger the signals for some reason).

Best Answer

First, I'll assume by "servo" you are really referring to hobby servo motors that are controlled by 1-2 ms pulses, not the general meaning of "servo" in electronics and control systems. You really should properly define this term in your question.

These hobby servos only use the 1-2 ms pulse as a way of communicating a analog level. The old all-analog hobby servos would integrate the pulse, hold it, and then use that as the control signal to compare the position feedback signal to. Newer digital types measure the pulse width digitally, then use that value to compare the position feedback to.

Either way, the driving of the motor is not synchronized to the pulse. The motor's drive signal is constantly updated internally to the saved control value derived from the last pulse. A new pulse only changes this control input.

That said, a sudden step in the control signal will likely cause a short term error, which the control mechanism will react to by driving the motor harder until it settles to the new position. Therefore, while the motor is always driven, it will usually be driven harder after a step change in the input, which can only happen immediately after a pulse.

Overall, I'd say it is good to stagger the pulses to multiple hobby servos if it's not much burden to do so. Note that this comes automatically if using a off the shelf radio link. These will send the pulses for each of the hobby servos it controls sequentially anyway. If you are controlling multiple hobby servos from a single microcontroller, then multiplexing might dictate sequential pulses too.

If it works out more simply to generate all the pulses at the same time, then go ahead and not worry about it. 20 ms is a short time, and the extra current from a sudden control input change will take longer than that in most cases. In the case of slow changes, the steps are small anyway, so the current should be relatively even. Put a bigger cap on the power supply if you're worried about it.