Are you fine with the current draw for a small LED?
Similar to my previous suggestion, but instead of a gear you use the disk for the scroll wheel from a mouse. Or you can print something in finer resolution.
LED on one side, photodiode on the other, connected to the interrupt pin.
You can (maybe) even double the resolution by printing two striped circles on the disk and using two photodiodes.