Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use PCA9685 Breakout Board: Examples, Pinouts, and Specs

Image of PCA9685 Breakout Board
Cirkit Designer LogoDesign with PCA9685 Breakout Board in Cirkit Designer

Introduction

The PCA9685 Breakout Board, manufactured by NXP Semiconductors (Part ID: PCA9685), is a versatile 16-channel, 12-bit PWM controller. It communicates via the I2C protocol, enabling precise control of devices such as servos, LEDs, and other components requiring PWM signals. This breakout board is widely used in robotics, lighting systems, and other applications where multiple PWM outputs are needed.

Explore Projects Built with PCA9685 Breakout Board

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Raspberry Pi 5-Controlled Multi-Servo System with Environmental Sensing
Image of cit: A project utilizing PCA9685 Breakout Board in a practical application
This circuit is designed to control multiple servos using two Adafruit PCA9685 PWM Servo Breakout boards, which are interfaced with a Raspberry Pi 5. The Raspberry Pi provides power and control signals to the PCA9685 boards, which in turn generate PWM signals to control the position of each servo. Additional sensors, including a DHT11 temperature and humidity sensor and an MKE-S01 ultrasonic distance sensor, are connected to the Raspberry Pi for environmental data acquisition.
Cirkit Designer LogoOpen Project in Cirkit Designer
16-Channel Servo Controller with Adafruit PCA9685
Image of my first project: A project utilizing PCA9685 Breakout Board in a practical application
This circuit consists of an Adafruit PCA9685 PWM Servo Breakout board connected to multiple MG995 servomotors. The PCA9685 board is used to provide PWM (Pulse Width Modulation) signals to control the position of each servomotor. Power (5V and GND) is distributed from the PCA9685 to all servomotors, and individual PWM outputs from the PCA9685 are connected to the signal inputs of the servomotors, allowing for independent control of each servomotor's angle or speed.
Cirkit Designer LogoOpen Project in Cirkit Designer
8-Channel Servo Controller with Arduino and PCA9685
Image of spiderbot: A project utilizing PCA9685 Breakout Board in a practical application
This circuit is designed to control multiple servos using an Adafruit PCA9685 PWM Servo Breakout board, which is interfaced with an Arduino UNO microcontroller. The PCA9685 board receives power from a 9V battery and communicates with the Arduino via I2C (SDA/SCL lines). The Arduino is programmed to generate PWM signals through the PCA9685 to independently control the position of each connected servo.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi-Controlled Dual Servo Driver with PCA9685 Interface
Image of Copy of PWM, SERVO, ESC Wiring: A project utilizing PCA9685 Breakout Board in a practical application
This circuit controls two servomotors (MG996R and MG995) using a Raspberry Pi 5 and an Adafruit PCA9685 PWM Servo Breakout board. The Raspberry Pi communicates with the PCA9685 via I2C (using GPIO 2 and GPIO 3 for SDA and SCL, respectively) to send PWM signals to the servos. Power distribution is managed through an Adafruit Perma Proto Small Mint board, which connects the 5V and GND from the Raspberry Pi to the PCA9685 and the servos.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with PCA9685 Breakout Board

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of cit: A project utilizing PCA9685 Breakout Board in a practical application
Raspberry Pi 5-Controlled Multi-Servo System with Environmental Sensing
This circuit is designed to control multiple servos using two Adafruit PCA9685 PWM Servo Breakout boards, which are interfaced with a Raspberry Pi 5. The Raspberry Pi provides power and control signals to the PCA9685 boards, which in turn generate PWM signals to control the position of each servo. Additional sensors, including a DHT11 temperature and humidity sensor and an MKE-S01 ultrasonic distance sensor, are connected to the Raspberry Pi for environmental data acquisition.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of my first project: A project utilizing PCA9685 Breakout Board in a practical application
16-Channel Servo Controller with Adafruit PCA9685
This circuit consists of an Adafruit PCA9685 PWM Servo Breakout board connected to multiple MG995 servomotors. The PCA9685 board is used to provide PWM (Pulse Width Modulation) signals to control the position of each servomotor. Power (5V and GND) is distributed from the PCA9685 to all servomotors, and individual PWM outputs from the PCA9685 are connected to the signal inputs of the servomotors, allowing for independent control of each servomotor's angle or speed.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of spiderbot: A project utilizing PCA9685 Breakout Board in a practical application
8-Channel Servo Controller with Arduino and PCA9685
This circuit is designed to control multiple servos using an Adafruit PCA9685 PWM Servo Breakout board, which is interfaced with an Arduino UNO microcontroller. The PCA9685 board receives power from a 9V battery and communicates with the Arduino via I2C (SDA/SCL lines). The Arduino is programmed to generate PWM signals through the PCA9685 to independently control the position of each connected servo.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Copy of PWM, SERVO, ESC Wiring: A project utilizing PCA9685 Breakout Board in a practical application
Raspberry Pi-Controlled Dual Servo Driver with PCA9685 Interface
This circuit controls two servomotors (MG996R and MG995) using a Raspberry Pi 5 and an Adafruit PCA9685 PWM Servo Breakout board. The Raspberry Pi communicates with the PCA9685 via I2C (using GPIO 2 and GPIO 3 for SDA and SCL, respectively) to send PWM signals to the servos. Power distribution is managed through an Adafruit Perma Proto Small Mint board, which connects the 5V and GND from the Raspberry Pi to the PCA9685 and the servos.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Controlling servo motors in robotics and automation systems
  • Driving LED arrays for lighting or display purposes
  • Generating PWM signals for motor speed control
  • Applications requiring multiple synchronized PWM outputs

Technical Specifications

Key Technical Details

  • Manufacturer: NXP Semiconductors
  • Part ID: PCA9685
  • Number of Channels: 16
  • PWM Resolution: 12-bit (4096 steps)
  • Operating Voltage: 2.3V to 5.5V
  • Logic Voltage: Compatible with 3.3V and 5V logic
  • Maximum Output Current per Channel: 25mA
  • I2C Address Range: Configurable via address pins (0x40 to 0x7F)
  • PWM Frequency: Adjustable from 24Hz to 1526Hz
  • Built-in Oscillator: 25MHz
  • Operating Temperature: -40°C to +85°C

Pin Configuration and Descriptions

The PCA9685 Breakout Board has the following key pins:

Pin Name Description
VCC Power supply input (2.3V to 5.5V).
GND Ground connection.
SDA I2C data line for communication.
SCL I2C clock line for communication.
OE Output enable pin (active low). Disables all outputs when pulled high.
PWM0-PWM15 16 PWM output pins for controlling servos, LEDs, or other devices.
A0-A5 Address selection pins for configuring the I2C address.
V+ External power supply for driving high-current devices (e.g., servos or LEDs).

Usage Instructions

How to Use the PCA9685 in a Circuit

  1. Power the Board: Connect the VCC pin to a 3.3V or 5V power source and GND to ground. If driving high-current devices like servos, connect an external power supply to the V+ pin.
  2. Connect to I2C: Connect the SDA and SCL pins to the corresponding I2C pins on your microcontroller (e.g., Arduino UNO: A4 for SDA, A5 for SCL).
  3. Set the I2C Address: Configure the I2C address using the A0-A5 pins. Leave them unconnected for the default address (0x40).
  4. Connect Devices: Attach servos, LEDs, or other devices to the PWM0-PWM15 pins.
  5. Program the Microcontroller: Use an appropriate library (e.g., Adafruit PCA9685 library) to control the PWM outputs.

Important Considerations

  • Ensure the external power supply (V+) matches the voltage requirements of connected devices.
  • Avoid exceeding the maximum current rating (25mA per channel) to prevent damage.
  • Use pull-up resistors on the SDA and SCL lines if not already present in your circuit.
  • Adjust the PWM frequency based on the application (e.g., 50Hz for servos).

Example Code for Arduino UNO

Below is an example of how to control a servo motor using the PCA9685 and the Adafruit PCA9685 library:

#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>

// Create an instance of the PCA9685 driver
Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();

void setup() {
  // Initialize the I2C communication and PCA9685
  pwm.begin();
  
  // Set the PWM frequency to 50Hz (suitable for servos)
  pwm.setPWMFreq(50);
}

void loop() {
  // Define the servo pulse width range (in microseconds)
  int servoMin = 150; // Minimum pulse width (0 degrees)
  int servoMax = 600; // Maximum pulse width (180 degrees)

  // Sweep the servo from 0 to 180 degrees
  for (int pulse = servoMin; pulse <= servoMax; pulse++) {
    pwm.setPWM(0, 0, pulse); // Channel 0, start at 0, set pulse width
    delay(10); // Small delay for smooth movement
  }

  // Sweep the servo back from 180 to 0 degrees
  for (int pulse = servoMax; pulse >= servoMin; pulse--) {
    pwm.setPWM(0, 0, pulse); // Channel 0, start at 0, set pulse width
    delay(10); // Small delay for smooth movement
  }
}

Notes on the Code

  • The setPWMFreq() function sets the PWM frequency. For servos, 50Hz is standard.
  • The setPWM() function controls the pulse width for a specific channel. Adjust the pulse width to control the servo angle.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Response from the PCA9685

    • Cause: Incorrect I2C wiring or address mismatch.
    • Solution: Verify SDA and SCL connections. Check the I2C address configuration.
  2. Servos or LEDs Not Functioning

    • Cause: Insufficient power supply or incorrect wiring.
    • Solution: Ensure the external power supply (V+) is connected and matches the device requirements.
  3. PWM Outputs Are Erratic

    • Cause: Noise or insufficient pull-up resistors on the I2C lines.
    • Solution: Add 4.7kΩ pull-up resistors to the SDA and SCL lines if needed.
  4. Overheating or Damage

    • Cause: Exceeding the current rating of the outputs.
    • Solution: Limit the current to 25mA per channel or use external drivers for high-current devices.

FAQs

  • Can I use the PCA9685 with a 3.3V microcontroller?
    Yes, the PCA9685 is compatible with both 3.3V and 5V logic levels.

  • What is the maximum number of PCA9685 boards I can use on a single I2C bus?
    Up to 62 boards can be used by configuring unique I2C addresses via the A0-A5 pins.

  • How do I calculate the pulse width for a specific servo angle?
    Use the formula: pulseWidth = map(angle, 0, 180, servoMin, servoMax); where servoMin and servoMax are the pulse width limits for your servo.

This documentation provides a comprehensive guide to using the PCA9685 Breakout Board effectively. For further details, refer to the official datasheet from NXP Semiconductors.