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.
Best Answer
Well, you can - in principle - but....
Any regular brushed DC motor can be used as a tachometer. The problem is that the tachometer really does work (more or less) like a motor in reverse. So, if the no-load speed of a DC motor is 1000 rpm with 5 volts applied, when used as a tachometer the output voltage will be about 5 volts at 1000 rpm. As you might guess, you're not likely to find a motor which will give you useful output voltages when driven by a trackball. Very low-speed motors usually have a gear train between the motor and the output shaft, and this is essentially impossible to drive backwards.
I'd recommend you make your own optical encoder if you're really on a tight budget. You make a disk out of some thin material (heavy paper might do), punch a bunch if holes around the rim, and attach it to your shaft. Now get a photointerrupter
and set it up to look through the holes. Actually, this is probably the way the trackball works.
If you've got a few bucks, make life easier on yourself and buy a ready-made encoder. Try Digikey for examples of either.