PCA9685 for PWM/Servo conflict


I’m building a small project, and I’m trying to make sure my design works in a simulated CAD before I buy all the necessary hardware to actually craft it.

This email is about the PCA9685 servo driver. The issue I’m trying to resolve is that I’d like to use a servo motor with several (4-6) RGB LEDs; however, the servo motor interferes with the 9/10 PWM pins on the Arduino.

I’m hoping the PCA9685 will help me fix this by acting as a dedicated RGB LED extension, which will, then, allow me to use the Arduino just for the servo motor.

I’m an absolute beginner, and while I have no problem using a servo motor and LEDs on the Arduino, I’m wondering if using the PCA9685 is something relatively easy to do? can I simply attach it to the Arduino and power my LEDs? how does it affect the coding? is there a special library I must, then, use?

Sorry for the long query, but I’d really like to be sure that this is the right piece of hardware for what I need before I buy it (with a bunch of other pieces I need).


Hey Teddy,

This little device can indeed work as a RGB LED extension

There is this guide for the PCA9685 here: https://cdn-learn.adafruit.com/downloads/pdf/16-channel-pwm-servo-driver.pdf
This guide goes through all the in’s and out’s of the board, how to install the library and includes some very handy code examples to get you started.
The code is not identical to using the pwm pins straight up, but is very similar.

If you have any further questions, please don’t hesitate to ask.