Source: https://mokxi.com/parts/pca9685
Updated: 2026-11-10

Part

# Servo driver, PCA9685 16-channel

Sixteen servo pulses from two I2C wires. It wakes up asleep, at 200 Hz.

See every part

- 22 pins
- 1 setting
- In 3 projects
- In 1 lesson

Drawn live by the editor's own code, at the size you see it.

At a glance

## The Servo driver, PCA9685 16-channel in brief

What it is, and every setting the properties panel gives it.

The PCA9685 board is the blue breakout with sixteen three-pin servo headers that runs a robot arm from two I2C wires. VCC takes the logic supply, 5 or 3.3 volts, SDA and SCL go to A4 and A5 on an Uno or GPIO 21 and 22 on an ESP32, with 10k pull-ups already on the board, and V+ brings the servos’ own supply. Inside, a 12-bit counter compares each channel’s ON and OFF counts against an exact 25 MHz oscillator, so at 50 Hz one count is about 4.9 microseconds and the Servo library’s 544 to 2400 microsecond window is 111 to 492 counts. Mokxi keeps the traps the register map sets: the chip wakes asleep with every channel off, the prescale can only be written while it sleeps, auto-increment is off out of reset, and outputs change at the end of the transfer. The Adafruit PWM Servo Driver calls are built in at address 0x40. A tutorial that sets the oscillator to 27 MHz gets pulses about 8 percent short here. Real oscillator spread, the external clock and the sub-addresses are not modeled.

Family

Clocks and links

Pins

22

address

64

the I2C address, 0x40 (64) by default. A real board adds its A0 to
A5 solder jumpers to 0x40; set the same number here and in the sketch.

Pins

## 22 pins

Named as the editor names them, so a wire lands where you expect it.

Pin

What it does

GND

Ground, shared with the board and the servo supply.

OE

Output enable, active low. Pulled low on the board: leave it unwired.

SCL

The I2C bus. The board has 10k pull-ups on both.

SDA

The I2C bus. The board has 10k pull-ups on both.

VCC

The chip's logic supply, 2.3 V to 5.5 V: the board's 5 V or 3.3 V.

V+

The servos' supply, from its own 5 V source. The chip does not use it.

PWM0

PWM1

PWM2

PWM3

PWM4

PWM5

PWM6

PWM7

PWM8

PWM9

PWM10

PWM11

PWM12

PWM13

PWM14

PWM15

How to use it

## How to use the PCA9685 servo driver with an Arduino

SDA goes to A4 and SCL to A5, VCC to the Uno’s 5 volts and GND to GND, and V+ to a separate 5 volt supply for the servos with its ground joined. Call pwm.begin() and then pwm.setPWMFreq(50) in setup(); after that, pwm.writeMicroseconds(channel, us) moves a servo with no pulse timing in the sketch at all.

begin() returns false when nothing answers at 0x40, so the example prints a reminder to check SDA, SCL and VCC when it does. The board’s face prints each channel’s pulse width as the chip makes it, which shows at once whether a wrong angle comes from the sketch’s math or from the servo’s window.

Part pin

Board pin

SDA

A4

SCL

A5

VCC

5 V

GND

GND

V+

Separate 5 V supply

PWM0 to PWM3

The arm’s four servos

On an ESP32 the same sketch runs with SDA on GPIO 21 and SCL on GPIO 22, and the board’s VCC can come from 3.3 volts.

Click to open it in the editor

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

One servo on channel 0

How it is modeled

## What is true about the Servo driver, PCA9685 16-channel, here

In its help article’s own words: what the simulation gets right, and where it stops.

### Not modeled

The spread of real oscillators, the external clock input, the sub-addresses
and the software reset call. The all-call address 0x70 does work.

From PCA9685 16-channel servo driver, in full.

Projects

## See the Servo driver, PCA9685 16-channel in a project

3 built-in projects use it. Each opens in the editor, already wired.

Lessons

## Where it turns up in a lesson

One lesson places it in its own circuit.

### Learn articles

1 lesson

- Arduino PCA9685 Servo Driver: Wiring and Code

Boards

## The boards it is shown on

This board has a built-in project with the Servo driver, PCA9685 16-channel in it.

- Arduino Uno R3

Libraries

## Arduino libraries for the Servo driver, PCA9685 16-channel

Built in, so the sketch compiles with nothing to install. Each page has the calls, the wiring and an example to run.

- Adafruit PWM Servo Driver Library
- Adafruit Motor Shield V2 Library

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Filament lamp

A tungsten bulb in a holder: an inrush when it is switched on cold, tens of milliseconds to warm up, and dim on half its voltage.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio; real internet through the Cloud panel’s switch), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

Raspberry Pi 4 Model B

Raspberry Pi 4 Model B: the 40-pin header, driven by main.py with RPi.GPIO or gpiozero.

See every part

## Wire up the Servo driver, PCA9685 16-channel

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.

Start building free Open the editor
