Pages: [1]   Go Down
Author Topic: How to make frequency or tone detector  (Read 1340 times)
0 Members and 1 Guest are viewing this topic.
Turku
Offline Offline
Full Member
***
Karma: 1
Posts: 232
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 486
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

look at ne567 IC

i have no idea, but would a analog in work?
« Last Edit: February 27, 2012, 11:51:15 am by sirbow2 » Logged

http://dduino.blogspot.com all my Arduino/electronic projects!!!

{NEW} Getting Started, Learning, Reference + FAQ PDF!!:
[url]http://ar

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26637
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Would Goertzel's algorithm work for you?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Turku
Offline Offline
Full Member
***
Karma: 1
Posts: 232
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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
Logged

Turku
Offline Offline
Full Member
***
Karma: 1
Posts: 232
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Would Goertzel's algorithm work for you?

Heh, I had to look it up first.

Yes probably. How it is done?
Logged

Turku
Offline Offline
Full Member
***
Karma: 1
Posts: 232
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
http://netwerkt.wordpress.com/2011/08/25/goertzel-filter/

I dont know when I can test this. If any you have some extra info, I am happy hear it before I begin.
« Last Edit: February 27, 2012, 12:33:05 pm by LMI » Logged

Montreal
Offline Offline
Faraday Member
**
Karma: 31
Posts: 2611
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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?

Logged

Turku
Offline Offline
Full Member
***
Karma: 1
Posts: 232
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Quote
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?

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

Logged

Pages: [1]   Go Up
Jump to: