Detect Audio frequency

Is there a way to detect the frequency of a sound with a microphone and an arduino ?

And the difference between the different audio frequencies?

Possibly This

A frequency measurement library

 

http://interface.khm.de/index.php/lab/experiments/frequency-measurement-library/

 

Would be up to you to condition the input signal to suit I suppose.


thanks I will try this one.

analyzing frequencies can be

analyzing frequencies can be very tricky.

in so many signals, there are many overlapping frequencies all happening at the same time.

to see what I mean, take any .WAV file and write a program to read in the bytes and display the values.    if you get that far and want to see more, try graphing those values over time.  I think each byte in a WAV file has a range from -128 to +128.   the first 30 or 40 bytes are descriptive and not part of the signal.

sampling rates dictate how many bytes are crammed into each second of recorded sound.  ex: 22khz means 22,000 samples (bytes) per second.   

its been about 10 years since I played with this stuff so my facts might be a little off, but I remember it was very challenging to analyze recorded sound.

 


Well I dont want to analyze the sound in depth just its frequency I cant provide you with extra information because I want to keep it secret untill is made .

Are you trying to calculate

Are you trying to calculate the frequency of a heard sound, or are you always listening out for a sound of a known frequency?


I want to calculate the frequnecy of several heard sounds and then save the value of the frequency  to an epprom on sd card

and then I will try to make my arduino recognize the saved sound’s frequency .

For example recognize the frequency of a string of a guitar and if you hear something simmilar to this do something.

I suggest you record the

I suggest you record the sound wave signals on your computer to analyze them first.  Understand what the wave looks like and determine if you need to condition the signal.  An example of conditioning/changing the signal is to run it through an amplifier and/or filter.

For instance a transistor or operational amplifier can be used to amplify the signal so it is at voltage levels the AVR microcontroller in your Arduino can pick up on.  If you ‘rail’ the voltages you could essentially create a square wave output from the amplifier to feed as a digital input to the arduino, which would not require use of the analog to digital converter (ADC).

Filtering can be used to get rid of harmonics or overtones and unwanted signal/noise.  Some simple resistor capacitor circuits can be used to do this.  Remember to analyze the signal on a computer/oscilloscope to know what is actually going on.

You may want to startwith a tuning fork but I suppose a guitar string is not a bad idea, although some guitar strings will have a better waveform than others.

You might look around for

You might look around for open source MIDI utilities. To convert sound to MIDI, you have to find the frequency and map it into a range. Besides having algorithms for deciphering such things, most of the ones I have dealt with (as a user) are somewhat forgiving. 


Will this circuit do the job?

http://www.sparkfun.com/products/9868