PCA9685 Servo Controller

PCA9685 Servo Controller by Adafruit

Control PCA9685 servo breakout with Arduino Uno using Synthiam ARC and EZB firmware; servo shield support and programming tutorial.
Connection Type
USB
Number of Servos
16
Audio Support
No
Camera Support
No
UARTs
None
I2C Support
No
ADC Ports
None
Digital Ports
None

If you’re building a robot or project with lots of servos (hexapods, animatronics, kinetic art, pan/tilt arrays, etc.), the PCA9685 makes it much easier. Instead of trying to plug many servos directly into an Arduino’s limited pins, the PCA9685 provides up to 16 servo outputs using a simple two‑wire connection (I2C) to the Arduino.

This setup is commonly used with Arduino boards that accept shields such as the Uno, Leonardo, Mega, or ADK. We recommend the Arduino Uno for beginners because it’s compact, inexpensive, and works great with ARC when loaded with the correct EZB firmware.

Beginner overview: How it works
  1. You load EZB firmware onto the Arduino.
    This turns the Arduino into a controller that ARC can talk to.
  2. The Arduino talks to the PCA9685 board.
    The Arduino sends I2C commands (usually over pins SDA/SCL). The PCA9685 generates stable servo pulses for up to 16 channels.
  3. ARC controls the servos.
    In ARC you add servo controls/scripts and ARC sends commands through the Arduino (EZB firmware) to the PCA9685 outputs.
Before you start (important for beginners)
  • Servo power: Servos often need more power than USB can provide. In most builds you will use a separate 5–6V power supply for servos.
    Tip: Many servo issues (jittering, resetting, random movement) are power-related.
  • Common ground: If you use a separate servo power supply, make sure the GND (ground) of the servo power supply is connected to the GND of the Arduino/PCA9685 system.
  • Servo count: The PCA9685 provides 16 channels. You can often stack or chain boards in some setups, but start with one board until everything works.
  • Firmware choice matters: Different firmware builds exist for different Arduino + PCA9685 configurations. If one firmware does not match your hardware layout, ARC may connect but servo channels may not respond as expected.
Download EZB Firmware Source Code

Choose one of the firmware packages below. If you’re unsure which one to use, start with the newest official-looking option first, then try the others if needed.

Programming (Flashing) the Firmware

After downloading the firmware, follow the step-by-step tutorial to install it on your Arduino: https://synthiam.com/Tutorial/17526

What you will do in the tutorial:

  1. Install and open the Arduino IDE.
  2. Open the firmware project you downloaded (ZIP file).
  3. Select your Arduino board type (ex: Uno) and correct COM port.
  4. Upload the firmware to the Arduino.
  5. Connect ARC to the Arduino running EZB firmware.
Next steps in ARC
  • Add servo controls in ARC and test a single servo first (one channel) before connecting all servos.
  • If a servo moves the wrong direction or doesn’t reach the expected range, use ARC servo configuration options (such as reverse and limits) to fine-tune motion.
  • If servos jitter or ARC disconnects, re-check your power supply and ensure all grounds are connected together.

ARC Pro

Upgrade to ARC Pro

Stay on the cutting edge of robotics with ARC Pro, guaranteeing that your robot is always ahead of the game.

Author Avatar
PRO
USA
#33   — Edited

Great info on th this site https://learn.adafruit.com/16-channel-pwm-servo-driver?view=all

I read the connections on the PCA9685 module are duplicated on each end, making it easy to use multiple modules. By using right-angled DuPont male and female connectors you could "daisy chain" the modules. Just make sure to select a unique I2C address for each module.

Wow, 992 servo motors, like to see that project, lol

#34   — Edited

Thanks for your reply.  I just want to be clear if I I connect three of these boards together that ARC can address each boards ports.  Also what are the changes needed to the firmware to support more than one board?  Because looking at the firmware I don't see how this would work.

Author Avatar
PRO
USA
#35   — Edited

on ARC, not sure, was using an Arduino.

I can test when I get back However, I would think it is one board on ARC

correct the firmware needs to be updated with each PCA 9685 you add

// Creat object to represent PCA9685 at default I2C address Adafruit_PWMServoDriver pca9685 = Adafruit_PWMServoDriver(0x40);

**(adding another PCA 9685 ) Adafruit_PWMServoDriver pca9685 = Adafruit_PWMServoDriver(0x41);

**(adding another PCA 9685 ) Adafruit_PWMServoDriver pca9685 = Adafruit_PWMServoDriver(0x42);

now you have 48 servos

and so on

Author Avatar
PRO
Synthiam
#36   — Edited

I don't think you'd be able to do that very easily. You'd have to create a custom robot skill and extend the existing ezb protocol. The ezb protocol supports 25 servos - a legacy from the ezrobot days. There are two alternatives...

  1. Hard way. Have a robot skill servo driver, similar to Dynamixel, which uses a custom protocol that extends the servo count. Or use the servo Script: https://synthiam.com/Support/Skills/Scripting/Servo-Script?id=19068

  2. Easy way. Have 3 arduinos and 3 pca's. Connect each Arduino to a different physical port

If you decide to go the hard way, the servo Script can send a custom serial command for each servo and position. It isn't super difficult, but you'd have to make your own firmware.

#37  

DJ thank you for confirming the limitation. I thought this could not be done with this skill without a lot of changes.

Author Avatar
PRO
Synthiam
#38  

the servo Script skill doesn't require any changes. Just send the servo id and position for each servo. Your arduino code merely has to listen on a loop to get the servo id and position

#40  

EzAng,   Thanks for posting this but I wanted a solution that works in ARC.