Although detecting the frequency of various signals with an Arduino has been demonstrated in the past, the methods used including looking for peak and slope detection or zero-crossing of the signal can be effective with simple signals but have trouble with harmonics. However using some digital signal processing techniques demonstrated by Instructables user akellyirl, a much more accurate frequency detection can be possible
His system uses autocorrelation, which according to Wikipedia:
... is the cross-correlation of a signal with itself. Informally, it is the similarity between observations as a function of the time lag between them. It is a mathematical tool for finding repeating patterns, such as the presence of a periodic signal obscured by noise, or identifying the missing fundamental frequency in a signal implied by its harmonic frequencies. It is often used in signal processing for analysing functions or series of values, such as time domain signals.
As well as documenting the process, you can also find the required sketch and a sample synthesiser waveform table to be included for your own testing - so to learn more about this interesting technique visit the project Instructable. And for more, we're on twitter and Google+, so follow us for news and product updates as well.
Need a tiny Arduino-compatible for use with your own audio-based projects? Then check out out our LeoStick. It's the Arduino Leonardo-compatible board that's cheaper and smaller than the original:
Apart from being one of the smallest Arduino-compatibles on the market with USB, it also has an onboard RGB LED and piezo which can be used a knock sensor and various tune and sound effects. Plus you can add extra circuitry with the matching protostick! For more information and to order, click here.