Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

measure frequency from analog input port

Hello,

 

I am using an analog input port of a DAQ board to measure the signal coming out of a circuit built around a humidity sensor. I am succesfully reading the voltage and i am plotting the signal in Labview. It looks like a square pulse. Now i would like to measure the frequency of this pulse but i am not sure what is the proper way to do it. None of the functions of Labview work as the signal is not recognized as Digital or Analog pulse. Anyone know how should i do it?

 

Thank you,

 

CK

 

 

0 Kudos
Message 1 of 10
(8,048 Views)

Have you tried the the

Pulse Measurements VI

Owning Palette: Waveform Measurements VIs

Requires: Full Development System

Accepts a periodic waveform or an array of periodic waveforms and returns the period, pulse duration (pulse width), duty cycle (duty factor), and pulse center of a selected pulse and period. Wire data to the signal in input to determine the polymorphic instance to use or manually select the instance.

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 2 of 10
(8,023 Views)

Thank you for you reply.

I have tried the pulse measurements vi but i do not have the correct type of waveform to input.

I only have a numeric value (float) representing a voltage coming in from the AIO port.

The change of this voltage creates a kind of square pulse which i need to measure.

 

My problem is how to convert the numeric value to a waveform format in order to be able to use the VIs from the analog measurements pallete

 

Thank you,

 

Christos

 

 

0 Kudos
Message 3 of 10
(7,998 Views)

OK, back to GO

What frequency range to want to measure?

What Hardware are you using?

What desired Frequency uncertainty do you need / expect ?

What update rate do you need?

 

How are your LabVIEW DAQ skills?

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 10
(7,994 Views)

Hello,

 

The frequency range i want to measure is 6 to 7 Khz

I am using a PC104 computer motherboard that has on-board 8 Analog Input ports.

I am using one of these ports to measure the voltage.

The uncertainty is not that critical for this stage. It can be 10-100 Hz

 

I have worked in the past with LabVIEW DAQ but i have used NI hardware.

 

Thanks,

 

CK

0 Kudos
Message 5 of 10
(7,965 Views)

OK what are the possible sampling rates and the number of samples you can read? 

For 10Hz you need to read 100ms @ at least 20kHz -> 2000 samples ( hopefully you can read them hardware timed.... don't know your driver;) )

Now count the falling (or rising) edges  6kHz makes 600 edges 🙂

Well not quite 10Hz uncertaincy ..... but good enough for a humidity sensor  with 2% ??

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 6 of 10
(7,943 Views)

Hello Henrik, thanks for your response and sorry for the late reply. I was busy in a training and i did not have time to work on this issue.

 

My hardware can have up to 100Khz sampling rate, so this should not be a problem. The problem is how to sample such a pulse and measure its frequency in labview.

Is it possible to send you my code to have a look at it?

 

Thanks,

 

CK

0 Kudos
Message 7 of 10
(7,785 Views)

Howdy Christos!

 

What driver are you using to communicate with the PC104?

 

Regards,

Barron
Applications Engineering
National Instruments
0 Kudos
Message 8 of 10
(7,761 Views)

[duplicate post]

Barron
Applications Engineering
National Instruments
0 Kudos
Message 9 of 10
(7,760 Views)

Attached is a 5min tryout plus another 3min for cosmetics 😉

I simulated the signal and used low level vis that work with array  (don't know your driver, but you will always get an array of values out )

 

I thought there would be a ready made made 'count pulses' but I didn't found it.

So here is my approach: I build the derivate of  the signal and count the peaks ...

As an alternative I used the tone detection vi. Since this will calculate the fft it needs more computation power but will give much better results.

 

 

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 10 of 10
(7,740 Views)