Rotary Encoder
A rotary encoder, also called a shaft encoder, is an electro-mechanical device that converts the angular position or motion of a shaft or axle to an analog or digital code. (from wikipedia)
RE0124 PVB
There are a few of these rotary encoders available in the space for use with your project. It's electrical rating is 5V 0.5mA (very low, not even a LED driver!)
Here is the datasheet
Terminal A-C leads, i.e., when rotating clock-wise, A-C will go 'on' first, then B-C will go on, A-C goes off, then B-C goes off. Counter clockwise means: A-C goes on, followed by B-C which goes off.
rest (0°) | ~3.75° | ~7.5° | ~11.25° | rest (15°CW) | |
---|---|---|---|---|---|
terminals A-C | 0 | 1 | 1 | 0 | 0 |
terminals B-C | 0 | 0 | 1 | 1 | 0 |
In short: on falling edge interrupt A-C (which is the dented position, in a 15±3° step), B-C high means a clockwise step; 24 steps make a circle.