Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

sound generation

Solved!
Go to solution

Dear LabVIEW experts,

 

I am a researcher who studies auditory electrophysiology. Specifically, I present acoustic sounds to a human listener and record their EEGs in response to the acoustic stimuli. 

 

My current laboratory setup to generate acoustic signals is explained as follows.

 

  1. I have written a LabVIEW program capable of generating specific signals (e.g., single pulse, tone burst, or to read in a pre-recorded .wav file)
  2. The signal is then delivered to an analog filter (I use a WaveTek 442 Dual HI/LO Variable Filter)
  3. The filtered signal is then delievered to a physical attenuator and a headphone buffer (I use a Tucker-Davis Technologies Programmable Attenuator PA4 and a TDT stereo headphone buffer HB6)  The attenuator is used to control the intensity of the acoustic output. The headphone buffer is used to ensure that that the signal has enough power to drive the diagram of an insert earphone (see below) and to produce a desired intensity of the acoustic output.
  4. The signal is then delivered to an insert earphone (I use an Etymotic ER-3A insert earphone) 
  5. The insert earphone then delivers the acoustic output to the listener's ear canal.

 

My current setting is working fine generating acoustic sounds with a wide range of sound intensity and frequency. However, this kind of setup is not very "portable". I mean, the analog filter and the TDT attenuator and headphone buffer are quite large in size and are not easy to be transported to a different site for testing and data recording.

 

My question is: Does NI has any hardware that I can use to replace the functionalities of the analog filter, programmable attenuator and headphone buffer, and to use LabVIEW to control the generation of my acoustic stimuli?

 

Any comments will be greatly appreciated.

 

Sincerely,

Fuh

 

 

0 Kudos
Message 1 of 7
(4,301 Views)

Hi Fuh,

 

Thank you for posting on the NI Discussion Forums! While I am not a domain expert in audio hardware, I do recommend that you look into the CompactRIO system that we offer, which would definitely meet your criteria of portability to the field. The cRIO system incorporates an FPGA-based chassis and a real-time controller into one package and will allow you to perform the filtering and signal conditioning processes that you need. Please take a look at this Developer Zone article: http://zone.ni.com/devzone/cda/tut/p/id/3357, which outlines the numerous functions that the cRIO can perform. Particularly, see Table 1 under analog control. As for outputting the actual signal, what kind of power requirements for the headphones are required? We offer many types of analog output modules that can plug into the cRIO, and if you have more specifications concerning the audio signals I can perhaps direct you to the appropriate module.

0 Kudos
Message 2 of 7
(4,287 Views)

hello,

how are you driving your system now?  with an analog output from a DAQ card?  with the sound output from a sound card?

 

one method to would be to use software filters instead of hardware filters  this approach would be used with DAQ hardware or cRIO hardware.  the rest of the manipulations are also software functions to adjust amplitude.

 

in either case, you will need enough drive current to power the Etymotic ER-3A insert earphone.  this will require more current than the DAQ card or cRIO hardware can typically supply.  our company has just introduced a voltage buffer module that has enough current drive and bandwidth for this type of application.  contact me if you want more information.

stu@viewpointusa.com

Stu
0 Kudos
Message 3 of 7
(4,278 Views)

Dear Joseph,

 

Thanks a lot for the information. It is so cool - the CompactRIO. I definitely will take some time to go over it.  

 

In terms of the specifications of my insert earphone, you can find its specifications by click on the link http://www.etymotic.com/pdf/er3a-datasheet.pdf I currently have two pairs of the ER-3A earphones (one has an impedance of 50 ohms, and the other 10 ohms). If you could take a look of the earphone specification and let me know what module I can use, I would greatly appreciate it.

 

By the way, if I have a decent sound card, can LabVIEW control the sound card? If so, is there any example that I can look into?

 

Thank you so much for your time and kindness.

 

Sincerely,

Fuh

 

0 Kudos
Message 4 of 7
(4,272 Views)

Hi Fuh,

 

Unfortunately, our analog output modules for the cRIO/cDAQ do not support the current draw that your earphones would require, as Stu McFarlane suggested in his post. Most of our devices can only support a 20 mA current draw. You may wish to consider the modules that Stu was suggesting in the post above.

 

Alternatively, as you mentioned, you can indeed use LabVIEW to output a waveform to the soundcard. Please take a look at these VI functions: http://zone.ni.com/reference/en-XX/help/371361H-01/lvpict/soutput_vis/, particularly the Sound Output Configure and Sound Output Write VIs. Assuming you are running Windows, you will need DirectX 8.0 or higher to use these VIs. Let me know if you have any more questions!

0 Kudos
Message 5 of 7
(4,251 Views)

Dear Joseph,

 

With Stu's help, I actually tried two LabVIEW example codes ("Sound File to Sound Output.vi" and "generate Sound.vi") to generate acoustic sounds to the headphone jack of my laptop, and then to my ER-3A insert earphone. I also measured the voltage output of the headphone jack output, acoustic dB SPL level of the acoustic sound,  and frequency accuracy of the acoustic sound. It appears to me that the sound card of my laptop is working OK. I am acutally very happy and excited to learn more about the sound card of my laptop, and how to control it.

 

While I was practicing on the LabVIEW Sound-Card example codes, I set the volume control (e.g., via the Generate Sound.vi) at 80%, and I also set the Windows Mixer Controller at 80% (manually). For the volume control in the Generate Sound.vi, I think I can simply specify whatever volume values (0-100%) through the LabVIEW program. However, for the Windows Mixer controller, the only method I know is to change it "manually". 

 

Is there a way that I can set the Windows Mixer Controller to a desired level using LabVIEW?

 

Sincerely, Sincerely,

Fuh

 

0 Kudos
Message 6 of 7
(4,248 Views)
Solution
Accepted by topic author Fuh

Hi Fuh,

 

I did a quick search on the forums and found this post: http://ni.lithium.com/t5/LabVIEW/Anyone-know-how-to-control-the-microphone-volume-input-via/m-p/3400... which discusses control of the microphone volume, but the work should be applicable to controlling the system mixer volume as well. If you do not find what you need on our forums, I would recommend that you search online for articles on how to control the system volume mixer with other programming languages (such as VB, C++, C#, etc). Essentially, they should all be making calls to a system dll or ActiveX, etc. You can then work on creating the same function calls through LabVIEW. If you do find some good articles online and still want some further direction, feel free to post again. Good luck!

0 Kudos
Message 7 of 7
(4,246 Views)