Hardware Setup
This guide covers the physical connections and hardware requirements for the PCA9685 chip.
Pin Connections
Basic I2C Connections
1
2
3
4
5
6
MCU PCA9685
โโโโโโโโโโโโโโโโโโโโโโโโโ
3.3V โโโโโโ VDD
GND โโโโโโ GND
SCL โโโโโโ SCL (with 4.7kฮฉ pull-up to 3.3V)
SDA โโโโโโ SDA (with 4.7kฮฉ pull-up to 3.3V)
Pin Descriptions
| Pin | Name | Description | Required |
|---|---|---|---|
| VDD | Power | 2.3V to 5.5V power supply (typically 3.3V or 5V) | Yes |
| GND | Ground | Ground reference | Yes |
| SCL | Clock | I2C clock line | Yes |
| SDA | Data | I2C data line | Yes |
| OE | Output Enable | Active-low output enable (optional) | No |
| A0-A5 | Address | I2C address selection pins | No (for single device) |
Output Channels
The PCA9685 provides 16 PWM output channels (OUT0-OUT15). Each channel can drive:
- LEDs (with current-limiting resistors)
- Servos (typically 5V servos)
- Other PWM-controlled devices
Power Requirements
- Supply Voltage: 2.3V to 5.5V (3.3V or 5V typical)
- Current Consumption:
- Active: ~10 mA typical
- Sleep mode: < 1 ยตA
- Power Supply: Stable, low-noise supply recommended
- Decoupling: 100 nF ceramic capacitor close to VDD pin recommended
I2C Configuration
Address Configuration
The PCA9685 I2C address is determined by pins A0-A5:
| A5 | A4 | A3 | A2 | A1 | A0 | I2C Address (7-bit) |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0x40 (default) |
| 0 | 0 | 0 | 0 | 0 | 1 | 0x41 |
| โฆ | โฆ | โฆ | โฆ | โฆ | โฆ | โฆ |
| 1 | 1 | 1 | 1 | 1 | 1 | 0x7F |
Default: All address pins to GND = 0x40 (used in examples)
I2C Bus Configuration
- Speed: Up to 1 MHz (Fast Mode Plus)
- Standard Mode: 100 kHz
- Fast Mode: 400 kHz (most common)
- Fast Mode Plus: 1 MHz
- Pull-up Resistors: 4.7 kฮฉ on SCL and SDA (required for I2C)
- Bus Voltage: Must match VDD (3.3V or 5V)
Physical Layout Recommendations
- Trace Length: Keep I2C traces short (< 10 cm recommended for high speeds)
- Ground Plane: Use a ground plane for noise reduction
- Decoupling: Place 100 nF ceramic capacitor within 1 cm of VDD pin
- Routing: Route clock and data lines away from noise sources (switching regulators, motors)
- Multiple Devices: When daisy-chaining, use proper bus termination
Example Wiring Diagram
Single PCA9685
1
2
3
4
5
6
7
8
9
PCA9685
โโโโโโโโโโโ
3.3V โโโโโโโโค VDD โ
GND โโโโโโโโค GND โ
SCL โโโโโโโโค SCL โโโโ 4.7kฮฉ โโโ 3.3V
SDA โโโโโโโโค SDA โโโโ 4.7kฮฉ โโโ 3.3V
โ โ
โ OUT0-15 โโโโ To LEDs/Servos
โโโโโโโโโโโ
Multiple PCA9685 Devices (Daisy Chain)
1
2
3
4
5
6
7
MCU SCL โโโฌโโโ PCA9685 #1 (A0=0, Addr=0x40) SCL
โ
โโโโ PCA9685 #2 (A0=1, Addr=0x41) SCL
MCU SDA โโโฌโโโ PCA9685 #1 SDA
โ
โโโโ PCA9685 #2 SDA
Output Enable (OE) Pin
The OE pin is an active-low output enable. When pulled HIGH, all outputs are disabled (high-impedance). When pulled LOW or left floating, outputs are enabled.
Typical Usage:
- Connect to a GPIO for software control
- Leave floating if not needed (internal pull-up enables outputs)
- Use for synchronized startup of multiple devices
Next Steps
- Verify connections with a multimeter
- Use an I2C scanner to verify device detection at expected address
- Proceed to Quick Start to test the connection
- Review Platform Integration for software setup
Navigation โฌ ๏ธ Quick Start | Next: Platform Integration โก๏ธ | Back to Index