Hang with me while I explain...
I have (soon) a servo with feedback from adafruit. I need to find the physical limits of the servo without destroying the servo.
My thinking was to create a variable voltage regulator (using an LM317) and increase the voltage (with a digital potentiometer) until the servo moves to a requested angle in order to find the minimum voltage threshold and then continue to increase the requested degree until the servo no longer reaches the requested increase.
I would have to do this without any physical load and then again with a constant physical load.
So:
Should I vary the voltage to change the "stall torque"?
or
Should I (somehow) vary the current/amperage to change the "stall torque"?
As you can tell, I'm not an Electrical Engineer, so be gentle...
Why would you want to do this?
There is a lot of information in a servo data sheet, things like:
Power requirements: 4 to 6 VDC
Maximum current draw: 140 +/- 50 mA at 6 VDC when operating in no load conditions
15 mA when in static state
STALL TORQUE
AT 4.8V
7.7kg.cm(106.93oz.in)
AT 6.0V
9.6kg.cm(133.31oz.in)
etc etc
If you are trying to somehow "size" a servo and pick the right one for the job, you can do that by reading and without destroying it.
What are you really-really trying to do mechanically?
The "physical limits" and specifications are, of course, usually tested with the recommended electrical power applied.
You can find the limits of the servo by reading the specs, or by doing experiments with known-loads. If you need to accelerate a load, or do something in a certain amount of time, it's usually easier to test it with the required load than to calculate the force (torque) required to overcome the inertia.
Normally you should be able to stall a servo without damaging it, but I'd guess it's not a good idea to stall it frequently or for long periods of time.
Servo test code you can use to determine the servo's internal rotation limits.
// zoomkat 10-22-11 serial servo test
// type servo position 0 to 180 in serial monitor
// or for writeMicroseconds, use a value like 1500
// for IDE 0022 and later
// Powering a servo from the arduino usually *DOES NOT WORK*.
String readString;
#include <Servo.h>
Servo myservo; // create servo object to control a servo
void setup() {
Serial.begin(9600);
myservo.writeMicroseconds(1500); //set initial servo position if desired
myservo.attach(7, 500, 2500); //the pin for the servo control, and range if desired
Serial.println("servo-test-22-dual-input"); // so I can keep track of what is loaded
}
void loop() {
while (Serial.available()) {
char c = Serial.read(); //gets one byte from serial buffer
readString += c; //makes the string readString
delay(2); //slow looping to allow buffer to fill with next character
}
if (readString.length() >0) {
Serial.println(readString); //so you can see the captured string
int n = readString.toInt(); //convert readString into a number
// auto select appropriate value, copied from someone elses code.
if(n >= 500)
{
Serial.print("writing Microseconds: ");
Serial.println(n);
myservo.writeMicroseconds(n);
}
else
{
Serial.print("writing Angle: ");
Serial.println(n);
myservo.write(n);
}
Serial.print("Last servo command position: ");
Serial.println(myservo.read());
readString=""; //empty for next input
}
}
I guess my goals need to be further described: 2 goals:
Without any load, I need to know the degrees of movement for a particular servo (they vary from the specs, usually lower by 10-15 degrees, at least on the ones I've tested)
My servo has a wheel attached which moves a dial by friction/pressure. I need to dynamically "tune" my servo so I can barely move the dial (speed not critical) but when the dial reaches the end of its travel, the servo will stall and I can detect the dial is at its maximum/minimum without forcing the wheel to slip on the dial. In other words, I want to detect when the wheel is "about" to slip against the dial.
I understand that most folks want to know the maximum torque a servo can provide... I want almost the opposite...I want to "force" a stall and measure when it happens via the feedback (4th wire).
How do I adjust the voltage or current to the minimum values to get the servo to move, yet will stall easily if additional physical force is applied? Once I get the range of degrees that the servo can travel without the wheel slipping against the dial, then I can go back to full power/current and operate as usual.
Whew... describing this was harder than I thought it would be.
Thanks for your help.
bigred1212:
Why would you want to do this?
There is a lot of information in a servo data sheet, things like:
Power requirements: 4 to 6 VDC
Maximum current draw: 140 +/- 50 mA at 6 VDC when operating in no load conditions
15 mA when in static state
STALL TORQUE
AT 4.8V
7.7kg.cm(106.93oz.in)
AT 6.0V
9.6kg.cm(133.31oz.in)
etc etc
If you are trying to somehow "size" a servo and pick the right one for the job, you can do that by reading and without destroying it.
Without any load, I need to know the degrees of movement for a particular servo (they vary from the specs, usually lower by 10-15 degrees, at least on the ones I've tested)
I posted code that with a little bit of thought should allow you to do this.
My servo has a wheel attached which moves a dial by friction/pressure. I need to dynamically "tune" my servo so I can barely move the dial (speed not critical) but when the dial reaches the end of its travel, the servo will stall and I can detect the dial is at its maximum/minimum without forcing the wheel to slip on the dial. In other words, I want to detect when the wheel is "about" to slip against the dial.
A limit switch setup might be used such that the switch/contact is made when the pointer is at the end of its travel, your servo code will note the current control value being sent to the servo and hold at that point.
...I want to "force" a stall and measure when it happens via the feedback (4th wire).
Just what type of servo are you using that has four wires?
How do I adjust the voltage or current to the minimum values to get the servo to move, yet will stall easily if additional physical force is applied? Once I get the range of degrees that the servo can travel without the wheel slipping against the dial, then I can go back to full power/current and operate as usual.
You might be able to do some involved hacking of the servo, but it would probably be easier to redesign you project.
Whew... describing this was harder than I thought it would be.
Just wait until you try to build it and get it to work!