I was trying to control a Tower Pro SG-5010 servo motor using a Raspberry Pi 4, with the python code below, but after working for a minute or so, the servo started not turning for some of the commands, and now makes a clicking sound when it should be turning, but does not move at all. The servo is powered with a breadboard power supply through a 100 uF capacitor, and connected to the ground pin of the raspberry pi. This same code and wiring worked to power some continuous rotation servos I have, but not this regular servo. I don't have a multimeter or any fancy tools to measure voltage, current, etc. and I didn't notice any physical signs of damage to the servo.
Afterwords, I realised that servo.value = None
isn't necessary for a regular servo, though I was using it for the continuous rotation ones, and wondered if it may have caused the problem.
I am very new to electronics and am not sure what caused my servo to break, or what I can do if I get a new one to prevent the same thing from happening.
from gpiozero import Servo
from gpiozero.pins.pigpio import PiGPIOFactory
from time import sleep
factory = PiGPIOFactory()
servo = Servo(6, pin_factory=factory)
while True:
servo.max()
sleep(0.5)
servo.min()
sleep(0.5)
servo.value = None
sleep(2)