I rather new to the ESPHome whorld and came across the PCA9685.
I am currently busy with building a tilt / pan head for a webcam. I want to control the servos with the help of a PCA9685 and an ESP8266 via home assistant / ESPHome.
Looking at Google this seems to be a rather odd idea. Somehome it appears to me that the PCA9685 is rather well used with light but not with servos. Anyone out there using the PCA9685 with servos?
As I haven’t got any hardware at hand I cannot test my ideas. From the Youtube videos I found (working educational examples) I gathered some information and these are my ideas so far:
@nickrout :
Have you got any idea how many servos can be attached using ESPHome and the servo code while having a proper working WiFi connection?
I fear that this might become a problem and therefore I’d rather delegate the load of creating PWM to the PCA9685 module.
As the module can take an I2C address in an address range several of those those modules can exist in parallel on the I2C bus. Just in case one feels to have 64+ servos connected…
The author of the videos uses Arduino IDE to program the ESP. A rather simple C program is used to send commands via I2C to the PCA9685 module.
It is really easy to implement the servo control in C / C++ thanks to the library and additional functions. I could of course add a bit of MQTT code to the example program and integrate it via MQTT in HA. But as I rather want to have it totally in ESPHome / HA…