The PCA9685 is a small board that drives sixteen servos (or LEDs, or anything that takes PWM) from just two I2C wires. It generates all sixteen pulse trains on its own chip, so the microcontroller sets a position and then gets on with other work. It is the standard answer to “I have run out of PWM pins,” and the easy way to run a bank of vents, louvers, or valves from one ESP32 or Raspberry Pi.
What it is.
A breakout board around an NXP PCA9685 chip: sixteen channels of 12-bit PWM, each with its own header so a servo plugs straight in. It speaks I²C, the same two-wire bus your sensors use, so it costs the controller only two pins no matter how many servos hang off it. There is a separate power terminal (V+) for the servos, kept apart from the logic supply, which is exactly the separate-power habit servos need.
How it frees the controller.
Generating a clean servo pulse means timing it precisely, fifty times a second, for every servo. Do that in software for a dozen servos and the controller spends its life counting microseconds and the motion turns jittery. The PCA9685 takes the whole job: you send it “channel 3 to this position” over I2C and its hardware produces that pulse continuously, untouched, until you change it. The controller is free to read sensors, talk to Home Assistant, and do real work.
Chaining and power.
Sixteen not enough? Each board has address jumpers, so you give every board a different I2C address and stack them on the same two wires, up to sixty-two boards and nearly a thousand channels in theory. Power is the part to respect. Feed the servos from a supply on the V+ terminal sized for them all moving at once, not from the controller, and share a common ground. A bank of servos lunging together is a large, sudden current draw, and an undersized supply will sag and misbehave.
Key facts.
Where it fits, and where it doesn’t.
Where it fits
- Several servos from one ESP32 or Raspberry Pi.
- A bank of vents, louvers, or small valves.
- Dimming many LED grow-light channels.
- Freeing the controller from PWM timing.
Where it doesn’t
- Standalone use; it needs a controller to command it.
- Driving motors directly; it sends signal, not power.
- One or two servos; the controller’s pins are enough.
- Powering servos from its logic supply; use V+.
Resources & where to buy.
Adafruit PCA9685 Adafruit guide ESPHome PCA9685 Servos & PWM overview
Frequently asked questions.
What is the PCA9685 used for?
It drives up to sixteen servos (or LEDs, or anything that takes PWM) from a microcontroller over two I2C wires. It generates the pulses on its own chip, so it is the standard way to run many servos, a bank of vents or valves for example, without tying up the controller or running out of PWM pins.
How does the PCA9685 connect to a microcontroller?
Over I2C, the same two-wire bus your sensors use, so it costs only two pins (SDA and SCL) no matter how many servos are attached. You command a channel to a position and the board holds that pulse until you change it. Libraries exist for Arduino, the Raspberry Pi, and ESPHome.
How do I power servos on a PCA9685?
From a separate supply on the board’s V+ terminal, sized for all the servos moving at once, with a common ground to the controller. Do not power servos from the logic supply; a bank of them lunging together draws a large surge that would brown out the controller.
Can I use more than 16 servos with a PCA9685?
Yes. Each PCA9685 board has address jumpers, so you set a unique I2C address on each and chain several boards on the same two wires, up to sixty-two boards in theory. For standalone, scripted control with no microcontroller, look instead at a Pololu Maestro.