I am making an automated water turret, purpose built to keep cats off of the counter. I call this, Counterstrike.
The hardware design consists of a raspberry pi 3b+, two MG996R servos which provide pan and tilt controlled by a PCA9685 servo controller. The sprayer is a 5v pump - this is the component I need help with.
The pan tilt system works flawlessly. Cat targets are properly acquired by a tensorflow object detector, and then tracked with a lucas-kanade based tracker. However, once the target is locked and I energize the 5v spray pump via a relay, there is a significant voltage drop and the servos go haywire, losing the target.
I already experienced this issue when I was first setting up the servos and suffered from servo jitters. I added a dedicated power supply and the servo controller, which fixed the jitter issues. This new power supply is 5v 2A, so I expected it to be able to run two servos and the sprayer motor. But running the motor and servos simultaneously isn't working.
So far I have tried:
-Running the motor of the RPi power supply, causes the RPi to reset
-Wiring the motor directly to the servo power supply. Causes the servos to behave erratically
-Wired the motor to the servo controller, in the hopes the on board capacitor would stabilize the power drops. There didn't seem to be a difference.
I really don't want to add another powersupply just for a motor, as I already have two. Do I just need a bigger one, like a 10A? What else can I try?
Thanks for your time!