Wednesday, February 20, 2013

Fast Fourier Transforms FFT


Introduction

I have had a hard time trying to isolate the audio frequency sent out by my robot. Fortunately Mike Barela pointed me in the direction of FFT. FFT is Fast Fourier Transforms and are used to find out what combination of frequencies that make up a sound (among other things).

"If a function x(t) contains no frequencies higher than B hertz, it is completely determined by giving its ordinates at a series of points spaced 1/(2B) seconds apart." -Nyquist–Shannon sampling theorem


Mike pointed me to this awesome project:
http://coolarduino.wordpress.com/2012/10/01/sound-localization/

That was really inspirational, and made me think that I still might have a chance to do this!

There are a lot of who have done this before...
http://www.arduinoos.com/2010/10/fast-fourier-transform-fft-cont/

The 15ms beeps (1 per second) results in an update of the LCD.

Now using a library I can get a boolean result when a sound of the correct frequency is received. It feels like a step forward towards calculating the distance between the robot and the microphone. Next step synchronize the sender and receiver! Looking forward to it!

Libraries:

I found a few libraries and this was the one I tried first:
http://wiki.openmusiclabs.com/wiki/ArduinoFFT

They also have this that might be even faster
" As a result, the FHT uses half as much processing power, and half as much memory. You can have your cake and eat it too!" - http://wiki.openmusiclabs.com/wiki/ArduinoFHT
Here is another library to try...
http://code.google.com/p/makefurt/source/browse/trunk/arduino-libraries/?r=11#arduino-libraries%2FPlainFFT


No comments:

Post a Comment