How to make frequency or tone detector

If input is normal music or speech, is Arduino powerfull enough for a tone detector or encoder. Pulse counting or counting zero crossings could work but it is not very noise tolerant. I want to know if certain frequency or frequencies are present in the input.

I could use some filtering but the more I filter, the less I need the microcontroller. A narrow band analog filter is easy to make after all.

Leif

look at ne567 IC

i have no idea, but would a analog in work?

Would Goertzel's algorithm work for you?

look at ne567 IC

i have no idea, but would a analog in work?

Hi

NE567 is a good chip, although I am not sure how much it is used today, because it is so old. Analog is surely on option but I wondered if an AVR could handle this. The problem is, I now nothing about discrete math or DSP programming. And I wondeded if someone has tried something like this. "If you want to be cool, you have to use a controller." Not my exact opinion, but a microcontroller option is good to have.

Yes, Ain would probably work, and then some fancy math. Or something simpler with amplifier, smith trigger and digital input.

I have to stop now, another reply came

Leif

AWOL:
Would Goertzel's algorithm work for you?

Heh, I had to look it up first.

Yes probably. How it is done?

AWOL:
Would Goertzel's algorithm work for you?

And where it is in C. Wikipedia has some info, but do you know a little easier way. Like a C sample

Edit #3. A C sample

I dont know when I can test this. If any you have some extra info, I am happy hear it before I begin.

I want to know if certain frequency or frequencies are present in the input.

It's the whole world difference :

  1. you need to detect one / few "specific" freq. - Goetzel is the best option;
  2. look whatever "pop-up" in sampling pull - FFT.
    For second variant, more details necessary, in order to be sure that arduino "capable" for a mission:
    sampling rate, freq. selectivity / resolution (Q) of the filter?

Now it looks like I will know the frequencies before I start. And I can decide - there will 1 or 2. This so early it is easy to decide these things. So it is the Goetzel. I hope I understand the sample enough to use it.

  1. look whatever "pop-up" in sampling pull - FFT.
    For second variant, more details necessary, in order to be sure that arduino "capable" for a mission:
    sampling rate, freq. selectivity / resolution (Q) of the filter?

What is the Q of Goetzel. If it is something like 10000, we'll newer hit it. And does it work in real life.