Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Rotation angle of Servo???

Status
Not open for further replies.

ecaits

New Member
I am working on Arduino Uno based project to control the multiple servos.

I am using Vigor VS 2 servo. As per data sheet, its output angle is >=170 degree and pulse traveling 800 to 2200 μsec.

When I give command of 90 degree to rotate, it rotate slightly more than 90 degree but when I give command of 85 degree then it is looking like exact 90 degree.

I have written simple program as written below.

Servo myservo;
int pos = 0;
void setup()
{
myservo.attach(9);
}
void loop()
{
myservo.write(85);
}

What I require to modify to get the exact angle as per program code.

Thank You,

Regards,
Nirav
 
Servo's are not all EXACLTY the same so you would need a calibration map or a 180 digit lookup table..

if you calibrated 0 position by turning the servo to suit the 0 position, then give the "myservo.write(85);" then measure the actual angle you then can map the real value to the desired angle..

Most servo's do not have the complete 180 degree operation 165~170 at best!!
 
That is an analog, low cost ($5.35 at HobbyKing) servo. Its deadband specification is 5 uS, which is probably a bit optimistic. It has a conventional brushed motor and uses a standard carbon potentiometer for feedback. There is also slop in the gears.

Calibration is certainly an issue as 5° out of 90° is not much more than 5%. Once calibrated, if the reproducibility is not adequate for your needs, consider a digital servo with a better motor.

John
 
As for a code mod, just try subtracting 5 from the angle parameter. So 80 in code should give roughly 90° angle in practice.
 
A few years back, I created A Clock for Geeks. I used a 4310 Futaba servo, which is known for its linearity. The accuracy across the scale was good enough for the task.

When I recreated the clock, I used a no-name cheap servo. The accuracy wasn't so good, with approximately 20 minute errors in the indicated time across the scale. I had to use a lookup table with the cheap servo. Servo Clock Calibration.

image.jpg
 
"There is also slop in the gears." Slop does not come into it.
Despite that comment being six months late, it is not accurate.

The TS is asking about accurate positioning. Gear slop is a little like backlash in a machine tool's positioning controls, like in a vertical mill. Backlash can be compensated for to an extent by always approaching the final position from the same direction, for example, pulling the table toward you or pushing to the right, but that does not completely remove its effect. That type of compensation is rarely, if ever, done with these light-weight, inexpensive servos. Yet it is certainly a concern when accurate positioning is needed. Also, the potential for the orientation of the servo relative to gravity or other forces (e.g., aerodynamic forces on a control surface) can change, which adds slop-related error that cannot be compensated for in the manner described for machine tools. Any movement due to such slop is not detected by the feedback.

John
 
"Despite that comment being six months late, it is not accurate. "

The pot is connected directly to the output shaft. Slop does not come into it.
 
Not trying to start anything, you all just got me to wondering, how does the pot connect to the shaft? I never pulled a servo apart as they use to cost a lot of money back when I played with RC cars.

servo+motor3.JPG
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top