Log in

View Full Version : Servo Offset -> Angle conversion


bush
29-01-2006, 17:33
I have estimated the conversion at
Angle = Offset / 2
Does anybody have a more optimal conversion equation?

6600gt
29-01-2006, 18:24
I have estimated the conversion at
Angle = Offset / 2
Does anybody have a more optimal conversion equation?

((PAN_SERVO - 124) * 65)/124
((TILT_SERVO - 144) * 25)/50

In Kevin's camera code check out terminal.c

Its the 65/124 degrees change for every pan incriment and 1/2 for every tilt incriment that you need.

bush
29-01-2006, 19:06
That of course assumes that your CENTER pwm values are at 124 and 144 (not hard to change). But then my next question would be, why would the degree change be different for 2 identical servos?

Eldarion
29-01-2006, 19:11
That of course assumes that your CENTER pwm values are at 124 and 144 (not hard to change). But then my next question would be, why would the degree change be different for 2 identical servos?

My guess is it has something to do with the camera sensor--it isn't a perfect square, but is rectangular with the "pan" side being longer than the "tilt" side.

Without having looked at that piece of code, I don't really know for sure. :)

6600gt
29-01-2006, 20:01
My guess is it has something to do with the camera sensor--it isn't a perfect square, but is rectangular with the "pan" side being longer than the "tilt" side.

Without having looked at that piece of code, I don't really know for sure. :)


Yeah probably because the camera is centered around the pan axis but not the tilt axis.

Andrew Blair
29-01-2006, 20:36
Perhaps with the linkage in the KOP bracket the pan is longer or shorter.

PEKMAN
29-01-2006, 20:43
With the help of the LabView software I have found that 45 degrees is right around 50 servo "ticks".

Eldarion
29-01-2006, 21:51
Yeah probably because the camera is centered around the pan axis but not the tilt axis.

Uh-oh...

So I did something bad by unscrewing the servo horn and re-centering the tilt axis to be exactly vertical at 127? :)

I wonder how many other teams did that as well...

devicenull
29-01-2006, 22:04
Uh-oh...

So I did something bad by unscrewing the servo horn and re-centering the tilt axis to be exactly vertical at 127? :)

I wonder how many other teams did that as well...

Our's is deliberately off center.. we can tilt more upward then downward. Although if the target is ever below our robot, we won't be able to see it (but at that point, we have more problems then that)

bush
29-01-2006, 22:04
Uh-oh...

So I did something bad by unscrewing the servo horn and re-centering the tilt axis to be exactly vertical at 127? :)

I wonder how many other teams did that as well...

I did that too, but that is not what 6600 gt was referring to. It simply meant that the pan servo lies on the vertical axis of the camera lens, while the tilt servo is not in line with the horizontal axis.

DanDon
30-01-2006, 08:55
Hi all,

If you still need help converting, there's a great thread about it here (http://www.chiefdelphi.com/forums/showthread.php?t=42327)

Hope this helps,

Eldarion
30-01-2006, 13:34
I did that too, but that is not what 6600 gt was referring to. It simply meant that the pan servo lies on the vertical axis of the camera lens, while the tilt servo is not in line with the horizontal axis.

Just one more quick reply here. :)

On my camera, at least, the camera lens is exactly in line with the pan and tilt servos. Did anyone mount the camera board upside-down, or is the offset just too slight to easily notice? :confused: