Digital Servo is continuously rotating.

Hi,
I am new to coding and have been working with a digital servo to try to control a robotics hand, but while working with the servo I attempted a speed control code. After attempting the code it appears now the servo just constantly turns in the same direction (once connected to power it automatically turns even without signal wire connected).
Any suggestions on how to stop the continuous rotation? I would simply like to use the 180 to 0 degree sample code from arduino library, but it is not correcting the issue when I try to upload it.

Any suggestions on how to stop the continuous rotation?

it sounds like you have a continuous rotation servo. Continuous rotation have had their feedback element disconnected so they are no longer a servo that is able to seek and maintain a position but only a geared motor with speed control.

I would simply like to use the 180 to 0 degree sample code from arduino library

Then you need a real servo that has a working feedback element (potentiometer tied to the output shaft).

Which servo do you have? Give us a link to it.
Did the servo previously work for 0-180 operation?

Is mentioned above, some servos are offered or user modified to remove the positional awareness hardware. These are often referred to as 360 servos or continuous rotation servos. There is frequent confusion over how these operate and how these differ from standard servos. Knowing what you have would help us help you.

Some standard servos have an unexpected failure mode. When the are given a servo command outside of their acceptable range, the rotate continuously.

What have you done to speed control the servo ?

Servos usually take a PWM signal that determines the position . You could only “speed” control a servo by moving it a small distance, waiting , move again, and so on.

The sample code did previously work and it was a PWM command I had attempted before the issue happened. The servo I have is LD-20MG Lobotomy’s digital servo 20 kg*cm. Here is a link to it on amazon:

https://www.amazon.com/LOBOT-LD-20MG-Torque-Digital-Models/dp/B0755P29YT

Try loading up the simple servo sweep tutorial. What does the servo do?

I’ve attempted that in a couple different ways to no avail. When the servo is powered by the arduino it pulls too much power making it impossible to upload the code. So I’ve tried using an external power supply with the signal connected to arduino to no avail ( doesn’t even stop for a few moments).

I think you are saying that the servo continuously rotates whenever power is applied and the signal has no effect on the speed or anything else. It's supposed to be a 180 degree servo so if that's true then it sounds like the controller in the servo is dead.

Steve

That’s exactly right. I believed that was a possibility, but was unsure. Is there anyway to correct it such as any replacement components?

acdavis1999:
I’ve attempted that in a couple different ways to no avail. When the servo is powered by the arduino it pulls too much power making it impossible to upload the code. So I’ve tried using an external power supply with the signal connected to arduino to no avail ( doesn’t even stop for a few moments).

Yes, a servo powered by the arduino is problematic. Sometimes OK for a single, unloaded small servo. But much better to go with a separate power supply.
Did you connect the grounds?

acdavis1999:
That’s exactly right. I believed that was a possibility, but was unsure. Is there anyway to correct it such as any replacement components?

I suspect that a replacement servo is the only solution. The only replacement parts I have seen for hobby servos is gear trains, and those only for some servo lines.

Yeah, I have tried grounded as well to no avail. I believe it is likely the circuit was blown when attempting to use an external power source. I had 9 volt wall adapter for an arduinonto power one that allows a direct ground and positive to connect to it and when I first connected it the servo was trying to move on its own in small steps as if the power was overloaded.

Your servo is rated to 7.4V and that normally means a 2S Lipo, so up to 8.4V fully charged. It would be unusual for only 9V to damage that but anything is possible, particularly if the wall adapter isn't well regulated so maybe delivering more than 9V.

Steve

Hi,
When you power the servo with an external power supply, and try and control it with the Arduino, do you have the gnd of the Arduino and the gnd of the external power supply connected together?

As in this diagram.
Servo_Pot_UNO.jpg
Tom… :slight_smile: