# Frequency Counter‏

**URL:** <https://www.ruby-forum.com/t/frequency-counter/240889>\
**Category:** GNU Radio\
**Created:** [May 5, 2014, 10:27am UTC](https://www.ruby-forum.com/t/frequency-counter/240889 "2014-05-05T10:27:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [May 5, 2014, 10:27am UTC](https://www.ruby-forum.com/t/frequency-counter/240889/1 "2014-05-05T10:27:23Z")

</div>

Hi list, Has anyone been able to implement a frequency counter yet?  
Any ideas on how I should try it?

---

<div class="post-metadata">

**Author:** ![Dimitris\_Siafarikas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9fc29f/32.png) [@Dimitris\_Siafarikas](https://www.ruby-forum.com/u/Dimitris_Siafarikas)\
**Post date:** [May 5, 2014, 5:42pm UTC](https://www.ruby-forum.com/t/frequency-counter/240889/2 "2014-05-05T17:42:43Z")

</div>

jimsiaf91 wrote

> Hi list, Has anyone been able to implement a frequency counter yet?  
> Any ideas on how I should try it?
> 
> * * *
> 
> Discuss-gnuradio mailing list

> Discuss-gnuradio@

> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

I have been pulling FFT vectors out of the flow into python using a  
message  
queue, then finding the frequency of the maximum bin. I suppose you  
could  
do this, retune the USRP or channelizer, then increase the decimation.  
Keep  
doing this to narrow down the spectrum.

I suppose a gated type counter would work too, where you just could the  
cycles, and may work better for modulated signals.

Lou  
KD4HSO

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Frequency-Counter-tp47952p47957.html](http://gnuradio.4.n7.nabble.com/Frequency-Counter-tp47952p47957.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![Dimitris\_Siafarikas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9fc29f/32.png) [@Dimitris\_Siafarikas](https://www.ruby-forum.com/u/Dimitris_Siafarikas)\
**Post date:** [May 5, 2014, 5:56pm UTC](https://www.ruby-forum.com/t/frequency-counter/240889/3 "2014-05-05T17:56:51Z")

</div>

The ‘spectrum sense mode’ in scanoo locks on to the strongest signal  
within  
the rx bandwidth. Just set the squelch and then enable spectrum sense  
in  
the spectrum sense tab:

> **[GitHub - m0mik/scanoo: This project no longer works so please try Ham2Mon -\>](https://github.com/m0mik/scanoo)**
>
> This project no longer works so please try Ham2Mon -\> - GitHub - m0mik/scanoo: This project no longer works so please try Ham2Mon -\>

Mike

–  
Mike J. M0MIK BSc MIET  
Email: removed\_email\_address@domain.invalid  
Web: [http://scanoo.com](http://scanoo.com)

---

<div class="post-metadata">

**Author:** ![Dimitris\_Siafarikas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9fc29f/32.png) [@Dimitris\_Siafarikas](https://www.ruby-forum.com/u/Dimitris_Siafarikas)\
**Post date:** [May 6, 2014, 12:54pm UTC](https://www.ruby-forum.com/t/frequency-counter/240889/4 "2014-05-06T12:54:19Z")

</div>

Ah sorry, I didn’t mean to put it that way: It’s not an analog device;  
the thing I wanted to point out  
that there being a device that counts frequency --to me-- belongs to a  
very “analog” thinking (i.e. it’s not math on a computer, but an actual  
thing with an HF connector). Actually, you’re absolutely right, counting  
things in discrete steps in defined time intervals is the most digital  
thing one could do.

Thanks for your mail!

Greetings,  
Marcus

---

<div class="post-metadata">

**Author:** ![Dimitris\_Siafarikas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9fc29f/32.png) [@Dimitris\_Siafarikas](https://www.ruby-forum.com/u/Dimitris_Siafarikas)\
**Post date:** [May 5, 2014, 5:58pm UTC](https://www.ruby-forum.com/t/frequency-counter/240889/5 "2014-05-05T17:58:42Z")

</div>

Hi Dimitris,

a frequency counter counter is a very analog-world concept, I’d say.  
As DSP person I’d assume you’d want a frequency estimator.  
You can implement a simple one by using an FFT block, abs, max arg  
chain, or just get your result from looking at any FFT plot.

Anyway, for spectrum estimation, I recommend the gr-specest toolbox,

> **[GitHub - kit-cel/gr-specest: A module adding spectral estimation routines to...](https://github.com/kit-cel/gr-specest)**
>
> A module adding spectral estimation routines to GNU Radio. - GitHub - kit-cel/gr-specest: A module adding spectral estimation routines to GNU Radio.

Greetings,  
Marcus

On Mon, May 5, 2014 at 10:25 AM, Dimitris Siafarikas

---

<div class="post-metadata">

**Author:** ![Dimitris\_Siafarikas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9fc29f/32.png) [@Dimitris\_Siafarikas](https://www.ruby-forum.com/u/Dimitris_Siafarikas)\
**Post date:** [June 3, 2014, 2:06pm UTC](https://www.ruby-forum.com/t/frequency-counter/240889/6 "2014-06-03T14:06:51Z")

</div>

On Mon, May 5, 2014 at 4:25 PM, Dimitris Siafarikas  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi list,
> 
> Has anyone been able to implement a frequency counter yet?
> 
> Any ideas on how I should try it?

Hi Dimitris,

Yes.  
I have recently created a block for frequency counting, refer

> **[GitHub - activecat/gr-test2: GNU Radio: more examples](https://github.com/activecat/gr-test2)**
>
> GNU Radio: more examples

Try to run this flowgraph: gr-test2/examples/flowgraph\_04.grc  
amazingly it shows quite an accurate result.

Let’s test it with various frequencies by adjusting the GUI Slider.

I created this block when I need to observe the frequency stability of  
signal from USRP, as in flowgraph\_05.  
Hope this block is useful to you too.

---

<div class="post-metadata">

**Author:** ![Dimitris\_Siafarikas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9fc29f/32.png) [@Dimitris\_Siafarikas](https://www.ruby-forum.com/u/Dimitris_Siafarikas)\
**Post date:** [June 8, 2014, 2:36am UTC](https://www.ruby-forum.com/t/frequency-counter/240889/7 "2014-06-08T02:36:45Z")

</div>

First of all, please stay on the list.  
Refer inline reply below.

On Fri, Jun 6, 2014 at 11:12 PM, jimsiaf91 [via GnuRadio] \<  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:

> Well,  
> I tried it with my usrp N210. The first time it showed something on the  
> Scope sink. After that it did not.

Your setup could be wrong.

> Only when I run first the flowgraph\_6.grc then the 5th ( the one with the  
> USRP source) showed something. I do not understand why this is happening.

I see no correlation on this.

> Besides that, I tried to measure at 2Ghz with and external frequency  
> generator (sin) and also attached a number sink after the block you wrote.  
> The number sink did not show 2Ghz (in units), instead jittered at about  
> 1000 units.

If the Sample Rate (samp\_rate) of the UHD (USRP) source is only 100kHz,  
it  
cannot measure 2GHz external frequency.  
Refer Nyquist sampling theory.

---

<div class="post-metadata">

**Author:** ![Dimitris\_Siafarikas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9fc29f/32.png) [@Dimitris\_Siafarikas](https://www.ruby-forum.com/u/Dimitris_Siafarikas)\
**Post date:** [June 6, 2014, 4:46am UTC](https://www.ruby-forum.com/t/frequency-counter/240889/8 "2014-06-06T04:46:33Z")

</div>

On Tue, Jun 3, 2014 at 11:41 PM, Dimitris Siafarikas  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Exceptional work! Looking forward to try this with my usrp tomorrow 😉

Dimitris,

How is your test result with USRP, any updates ..?
