Counting holes in a steel rail. A magnetic proximity sensor?

We are trying to automate the rotating dome in a small astronomical observatory and part of it involves locating the position of the "slot" that the telescope looks through. To do this I need to be able count the holes in the rail that a geared motor uses to turn the dome. (See attached pictures.)

Our first run at it used an LED under the rail and a light sensor above it. As the dome rotated we could count the number of times the sensor reads light and dark. He have had some challenges with this and want to explore other options.

Some people have used "cogged" wheels with a rotation sensor for the axle. I am wondering if we could use a magnetic proximity sensor and detect when there is a hole or not a hole. I think we could place the sensor about 0.5 cm above the rail and not hit it during a rotation.

Does anyone have experience with these?

Dome rail_small.png

Dome Rail 2_small.png

A conductive (capacitive) proximity sensor should work and probably be easier to use. They detect proximity of any conductive material, and there are lots of variants.

Low voltage DC units are cheap, Arduino compatible and even detect water levels through plastic tank walls.

One example.

Thanks! I will give it a shot.

I would use 2 break-beam optical sensors spaced so you get a 2 channel "quadrature" (Gray code) signal, like an encoder, you could get double resolution and direction info. Or is there a problem with dirt on vertically mounted optos?

The proximity sensor could also be used to detect the teeth of the gear that drives the rail.
Leo..

outsider:
Or is there a problem with dirt on vertically mounted optos?

Indeed. Photoelectrics are great but they can be defeated by the slightest of obstructions. Is it possible to post a picture (or three) of the thing to be monitored?

dougp:
Indeed. Photoelectrics are great but they can be defeated by the slightest of obstructions. Is it possible to post a picture (or three) of the thing to be monitored?

More than the pictures in the OP?

adwsystems:
More than the pictures in the OP?

Dang! Where's that egg-on-face emoji?

The track in the pictures looks like either aluminum or stainless steel. Neither one will work well with any magnetic sensor.

Paul