Possible Code Issue?

Let's try something naughty

  • Disconnect the external power supply from the PCA
  • Disconnect all but one of the servos from the PCA and leave that one on channel 0
  • Make sure that the servo can move freely so that there is no load on it
  • Connect the V+ pin at the end of the PCA to 5V on the Uno
  • Run the sketch that you posted

This is naughty because the servo is being powered from the Uno, which is not desirable, but I would be interested in knowing the outcome

If the servo sweeps as it should then remove power from the Uno after a few sweeps as we don't want to damage the Uno by having it supply too much current. Having said that, I have never had a servo cause a problem to an Arduino board when powered this way for testing but it is not a long term solution