Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

noise in frequency measurement using a counter

Solved!
Go to solution

Hi all,

 

I'm using a 6602 card for frequency measurement in a 'bufferred large range with 2 ctrs' mode, the signal of interest is a TTL signal from an APD, however, I got a signal as shown attached. It seems that the noise level varies with signal level, is there any good way to eliminate such noise? Tried with digital filter but it doesn't work throwing out an error 200774. It seems the source of selected counter is set by default 'No Filter'. And I'm also thinking to use a bandpass filter, but since the signal level changes (~300Hz - ~300kHz), the high and low limits are not easy to set.

 

Thanks in advance!

 

Best,

L.

0 Kudos
Message 1 of 22
(5,174 Views)

Hi

 

First of all Im not sure what a ADP is, second of all if you have a noise on your signal a filter AFTER the counter won't do any good. You need to put a hardware filter on the signal before you send the pulse to the card or perhaps just use the Filter Clock if the noise is small pulses. But perhaps you don't need a filter after all, perhaps just averaging your values could give you the desired values. Or maybe you need to increase the Measurment time.

 

Regards

Bjorn

0 Kudos
Message 2 of 22
(5,151 Views)

Hi Bjorn,

 

Thank you very much for you reply! 

 

APD is avalanche photodiode, a device for photon counting, outputing TTL signals in my case.

 

'You need to put a hardware filter on the signal before you send the pulse to the card', in my lv code, the digital filter (for PCI6602 card, a hardware filter) is set after the create channel step and before the 'start task' step, I think it works the way as you said ( or maybe i'm wrong? ), but it errors 200774 as mentioned in my first post. Averaging the samples could help but I'd like to keep as high time resolution as possible, so i'd prefer to try other methods before turning to this one. 

 

Best,

\L

0 Kudos
Message 3 of 22
(5,147 Views)

The increase of noise at higher frequencies could be a natural part of the digital noise of your counting sheme. Please post more parameters (and maybe code?) of your setting.

 

How does the input signal looks like? 

 

Assume a 'constant' jitter, then the noise(error) for short period(s) (high freq) will be higher.

   

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 22
(5,133 Views)

Hi Henrik,

 

Sorry I don't have the code in the computer I'm using, I'll have it on the next Monday. Basically it's the example 'freq meas buffered large range 2 ctr' for counters frequency measurement except that i put it in a producer-consumer structure and added a DAQmx channel node where I set this digital filter which doesn't work. It is put before the 'start task' step. The curve I showed in the first post was what I got from the consumer loop but it showed the same in the producer loop, of course, with the digital filter disabled. 

 

Here are the parameters I recall:

Method: large range with 2 counters

Mode: contineous sampling

Counter: Counter 0

Divisor: 4

Samples per channel (buffer size): 10000

Samples to read: 100 

Connection: PFI39, the source of counter0, for the TTL signal from APD.

 

The buffer size and samples to read don't matter to the signal itself. If I chose other counters, with digital filter enabled, the error showed the PFI of the corresponding source was set 'No Filter'. I think you're right it could be part of the digital noise of the counting scheme. It also exists in an edge counting mode, and appears after a derivative to the counts. Any suggestions to reduce it? Thanks!

 

Best regards,

L.

 

 

0 Kudos
Message 5 of 22
(5,116 Views)

Anyone has any idea about this?

 

The DAQmx channel for the digital filter is set after the create channel and before the timing step.

0 Kudos
Message 6 of 22
(5,090 Views)

Hi LTong,

 

You might have seen my other post, but I wanted to post here to make sure anybody who comes across this forum is aware that DAQmx 9.0 should fix the error you are experiencing when trying to configure the digital filter.  Please let us know if there are still any issues after the upgrade.

 

-John

John Passiak
0 Kudos
Message 7 of 22
(4,966 Views)

Thanks John!

 

After leaving labview for sometime I'm now back to this issue. I also post this as a new thread in this forum but I'd like to reply this also because it's an extended problem.

 

I installed DAQmx9.0 and I don't see the previous error anymore. The digital filter can at least be initialized. But the problem is that I don't get any signal when i enable the digital filter...

 

I simply added a DAQmx channel node where I enabled digital filter in the "Meas Dig Freq Buffered Cont High Freq - 2ctr.v" example. The signal is of ~50kHz and the highest glitch was 20MHz if I read one sample each time. It's simply one tick of the timebase. So I used the MinPulsWidth 1us, which is supported by the board. I supposed that the glitch should be filterted but the normal signal should pass. However, I got error 200284. To me it seems all the signal was filtered so that the DAQmx read task read nothing and throw the error 200284. With the filter disabled, it works fine, but one sees lots of glitches.

 

 What do you think causes this problem? Any suggestions are appreciated.

 

Best,

LTong

0 Kudos
Message 8 of 22
(4,815 Views)

Hi LTong,

 

This wouldn't be expected, the 50 kHz signal should give pulse widths of 100 useconds (assuming a 50% duty cycle) which would be easily passed by the 1us digital filter.  Here's a chart of the filter settings from the 660x User Manual for convenience:

 

660x Filter Settings.PNG

 

Are you positive that you are not receiving any data?  If you had a 50 kHz signal with 20 MHz glitches around the edges, I really can't think of a reason that you would be seeing 0 samples.  Would it be possible for you to acquire your digital signal on a Scope (as high of a sample rate as possible)?  How do you know that you are receiving 20 MHz glitches?

 

Also, what is your timeout set to on DAQmx Read?  Maybe it is just taking longer to receive the desired amount of samples since the noise pulses are not being counted.  You could try reducing the Number of Samples, or increasing the timeout on DAQmx Read to see if you are getting any data.

 

 

I'd be more than happy to take a look at your code if you post it, but I think we need to first make sure that the signal is in fact what we think it is.

 

 

Best Regards,

John

John Passiak
0 Kudos
Message 9 of 22
(4,792 Views)

John:

 

A 50kHz signal at 50% duty cycle will yield 10usec pulses, not 100usec. But even those should still pass through the filter.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 10 of 22
(4,785 Views)