LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using sound card as a DAQ

I know that you can capture audio with labview, but can you capture the lower level analog input signal if its not audio?
0 Kudos
Message 1 of 12
(9,516 Views)
Hi elen,

A microphone is just another type of sensor...so yes...you can acquire sound with a DAQ board. I have done this before. What HW do you have and what exactly are you trying to do?

-Brett Burger
0 Kudos
Message 2 of 12
(9,491 Views)
Mr. Burger,

Thank you for your reply. This is actually for my senior design project at Texas A&M university. My team is building a laser microphone and we wanted to do all of the signal processing and the user interface in Labview. We could obviously buy a DAQ to measure the output of the photodetector, but a soundcard offers a variety of advantages:
1. cheaper
2. all computers have them so our software would be portable
3. good sampling rate compared to many DAQs

Basically we would like for the soundcard to do as little processing as possible to the signal because it will treat it as sound and its not. Ideally we would like to get the data right after its digitally converted. Any information would be useful at this point. Thank you for your time.
0 Kudos
Message 3 of 12
(9,487 Views)
You should be able to use either the Line In or Microphone inputs of your sound card, along with the Sound I/O VIs in LabVIEW, to capture your signal. The gotchas are hardware-related. You need to compare the expected signal level of the sound card inputs to the signal coming from your sensor. That signal may need to be amplified or otherwise conditioned. Check the hardware specs for your sound card.

Steven H.
Message 4 of 12
(9,461 Views)
Howdy Ag,

I guess your name isn't elen and you are in ELEN405 at TAMU....that makes sense.

I am sorry I didn't understand before but I now believe I understand what you are doing. Depending on which version of LV you should have sound vis allowing you to receive data from your soundcard using a basic mic...or a built in mic. There are also VIs to save and retreive data from .WAV files....keep in mind though before you listen to a wave file....LV is receiving the pure digital data which is a very small voltage...you will probably need to multiply the signal by 100k or so to make it audible.

I have created you a service request for this issue: 688689. If you call 1-866-275-6964 (1-866-ASK-MYNI)...and enter that SR number you will get routed to me and we can talk further about your project or any other help you may need with it. EDUs get free phone based support...just wanted to let you know in case you want to take advantage of it.

regards,
Brett Burger
Texas A&M c/o 2002
Message 5 of 12
(9,449 Views)
Mr. Burger,

Thanks so much for your help. I am sure we will be having some questions for you in the upcoming weeks. We will be sure and give you a call when we run into any complications. For now, do you know of any demos or VIs that utilize this approach. You can email them to our team account: elen405team1@gmail.com . We appreciate your help very much.

Thanks again,
Daniel Felps (2005)
0 Kudos
Message 6 of 12
(9,441 Views)
I think there is a great example that ships with LabVIEW. "Sound Card AutoPower Spectrum". Help>>Find Examples and search for "sound". It should be there.

-Brett
Message 7 of 12
(9,374 Views)
Be careful on the build in soundcards.

Some time ago we wanted to use soundcards for some low frequency signal analysis (20Hz-150Hz) and the build in soundCard was performing so bad that at the end we bought the small USB converter.

Anyway we have tested the audio inputs on 3 computers and all had really poooor performance -> we had constant noise and buzz problems (and we tried all strange stuff, even removing computer power ground).

So test inputs of the sound card you want to use.

Peace
Waldemar
Message 8 of 12
(9,364 Views)
Waldemar makes an excellent point. The HW in a DAQ device is specifically designed for voltage measurements such as the ones you are making. Of course it will cost more...but that is a decision your spec docs will decide. NI offers USB-DAQ for as little as $150.00. (14bit,10kS/s)...and that is without any edu discount.

-Brett
Message 9 of 12
(9,344 Views)
Mr. Burger,

We have considered that option. We are going to try to make it work with the soundcard becuase the average budget is around $400, and we are already spending close to $1000. Optics parts are extremely expensive. However we are keeping this option in mind. Do you happen to know how much an educational discount is?

Thanks,
Daniel Felps
0 Kudos
Message 10 of 12
(9,341 Views)