Overview
The PCA9685 is an I2C-bus controlled 16-channel 12-bit PWM controller manufactured by NXP Semiconductors. Originally designed as an RGBA LED driver, its 12-bit resolution ( steps) and internal 25 MHz oscillator make it the industry-standard driver for driving up to 16 RC servo motors using a single I2C bus connection.
Breakout boards incorporate power regulation, a reverse-polarity protection MOSFET for motor power (V+), series resistors on output lines, and 3-pin headers (Signal, V+, GND) for direct servo plug-in.
Quick reference
Logic supply (VCC) | 2.3 V to 5.5 V DC |
Servo / Load supply (V+) | Up to 6.0 V DC (dependent on connected servos) |
| PWM channels | 16 independent outputs (PWM0 to PWM15) |
| PWM resolution | 12-bit (4096 duty-cycle steps per period) |
| PWM frequency range | Programmable from 24 Hz to 1526 Hz (typically set to 50 Hz for servos) |
| I2C slave address | Base 0x40 (selectable 0x40 to 0x47 via jumpers A0–A5) |
| All-Call / Software Reset | Responds to I2C All-Call address 0x70 |
Pinout
Standard PCA9685 Servo Breakout Board Pinout
| Pin / Header | Name | Type | Description |
|---|---|---|---|
| Power Terminal | V+ / GND | Power Input | External high-current power supply input for servos (e.g. 5V–6V DC, 2A–10A) |
| Bus Header Pin 1 | VCC | Power | Logic supply (+3.3 V to +5.0 V DC) |
| Bus Header Pin 2 | V+ | Power Output | Pass-through external motor voltage |
| Bus Header Pin 3 | SDA | Digital I/O | I2C Serial Data line |
| Bus Header Pin 4 | SCL | Digital Input | I2C Serial Clock line |
| Bus Header Pin 5 | OE | Digital Input | Active-LOW Output Enable pin (Must be LOW to enable outputs) |
| Bus Header Pin 6 | GND | Power | Logic Ground (0 V) |
| Servo Ports 0–15 | PWM / V+ / GND | Servo Connector | 3-pin 0.1" headers for standard servo connectors |
Specifications
| Parameter | Symbol | Min | Typ | Max | Unit | Conditions |
|---|---|---|---|---|---|---|
| Logic Supply Voltage | 2.3 | 3.3 / 5.0 | 5.5 | V | DC | |
| Motor Supply Voltage | — | 5.0 | 6.0 | V | Via Terminal Block | |
| Output Sink Current | — | 25 | — | mA | Per pin at | |
| Output Source Current | — | 10 | — | mA | Per pin at | |
| Internal Clock Frequency | 23 | 25 | 27 | MHz | Internal oscillator | |
| PWM Frequency | 24 | 50 | 1526 | Hz |
Prescaler & 50 Hz Servo Timing
The PWM frequency is set by configuring the PRE_SCALE register (0xFE):
For a 50 Hz servo control signal with :
Servo Position Pulse Width (at 50 Hz, Period = 20 ms)
Each 20 ms period is divided into 4096 steps ():
- 0° (0.5 ms pulse): counts
- 90° (1.5 ms pulse): counts
- 180° (2.5 ms pulse): counts
Wiring
| PCA9685 Breakout | → | Microcontroller / Power Supply | Notes |
|---|---|---|---|
VCC | 5V (or 3.3V) | Logic supply from MCU | |
GND | GND | Common ground | |
SDA | SDA (A4 on Uno, GPIO21 on ESP32) | I2C Data line | |
SCL | SCL (A5 on Uno, GPIO22 on ESP32) | I2C Clock line | |
Terminal V+ / GND | External 5V/6V Power Supply | Dedicated high-current supply for servos |
Do NOT power servos from the microcontroller 5V rail: Connecting multiple servos to the PCA9685 without a dedicated external power supply on the screw terminal will overload the MCU power regulator and cause constant brownouts.
Common mistakes
- Forgetting to set PRE_SCALE while in SLEEP mode: The
PRE_SCALEregister (0xFE) can ONLY be written when theSLEEPbit (bit 4 ofMODE1register0x00) is set to1. - Leaving Output Enable (
OE) floating or HIGH:OEis active-LOW. IfOEis pulled HIGH, all 16 PWM outputs are disabled (high-impedance). - Inaccurate internal clock frequency: The internal 25 MHz oscillator can drift . For ultra-precise positioning, measure actual output pulse width with an oscilloscope or feed an external clock into
EXTCLK.
Notes
- Up to 62 PCA9685 boards can be cascaded on a single I2C bus to control up to 992 servos.
Assets & downloads
- datasheetdatasheet
- product-pagereference