Overview
The PCA9685 is a 16-channel, 12-bit PWM driver from NXP that talks I2C and gives you 16 independent PWM outputs from a single chip — perfect for driving a swarm of servos, an RGB LED array, or any project that needs more PWM than your microcontroller's built-in pins can deliver. Pair it with this breakout board and you get all 16 channels broken out on standard 3-pin servo headers, plus a screw terminal for separate servo power.
Internal PWM frequency is software-selectable from 24 Hz to 1526 Hz (perfect for the 50 Hz that hobby servos want). The on-board 25 MHz oscillator means PWM stays smooth and jitter-free even when the host MCU is busy. Cascade up to 62 drivers on the same I2C bus by setting the address jumpers — 992 PWM channels total if you really need them.
The Adafruit_PWMServoDriver library makes it trivial: setPWM(channel, on_time, off_time) and you're done. Use it to build hexapods (18 servos), animatronic faces (12 servos), RGB LED grids (5 RGB LEDs = 15 channels), or any large-scale PWM project.
At a Glance
Specifications
| Parameter | Value |
| Driver Chip | NXP PCA9685 |
| PWM Channels | 16 independent |
| PWM Resolution | 12-bit (0-4095) |
| PWM Frequency Range | 24 Hz to 1526 Hz |
| Logic Voltage (VCC) | 2.3V to 5.5V |
| Servo Voltage (V+) | Up to 6V (separate from VCC) |
| Output Current per Pin | 25 mA sink, 10 mA source |
| I2C Address | 0x40 default (configurable via 6 jumpers) |
| I2C Speed | Up to 1 MHz (Fast Mode Plus) |
| Output Headers | 16 × 3-pin (PWM, V+, GND) |
| Power Terminal | 2-pin screw terminal for servo V+ |
| Dimensions | ~62 × 26 mm |
Pinout Diagram
Wiring Guide
Arduino + Servos
Logic side: I2C (4 wires). Power side: connect external 5V or 6V battery to the V+ screw terminal — this powers the servos, NOT the chip. The chip's VCC comes from Arduino 5V. Plug your servo cables into the 16 output headers.
| PCA9685 | Arduino / Power |
|---|---|
| VCC | Arduino 5V |
| GND | Arduino GND |
| SCL | A5 |
| SDA | A4 |
| V+ screw terminal | External 5V/6V battery (+) |
| GND screw terminal | External battery (-) |
| 16 output headers | Servo plugs (PWM, V+, GND) |
ESP32 + Servos
Same I2C wiring with 3.3V VCC on the chip. Servos still need 5V from external power.
| PCA9685 | ESP32 / Power |
|---|---|
| VCC | 3.3V |
| GND | GND |
| SCL | GPIO 22 |
| SDA | GPIO 21 |
| V+ screw terminal | External 5V/6V (+) |
| GND screw terminal | External (-) (shared with ESP32 GND) |
Driving LEDs Instead
The PCA9685 isn't just for servos — each output can sink 25 mA, perfect for driving LEDs through current-limiting resistors. Set PWM frequency to 1500 Hz (above flicker threshold) and you have 16 dimmable channels.
| Connection | Wiring |
|---|---|
| LED anode (+) | V+ rail |
| LED cathode (-) | Through 220Ω resistor to PCA9685 PWM channel |
| Set PWM freq | ~1500 Hz (no flicker) |
Code Examples
Arduino — Sweep Servo on Channel 0
// PCA9685 - Sweep a servo on channel 0
// Library: Adafruit PWM Servo Driver Library (Library Manager)
#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>
Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();
#define SERVOMIN 150 // ~0.6 ms pulse (-90 deg)
#define SERVOMAX 600 // ~2.4 ms pulse (+90 deg)
void setup() {
pwm.begin();
pwm.setPWMFreq(50); // 50 Hz for hobby servos
}
void loop() {
for (int p = SERVOMIN; p <= SERVOMAX; p += 5) {
pwm.setPWM(0, 0, p);
delay(15);
}
for (int p = SERVOMAX; p >= SERVOMIN; p -= 5) {
pwm.setPWM(0, 0, p);
delay(15);
}
}
Raspberry Pi (Python — adafruit-pca9685)
#!/usr/bin/env python3
# Install: sudo pip3 install adafruit-circuitpython-pca9685 adafruit-circuitpython-servokit
from adafruit_servokit import ServoKit
import time
kit = ServoKit(channels=16)
while True:
for angle in range(0, 181, 5):
kit.servo[0].angle = angle
time.sleep(0.02)
for angle in range(180, -1, -5):
kit.servo[0].angle = angle
time.sleep(0.02)