Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: cybcode on August 16, 2007, 05:46:22 PM

Title: Using a servo's potentiometer as an input sensor
Post by: cybcode on August 16, 2007, 05:46:22 PM
Hi,

Is it possible to use a servo's internal potentiometer as an input sensor to indicate the servo's position? If it's possible, does anyone have any tips/instructions on how this should be done? And what servo is recommended for that - is there a particular Hitec servo that this can be done more easily with? For example, servocity says that HS-422 has an indirect drive potentiometer. Is that helpful in any way?

Thanks.
Title: Re: Using a servo's potentiometer as an input sensor
Post by: Soeren on August 16, 2007, 09:37:24 PM
Hi,

Is it possible to use a servo's internal potentiometer as an input sensor to indicate the servo's position? If it's possible, does anyone have any tips/instructions on how this should be done? And what servo is recommended for that - is there a particular Hitec servo that this can be done more easily with? For example, servocity says that HS-422 has an indirect drive potentiometer. Is that helpful in any way?
If you locate the bottom end (might be ground or else the pin with the lowest potential) of the potentiometer and the wiper (the one that changes when the potentiometer is moved), the voltage potential between those two will change according to position.
If they're fed through an op-amp buffer, to avoid loading the circuit (might or might not be necessary) you should see a voltage changing with servo position.

Not knowing why you want this, so just wanna mention that you could get the same info from looking at the pulse width of the servo pulses.
Title: Re: Using a servo's potentiometer as an input sensor
Post by: cybcode on August 16, 2007, 11:08:17 PM
You mean the pulse width that I send to the servo? If I understood correctly, that is the desired position, not the actual current position, and it takes the servo time to get from the current position to the desired one. Am I correct or am I missing something?
Title: Re: Using a servo's potentiometer as an input sensor
Post by: dunk on August 17, 2007, 04:22:29 AM
hey cybcode,
Quote
You mean the pulse width that I send to the servo? If I understood correctly, that is the desired position, not the actual current position, and it takes the servo time to get from the current position to the desired one. Am I correct or am I missing something?
you are correct.
it's not an issue for most people as servos are fairly quick and strong so you can generally presume they are in the position you told them to be within a few fractions of a second.

if you need finer controll than this you might want to look at this project:
http://www.openservo.com/ (http://www.openservo.com/)

there are also several commercial servos on the market that can tell you their current position via some sort of serial bus.

dunk.
Title: Re: Using a servo's potentiometer as an input sensor
Post by: Admin on August 21, 2007, 03:16:31 PM
Yeap you can do it really easily with a servo. Ive had situations where Ive needed to do it but Ive always been to lazy to actually do it.

Its exactly like you would wire up and program a photoresistor. Just make a voltage divider and connect one line to a uC ADC pin.The data just represents servo angle instead of light brightness, that is the only difference.

You will probably have to drill a small hole in the bottom of the servo casing for it to look nice and get the wiring soldered in correctly.

But as Soeren said, you may have to worry about amplification . . .
Title: Re: Using a servo's potentiometer as an input sensor
Post by: Gertlex on August 21, 2007, 10:31:34 PM
Random thought pops into my head...: Is this one of the features that a digital servo can provide?  ???
Title: Re: Using a servo's potentiometer as an input sensor
Post by: cybcode on August 23, 2007, 11:53:07 AM
Could you be a little more specific about the amplification? What could overload? Why? What's an op-amp? Sorry, I'm quite new at this...