Most motion-control applications typically employ an optical disk or Hall-effect device in order to accurately count the number of times that a motor shaft rotates. While the following circuit lacks the accuracy of both the optical disk and Hall-effect sensor methods, it does consume very little pc-board real estate, works well in harsh environments, and also does not require any mechanical construction effort.
In the counter circuit, Q1 is used as a current sensor when the gate signal is high (Fig. 1). As the PM dc motor armature rotates, the brushes momentarily short-circuit the two neighboring segments. This current pulse is converted into a voltage signal by Q1’s RDS and is ac-coupled by C1 into comparator U1. C2 is used to clean up the comparator output, while tying pins 5 and 6 to VCC sharpens the clock output edges.
The signals measured on Q1 and the LM311 are shown (Fig. 2). Note that the LM311 output should have a pull-up resistor to +5 V.
If the motor speed is actively controlled by a PWM gate signal, some additional processing overhead will be required. The software will need to subtract the PWM-generated clock edges from those generated by the commutator. Assuming fPWM >> fMOTOR, it’s still possible with some additional filtering and logic to realize a 3 to 10 count accuracy over a wide operating range.