I am looking for a way how to detect the rotation of an object that is hanging from the ceiling, attached with a rope. Since the object can freely rotate for many revolutions (until the rope is too twisted), there is no way to provide power to any sensors and/or microcontrollers if they are attached to the hanging object. Batteries are not an option since they would have to be replaced regularly. So I thought maybe I could pass the rope through a pipe, attach a magnet to the rope, and sense the position of the magnet by a magnetic sensor that is fixed on the pipe (see the diagram).
For context: this is an installation in an art exhibition. The object is freely hanging in the rope and is expected to be manually spun by the visitors. When it spins, sound effects are played on several speakers that are placed around the object. The object is firmly attached to the rope and thus pulls the rope along with it. The rotation would go several revolutions in one direction, and when the rope has aggregated enough resistance, the rotation would get slower until it starts going in the other direction.
The plate with magnets would be attached as close as possible to the object so that it could be assumed that the rotation of the plate reflects the actual rotation of the object.
Since the pipe is fixed, there is no problem powering the sensor and microcontroller to read it.
I found this magnetometer - HMC5883L and would like to know if that could be used to read the position of the magnet. Or maybe there is much better way to achieve what I'm looking for, with of without magnets.