6

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.

Student-LTB
  • 61
  • 1
  • 2

4 Answers4

2

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.

Dmitry Grigoryev
  • 1,288
  • 11
  • 31
1

You could either:

  1. 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,

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

JRobert
  • 15,407
  • 3
  • 24
  • 51
0

The best way is use external feedback. Hall sensor for example. 200-250ms after using servo check status of hall sensor

Pararera
  • 213
  • 1
  • 8
0

I suggest detecting the current flowing through the servo or using a potentiometer to detect whether the servo is moving. You could also put a clutch between the servo and the key, but then you wouldn't know the angle of the key at any given time.