I have a small project to drive a servo with an Arduino Pro Mini using 2 push buttons - one for clockwise movement and the other for counterclockwise movement. The logic is simple and the sketch is correct. The problem I am having is the servo behavior varies with the power source and whether I have an ammeter in the circuit. A copy of the schematic is attached.
If the circuit is powered from a USB connection (bypassing the 7805 voltage regulator) the servo works as intended.
If it is powered from a 9V battery the servo movements are erratic and often it will simply stall and not move at all until power is reset.
However, if I plug an ammeter into the circuit between the voltage regulator and the servo power pin the servo works as intended.
Clearly the ammeter is having some effect but I can’t figure out what that is and how to either replicate it in my circuit or design my circuit so it isn’t an issue.
I’m pretty new to this so any help would be appreciated.
TWO-BUTTON-SERVO-CONTROL.pdf (28.5 KB)