Note on Arduino Uno servo jitter

Yesterday I discovered very nasty feature of Arduino Uno (and all other AVR ATMega328 boards) when using servos. Although official Servo library states that it can support up to 12 servos on Arduino Uno (more on advanced boards as Mega), it does not say much about quality of PWM signal.

Since all connected servos (in case of Arduino Uno/ATMega328) are driven using the same timer (timer1), the more servos are connected, the more jitter is introduced to PWM signal. Control “window” of each servo starts to overlap. This results in a situation when real pulse width jumps up and down, sometimes even outside allowed values.

My experiments says that Servo library can support up to 3 servos per 16 bit timer with acceptable jitter level to use as RC control signal. Specially when PWM signal is fed to flight controller. With 3 channels signal quality was acceptable after enabling input filtering on Cleanflight. 2 PWM/Servo channels did not required input filtering.

4 or more PWM channels can be used when real servos, not flight controller inputs, are used. Servo inertia “solves” issue of signal jitter.

Note on Arduino Uno servo jitter was last modified: January 5th, 2016 by Dziku