From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.


Showing results for 
Search instead for 
Did you mean: 

Hall Effect Sensor

Go to solution



I am using a Melexis 90217 Hall Effect Sensor and its magnet to measure the RPM of a rotating shaft.  I developed a VI in LabVIEW for that purpose.  It measures the RPM of the rotating shaft accurately up to 600 RPM.  The problem I am having is that whenever I rotate the shaft at a speed greater than 600 RPM, all my VI measures is 600 RPM.  For instance, the shaft was spinning at 1100 RPM and all it read was 600 RPM.  I tried to fix this by multiplying my RPM reading by a factor of 2, and I consistently got a reading of 1080 RPM when my shaft was rotating at 1100 RPM.  However, I wanted to know if there is an error in the logic I used for my VI.  Thanks.

0 Kudos
Message 1 of 5
Accepted by topic author SSS1

Hi SSS1,


two points:

1) Your inner loop is not needed:


Use array math instead...


2) Your sample rate is set to 1000Hz. According to Mr. Nyquist your highest possible signal frequency is 500Hz (in theory). You're limited by the sample rate...

Best regards,

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5

Thanks for all the help.  That VI looks much simpler than what I was trying to do.  I guess I will have to double my sampling rate to 2000 Hz in order to read up to 1200 RPM.  I will go try this out. Smiley Happy

0 Kudos
Message 3 of 5

Hi SSS1,


sorry, I mixed up "RPM" with "Hz", so your sampling rate should be ok.


What kind of signal do you get? Is your data evaluation correct?

Best regards,

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5

Hi GerdW,


Well, I had tested my VI using a two speed drill gun that had speeds of 300 RPM and 600 RPM.  My VI measured those speeds accurately and the voltage graph displayed perfectly square pulse waves.  My Senior Design project entails using a 5 hp motor to rotate a shaft and 28 inch diameter flywheel up to 1100 RPM.  Thus, there is some noise and vibration to contend with.  I placed a magnet on the rotating shaft so that I could measure RPM with the Hall Effect Sensor.  When I ran my VI, there were again square pulse waves (although they were not perfectly square).  The Hall Effect Sensor would measure the speed up to 600 RPM and once the motor went above that speed all it read was 600 RPM.  I also tried to use a Butterworth filter to help filter out noise, but it read the same RPM as my VI without a filter.  I thought that since there there was a cutoff at 600 RPM, I might have to change the sampling rate.  Now you say my sampling rate should be okay.  Did I make an error in my logic for the VI or is it possibly a problem with the sensor?  Thanks. 

0 Kudos
Message 5 of 5