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?
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.