LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Frequency Counting with noise

I am trying to measure speed or frequecy of an DC electric motor using Labview express vi (daq assistant). We are taking the reading from one of the hall

sensors on the motor (fires 15 times per revolution). I have a strong square wave with an ampiltude of roughly 7 VDC when viewed by an oscilliscope (see

attached file). The problem is that the tops of these square waves have some noise in them. The noise amplitude appears to be nearly 1/2 a volt. This

1/2 volt noise is triggering a frequency count that is ficticious. Is there a way to change the amplitude required to trigger a count so that only the large voltage peaks are counted?

Thanks,

Patrick

0 Kudos
Message 1 of 9
(4,224 Views)
Hi Patrick,

What NI hardware are you using to perform this counter input operation?  I'm assuming the board you have is expecting TTL compliant signals, so any voltage that is above 2 Volts should be considered a "high."  There is no way to change these logic levels, as they are predetermined by the hardware on the card.  Once your signal reaches 7V, the .5V noise shouldn't cause extra counts to register.  However, if there is high frequency noise on this signal during its rise time, then you could get multiple counts as it passes through the 2V region, which sounds like what you are seeing.

Depending on the device you are using, you can enable digital filtering through NI-DAQmx.  Let me know if this helps out, and if you have any other questions.

Have a great day!
Travis W



0 Kudos
Message 2 of 9
(4,193 Views)

Thanks for the reply Travis.

I'm definitely classified as a new comer to Labview and data acquisition in general.

The device I'm using Is the DAQPAD 6015 with mass termination and a SC2345 carrier.  I'm attempting to read the frequency via one of the on board general purpose counter timers.  I've recently been informed that this might not be the best method for doing this because apparently there is no way of filtering signals when using this method.

The counter actually works fine until I place the motor under load and it gets a little bit of noise in the signal.  Even then it sometimes reads correctly, but sporadically jumps to a much higher frequency (counts the small spikes in the noise).

It has been recommended that I try to use one of the AI channels instead.  If I have to do this I will, but will have to purchase more hardware to do so.

Patrick

0 Kudos
Message 3 of 9
(4,182 Views)
Are the hall devices powered from the same supply as the motor? You may be better off if you used a separate suppy for the halls to reduce the noise.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 4 of 9
(4,181 Views)

Yes,

The hall sensors are powered from the same supply as the motor, but they are integrated into the motor circuit board so I am unable to separate the power sources.

This motor is a very different configuration.  All windings, hall sensors, etc are printed on a circuit board.  Instead of the motor windings turning, the magnets turn.

Patrick

0 Kudos
Message 5 of 9
(4,165 Views)
Hi Patrick,

You're correct, the 6015 will not support digital filtering on the counter input.  For using an analog input to count this signal, this example would be a great place to start.  Otherwise, you could create a simple comparison of the voltage level in software.

In terms of a solution with your current hardware, I did think of one other option:
You could perform a buffered event counting operation (where the value of the count register is read in based on a high-frequency sample clock).  Using the other counter on this board as the sample clock, you could potentially read the value of this count register at 10 times the maximum frequency your encoder will pulse, and from there you could figure out which were the real counts and which were false.  If you'd like to try this option and you need help getting started, let me know.

Also, let me know if there is anything else we can help you out with or other questions we can answer.

Have a great day!
Travis W
0 Kudos
Message 6 of 9
(4,140 Views)

Could it be that 7 volts is above the specification for TTl logic levels??? This may cause unexpected glitches in counting.

Personally I would limit the counter input to 5 volts- ideally you could use an optoisolator to lower the value to 5V AND to isolate the voltage going into the counter from the noisy power running the motor.

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 7 of 9
(4,121 Views)
Is there any one who help me.I want to measure frequency in 60 seconds but I can't.My data is square wave.shortly I want to measure heart rate in 1 minute.
 
0 Kudos
Message 8 of 9
(3,740 Views)

Hi,

I would like to advise you to start a new thread for your question, since you have a new issue, it helps us keep track of  customer problems. Also there is more information needed to help you measure frequency, for example: What board do you have? What is the range in frequency that you might be expecting? Is your signal TTL or differential?

Some resource in frequency measurements are: Making Accurate Frequency Measurements and Period Measurement with a Counter.

Don't hesitate in posting your questions in a new thread.

I hope it helps



Message Edited by Jaime F on 01-14-2008 11:47 AM
Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 9 of 9
(3,707 Views)