Skip to main content

Quick Start

This board drives up to 16 servos or PWM outputs over I2C. Connect it, install the library for your platform, and run the smallest example to see a channel move.

You program the controller connected to this breakout. The breakout itself is not flashed.

1. Connect the breakout board​

Plug a Qwiic cable into either Qwiic connector on the board and the matching connector on your controller. No soldering needed, and the second Qwiic connector is free for chaining another Qwiic board.

ControllerSoldered PWM & Servo Driver 16-Channel 12-bit PCA9685 breakout
Qwiic connectorEither Qwiic connector

This example only needs the Qwiic connection. The screw terminal (or the header's V+ pad) needs its own supply only once you connect servos, not for this first test.

Without Qwiic: breadboard wiring​

If your controller has no Qwiic connector, solder header pins to the 6-pin header and wire it on a breadboard:

ControllerSoldered PWM & Servo Driver 16-Channel 12-bit PCA9685 breakout
3.3 VVCC
GNDGND
I2C data (SDA)SDA
I2C clock (SCL)SCL

Leave OE unconnected: the board pulls it low, which keeps all 16 outputs enabled. VCC takes 3.3 V only.

2. Install the library​

Install Soldered PCA9685 PWM Servo Driver using the Arduino IDE Library Manager, or download it from the source below.

🔗Soldered PCA9685 PWM Servo Driver

Arduino library at commit 1f3aa5a

→

Tip: downloading from GitHub. On the library's GitHub page, click the green Code button and choose Download ZIP, then add it in Arduino IDE with Sketch → Include Library → Add .ZIP Library....

3. Run the first example​

This is Basic_PWM.ino, the library's own example. It ramps the raw PWM duty cycle on channel 0 from fully off to nearly fully on, over and over.

Select Board
Basic_PWM.ino
/**
**************************************************
*
* @file Basic_PWM.ino
* @brief Ramp raw PWM duty cycle on channel 0 of the PCA9685.
*
* @authors @ soldered.com
***************************************************/

#include "PCA9685-SOLDERED.h"

PCA9685 pwm;

void setup()
{
pwm.begin();
pwm.setPWMFreq(1000); // fast PWM for LEDs/general outputs, not servos
}

void loop()
{
for (uint16_t duty = 0; duty <= 4095; duty += 32)
{
pwm.setPWM(0, 0, duty);
delay(20);
}
}

4. Check the result​

There is no serial output. Connect an LED (with a suitable resistor) or a scope probe to channel 0's OUT pad, and its brightness or duty cycle ramps up repeatedly, taking a little over 2.5 seconds per ramp.

5. If it does not work​

Continue with Troubleshooting and retry this smallest example after each change.