Page 1 of 1

Best way to measure RPM of rotating shaft

Posted: Wed May 27, 2015 2:51 pm
by PureRotation
Hey guys,

I am currently working on the starting behaviour of a small DC motor with a metal shaft attached to it. The other end of the shaft is mounted in a bearing and I am looking for a convenient way to capture the rotary speed of the shaft using my RPi2. Any ideas?

Ideally, I am looking for an output that looks something like this:
Image

The above image shows a graph in MATLAB/Simulink, this software is available as well is needed.

Thanks for all ideas in advance!

Re: Best way to measure RPM of rotating shaft

Posted: Thu May 28, 2015 12:59 am
by elatllat
Take apart an old ball mouse.

Re: Best way to measure RPM of rotating shaft

Posted: Thu May 28, 2015 1:29 am
by MarkHaysHarris777
You will need to decide on an appropriate transducer, counter|timer, and of course whatever mounting hardware you have designed.

The transducer might be as simple as a magnet mounted on balanced collar on the shaft... or perhaps an emitter wheel (rotating disc with holes cut along the outer edge) with an IR emitter | collector to read the holes (those are brush-less ideas)... or it could be brushes following an armature. Some dedicated mcu then reads the pulses over time to calculate the RPM. You'll want to determine your timer config, and then measure the time between pulses over a timed sample, then do your maths.

There 'lots' of ways to do this. Personally, I prefer the brush-less methods, and I am particularly fond of the emitter wheel concept.

Re: Best way to measure RPM of rotating shaft

Posted: Thu May 28, 2015 1:43 am
by ame
What is the diameter of the shaft?

Can you attach something to the shaft?

For a small diameter shaft you could attach a vane and arrange a slotted opto-switch so that the vane breaks the IR beam in the switch every rotation (or you can have several vanes, or you can have a disc with several slots).

For a larger diameter you could paint a reflective mark on the shaft and use a reflective opto-switch to detect alternating light and dark parts as the shaft rotates.

A small magnet and hall-effect sensor would work, but the mass of the magnet might upset your rig unless you balance it (or put two or three magnets equally spaced.

Yes, there are lots of ways to do it.

Post a picture of your motor assembly (with a ruler for scale) and maybe you'll get some more detailed suggestions.

Re: Best way to measure RPM of rotating shaft

Posted: Thu May 28, 2015 1:50 am
by ame
Here's a practical illustration, but it doesn't have to be this complicated:
http://www.seeedstudio.com/wiki/Grove_- ... ive_Sensor

Here's another example:
http://www.pridopia.co.uk/pi-motor-encoder.html

Here's the simplest hardware:
http://www.utopiamechanicus.com/article ... al-switch/

It's a slotted opto switch module and a couple of resistors. You might find a slotted opto switch in an old printer, or an old 3.5" floppy drive.

Re: Best way to measure RPM of rotating shaft

Posted: Thu May 28, 2015 1:54 am
by MarkHaysHarris777
ame wrote: Here's another example:
http://www.pridopia.co.uk/pi-motor-encoder.html
... this one is my favorite.

Re: Best way to measure RPM of rotating shaft

Posted: Thu May 28, 2015 7:29 pm
by PureRotation
First of all, thanks to all of you for your contribution!

I really like the approach with the slotted optical switch. I should indeed have an old mouse somewhere to get the optical chopper wheel from...
The shaft is quite small, 7mm diameter, so the dimensions should be fine.

So I'll attach the optical chopper wheel to the shaft and the switch to the RPi as described in the link. Then in Matlab I should be able to sample every 0.1 or so seconds to calculate the rpm and plot the graph I need. Sounds good, thanks again :-D

Re: Best way to measure RPM of rotating shaft

Posted: Thu May 28, 2015 7:43 pm
by joan
I have measured the shaft speed of a small hobby motor using Hall effect sensors and magnets.

Details shown in viewtopic.php?p=632413#p632413

Re: Best way to measure RPM of rotating shaft

Posted: Fri Nov 13, 2015 8:26 pm
by jb63
Here is a 'crazy' idea, though implemented commercially on some measuring devices.

If you monitor the current ripple (that you're feeding to the motor), you should be able to calculate the resulting RPM. All you need to know is the number of coils on the rotor ...