Asked — Edited

Detecting Servo ?

I was just wondering, Is it possible to detect if a servo is present or not? I have an attachment that runs on a servo. I'd like to be able to test if the servo is present before I run a script to use that servo.


ARC Pro

Upgrade to ARC Pro

With ARC Pro, your robot is not just a machine; it's your creative partner in the journey of technological exploration.

#9  

It may be possible to "steal" a wire from your setup if two share a common basis. For example, if one of the servo wires and one of the 12 Volt wires share a common ground allowing those wires to run as one. You really only need one free wire to do the detecting. For instance, use the negative of the 12V lines as a common point and the freed-up wire to feed back +12V. These points then run a relay which can be used as the detection method.

There are other possibilities:

You could also simply place a current sensing resistor in series with either of the 12Volt lines and do the same thing as I described before when using the servo line. This would be better since it would be a steady current as opposed to the servo line. This method, as before with the servo, requires no lines to be freed up.

As mentioned by Justin, another possibility would be to use a wireless system for the speaker. A simple bluetooth or FM transmitter in the primary unit and a simple reciever running from the 12V in the secondary unit. That would free up two wires right off. Running a wireless audio system these days is ridiculously simple and cheap.

It is also possible to run an audio signal over the 12V wires at the same time you run the 12 Volts. Basically you feed the audio from the speaker wires to the 12V wires via a capacitor and pick it off the other via another capacitor. Problem is this method will result in a loud pop on the speaker when you plug it in. There could be a problem at the transmitting end as well since there will be current surge there as well. The capacitors will need to be fairly large. Electrolytics most likely (watch the polairty). Try this at your own risk, however.

All in all though, I gotta say that it would be much easier to simply re-do the existing wiring and add one more wire. That's all you really need, just one more wire. Heck, wrap a small wire around the existing cable and use a second plug and socket. Anything would do. Bannana plug, audio plug, whatever.

#10  

>>Heck, wrap a small wire around the existing cable

Yea, I think @WBS00001 found the solution there. You keep your current setup, but use a digital port on the EZb and set it to look for on/off and you make a second a plug that is attached to your main cable...this would act as a jumper and the "sensor" method to know if your cable is plugged in or not. When you pull the main cable out, the secondary "sensor" cable would come out too. That's actually a pretty good idea! :)

#11  

Thanks guys. I have an idea on how to do this and its not vary hard. I'm thinking a second cable is the way to go. Thanks.:)