Blog

PCA9685 16-Channel 12-bit PWM/Servo Driver

PCA9685 16-Channel 12-bit PWM/Servo Driver

I2C Interface for Arduino and Raspberry Pi Projects

Introduction

The PCA9685 is a 16-channel, 12-bit PWM controller with an I2C interface, perfect for controlling multiple servos or LEDs. This compact module can drive up to 16 servos with just 2 pins (SDA and SCL) from your microcontroller.

PCA9685 Module

Key Features

🎛️ 16 PWM Channels

Independent control of 16 outputs

📊 12-bit Resolution

4096 steps of PWM control

🔌 I2C Interface

Simple 2-wire communication

External Power

Supports 2.3V-5.5V for PWM outputs

Technical Specifications

Channels 16 independent PWM outputs
Resolution 12-bit (4096 steps)
Interface I2C (up to 1MHz)
Addresses 62 possible I2C addresses
PWM Frequency 40Hz to 1000Hz (adjustable)
Logic Voltage 2.3V to 5.5V
Output Voltage Same as V+ (2.3V-5.5V)
Current per Channel 25mA max (200mA total)

Pin Configuration

PCA9685 Pinout

Pin Function Description
VCC Power 2.3V-5.5V logic power
GND Ground Common ground
SCL I2C Clock Serial clock input
SDA I2C Data Serial data input/output
V+ Output Power 2.3V-5.5V for PWM outputs
OE Output Enable Active low output enable
PWM0-15 PWM Outputs 16 PWM output channels

Wiring with Arduino

PCA9685 Arduino Wiring

Wiring with Raspberry Pi

PCA9685 Raspberry Pi Wiring

Arduino Code Example

Raspberry Pi Python Example

Advanced Applications

LED Dimming

Multiple Servos

Cascading Modules

Troubleshooting

No Response

  • Check I2C connections (SDA/SCL)
  • Verify power supply is connected
  • Confirm I2C address (default 0x40)

Servo Jitter

  • Ensure adequate power supply
  • Check for loose connections
  • Try different PWM frequency (50-60Hz for servos)

I2C Errors

  • Verify pull-up resistors on SDA/SCL
  • Check for address conflicts
  • Test with different I2C speed