I am part of a group building a project for school that involves a servo. We made a circuit for our Arduino to detect when the servo is under heavy load / stalling. The circuit we built detects stalls quite well, but we aren't sure about circuit damage.
We know there are other "stall detection" circuits on the web. However, we wanted a generic form of detection that can be accomplished with a method that:
- Uses common components we would have lying around (resistors, caps, diodes)
- Needs no heavy-power-rated "shunt" resistors
- Needs no ICs
- Doesn't reduce the output of the servo
The servo PS (V1) has it's + line going through a 75KΩ resistor, and then to an analog input pin on the Arduino (A0), with a 0.1μF ceramic cap going to ground, and a Schottky diode from ground to A0.
When the servo is moving without additional load, the current was measured at about 100mA. Under heavy load, it draws about 300mA. A complete stall is about 500mA.
When the servo is under low load, the analog pin reads 1023 out of 1023, with a small amount of bounce down to around 900. If the servo is under a heavy load, the bouncing is strong. Under a complete stall, the analog reading stays around 850 with little bounce. Obviously those readings weren't difficult to use for stall detection.
As for protecting the components, I am not very familiar with flyback or EMF. I was not able to find anything about them in relation to servos, only regular motors, almost as if people aren't worried about servos. It appears some people believe the internal circuitry of servos protects from flyback/EMF...?
The diode was added for flyback protection, but I don't know if it really helps in that setup.
We are also not sure how a servo is supposed to act in relation to resistance and voltage drop under load. The stall detection was put "before" the servo in the circuit so as to avoid reducing the power of the servo by having a resistor in series with it, and to avoid having to order a heavy-power-rated shunt resistor. I can't personally say why this detection works, but it does.
Regardless, can we continue using this circuit as-is, or do we run a large risk of damaging the Arduino? If the circuit needs modification for safety, what would be a minimal way of doing so with common components?