How can I the grab frequency of a me humming?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I the grab frequency of a me humming?

1,517 Views
sbonkosk
Contributor I

Hello,

 

Ill start off by saying Im very new to working with embedded systems and do not have much experience at all, so if I ask kind of a dumb question, at least you'll know why :smileywink:

 

So I am working with the DEMOACKIT from Freescale, with the MCF51AC256. 

 

If I was to hum into a microphone, how could I go about getting the frequency of that hum? I'm pretty sure I'll need to make use of a FIR filter but have never even heard of one before I wanted to do this.

 

Any help would be greatly appreciated. Again, please excuse my noviceness, I'm learning! :smileyhappy:

Labels (1)
0 Kudos
6 Replies

611 Views
scifi
Senior Contributor I
Well, I suppose you could do a Fourier transform on a reasonably-sized sample of the hum. Then you could analyze the resulting spectrum and find the lowest-frequency component. That would be the frequency of your hum.
0 Kudos

611 Views
sbonkosk
Contributor I

Well I was actually thinking I could use a microphone, amplify it a lot, use a bandpass filter, and when I input it into the processor I would just count the number of zero passes in a given amount of time and that would be my frequency.

 

Would this work? 

0 Kudos

611 Views
admin
Specialist II

Counting the number of zero passes in a given amount of time is non-reliable method of the microphone signal frequency. It demands non-realistic accurate narrow bandpass filtering.

The idea of some preliminary bandpass filtering and the subsequent FFT is seem as the reliable method.

0 Kudos

611 Views
sbonkosk
Contributor I

So counting the number of zero passes definitely wouldn't work? Thats a shame, I was hoping it would be that easy...

 

Now, how exactly would I perform a Fourier Transform on the incoming signal? Is the Fourier transform all software that I would write? Is there some sort of bean that I should download for this to work? Or would the signal just be going into a AD converter and I would analyze it from there?

 

Again, sorry for the novice questions but this is all new to me and I'm i the process of learning all of this right now. 

0 Kudos

611 Views
admin
Specialist II

Arrange some analog conditioning: at least amplification and antialiasing low-pass filter. It will be also good to cut sure the non-interesting frequencies.

Arrange sampling the signal with a reasonable sampling frequency and quantity of samples.

Apply windowing.

Apply FFT.

Analyse the spectra.

 

Useful resources:

 

The Freescale source code DSP libraries:

1.
DSPLIBUM : Digital Signal Processing Libraries Using the ColdFire eMAC and MAC (pdf)
http://www.freescale.com/files/32bit/doc/ref_manual/DSPLIBUM.pdf?fsrch=1
"This document provides a library of macros designed to ensure efficient programming of the ColdFire processor using MAX..."
DSPLIBUMSW : "Digital Signal Processing Libraries Using the ColdFire eMAC and MAC User's Manual" Software (zip)
http://www.freescale.com/webapp/sps/download/license.jsp?colCode=DSPLIBUMSW&location=null&fsrch=1
"Accompanying software to the "Digital Signal Processing Libraries Using the ColdFire eMAC and MAC User's Manual"
2.
CFLMOPM : Library of Macros for Optimization Using eMAC and MAC Programmer's Manual (pdf)
"This programmer's manual provides a detailed description of a set of macros used for optimizations."
CFLMOPMSW : Software for the Library of Macros for Optimization Using eMAC and MAC Programmer's Manual (zip)
https://www.freescale.com/webapp/Download?colCode=CFLMOPMSW&appType=license&location=null&fsrch=1
"Software for the CFLMOPM"

 
Prosig Noise & Vibration Blog

"Telling you what you really need to know about noise & vibration measurement". Includes explanation of many practical issues:

0 Kudos

611 Views
sbonkosk
Contributor I

Thanks for the sources yevgenit!

 

Ill definitely check those out. 

0 Kudos