Go Down

Topic: Using Electret Mic to Identify Frequencies  (Read 51 times) previous topic - next topic

Amanuella

Hi All,

I don't know if this question has been asked/answered before, but I'm new to Arduino and I have a few questions.

I have an Arduino Uno and Arduino Micro and I would like to use an Electret Microphone Breakout Board to identify if a sound is within some specified frequency range. I don't want  the frequencies to be displayed on a screen, but I do want the Arduino to execute certain commands if the sound is of the desired frequency(for testing, I'd use an LED). Is this possible? I can't use a large external circuit and I am working with limited supplies. Some instruction, schematics and perhaps some sample code would be super helpful.

Cheers!

AWOL

Can you give any idea of the frequency you're interested in?
"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.

Amanuella

I'm mostly interested in the frequencies within the normal human audible range. I'm still not exactly sure which frequency/ frequency range yet.

DVDdoug

The "obvious" answer is FFT.  (Technically, it's called DFT in the digital domain.)  

Or if you are looking for one (or a few) specific frequency bands, you can use DSP bandpass filters, which are easier than FFT.  

There is an FFT library (I've never used it) so you don't have to start from scratch, but DSP (Digital Signal Processing) is not simple.  There is a FREE online DSP book, but it's not specific to the Arduino -  The Scientist and Engineer's Guide to Digital Signal Processing,  by Steven W. Smith, Ph.D..

The Arduino isn't a super-powerful processor and I don't know what kind of FFT limitations you'll run into, but people have made audio spectrum analyzers.

If 7 frequency bands are enough, look into the MSGEQ7 chip.  It's got 7 bandpass filters on a chip.  It requires some tricky timing & programming, but it's not nearly as complicated as FFT.  (I've never used the MSGEQ7 chip either, but I understand what it does...)

Amanuella

Thank you so much for the help!

I had read about FFTs and I did try to test the sketches the have for that, but a lot of the sketches fail to compile. I am also not sure what type of circuit setup the sketches are designed for(although I could figure it out from the code-- not easy as most of the code doesn't work).

If you have a specific working example(with all the necessary details)that I could perhaps look at to get a better grasp of things and build off of, that would be much appreciated.

I hate to be asking so much, but I'm new at this and I am totally willing to learn so the more examples and instruction, the better.

Thanks again!!!

Go Up