LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Audio Waveform DAQ through MIC input

Hello,

 

I need to acquire acoustic pollution in the audible range (20Hz - 20kHz). Budget is NONE so I decided to use the HD audio within small and cheap laptops (Atoms, etc.). DAQ performance seems OK - 24bit, 200kS/s and nice running FFT. However, the waveform looks strange - and I need it for some calculations over sampled intervals (using 44.1 kS/s).

 

Namely, the signal is ranged ±1 (not sure what 1 means physically), and it looks like a PWM series with baseline at -1 and saturating on +1. Understandable, FFT is aliased, repeating on multiples.

 

This is all DAQed with the integrated MIC on mu laptop. Does anyone know how to retrieve the "real" waveform? Will I get better results with external MIC (I plan to use PCB 130E20 MIC alojng with IEPE conditioner 485B36)?

 

Thanks in advance,

0 Kudos
Message 1 of 9
(4,534 Views)

Golubovski,

 

Unless you are aware of what sort of transform the microphone is actually performing in order to output the particular FFT you are seeing, it will be very difficult to know how to actually translate this into an analog waveform.  In your application, are you using LabVIEW to process the image?  If you are, here is a basic tutorial on how PWM signals can be used in LabVIEW:

 

http://www.ni.com/white-paper/2991/en

 

Also, chances are you will have more success with an external microphone, but that will depend on the resolution you are able to receive as well as how the external mic is actually configured to output the signal.  If your external mic had a signal conditioner, I would say that you would be better off not using the internal computer microphone.  Hopefully this provides a bit of insight.

 

Regards,

 

Keith M.

Applications Engineering

 

0 Kudos
Message 2 of 9
(4,510 Views)

Hello Keith,

 

Thank you for responding.I just need the real waveform!

 

And what I acquire from the ADC is a strange waveform consisted of discrete-like pulses with baseline at -1 and going toward saturation at +1. Attached is a sample waveform, and 2 zoomed sequences from it. The signal that is expected to be a sine looks like onlu the pozitive part of the signal, like the signal is offseted at -1...

 

BTW, I have switched off MIC's filter, so the record is the actual waveform. Look at the "zoomed waveform [2]" and you will understand my dilemma regarding what is actaully being acquired.

 

Can a true sine signal (tone) be acquired with a MIC through the audio-in ADC? - If yes, HOW?

 

R

0 Kudos
Message 3 of 9
(4,506 Views)

R,

 

I cannot speak to if there is any processing occurring in the microphone, but I can provide a basic outline of how it should look when you are trying to bring a sound file into LabVIEW through a microphone.  We have an example in our example finder that you may find helpful in this.  If you open LabVIEW and go to Help » Find Examples, you will open the NI Example Finder.  In the Example Finder under Browse, go to Hardware Input and Output » Sound » Sound Input to File.  Try running that program with your microphone, as it is the most basic descriptor of how to bring sound from a microphone into LabVIEW.  If you still receive an FFT with that VI, your issue is most likely on the hardware end in how your computer is actually doing the signal conditioning.  

 

Regards,

 

Keith M.

Applications Engineering

0 Kudos
Message 4 of 9
(4,493 Views)

Keith,

 

I am not receiving a FFT. I am expecting a sine signal from acquired tone, and I am getting the signal like in the attachements. Same with the LV example VI. So basically I need an explanation by a HW specialist to help me comprehend what am I aquiring and why. Is that an A/D Converotr issue, is it a HW filter in the MIC preamplifier, and what is the physical background of the ±1 range.

 

Thanks in advance,

 

R

 

0 Kudos
Message 5 of 9
(4,491 Views)

R, 

 

Because none of the Hardware that you are using is ours, we cannot verify how the microphone information is being processed by the computer nor how it is actually entering into LabVIEW.  In the images, it does appear as if you are getting an FFT, even if you are expecting a sine wave, which may be a result of how the internal hardware is configured.  If you are interested in doing dynamic signal acquisition via some of our hardware, here is a link that outlines some of the options that you might have:

 

http://sine.ni.com/nips/cds/view/p/lang/en/nid/205630

 

You would simply need to hook these up to a field mic, but how precise of data you collected would depend on the resolution of the mic and how accurate it was.  Unfortunately, we are rather limited in trying to determine what is happening in your pictures simply because there could be anything happening to the internal microphone on your computer before that data is being accessed by LabVIEW.  

 

Regards,

 

Keith M.

Applications Engineering

0 Kudos
Message 6 of 9
(4,480 Views)

Keith,

 

Let me paraphrase my question - Can LV acquire a sine waveform of a single tone from a audio-in MIC (internal or external)?

 

R

0 Kudos
Message 7 of 9
(4,463 Views)

R,

 

We do have a VI that does what you are looking for.  On your block diagram, if you go to Programming » Waveform » Analog Waveform » Waveform Measurements, there is a VI titled Extract Single Tone Information, which will output the information of a single tone.  A more detailed analysis on how it works can be seen here:

 

http://zone.ni.com/reference/en-XX/help/371361J-01/lvwave/extract_single_tone_info/

 

There is also a Tone Express VI in the aforementioned palette that may be able to do what you are looking for.  Either one of these will strip your signal into a single tone (or multiple tones if you want multiple - there is a VI for that as well) for processing.  Try that out and see if you can manipulate your data to behave as you would like.  

 

Regards,

 

Keith M.

Applications Engineering

 

 

0 Kudos
Message 8 of 9
(4,433 Views)

LV can acquire analog waveforms from the soundcard and its inputs. What you get is typically numbers between -32000 and +32000 if it is 16bit sound system. Use the sound VIs.

 

Cheers

Edgar

0 Kudos
Message 9 of 9
(4,429 Views)