I2Cdevlib Forums

# calculating frequency

## Recommended Posts

Hello All, I'm working on a project where I'm looking at trying to calculate sound frequency, my understanding is that because I only care about what the frequency is, not necessarily the sound itself, and accelerameter may be the best sensor for the job (Planning on mounting it securely to a plastic sheet so it gets the vibrations).  I purchased an MPU-6050 chip and it will arrive in a couple days, but now I've started trying to find some documentation to lead me along the right path and am not finding too much.  Can someone point me in the right direction on this?  and if this is not the best tool for the job i'm all ears, I'd rather do it right.  I'm also trying to make  this a low power project as it will be running on battery.

Thank you,
CBanta

##### Share on other sites

Hello cbanta.

First of all, these forums are almost abandoned, so I would suggest you look for help somewhere else, like the Invensense forums.

Now some suggestions: in order to detect sound frecuencies I would use Fourier Transform in order to get the frequencies of the signal.  If you knew what frequencies you are looking for or at least a range you want to detect, you could use instead some band-pass filters. First you have to capture the signal, I would do this using a microphone. Audio frecuencies go from 20 to 20000Hz (https://en.wikipedia.org/wiki/Audio_frequency) , in order to detect a frecuency there is a law somewhere that you have to measure at double the frequency you want to capture. If you are using an accelerometer, it is hard to reach high measure frequencies. Usually it is about 1kHz, but let's suppose you can get to measure at 10kHz, still you would only be able to capture audio up to 5kHz, missing all audio from 5 to 20 kHz.  So that is why I would try with something different that an accelerometer.

Good luck with your project and do a larger search online on that topic, I am sure there are lots of info out there.

##### Share on other sites

Thank you very much for the advice!  I'm looking for frequency on the low end (50-400hz) so nothing too high, but I'l do some more digging into measuring it via a microphone.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.