Servo Disconnect Error Check

Hi,

I'm working on a project with many servos. I have the servos stored in an array. What I am trying to do is display an error whenever a servo is disconnected from the arduino. I have the message that will appear on a 10 bar LED all figured out.

What I need is to figure out how to know when a servo is disconnnected. Disconnected means the pin fell out of the place on the arduino it is connected to. I think there might be some way to do this using the servo method read, but i'm not sure. I tried to digitalRead as well, with no avail.

Speedy reply would be much appreciated.

Thanks,

Pat

I think there might be some way to do this using the servo method read,

Servo.read() only reports the last position command sent to a servo and cannot determine if a servo is attached to the arduino..

You might be better off with a screw shield to make more rugged connections.

DFRobots have one, and I think forum member CrossRoads offers one as well.

In my experience servo connectors tend to require quite a lot of force to make/break the connection. Some brands of servo even use locking connectors. If you use conventional servo connectors, you shouldn't have any problem with leads coming unplugged, and if you do then you can simply add some extra mechanical support.

If you aren't using conventional servo connectors then use something that has similar characteristics, or use a screw terminal connector or soldered joints. There are lots of ways to make a reliable connection and you don't need to try to detect it electrically.

If the problem you're trying to detect is that somebody has deliberately disconnected the connector then you have a different problem. In this case it would be reasonable to replace the connector with one that has an extra terminal so that you can create a loopback to tell you whether the connector is in place. This doesn't protect against partially-made connections (unless you design the plug very carefully to do that) but again, that's a different problem and not one that conventional servo connections would usually suffer from.