If you have a motor and you’d like to know where the shaft position is, you are likely to turn to an optical encoder scheme. However, as [lingib] points out, you can also use a magnet and a ...