I recently saw a machine where it used a hall sensor or a magnetometer for linear positioning (the sensor is wrapped in some opaque protection so I don't know what it actually is which is the real problem and it was placed adjacent to the shaft and I think it displayed steel shaft position only without any magnets involved, meaning the shaft was made into an electromagnet itself but didn't got enough time to prove it.)
It's a relatively small component placement machine which has an arm joined with a base where the base goes up and down and the readings on the display for the linear up and down movement (Z - Axis) had a unit of BZ at the end and it definitely wasn't in metric.
From my speculation, there should've been changes in readings when I introduced a magnet(it was a strong little disc magnet) near the machine but I didn't see any, not even a minor flinch. I'm already working on a 3d positioning project with MLX90393 and went through a lot of work to get less noisy readings (which is why this machine got me interested) but this magnetic sensor set up got me worked up and I searched a lot of internet again.
Melexis has a feature called Stray field immunity and all those sensors which support that, require a proprietary programming hardware which is around $1250.... so that's out of the options anyways, my main question is, can we make a closed loop magnetic linear positioning system with no disturbances at all from other magnets or fields? I want an economical solution. I cannot place any multi-pole magnetic strips in my application to use like the AMS5311, which is about same, defining position of a shaft linearly, the movement range of shaft(steel) is of 6mm only. I don't care about output readings, they should be just stable and only change when the shaft position is changed, no changes from outside effects.
I thought of implementing an electromagnet for a closed loop so that sensor knows what to detect only?(this is a really wild thought) is that possible? I'm relatively new to all of this so please let me know what more I can provide!