Mega 2560 + I2c Pca9685 + long wires

Hi:

I need to control 16 servos, looks like the I2c Pca9685 driver will save my day.

Does it run on the Adafruit library? And Wire.h?

Some servos will be located up to 3 meters (9 ft.) from the board. Will this cause any problem?

Thanks

rva1945:
Some servos will be located up to 3 meters (9 ft.) from the board. Will this cause any problem?

Depends on the wiring (capacitance).
Use e.g Cat-5 or Cat-6.
Run clock/ground on one pair, and data/ground on another pair.
Use the remaining pairs for power (for the PCA) and ground.

The Mega has 10k pull up resistors onboard, and so has the Adafuit board.
That's a combined pull up resistance of 5k.
If there are problems (unlikely), add extra pull up resistors.
Leo..

What happens if there is a delay between powering up the Arduino with the Adafruit and the servos already connected and powering up the Adafruit with an external 5V source? Will current drain from the servos fry the Arduino?

Because if I power up everything, the servos will turn like crazy until they get their signals, and I'm afraid something will be broken, that's the reason why I want the servos to be powered AFTER they are already getting their signal.

The 16 servos will be enaged to a model railroad turnouts.

I will collect my Adafruit tomorrow, until then I can only guess at how it works. In a best case scenario, the servos are not connected to VCC, which will only power the Adafruit's logic, so they will not be powered until I connect the source to V+ terminals in the Adafruit.

rva1945:
What happens if there is a delay between powering up the Arduino with the Adafruit and the servos already connected and powering up the Adafruit with an external 5V source? Will current drain from the servos fry the Arduino?

Because if I power up everything, the servos will turn like crazy until they get their signals, and I'm afraid something will be broken, that's the reason why I want the servos to be powered AFTER they are already getting their signal.

  1. Nothing bad can happen to the Arduino or PCA9685.
    Servo power is (should be) completely independent of Arduino/PCA9685 power.

  2. Never connected servos to this chip myself (I only use them for LED downlights), but there is a OE (output enable) pin on the board. That could be used to disable servo control untill everything is powered up.

People that have used this PCA9685 board for servos might have another way to fix this.
Maybe wise to post your code (use code tags).
Leo..