Frequency Measurement with DLL. PS2205A

Post general discussions on using our drivers to write your own software here
Post Reply
rcrodriguez
Newbie
Posts: 0
Joined: Fri Aug 19, 2016 9:41 pm

Frequency Measurement with DLL. PS2205A

Post by rcrodriguez »

Hello, I'm using the Picoscope 2205A. I'm trying to measure the frequency of a waveform using DLL functions. I'm aware that there's no function dedicated to solely measuring frequency, but do you guys perhaps have any suggestions?

I was thinking of maybe using ps2000_run_streaming, and use the fact that I can specify the sampling time interval to measure the time difference between one V_peak to the next V_peak. The frequency would then be 1/(time difference).

Would this be the best method of measuring the frequency? I'd appreciate suggestions. Thanks.

Martyn
Site Admin
Site Admin
Posts: 4483
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Frequency Measurement with DLL. PS2205A

Post by Martyn »

That would be an acceptable method but I would use the zero crossing points, rather than the peaks.
Martyn
Technical Support Manager

TimOster
Newbie
Posts: 0
Joined: Mon Dec 01, 2014 5:36 pm

Re: Frequency Measurement with DLL. PS2205A

Post by TimOster »

Why do you say that? The zero crossing might occur between measurements, just like a peak. How does the Pico software measure frequency? At the fastest sampling rate and highest freq don't you only have a dozen or so samples?

bennog
Advanced User
Advanced User
Posts: 206
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: Frequency Measurement with DLL. PS2205A

Post by bennog »

That is why you need to do it at zero crossing (with a hysteresis if possible) then you have exactly 1 crossing from + to - and 1 from - to +.
If you count the samples between 2 successive + to - crossings you can measure the freq.
If the wave is symmetrical you can measure the number of samples between every crossing and multiply this by 2.

Benno

Martyn
Site Admin
Site Admin
Posts: 4483
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Frequency Measurement with DLL. PS2205A

Post by Martyn »

It is more accurate to use zero crossing, and when I say zero crossing I mean the point at which the waveform is half way so taking account of any DC offset. If you only have a few samples making up the waveform you can use linear interpolation and get a reasonable indication of where the crossing occurs, even if it is between sample points. If you try to do this with samples around the peaks the results you get will be less precise.
Martyn
Technical Support Manager

TimOster
Newbie
Posts: 0
Joined: Mon Dec 01, 2014 5:36 pm

Re: Frequency Measurement with DLL. PS2205A

Post by TimOster »

OK, I was thinking too literally. Transition from a positive to a negative value, rather than hitting zero exactly. Makes sense now.

Post Reply