I want to use a PIC to count the number of turns made by a shaft, then display a number calculated from this. I've got a 12V supply voltage, plus two terminals that go to +12V: one for forward, one for reverse. So I just need a way to sense the turns.
The shaft turns at about 60 rpm. It is a 125mm diameter cylinder of aluminum, with a single hole on the circumference, like this:
It's on a boat, so it would have to be resistant to water.
Can anyone suggest a suitable sensor, preferably without the need to add any markings to the shaft?
You could use a reflective optical sensor and let it sense when the hole came round (change in contrast). Or at that speed you could even put a magnet in the hole and use a reed switch or hall effect i.c to detect. If you want to measure direction, put the 2 12vs through relays or opto isolators to give logic levels to 2 spare input ports. You should then be able to measure speed and direction with suitable software.