Need help choosing a sensing method

Working on a project and need a bit of help choosing a wireless sensing method.

Its a bit tricky to explain but I'll give it my best shot. I have a 10" long 2" diameter shaft. around this is a ring that can travel up and down the length of the shaft. I have looking for a way to log movements of the ring up and down the shaft in 2" increments.

my first try involved hall effect sensors (US5881) inside the shaft. these were spaced 2" apart on the shaft. then I put a small square magnet inside the ring. This worked almost perfectcly. trigging a logger as it passed a sensor. However there are two problems with this approach. firstly the risk of the magnet falling out will damage other components. and secondly the ring can also rotate around the shaft. so the magnet may not be right in line with the hall effect sensor and won't trigger a log. I then tried to play around with a strip of magnetic tape all the way around the internal diameter of the ring to combat the rotating problem. however the magnetism in the tape isn't powerful enough to trigger the sensor with a small gap.

So my question is does any body know of a better way to log the position of the ring on the shaft with out external holes in the shaft (I need to protect the electronics as it will be used in a moist enviroment) I hope that makes a teeny bit of sense :slight_smile:

Your magnet approach is not so bad, with the proper orientation of the magnetic field. When e.g. north is top and south is bottom, a rotation doesn't affect the readings.

When you put an iron plate on top and bottom of each sensor, you can achieve very high sensitivity when the magnet has exactly that height. At the expense that a change will be detected only when the magnet moves to a different sensor, and no change in between.

There exist more ways for the layout of the magnetic field. Think about it, and you may find finer graduations between the sensor and magnet locations.