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.value = None
  • what is wrong with the servo?
    – jsotola
    Commented Feb 24 at 22:03
  • @jsotola it no longer moves at all when I run the script, and makes a clicking sound
    – guest1253
    Commented Feb 24 at 22:53
  • open it and figure out what is the problem
    – jsotola
    Commented Feb 25 at 1:54
  • @jsotola I opened it and looked at the gears, and it looked like the motor itself was having trouble turning possibly? I don't really know anything about how servos work but it looked like the gears were fine
    – guest1253
    Commented Feb 25 at 2:40
  • if you cannot figure out what is broken, then you cannot figure out what broke it ... maybe the servo simply failed
    – jsotola
    Commented Feb 25 at 3:23

1 Answer 1


Based on the information supplied I would say you have forced the servo to move past its end stops.

Not all servos support pulse widths outside the range 1000 to 2000 µs. Perhaps servo.max() and servo.min() are outside that range.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.