PCA9685 outputs flicker or twitch: frequency, OE pin and supply

Set the output frequency to 50 Hz for servos, and power the servo rail separately.

What the message means

The board has two supplies: the logic supply and V+ for the outputs. Without a steady V+ and the right frequency, servos twitch and LEDs flicker.

Fix it in this order

  1. Set the PWM frequency to about 50 Hz for hobby servos.
  2. Keep the OE pin low, or tie it to ground, so the outputs stay enabled.
  3. Power the V+ terminal from a supply that can carry all servos.
  4. Fit a large capacitor across the V+ terminals.
  5. Join the grounds of the controller and the servo supply.
  6. Check the I2C address, and the pulse range per servo.

Why it happens

The PCA9685 has a single frequency for all 16 channels, set by a prescale register. Libraries compute it from the frequency you ask for; about 50 Hz is the value for hobby servos, and the NXP datasheet gives a typical programmable range of 24 Hz to 1526 Hz. This means servos and LEDs on the same board share one rate, so LEDs on a 50 Hz setting may visibly flicker on camera or at the edge of your vision.

The OE pin is active low: held low it enables the outputs, and held high it disables them. Servos draw current in short bursts, so a V+ supply that is too small, or has no large capacitor close to the board, makes every servo twitch together.

If you see this, do this

You seeDo this
All servos twitch togetherSupply or frequency.
No output at allOE pin or V+.

PCA9685 not moving, servo jitter.

Last reviewed: November 2026. These are the usual causes and the order that finds them fastest. Test on your own board; clones and cables differ.

Why this happens

The PCA9685 has a 12-bit PWM counter, so each period is divided into 4096 steps, and one oscillator sets the frequency for all 16 channels. The frequency is set by a prescale value: prescale = round(25 MHz / (4096 x frequency)) – 1. For 50 Hz this is round(122.07) – 1 = 121. The internal oscillator is only approximately 25 MHz, so the real frequency can be a few percent off.

At 50 Hz the period is 20 ms, so one step is 20 000 / 4096 = 4.88 microseconds. A 1.5 ms pulse is about 307 steps, 1 ms is about 205 and 2 ms about 410. Because the board has one frequency for all channels, LEDs on the same board run at 50 Hz and can flicker visibly, especially on a camera. The OE pin is active low: low enables the outputs, high turns them off.

How to confirm the cause

  • Measure the V+ terminal with a multimeter while the servos move. A drop of more than a few tenths of a volt shows the supply cannot cope.
  • Check the OE pin with the meter. It should read 0 V or be tied to ground. A floating OE can switch the outputs on and off.
  • Command one channel to 307 steps. A servo should go near the centre. If it sits at one end, the frequency or the pulse range is off.
  • Move one servo at a time, then several together. If problems appear only with several, the supply current is the limit.
  • Use a camera to look at an LED on one channel. Visible flicker at 50 Hz is a frequency choice, not a fault.

Worked example

Setting 50 Hz and centring the servo on channel 0 with the Adafruit library. The address is the default 0x40.

#include <Adafruit_PWMServoDriver.h>
Adafruit_PWMServoDriver pwm;     // default address 0x40
void setup() {
  pwm.begin();
  pwm.setPWMFreq(50);            // set before writing pulses
  pwm.setPWM(0, 0, 307);         // channel 0, about 1.5 ms
}
void loop() {}

Common mistakes

  • Powering the V+ terminal from the Arduino 5 V pin.
  • Using a single thin wire to feed all the servos.
  • Putting LEDs and servos on the same board and expecting both to look right.
  • Mixing up the logic supply pin (VCC) and the servo power terminal (V+).
  • Leaving out the large capacitor near the V+ terminal.

If this did not fix it

  • Check the I2C wiring and the address jumpers. Two boards on the same address cause odd behaviour.
  • Check that all grounds are joined: controller, board and servo supply.
  • Check that the servo pulse range in the code suits each servo. Cheap servos may buzz at their ends.