09-27-2014 06:19 AM
Hi, im really newbie with labview but my goal is to acquire the PC built in microphone with the acquire sound express VI function, convert to dB data and if the dB values are bigger than "n" (for example bigger than 80dB) for "n" seconds a led turn on.
Is it possible? How could i do it?
09-29-2014 03:25 AM - edited 09-29-2014 03:39 AM
Take a look at the examples 🙂
continous sound input.vi is a good start.
Now you have the raw data...
Do you need a weigthning curve? How to define and calculate the 'overload'?
A lot is 'well' defined in standards ...
A simple solution: Calculate the FFT Power spectrum (use the exp. average for your n seconds) and use the waveform monitoring vis for the limits.
Expand the first try with a producer consumer architecture .. While you capture the next x00 ms of data in the producer loop, calculate the result in the consumer loop.
(It took me more time to write this than to program it.... , OK building a fancy GUI may eat up more time)
Your biggest problem will be the 'correct' 80dB limit without a traced pistophone or calibrated mic.
While playing around with my build in mic on my DELL laptop , I found that it will work up to 80kHz !! (checked with a piezo speaker on an old wavetek generator) I was able to use it for bat detection 🙂
09-29-2014 10:30 AM
Henrik:
80KHz, wow, sounds like they are using a piezo mic element.
Bat detection, cool!
-AK2DM
09-29-2014 11:55 AM
Hi,
yes, your application is possible with LabVIEW. There is an example on the Example Finder of LabVIEW 2014 from you can start to develop. It's called Contiuons Sound Input.vi.
That VI already acquire the sound from the microphone you set. Later you can use the Tone Measurements.vi to measure the frequency and convert to Db.
Have a nice evening!
09-30-2014 07:44 AM
Thank you all for the help, i will try!