Can Arduino/ Servo Achieve mm Position Accuracy? Contribute to Neuroscience!

Hi Everyone,

Please bear with me, as I am VERY new to this Arduino 'stuff' (for context, I bought the Arduino for Dummies book and starting reading it yesterday). It may seem a little premature to ask a forum question, but I need to get a project up and running ASAP for work and would really appreciate input on what combination of Arduino/ servo I need if I am to do the following:

Use Arduino 'sketch'/ code to drive a servo that would rotate to 'pull' a very small rod attached to a pin. The rod would pull towards the top of the pin, whilst the sharp end would be inserted into a base (material similar to plasticine). I want the pin to move a very small distance (approx. 1-2mm towards the servo), hold this position for 1-2s, then return to its start position.

I am confident Arduino plus servo could deliver this for me, but would appreciate it if you more experienced people could confirm that please. I would also like to know whether or not typical 'hobby' servos are capable of this level of precision. In summary, my questions are:

  1. Is an Arduino/ servo combination suitable for the above application (italics)?
  2. If so, is a hobby servo sufficient or do I need something else?
  3. Does code for a similar application exist and if so, where?

Thank you very much for your help. If anyone feels charitable enough to be particularly helpful/ guide me through this project, I would be happy to acknowledge you in future publications. For reference, I am a PhD student (Neuroscience) at the University of Edinburgh, so assuming my work is published, your acknowledgement would appear in reputable scientific journals.

I would also like to know whether or not typical 'hobby' servos are capable of this level of precision.

A typical hobby servo has plastic gears that are rather crudely made. The are NOT scientific instruments.

A typical hobby servo has a repeatable position of 1 degree. How far something moves, when it is attached to the servo arm, has to do with where, along the arm, it is attached. You have given no information about that.

A servo with metal gears is not all that much more expensive, and will have better repeatability.

A stepper motor will have more torque and even better repeatability, and can usually be made to micro-step.

Hi Paul,

I have a lot of flexibility in how long the arm is/ how far along the arm the pin is positioned, hence not reporting the length of it. I understand that this makes it difficult to provide input and apologise for that. With that said, knowing the typical precision is 1 degree is very useful, as I can use that to consider the length of the arm/ position of the pin on the arm (and I believe 1-2 degrees will be sufficient to produce 1-2mm pin movement based on my setup). Thank you very much for your help regarding servo gears/ stepper motors. I was considering stepper motors but heard that they were more expensive, and I do not require much torque (as pin movement really is my only application for this project). I was also worried that acceleration was poor with stepper motors. Is that the case? With that said, your statement regarding better repeatability warrants the extra cash, given my application. Again, I apologise for my ignorance but would like to ask: In your opinion do you believe that a stepper motor would be more applicable (than a servo, even if it has metal gears) to my project?

I was also worried that acceleration was poor with stepper motors. Is that the case?

No worse than with servos. There is a mass to be moved. That requires a specific amount of current and voltage. Provide at least that much, and you can achieve the change in velocity needed. Provide less, and the acceleration will be reduced.

In your opinion do you believe that a stepper motor would be more applicable (than a servo, even if it has metal gears) to my project?

I don't know your budget, how many motors you need, your torque requirements, your acceleration requirements, or your power supply, so I can't really comment.

Hi Paul,

Thanks again. If I go away and do some more reading/ research (determine the parameters you listed and look at potential motors), are you happy for me to contact you directly (PM via this forum) with what I find please? I would appreciate input from someone with your experience.

Thanks again for being so helpful

While you are at it, you might consider: Find a Mechanical Engineering, or Physics, student. Buy him/her a glass of decent Scotch, and ask them to explain things like levers, gear ratios, gearing speed vs. torq loading,
the meaning of life, the universe, and everything.

Buy him/her a glass of decent Scotch

Students work for beer. Professors need to be paid in Scotch.

123Splat does being up a good point, though. Someone local is a better choice.

When you put a wire into the innermost hole of a servo horn, you can figure out yourself how far it moves over a full or part of the servo rotation range. If you need a bigger distance, use the next outer hole. For better linearity remove the servo horn, and attach a toothed rack to the gear wheel.

This sounds to me like something that you need to determine by experiment. Buy a servo - perhaps not the cheapest nor the most expensive and see what results you get.

I suspect a lot will be determined by the mechanical aspects of the stuff connected to the servo as much as by the servo itself.

It will be important to choose a servo with sufficient torque for the job.

People regularly fly expensive model aircraft with servos to operate the control surfaces. They are clearly sufficiently reliable and repeatable for that purpose. Aircraft controls are sensitive.


Neuroscience, eh?

It is a long time since I was a Research Assistant. We were using vernier screws. Rather large ones, larger than these:

What gave me great heartache at the time was that (even back then) it would have been so eminently sensible that rather than having a Research Assistant twiddle the drum back and forth, it should have been microprocessor controlled using a stepper motor (which allows you to make precise movements) drive the screw to precise repeatable positions.

Note that with a stepper, you require a "zero sensor", generally an opto-interrupter which detects a "flag" passing through. For a screw, one along the axis and one on the periphery.

Hi everyone, thanks for your input. Vernier scale/ screws are still going strong. Use a set of them for my micromanipulator. I hope that makes you happy Paul :slight_smile: Things are coming along nicely here and a chat with a robotics researcher here (Uni of Edinburgh) has revealed that things called micro linear actuators/pullers exist, and I need one. Now to begin trying to understand which one I want. Anyone know of anywhere/ anything (website/ book etc.) here the COMPLETELY uninitiated can learn about torque/acceleration etc. in context of electronics please?

Torque, acceleration, etc. are studied in physics. Any introductory physics textbook should give a decent overview.

A stepper motor and threaded drive rod out of a printer might be an option, as resolution of 1200 dpi and more are pretty common. A servo with distance reducing linkage might also work. Surplus vendors often have printer parts and similar.

A small stepper motor with either a captive or non-captive lead screw would work. This NEMA 11 non-captive stepper has 2mm of travel per revolution, 200 full steps, or .01mm per step. To go with it you would need a ~$3 "stepstick" and an Arduino.