How to measure speed in any permanent magnet DC motor?

Thread Starter

Xavier Pacheco Paulino

Joined Oct 21, 2015

I have different models of permanent magnet DC motors. I attach a sample picture. They range from 90 to 130V. I want to design a closed loop speed control system using PWM. My feedback is the actual speed of the motor. Since I have different models, so they have different physical appareance, what kind of universal sensor I can use to measure speed in all of them? I mean, a sensor that I can easily attach on any motor and process the speed signal in a microcontroller. I do not need very high precision, so the simplest sensor would do the job.



Joined Aug 27, 2009
The first question would be how fast and how accurate.

Optical sensors can work on a motor shaft or flywheel in clean conditions. A direct shaft reflector might be a problem without a specialized sensor because the reflection surface is narrow. There are also sensors that can measure RPM from a shaft keyway if it's visible.

For a less clean environment a magnetic sensor is a good choice with gear type sensors giving higher frequency shaft feedback for better control at low rpm.


Joined Mar 31, 2012
There are lots of ways to measure the speed of a PM DC motor, but I don't think you are going to find some "universal" way that will allow you to just do the exact same thing for every conceivable PM DC motor out there -- just too many variables in physical size and shape alone to make that practical. If you can narrow down the set of motors that you are working with to something that has a few things in common, then it becomes much more plausible.


Joined Jul 18, 2013
You can also use a simple slot opto with either a single or dual opening or something higher resolution such as Ebay 112030673020, also slot opto..
For tight control, you will need to remove the flywheel, it was needed for Treadmill use.
The Johnson T.M. motors usually have a slotted wheel sensor on the rear already.
There is also the QRE1113 retro-reflector type.
Last edited: