Pan tilt kit servos oscillating randomly using ArduCAM PCA9685

I’ve got the pan tilt kit running with the PCA9685 repo from the manual (GitHub - ArduCAM/PCA9685: This library is used for Arducam Pan Tilt Camera for Raspberry Pi · GitHub), and the servos are vibrating/oscillating randomly all the time. It gets really aggressive if I hold the base down. I’m not sure if I’ve misconfigured something in the code or if the board itself is bad. Anyone seen this before?

That’s definitely not normal behavior. Could you give us a bit more info — what supply are you using for the servo rail (voltage/current), and is it both servos or mainly one? Also which example sketch from the repo are you running? A short video and a couple of photos of the wiring would help a lot.

Here’s a video and two photos of how it’s wired. I’m running the example from the repo, both servos jitter but the base servo is worse. Power is a 5V supply into the servo rail.

Video: https://cdn.arducam.com/forum/1b8cd3dcf54cc90a04607fe1abb2365a/WhatsApp%20Video%202023-11-14%20at%2000.10.28.mp4

Photos:

Thanks, that video is really useful. Before we blame the board, let’s rule out a few things. First, confirm the PWM frequency is set to 50Hz. Then try driving only one servo at a time with a fixed pulse (no sweeping). Also try powering the servos from a separate 5V supply with the grounds tied together. Does it oscillate even when idle, or only while moving?

Okay so I set 50Hz, tested one servo at a time with a fixed angle, and powered the servos separately with a common ground. It still vibrates even when idle. When I hold the base down it turns into a violent oscillation. The repo’s default example and a simple fixed-pulse test both do the same thing, so I’m fairly confident it isn’t the sketch.

Thanks for going through all that. Based on the symptoms and your tests, this points to a hardware fault with the B0283 board rather than a PCA9685 software/config problem. Random oscillation at idle that gets worse under mechanical load (holding the base) is consistent with a defective unit, so there’s no software change that’s going to clear it up.