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

ARC Pro will give you immediate updates and new features needed to unleash your robot's potential!

#1  

Good question Slee, the answer is "no". The servo is considered an output, you send the servo a position to move to and inside the servo is a variable resistor (a POT) that tells the servo it moved to the commanded position. But there is no mechanism that sends a signal back that says , "I'm here". You would need some external sensors to see of the servo is there. That seems like a waste of a port to me.

What is the attachment and what is the thinking behind needing to know if the servo is really there? Is the servo in danger of falling off or ripping the plug out?

#2  

No the servo is in no danger. My first robot, Droid-mun is the brains. he has the EZB-Board in him. He has a cable that attaches a 1/2 scale R unit named Droid-Et to him. This Droid-Et is his counter part. The first droid Droid-mun has all the brains, where as Droid-Et is merely a shell with a speaker and a servo to spin her head. The first Droid Droid-Mun has a relay that turns on and off the 12 volts power to Droid-Et and another relay switch's between Droid-Mun's speaker or Droid-Et's speaker depending on who is talking. I wanted Droid-Mun to know if Droid-Et was plugged in or not. This would have been vary easy if there connecting cable had an extra set of conductors but it dose not. Here is the scenario, If Droid-Et is unplugged and taken out back for some reason, and then a customer walks in and Droid-Mun then greets the customer and then refers to Droid-Et yet she is not there, she is out back.Iit will look kind of funny. If Droid men could detect the servo that spins her head he would know if Droid-Et was there or not.

https://www.facebook.com/photo.php?fbid=806714699441191&set=a.173472779432056.35956.100003080059485&type=1

PRO
Synthiam
#3  

No - a servo does not transmit any information. It only receives.

#5  

How about this? Mount a switch inside the robot you want to find out if it is active. Attach that switch to an ADC port. Send a signal to a servo that would turn and activate the switch. Your script would be watching the ADC port and when the value changes because the switch was turned on you know your robot is actave. Just a simple set of scripting commands and some imagination and your all set. ;)

#6  

Just my 2 cents. Dave's suggestion of using an ADC port is a good one. I'd like to offer a variation, however. Since I don't know how much current the servo you are using draws, nor do I have my robot yet, I can't give you values to use just the principle involved. Perhaps someone in the company can fill in the details.

Take a very low value (a few ohms), but high wattage resistor and put it in series with the servo output line. This will act as a current sensor. When there is no servo attached, there should be no current through it, therefore no voltage drop across it. When the servo is connected, a current will flow and a voltge drop across the resistor will occur. To detect the change, wire the resistor to the ADC port and monitor the voltage across it in your program. Run the Droid-Et servo briefly, and you should be able to tell if the shell is connected or not by the change in reading on the ADC port.

#7  

WBS00001, Thanks for all the input!

Dave Schulpius,

There is no extra conductors available in the current cable that connects the two droids.:( The cable has 6 conductors/wires in it. Two for the speaker, 3 for the servo and two for the 12 volt lighting. Had there been two unused wires Id have it made in the shade.:)

#8  

Add another cable or swap the cable. Or add a wireless radio link of some sort.