Go Down

Topic: Servo only goes 90º (Read 1 time) previous topic - next topic


Mar 27, 2011, 08:00 pm Last Edit: Mar 27, 2011, 08:03 pm by uitwear Reason: 1
Hello folks,

I have recently bought five servos:
A. 2x HS-311 - standard servo
B. 1x HS-5625MG - digital high torque
C. 2x HS-7955TG - digital high torque

They are all new, in good condition and, accordingly to specifications, can travel 180º.
I am using the Arduino Mega 2560 and an external power supply, that can provide enough current. I'm running each servo at a time for now.

If I use the servo program from the examples, the A (HS-311) servo runs perfectly well, no problems at all (runs the 180º range). However, if I use servos B or C they will stay "rigid" at the middle angle, although the readings from the Knob are ok.
I think the problem isn't with the wire connection: I double checked everything and all the connections are similar to the ones I found in the web (grounds connected,...), plus the fact that the A servos work.
Then I tried another approach, using the   myservo.writeMicroseconds(). Please check the program:
Code: [Select]

#include <Servo.h>
Servo myservo;

void setup()

void loop()
 for(int i=0;i<3000;i=i+1)

With this program the servo will run from about the 1000 us to 2000us, from 45º to 134º. I can not control them in the 0-44º or the 135-179º range. I used several values in the myservo.attach(2,min, max) but nothing as changed.
I could find some people facing the same trouble, but I couldn't find any solution. I really need the 180º range to work.
Could you please help me?
Thanks in advance!




for(int i=0;i<3000;i=i+1) is incorrect I think, I think you meant to do: for(int i=1000;i<2000;i=i+1)

Next to get 180 degree travel (assuming the servos are indeed capable of that much travel) you will have to find the minimum and maximum microsecond pulse width that the servo needs to travel that far, as 1000-2000 is obviously not enough. Sometimes the servo's datasheet will show it's extended travel pulse width values below and above the standard 1000-2000 usec values. So you might end up with using say: myservo.attach(2,800,2300);



Hello, and thanks for the quick answer!
I used the for from 0 to 3000 exactly to try to discover what the bounds are. I tried to change the values to the ones you said... servos now run much better: about 160º.
I think the problem is about to be solved using the correct bounds
Thanks a lot!

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131