RPM anomaly in Dynamometer

benjamin_b:
so there shouldnt be enough movement for the encoder wheel to move out of the optical sensor.

I think, from the other comments, that some people believe your Arduino stuff is working properly and the anomaly is due to the behaviour of the motor.

The comment I have quoted here suggests that you think the problem is within the Arduino system. IMHO the best way to verify that is with an alternative measurement system - either a different Arduino program (I gave you a suggestion earlier) or a completely different measuring system - perhaps an oscilloscope.

...R