How to move a servo 1/10th degree?

Hi Group,

For more precision I would like to move my servo to forexample 45.25 or 56.75 degree angle.Using myservo.write() does not produce the correct result.
Is there a solution to solve this??


The servo library has a method writeMicroseconds which gives you more granularity. Unless you have a really fancy servo though, I doubt you'll get the accuracy you're looking for.

I doubt that's possible. Servos have a built-in potentiometer to feed-back the position and pots aren't perfectly accurate & precise.

A geared-down stepper motor would probably work better but gears suffer from [u]backlash[/u] and you still need a precise zero/starting point so that wouldn't be easy either... You can probably gear-down enough to get an accurate 1/10th of a degree change (as long as you don't reverse) but 1/10th of a degree absolute accuracy is more difficult.

The metal geared servos will, my experience, respond to .7 of a degree of torque values.

500-2500uS for 180 degrees. Begets 11.11uS per degree, .5uS is about 1/2 degree.

You will need a precision and expensive mechanism to achieve 0.1 degree positioning. Beware of backlash with gears.

Thanks for the response,

Along the way i found this code:

unsigned int degree2ms(unsigned int degrees)
  return  1000 + degrees * 150 / 27;

and tested it this way:

Serial << degree2ms(pos) << endl;
Serial << degree2ms(pos +.25) << endl;
Serial << degree2ms(pos + .5) << endl;
Serial << degree2ms(pos + .75) << endl;

but it gave the same result 1683 where pos is defined as a float.


If you pass a float to a function that takes an unsigned int, the fractional part is dropped.

torque servo uS is done with a whole number.

What is the application that needs servo positioning so small?

Thanks.. Tom... :slight_smile:

Which servo do you have?

With cheap and common hobby servos you should be happy with a resolution of maybe a bit better than 1°, but reproducibility of the position will be far less (i.e. if you repeatedly move from 30 to 80°, it will probably end up somewhere between +/-2-3°of the first 30° position you had). In many situations that is good enough; if you have a feedback loop the position will automatically correct up or down and end up correct regardless of the actual number.

torque servo uS is done with a whole number.

It's a lowercase 's' for seconds.
S is the SI unit for conductance (Siemens)


unsigned int degree2ms(float degrees)
  return  1000 + (unsigned) (degrees * 150.0 / 27.0);

It's a lowercase 's' for seconds.
S is the SI unit for conductance (Siemens)

Peachy keen and Joe Cool.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.