Hello, first time poster. I recently got into Arduino and have a question about my approach to the problem I am trying to solve.
I want to measure the current rotation in degrees of a free-spinning object based on a relatively forward position. The rotating object, (a globe) needs to be able to spin freely along its single axis and lose its momentum gradually after it stops being actively pushed.
My solution is to use a stationary magnetometer, (specifically the MLX90393) in the object's axis and attach a magnet on the inside of the object that rotates with it, acting as a moving north position. Relative to the magnetometer this should function the same as rotationing the magnetometer itself.
My question is this. Is this a good solution? Am I overcomplicating this? Is there a simple component that fits all my needs such as a free spinning rotary encoder I am unaware of? Would this solution even work in the first place or have I fundamentally misunderstood how magnetometers work?
I originally thought I could use a rotary encoder to achieve this, having it act as the object's axis but I have been unable to find any that allow for free spinning.
Thanks in advance. Hoping I haven't made a fool of myself here.