user52941: I am trying to make a device which will turn a turn key with a servo. 
However, I want it to stop turning the turn key if the resistance is too great (meaning it is locked and will not ever turn). 
How do I do this? Would I just tell it to turn and then have it turn back after a time (because if it is locked or not it should be done within that time)? 
I do not want to damage my servo by having it try to turn something that it can't turn.
I am using an Arduino Uno and the library "Servo.h". The servo being used is a Batan S1123.

user313: You could either:

Use a limit-switch to sense that the servo has completed it move. If it doesn't complete it a reasonable time, return it to its original position. Or,
Measure the motor current by putting a low value resistor inline with the ground side of the motor's power supply. With one of the A/D pins, measure the voltage on the motor side of the resistor, which increases with motor current. You'll need to have figured out how much current the motor draws when operating normally. If the motor stalls, your controller could sense that by seeing that current increase. Pick a value (try 150%, for example) of over-current as an indicator that the motor is stalled, and return it to its original position.

The first way is easier to implement but possibly lets the motor stall while you wait for the expected move time to expire. The second way lets you detect stalling and take action immediately.

user13327: It depends on what kind of failure you expect. If you're afraid the motor may break your linkage (the gears, cranks, belts, whatever you have in place), you have to react very fast, and it's only feasible with a current measurement. That would require sensing the current and reacting very quickly on over-current to be effective.
If you know for a fact that your linkage can withstand the stall torque of the motor, you just have to worry about overheating the motor. Such a protection can be done with a position sensor or a limit switch if you happen to have one. You could even implement a protection with no sensors at all: drive the motor for just long enough to do its job and then stop: either it will turn the key or it won't, but it won't overheat if stalled for a second or two.

52941: <p>I am trying to make a device which will turn a turn key with a servo. </p>

<p>However, I want it to stop turning the turn key if the resistance is too great (meaning it is locked and will not ever turn). </p>

<p>How do I do this? Would I just tell it to turn and then have it turn back after a time (because if it is locked or not it should be done within that time)? </p>

<p>I do not want to damage my servo by having it try to turn something that it can't turn.</p>

<p>I am using an Arduino Uno and the library "Servo.h". The servo being used is a Batan S1123.</p>
 313: <p>You could either:</p>

<ol>
<li><p>Use a limit-switch to sense that the servo has completed it move. If it doesn't complete it a reasonable time, return it to its original position. Or,</p></li>
<li><p>Measure the motor current by putting a low value resistor inline with the ground side of the motor's power supply. With one of the A/D pins, measure the voltage on the motor side of the resistor, which increases with motor current. You'll need to have figured out how much current the motor draws when operating normally. If the motor stalls, your controller could sense that by seeing that current increase. Pick a value (try 150%, for example) of over-current as an indicator that the motor is stalled, and return it to its original position.</p></li>
</ol>

<p>The first way is easier to implement but possibly lets the motor stall while you wait for the expected move time to expire. The second way lets you detect stalling and take action immediately.</p>
 13327: <p>It depends on what kind of failure you expect. If you're afraid the motor may break your linkage (the gears, cranks, belts, whatever you have in place), you have to react very fast, and it's only feasible with a current measurement. That would require sensing the current and reacting very quickly on over-current to be effective.</p>

<p>If you know for a fact that your linkage can withstand the stall torque of the motor, you just have to worry about overheating the motor. Such a protection can be done with a position sensor or a limit switch if you happen to have one. You could even implement a protection with no sensors at all: drive the motor for just long enough to do its job and then stop: either it will turn the key or it won't, but it won't overheat if stalled for a second or two.</p>
