I am totally desperate and hope you can help me. I've been building a project for a while where I have to control several servos. For this I bought some MG996R servos and a PCA9685 16-Channel Servo Driver board. Furthermore, I bought a suitable power supply (DV 5V - max 3A).
First, I connected my controller and the board as follows and attached the power supply at the intended place:
Everything worked as desired and I could control e.g. one servo with this example script.
#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>
Adafruit_PWMServoDriver myServos = Adafruit_PWMServoDriver();
#define SERVOMIN 150
#define SERVOMAX 600
uint8_t servonum = 0;
uint8_t numberOfServos = 1;
void setup() {
myServos.begin();
myServos.setPWMFreq(60);
delay(10);
}
void loop() {
myServos.setPWM(0, 0, 500);
delay(1000);
myServos.setPWM(0, 0, 300);
delay(1000);
}
Then I tried something and reconnected a few cables while the power supply was still on (my bad) - after that no servo moved with the original setup (see picture above). After that I tried to find the broken part but couldn't find any - so I bought a new Arduino, PCA board and power supply to try and find the error - unfortunately without success.
Then I found out by chance that the servos move again when I connect the ground of the external power supply to the Arduino and plug the positive pole of the power supply to the V+ with the PCA9685. That is,
I ordered a pack of three new PCA9685s and again same problem - the servos no longer move when using the designated place for the power supply on the PCA9685 board - what is going on? Can anyone explain this and help me where the problem is?