The PCA9685 PWM Integrated Circuit Topology Explained
The PCA9685 is a 16-channel, 12-bit I2C pwm integrated circuit originally designed for RGB LED backlighting, but it has become the standard for offloading servo and high-power DC motor control from microcontrollers like the ESP32 and Arduino. Because the PCA9685 outputs are limited to 25mA at 3.3V or 5V logic levels, driving real-world loads requires a low-side N-channel MOSFET switching topology.
Here is the standard low-side driver topology with explicit node labels for your schematic:
- NODE_VCC: 5V logic supply to the PCA9685 V+ pin.
- NODE_I2C: SDA and SCL lines, requiring pull-up resistors to NODE_VCC.
- NODE_PWM: The specific channel output pin (e.g., PWM0) from the PCA9685.
- NODE_GATE: The junction between the gate resistor and the MOSFET gate.
- NODE_DRAIN: The MOSFET drain, connecting to the negative terminal of the load.
- NODE_SOURCE: The MOSFET source, connecting directly to the shared Power GND.
- NODE_VLOAD: The positive high-current supply (e.g., 12V or 24V) feeding the load.
You might wonder why use a dedicated pwm integrated circuit instead of routing ESP32 hardware PWM pins directly to a MOSFET. The ESP32 has limited hardware PWM channels, and more critically, its PWM timers can experience microsecond-level jitter when the WiFi or BLE stacks trigger interrupts. The PCA9685 runs on its own internal 25MHz clock. Once the MCU writes the 12-bit duty cycle register over I2C, the IC handles the edge timing autonomously, guaranteeing jitter-free PWM even if your MCU code blocks for milliseconds.
Component Selection and Design Walkthrough
Designing the gate drive and protection network requires picking exact values based on the MOSFET's gate charge and the I2C bus capacitance. Below is a proven component list for driving a 12V, 5A load (like a high-power COB LED strip or a DC motor) at a 1kHz PWM frequency.
- IC: PCA9685 (NXP/Adafruit breakout).
- MOSFET: Infineon IRLZ44N. It is a logic-level N-channel MOSFET with a maximum gate threshold voltage ($V_{GS(th)}$) of 2.0V and an $R_{DS(on)}$ of 22mΩ at 5V $V_{GS}$.
- I2C Pull-ups ($R_{pull}$): 4.7kΩ. According to the NXP I2C Specification, 4.7kΩ is optimal for 100kHz standard-mode buses with typical breakout board capacitance.
- Gate Resistor ($R_G$): 100Ω. The IRLZ44N has a total gate charge ($Q_g$) of ~63nC. A 100Ω resistor limits the peak inrush current from the PCA9685 pin to ~50mA (well within its 25mA continuous but higher peak limits) and dampens high-frequency ringing on the gate trace.
- Gate-to-Source Pulldown ($R_{GS}$): 10kΩ. This bleeds off gate capacitance and ensures the MOSFET stays off during MCU boot when I2C pins are floating.
- Flyback Diode: 1N5819 Schottky diode placed in reverse bias across the load (cathode to NODE_VLOAD, anode to NODE_DRAIN). Mandatory for inductive loads like motors or relays.
Behavior Table: Parameter Changes
| Element Changed | Modification | Resulting Circuit Behavior |
|---|---|---|
| Gate Resistor ($R_G$) | Increase to 1kΩ | Slower MOSFET switching transitions. At >5kHz PWM, switching losses ($P_{sw}$) increase drastically, causing the MOSFET to overheat even at low duty cycles. |
| Gate Pulldown ($R_{GS}$) | Remove entirely | Load turns on randomly or pulses during ESP32 power-on reset, as the floating PCA9685 outputs pick up ambient noise before the I2C bus initializes. |
| I2C Pull-ups ($R_{pull}$) | Decrease to 1kΩ | Bus works, but the PCA9685 open-drain outputs must sink ~5mA per line. Increases IC power dissipation and wastes current; risks violating the 3mA standard I2C sink limit. |
| Flyback Diode | Remove on motor load | Inductive kickback ($V = L rac{di}{dt}$) generates 50V+ spikes at NODE_DRAIN, instantly punching through the MOSFET's 55V $V_{DSS}$ rating and destroying the silicon. |
Failure Modes: What Breaks at the Extremes?
Understanding how a pwm integrated circuit topology fails when components short or open is critical for debugging blown boards.
The Gate-to-Drain Short
If a solder bridge or failed MOSFET creates a short between NODE_GATE and NODE_DRAIN, the PCA9685 output pin is now directly tied to the high-current load node. The instant the load switches or a flyback spike occurs, high voltage feeds backward through the 100Ω gate resistor into the PCA9685. The IC's internal CMOS output stage is rated for a maximum of 5.5V. A 12V or 24V spike will instantly cause CMOS latch-up and vaporize the internal bond wires, permanently killing that specific PWM channel or the entire IC.
The Source-to-Ground Open
If the connection from NODE_SOURCE to Power GND breaks (open circuit), the MOSFET cannot complete the load path. The load stays completely off. However, because the gate capacitance still charges via NODE_PWM, measuring Gate-to-Source with a high-impedance multimeter will show the full 5V logic PWM signal. Beginners often misdiagnose this as a 'working gate drive but dead MOSFET.' Always verify continuity from Source to Ground (< 1 ohm) before condemning the semiconductor.
Paralleling MOSFETs: The Current Hogging Failure
If your load requires 20A, you might be tempted to parallel two IRLZ44N MOSFETs on a single PCA9685 channel. If you wire them in parallel without individual gate resistors, the MOSFET with the slightly lower $V_{GS(th)}$ will turn on first and hog the majority of the current. It will overheat, fail short, and then dump the entire 20A into the second MOSFET, cascading into a total failure. Rule: When paralleling MOSFETs, every single gate must have its own dedicated 100Ω resistor directly off the shared PWM node.
Step-by-Step Breadboard Testing Procedure
Follow this exact sequence to validate your pwm integrated circuit driver on a solderless breadboard before committing to a soldered PCB or perfboard.
- De-energize and Wire Logic: With all power supplies off, wire NODE_VCC (5V) and GND to the PCA9685. Connect SDA/SCL to your MCU, and install the 4.7kΩ pull-up resistors to the 5V rail.
- Wire the Gate Drive: Insert the IRLZ44N. Connect the 100Ω gate resistor from the PCA9685 PWM0 pin to the MOSFET gate. Install the 10kΩ pulldown resistor between the gate and source pins.
- Verify Ground Continuity: Set your multimeter to resistance mode. Measure across the MOSFET source pin and the main power supply ground terminal. You must read < 1 ohm. If higher, fix the breadboard contact.
- Connect Load and High-Voltage: Connect the load's positive terminal to NODE_VLOAD (e.g., 12V supply). Connect the load's negative terminal to the MOSFET drain. Place the 1N5819 diode across the load (stripe facing NODE_VLOAD).
- Logic-Level Test (No High Voltage): Power only the 5V logic rail. Upload an I2C scanner sketch to your MCU. Verify the PCA9685 responds at address
0x40. Command a 50% duty cycle and measure NODE_GATE with an oscilloscope or multimeter (expect ~2.5V DC average). - High-Voltage Test: Power the 12V load supply. Command 10%, 50%, and 90% duty cycles. Monitor the MOSFET temperature with an IR thermometer; it should remain near ambient (< 40°C) at 1kHz due to the 22mΩ $R_{DS(on)}$.
FAQ: PWM Integrated Circuit Design Questions
Can I use a standard NPN transistor instead of a MOSFET with this PWM integrated circuit?
Technically yes, but practically no for high currents. An NPN BJT like the TIP120 is current-controlled, meaning you must supply continuous base current to keep it saturated. Driving a TIP120 to pass 5A requires ~20mA of base current, which is dangerously close to the PCA9685's 25mA absolute maximum pin limit. Furthermore, the TIP120 is a Darlington pair with a high saturation voltage ($V_{CE(sat)}$ ~ 2V), meaning it will dissipate 10W of heat at 5A. A logic-level MOSFET like the IRLZ44N is voltage-controlled, draws virtually zero steady-state gate current, and dissipates less than 1W at the same load.
Why is my PCA9685 PWM integrated circuit outputting a stuck 5V signal?
If a channel is stuck HIGH, the internal output register may be corrupted, or the output pin has been physically damaged by a voltage spike exceeding 5.5V. First, perform a software reset by sending the general call reset command (0x00 followed by 0x06) over I2C. If the pin remains stuck at 5V, measure the resistance between the PWM pin and VCC with the power off. A reading of less than 10 ohms indicates a blown internal ESD protection diode or shorted CMOS FET, meaning that specific channel is permanently destroyed.
How do I calculate the I2C address for multiple PWM integrated circuits on one bus?
The PCA9685 datasheet defines a base 7-bit address of 1000000 (0x40). The IC features six address pins (A0 through A5) that allow you to hardcode the lower six bits. If you bridge A0 to VCC, the address becomes 1000001 (0x41). Bridging A0 and A1 yields 1000011 (0x43). This allows up to 62 PCA9685 ICs on a single I2C bus, controlling 992 individual PWM channels. Always verify your physical jumper settings with an I2C scanner script before writing complex multiplexing code.






