PCA9685

Component/Hub

The PCA9685 component represents a PCA9685 12-bit PWM driver (datasheet, adafruit) in ESPHome. It uses I²C Bus for communication.

To use the channels of this components, you first need to setup the global pca9685 hub and give it an id, and then define the individual output channels.

# Example configuration entry
pca9685:
  frequency: 500

# Individual outputs
output:
  - platform: pca9685
    pca9685_id: 'pca9685_hub1'
    channel: 0

Configuration variables:

  • frequency (Required, float): The frequency to let the component drive all PWM outputs at. Must be in range from 24Hz to 1526Hz.
  • address (Optional, int): The I²C address of the driver. Defaults to 0x00.
  • id (Optional, ID): The id to use for this pca9685 component. Use this if you have multiple PCA9685s connected at the same time

PWM Output

The PCA9685 output component exposes a PCA9685 PWM channel of a global PCA9685 hub as a float output.

../../_images/pca9685-full.jpg

PCA9685 16-Channel PWM Driver.

# Example configuration entry
pca9685:
  - frequency: 500

# Individual outputs
output:
  - platform: pca9685
    id: 'pca9685_output1'
    channel: 0

Configuration variables:

  • id (Required, ID): The id to use for this output component.
  • channel (Required, int): Chose the channel of the PCA9685 of this output component. Must be in range from 0 to 15.
  • pca9685_id (Optional, ID): Manually specify the ID of the PCA9685 hub. Use this if you have multiple PCA9685s you want to use at the same time.
  • All other options from Output.