## Frequency Measurement with DLL. PS2205A

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

### Frequency Measurement with DLL. PS2205A

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
Posts: 3583
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

### Re: Frequency Measurement with DLL. PS2205A

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

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
Posts: 47
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

### Re: Frequency Measurement with DLL. PS2205A

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
Posts: 3583
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

### Re: Frequency Measurement with DLL. PS2205A

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

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