I want to measure the speed of a gear underwater (max 10 meters or 33 feet). The gear will be made out of stainless steal so I plan to mount a small piece of iron on top of it that will be reconcilable by the sensor. Because normally stainless steel has a value of 0.6 times steel I think it will work. I'm going to make the sensor inside a resin to make it watertight but will this work or am I forgetting something? This is the sensor I intend to use.
If the gear is rotating very quickly then it is possible that the sensor will not respond fast enough, those sensors are optimised for stability of detection rather than speed so you may have to test it first but it should be able to work underwater and will likely be just fine.
I would recommend a hall sensor though, that is what is typically used for this application. You can either mount a magnet on the gear or use a slotted or vane type sensor which can be used in a similar way to a photo-interrupter (but would be resistant to stuff that might build up and block light).
It wont work because the sensor you chose needs a strong difference in iron size at max distance to give a digital logic decision. Other methods can be used but need your explicit geometric limits and will need to be high gain analog to be sensitive to gear tooth at a distance greater than tooth or iron slug.
How small can you make the gap to sensor? few mm?