Author Options:

Use brushless DC motor (or stepper motor) as RPM sensor? Answered

Hi all, I'm making an Arduino based digital instrument cluster for my 1980 XS400 motorcycle. all the old tach and speedo instruments are mechanical so I need to convert the spinning cable's rotation to digital RPM. I've tried IR tachs but I can't seem to get them to be accurate enough (the lowest RPM I could get out of them was about 375, which isn't low enough) I'd love to use a more mechanical means of getting the RPM.

could I use a 3 phase DC motor to count RPM? if I can, how?


Jack A Lopez

6 days ago

The physical quantity you're asking about is called, "angular speed". Speaking generally, it has units of:

(unit angle)/(unit time)

like, for example:


what you (and many others) call, "RPM"

There are a handful of different techniques for measuring angular speed of a rotating shaft, and two of these methods come to my mind, right now.

One way is to put a wheel on the shaft, with some little slots in the wheel. Then shine a light through the little slots. Then the alternating pattern of light blocked, light admitted, can be watched with a light sensor, and this gives an alternating signal, with the speed information in it.

Alternately, the wheel can have alternating segments of dark and reflective, or black and silver, or black and white. Or this dark/light pattern can be painted on the shaft directly, if the shaft is wide enough. Then a light is reflected off the moving dark/light segments, and again a light sensor converts this pattern into an alternating signal, with the speed information in it.

Another way is to glue a magnet to the shaft, or have the shaft drive a wheel with some magnets on it. Then a pickup coil, or Hall Effect sensor, or even a reed switch (as Downunder35m suggests), is placed near the spinning magnet, and the sensor feels the changing magnetic field, and converts this into alternating signal, with speed information in it.

Since you asked, a brushless DC motor, in particular the kind used in cheap cooling fans for computers. This gizmo has a wheel with magnets on it, and it has coils of wire on its stator, and it might even have a Hall Effect IC or two.

Although, just now I was looking at disassembled computer cooling fan, from my junk collection, and thinking it looked kind of delicate, maybe not easy to get parts off, without breaking those parts.

If you decide to go with an optical route, the old-school computer mouse, the kind with a big ball in it, has some slotted wheels, with some little light emitters and sensors to watch the slots in the slotted wheel go by.

I think I have an example picture of this here somewhere... oh here it is:


Did I mention for optical techniques, sometimes the light sensor can pick up noise from the light in the surrounding environment, especially noisy sources like old fluorescent lights. But mostly that is just something to worry about when testing. Shielding this kind of light is as easy as simply putting the spinning shaft plus light emitter plus sensor, all in an opaque box.

By the way, if you have ever wondered what noisy light sounds like, I wrote an 'ible like ten years ago, that includes some of these sounds, eg. fluorescent lights, computer displays, etc., here:

Final note: when searching for more clues about this topic you might get different, possibly better, results, by searching for phrase, "measure angular speed", rather than, "measure RPM"

E.g. a page from the Arduino forum, "How to measure angular speed"

E.g. A slide show from slideshare.net, titled "Angular velocity measurement"


9 days ago

Just use a reed contact and magnet ;)
Like for these speedos on push bikes.
Any moving part on the driveline will do.
Just don't mount the magnet close to the ABS discs if your car already has ABS.
Readout gives one impulse or "closed" contact per revolution.
If mounted on some axle then the same calculations as for these bike speedos apply in terms of wheel diameter and turn ratios.
Of course you can just a GPS and read out the impulses per second or millisecond at a fixed speed and go from there.

Another neat way is a a magnet mounted where the speedo cable originates.
What is easier depends on locations and accessebility of course.