Difference between revisions of "PCA9685"
Jump to navigation
Jump to search
(Created page with "= Introduction = The number of GPIO pins on the ESP module can be expanded with a PWM Expander. We will use the PCA9685 that provides 16 more pins that can be used as PWM outp...") |
Grovkillen (talk | contribs) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 15: | Line 15: | ||
SCL GPIO 2 | SCL GPIO 2 | ||
− | = | + | = ESP Easy = |
− | + | The device is listed in the device dropdown, but you don't have to select it. There's actually nothing to configure there and the logic will work without selecting this plugin. You can use the control web page to set PWM levels using http commands to ESP Easy. | |
− | + | = Commands = | |
− | |||
− | = | + | {| class="wikitable sortable" |
− | + | |- | |
+ | ! Command | ||
+ | ! Value | ||
+ | ! Extra information | ||
+ | |- | ||
− | + | | PCAPWM,<pin>,<value> | |
+ | | '''0...4095''' | ||
+ | | Control PCA9685 pwm level. | ||
+ | |- | ||
− | + | | PCFGPIO,<value> | |
− | + | | '''1,0''' | |
+ | | Control PCF8574 output pins. | ||
+ | |- | ||
+ | |||
+ | | PCFPulse,<pin>,<value>,<duration> | ||
+ | | '''1,0''' | ||
+ | | Pulse control on PCF8574 output pins (duration in mS, MILLIseconds) | ||
+ | |- | ||
+ | |||
+ | | PCFLongPulse,<pin>,<value>,<duration> | ||
+ | | '''1,0''' | ||
+ | | Pulse control on PCF8574 output pins (duration in S, seconds) | ||
+ | |- | ||
+ | |} |
Latest revision as of 18:11, 16 October 2017
Introduction
The number of GPIO pins on the ESP module can be expanded with a PWM Expander. We will use the PCA9685 that provides 16 more pins that can be used as PWM output. This way it becomes possible to control 16 dimmable LED's
Hardware
The PCA9685 needs to be connected through the I2C interface. This chip is compatible with 3V3 and it can be connected to the ESP without levelshifters..
Connections
PCA9685 ESP-01 GND GND VCC VCC SDA GPIO 0 SCL GPIO 2
ESP Easy
The device is listed in the device dropdown, but you don't have to select it. There's actually nothing to configure there and the logic will work without selecting this plugin. You can use the control web page to set PWM levels using http commands to ESP Easy.
Commands
Command | Value | Extra information |
---|---|---|
PCAPWM,<pin>,<value> | 0...4095 | Control PCA9685 pwm level. |
PCFGPIO,<value> | 1,0 | Control PCF8574 output pins. |
PCFPulse,<pin>,<value>,<duration> | 1,0 | Pulse control on PCF8574 output pins (duration in mS, MILLIseconds) |
PCFLongPulse,<pin>,<value>,<duration> | 1,0 | Pulse control on PCF8574 output pins (duration in S, seconds) |