Will spinning a small DC motor work effectively as a rotational speed sensor (by producing voltage)?
I'm trying to measure the rotation of a shaft (driven by a trackball) on a shoestring budget. I came up with the idea of using a small DC motor I have on hand to generate a rotational speed based voltage. I came across information on resolvers, however I don't particularly care about the position of the shaft, just the speed and direction.
I'm planning on placing diodes on each terminal of the DC motor to direct the output to 2 different input pins on an ADC (depending on spin direction) and connect the correct terminal to ground.
Depending on the output voltage, I'll also plan on either putting in place a voltage divider or do some zenier diode clipping to prevent voltage spikes.
Is there anything I'm overlooking? It all sounds correct in theory to me, but damnit Jim, I'm a programmer, not an electrical engineer!
I'd rather not fry a microcontroller.