# Servo Speed Control

I work in a robot using arduino, and i have a few questions: It is possible to increase the speed of a servo, for example a parallax? It is possible to measure the current that pass through a servo?

• Assuming the on-board controller is already driving the motor with full effort, the only way to increase speed is to lessen the load at the servo output, increase the voltage, or change the servo. You can of course measure the current, perhaps by measuring the voltage drop across a very small sense resistor. Generally speaking, continuous rotation servos (presumably what you mean when you reference parallax) are rather crude (and arguably open loop, not "servos" at all once so modified) so before investing much effort you may want to start with something better. – Chris Stratton Jul 5 '15 at 6:08
• If you are powering the servo from the arduino 5v rail you could try to power it from something else, if you use a battery pack or powersupply, then put the Vin of the servo directly to that instead of using the arduino 5v rail. It is not healthy to run high current stuff from the arduino rails anyways. – EJTH Aug 19 '15 at 8:52

# Part 1: Can I increase the speed of the servo motor?

## Solution #1 :

You can run your servo motor at its maximum rated voltage, which will give you the fastest response. If angle is all you want, that should be ok.

## Solution #2 :

If speed control is just as important, you're better off using a DC motor with an encoder. You will have to write a PI control loop, but in return you will be granted a fine-tune control and potentially superior performance.

## Solution #3 :

If you need to hold a physical load accurately at a certain angle, then I would go for a stepper motor. But you need to make sure that you do not overload it, as it will cause a misstep.

# Part 2: Can I measure the current?

The simplest and cheapest method, is to connect a current sensing resistor to your servo and measure the potential difference using the analog input. Since the resistance is known, you can calculate the current using the formula I = V/R.

Two things to make sure: 1) Your resistor power rating is not exceeded. 2) The voltage difference has to be large enough to be measurable. (e.g. 2 ohm resistor gives .05V @ 100mA, .5V @ 1A and your Arduino analog input may have the resolution of roughly 0.005V)

What? Did I hear you say that the accuracy isn't good enough? Well actually you can buy an op amp to amplify to the scale that you need. Or to make life easier: buy one from Adafruit. :p

Hope this helps.

The speed of most servos cannot be changed in your code (unless your code is limiting the speed by changing the position in small increments with long delays between your writes). Most servos, in my experience, try to get to the set position as fast as the physical motors can possibly move while keeping the motion somewhat motors. However, motors can only go so fast, so you are limited.

One thing to note: some servo motors can be powered at higher voltages, but still controlled at 5V. With the increase in voltage, it might allow the motor to go a little faster, although the results will vary based on the servo's electrical characteristics and the motor driver's algorithm.

As for the current, you can buy cheap current sensors online that can be interfaced with the Arduino. You will want to measure the current (in series) flowing either from your power source to the VCC of the stepper, or from the GND of the stepper back to the GND of your Arduino.

• Thank you very much, your answer was so complete and helped me so much, now things are so much clear. Sorry for my English, I am not a native speaker. – Ionel Pop Jul 21 '15 at 1:47