I build a rotor balancer for my prism scanner with an Arduino Nano 33 BLE and an infrared led sensor. I am able to reduce the unbalance of the prism by a factor 10 at a rotor frequency of 90 hertz. Note that for this motor the rotor frequency does not equal the pulse frequency.
The prism seems to have multiple plane unbalance so I was not able to perfectly balance it.
A single measurement is shown below;
Multiple measurements are taken. For each measurement the amplitude of the accelerometer signal and phase difference between the IR sensor and the accelerometer signal are determined. As the phase seems dependent on frequency, the prism seems to have multiple plane unbalance, What also seems to play a role is that the electric motor works in reverse. The spinning disk probably creates current in the motor which is turned off. In the future, I will try to substract the measurements of unbalanced prism with a balanced one... Maybe their difference will be more intuitive.
The code, measurements and a brief discussion of the results are available on Github.