Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with frequency measurement using NI 9401 module

Solved!
Go to solution

I am trying to measure the rpm of a dc motor by installing a hall sensor across a wheel connected to the motor. The wheel has four small gaps at equal intervals; the hall sensor gets demagnetized when it is across these gaps and gets magnetized again as it is away from these gaps. Meaning, the sensor is sending digital highs and lows (switching from 0V to around 5V) signal.

 

For measurement, I am using NI 9401 module placed at slot 6 on NI cDAQ-9178 chassis and the sensor is connected to pin 16 (PFI1) of the module.

 

When I check these signals using DAQ Assistant > Acquire Signals> Digital Input, I can see that the program is showing me the highs and lows correctly and results are given in the form of a ‘1D array of booleans’ in LabVIEW.

 

Now, when I use ‘counter input’ instead in the DAQ Assistant so that I can measure the frequency of these digital signals, the test run always gives me rapidly changing numbers around a certain value and this value does not change as expected if I speed up or down the dc motor. Additionally, the waveform chart also does not give a true representation of frequency as you can see in the picture below. The range of my frequency is 1-300 Hz and I am using 1 counter low frequency method. I am wondering how I can get correct frequency reading by this method, or alternatively, if I can somehow convert the ‘1D array of Booleans’ result into a frequency reading if I use the ‘Digital Input’ method. I am new to programming in LabVIEW and apologize if I have not worded the problem properly.

0 Kudos
Message 1 of 5
(4,768 Views)

So your motor is running at 300Hz or you are getting a pulse at 300Hz?  If your motor is running at 300Hz, then you should be getting a pulse frequency of 1.2kHz (300*4).  Therefore, you probably just need to change your range of frequencies.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(4,763 Views)

Sorry for confusion. The motor's frequency at max is around 70 Hz, so I would only reach about 70*4 = 280 Hz with the wheel. Right now I have tried within the range of 10 to 100 Hz pulse frequency. But, the primary problem is that within this range, the measurement still wouldn't show any change in frequency value. At a certain set frequency, I would expect the program to show a stable frquency value but so far this has not been the case (I can only see a rapidly updating number around the same value ~1.14e7).

0 Kudos
Message 3 of 5
(4,758 Views)

After going through some other threads, I also came across the idea that this type of problem might be the result of some signal noise/disturbance. If I need to use some kind of PFI filtering (as one in the picture) to get rid of this noise, what value should I choose for 'minimum pulse width' if the frequency value I am currently getting is around 11MHz whereas I am expecting something between 80-200 Hz?

0 Kudos
Message 4 of 5
(4,744 Views)
Solution
Accepted by topic author Miniature1313

Ok, when I switched from my old age Windows XP to Windows 10, the problem got resolved. I am sorry for this little annoyanceSmiley Happy!

0 Kudos
Message 5 of 5
(4,729 Views)