Servo Jams with reset_servo

reset_servo() seems to “jam” the servo to one side, and the servo motor keeps running trying to turn past it’s extreme point (I think it’s 0, but could be 180).

  1. How do I fix this?
  2. OR, how can I set the servo to look forward on app start?


Hi @vincent.serpico,

Could you use the following method and tell us if setting it to 90 is setting the servo arm forward?

If that’s true, then I think we need to fix the documentation.
Please let us know how it goes.

Thank you!

I attached two photos, before and after.

As you can see, before the servo arm is at it’s far extended position.
After executing Servo.rotate_servo(90), it tries to extend beyond its furthest position and never stops. I have to shut the device off to get it to stop.


Hi @vincent.serpico,

I’ve tested the code with our servo using the documentation and we haven’t had any problems.
What I would do now if I were you would be to test the servo by setting it to every value between 0 and 180 - 10 degree increments should be enough.
Telling us where it starts to position itself and where it ends would be really good - in fact, the more information you give us the better.

That’s definitely not a good thing and we need to identify what is the issue.

Thank you!

Hi @RobertLucian

I have attached a series of images that detail what I did at each step.

My goal is to be able to programmatically reset the servo to the center.

Also, a question: If the servo is rotated to the extreme 180 position, and rotate_servo(180) is called, will the servo jam and continue running it’s motor until shit down? That’s what it does for me.

Finally, I am available for a call if that would help. If you have paid support, I will buy support, as I want this issue resolved.

1 - Manually rotated fully to the left2 - Manually rotated fully to the right3 - Manually rotated to about the middlerotate_servo(10) - from middle positionrotate_servo(-10) - (from position in image 4)

I am seeing the same behavior as vincent.serpico. When I call reset_servo() it jams the servo to the extreme 0 degree position (clockwise when looking at the servo from above).

This is the code from

    def reset_servo(self):
        Resets the `servo`_ straight ahead, in the middle position.

        .. tip::

           | Same as calling ``rotate_servo(90)``.
           | Read more about :py:meth:`~easygopigo3.Servo.rotate_servo` method.

        self.gpg.set_servo(self.portID, 90)

As this is setting the servo position with pulse width in microseconds (according to the code in, shouldn’t this code be changed to:

 def reset_servo(self):
        Resets the `servo`_ straight ahead, in the middle position.

        .. tip::

           | Same as calling ``rotate_servo(90)``.
           | Read more about :py:meth:`~easygopigo3.Servo.rotate_servo` method.

        self.gpg.set_servo(self.portID, 1500)

Servos behave as expected when calling rotate_servo()

1 Like

Hi @vincent.serpico, @kev.r,

Observation about Servos

Okay, so there’s one thing to know about servos in general: it’s said a servo will go from 0 degrees to 180 degrees, but in reality, they may start at say 4 degrees and go up to 175 degrees, or start at 0 degrees and go upward to 185 degrees - every servo is a bit different one to another so you have to find its extremities by experimenting with it.


Thanks, @kev.r, for pointing out that issue - it should have been indeed set to 1500uS, which is the middle point between 575uS and 2425uS. We have just solved that issue through the following PR:

In order to bring in the new changes, type in the following command:

sudo curl -kL | bash

Please let us know both of you if this solved your problems.

Thank you!

Hi @RobertLucian

Thank you, but the servo still jams to the extreme 0 degree position when I call reset_servo()

@RobertLucian the issue is resolved for me. Calling reset_servo() now causes the servo to move to the 90 degree position. I wasn’t really having any issues - just trying to learn by following the forums here.

@vincent.serpico can you try this code:

import time
import easygopigo3 as easy
gpg = easy.EasyGoPiGo3()
servo = gpg.init_servo()
for i in range(10,180,10):

Your servo should go from 10 degrees to 170 degrees in 10 degree steps then reset to the center position. (The last 2 lines are functionally equivalent if you’ve applied the update as instructed by @RobertLucian above)

1 Like

Thanks, @kev.r

I followed your code, and it still jams bad.

Any suggestions I can do to the hardware itself?


@vincent.serpico You wrote above that your servo is jamming when you execute servo.rotate_servo(90)
I don’t understand this unless your software is corrupted somehow. Have you updated the software on your gopigo3 recently? If not, I would give that a try (or even re-image your SD card). If that doesn’t help, you might have a hardware problem (bad servo or GoPiGo3 board). Do you have any other servos you could try?

I see in one of your photos above, that you called servo.rotate_servo(-10) the servo_position parameter for this function should be between 0 and 180 (any values below 0 are changed to 0 and any values above 180 are changed to 180).

@kev.r My software is up to date. Maybe I have a defective servo.

@RobertLucian, how can I trade in my servo for a new one?

Hi @kev.r,

I’ve tried the code provided by you and it worked for me fine, though on the last step (at 170 degrees), my servo is buzzing, which is fine and that means that’s how much it can rotate. Bottom line is that things look good now. Fun fact: my servo can only go from 0 degrees to 164 degrees.

@vincent.serpico, if your servo is plugged correctly into the SERVO1/2 port and you get a buzzing noise, then you have a faulty servo and we need to replace it. I’m bringing @ChrisDooley into this discussion so he can help you get a new one.

Just for reference, the:

  • "-" pin goes to the brown wire.

  • "+" pin goes to the red wire.

  • "SIG" pin goes to the orange wire.

Thank you!

A post was split to a new topic: Servo jams - do I need replacement?