Position sensor

I'm making an auto pilot for a boat and I want a sensor on the rudder to know its angle, or at least to know when the rudder is straight.

The rudder implementation consists off a steel rod with a steering sylinder connected to it, similar to the image. I'd like to place two sensors, like in the image so I know when they are in "home position".

Even better is if I could read the position of the rudder, degres to the right/left etc.

Anyone know what kind of sensor would be good to make this happen?

Since you are making an autopilot, the rudder is positioned by some automatic mechanism. Can you describe it?

Perhaps you should instrument the shaft with an encoder. For 'home' sensing, a micro-switch is the traditional solution.

The simplest solution would be to use a potentiometer by connecting the potentiometer's knob to the rudder shaft using a belt.

I'd make a disc (or a sufficient segment of a disc) attached so that it rotates with the rudder shaft. On the periphery of the disc, I would have a series of holes read by 2 photo interrupters in quadrature fashion. Elsewhere on the disc I'd have one extra hole read by a separate photo interrupter to indicate the home position.

This definitely gave me some ideas. First, I was thinking about a magnetic rotary sensor, this would be very nice as I with one sensor have been able to read the position off the rudder at any time. Like this: http://forum.arduino.cc/index.php/topic,155238.0.html Then I realized that I maybe don’t have access to the end of the rudder shaft, I will check that tomorrow.

I thought about the potentiometer, but maybe it would be exposed to fatigue and so forth, but would be a very good solution if I got it mounted right.

I liked the photo interrupter idea. With 3 sensors really can get all the info I need. I think I will try this, or the same principle, but maby with reed sensors, like this one. http://www.hamlin.com/specsheets/59085.pdf

Thanks so far:)