Author Options:

Problems With My HXT HX5010 servo. Answered

i recently bought a HXT  HX5010  twin bearing servo.First it did'nt work when i tried powering it off the arduino ,so i switched to a separate power supply and connected the gnd of the power supply to the gnd of the arduino and then it started behaving better.When i ran the "sweep" program on the arduino the servo started sweeping however i noticed that it did only around-about 160 degrees and not a full 180 degree sweep.Even when the servo tried to do a full 180 degree sweep,as it reached the far end(180 degrees) it would lock itself and not move and a low grinding sound would be emitted from the servo after it got locked.Does my servo have bad gears?,should i lubricate them?This is the first time i've ever used a servo ,so please help me out!


I think I'd test it again with the limits MUCH smaller - say 30 and 120, like Andy suggests.

See my reply in the other copy of this question.
Servos can get 'hung up' on the endstops if you push them beyond the limits.
Smaller servos can be damaged permanently by this.

Thank you for answering my questions.So if i mod the servo for continuous rotation ,will the problem be solved or should i change the gear system?No matter what program i run on my servo,it turns to the far left and it gets stuck there .If it's not too much trouble,please suggest me a program to see whether my servo is good/working that does'nt involve turning of the servo to its endpoints.

Try reducing the min and max limits as I suggested in the other post and change the limits in your FOR loops to something like 30 and 120.  Those values should work with any servo  and if it's still hanging up then you may have a faulty servo, or I'm missing something fundamentally wrong with your code (as I said, I'm not familiar with C / Arduino coding).
Converting it to a continuous rotation wouldn't help if it is a faulty servo.  If you do that you lose the positional control and can only alter the speed (or if you take all the control circuit out you can run it as just a motor / gearbox from a bridge motor controller).
Is there any way you can get hold of another servo to test?

Try powering up the circuit with no code or just a simple delay loop loaded. If it still goes all the way to the endstop then it's definitely a faulty servo.

I tried the following code and it seemed to work properly when it turned the servo to one of its ends(0 degree) :

Servo myservo;

void setup() {
void loop() {

However,if the servo is already at say,60 and if i servo.write(60) ,it goes 60 degrees further and then gets stuck and starts humming.I guess one of the gears are bad and i might need to get a new gear set.The humming i guess,is caused as the potentiometer is not getting any feedback and the motor keeps running trying to turn one of the gears to give a feedback,please correct me if i'm wrong.

Yep, I think you're right, or possibly the internal potentiometer is losing contact with the track and not feeding back the gear position, so the motor keeps driving and driving . . .

You've nothing to lose so open it up and see if you can find the cause - Just make sure you keep track of where the gears go.

As you said i tested the potentiometer with my multimeter and it showed 3.3k to 0 smoothly on each set of the pins properly,so i guess problem is either electronic or mechanical.When i was inspecting the gears i found lot of minute debris in between the teeths of the first gear.Could this be the cause of the problem,cause i don't think its big enough to affect the servo.

Forgot to add normally a servo has about 120 deg of motion unless you hack it to be more.


agreed.But why is the servo getting "locked/stuck" in a position and then not move?