From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Microphone/headphone specifications

Solved!
Go to solution

I teach a lab class at a university that is about to close all in-person learning.   The last four weeks of the class use labview, for which we have a site license and I can tell them to download it to their personal computers/laptops.   However, we do not have data acquisition devices, so the exercises would have to be redirected to using the sound port on their computers.  Does anyone know the typical specifications of these ports?  What is their max sample rate?  44.1kHz?  What about their frequency response?   (I believe that they are AC coupled so they can't do DC).  Resolution?

 

Any information would help.

 

Thanks,

Joel

0 Kudos
Message 1 of 7
(2,691 Views)

What a spot to be in!  At least you have interested students.

 

I believe the Sound VIs use Microsoft's DirectX "hooks" into the sound card present on most (all?) PCs.  You can probably expect stereo in and out, and probably a sampling rate on the order of 44.1 kHz, or CD Quality.  I believe that the DACs are 16-bit integers.

 

Bob Schor

0 Kudos
Message 2 of 7
(2,680 Views)
Solution
Accepted by Joel

Samplerates 44.1k, 48k at least 16bit , common is 24bit, and you most have 96kSPS.

Commonly the frequency range starts at 20Hz and the upper frequency often is cut at about 20kHz , HP and LP hardware filter.

I have an old DELL NB were the internal (MEMS) MIC goes up to 80 kHz at 192kSPS ... but line-in is limited to 20kHz 😞

Just open the soundcontrol ... properties... additional properties ...and see what formats are offered.

Or click on the speaker , open the mixer and click on the device symbol..

 

I used LabVIEW and the soundcard to listen to Grimeton SAQ VLF radiostation at 17.2kHz (2-3 times a year)  and to monitor the line frequency ( magnetic coupling ... plugged a headphone into the line-in and placed it near an classical transformer power supply)

To read a seismometer, I tweaked a USB-Soundcard. Located the Vref and input pins, build an DC amplifier (INA127)  with (buffered) 1.25V bias ...worked great.

 

At the VIP2018 or 19 in germany a professor demonstrated a lot of nice experiments with LV and the soundcard. MEMS accelrometers with analog output are cheap..  the mic input have an additional amplifier and 2V (?) bias (current limited, used for the ECM mics) .. hook up a phototransistor and measure the speed of a fan ...

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 3 of 7
(2,598 Views)

Thanks, I've looked at a number of computers and found the same basic specs.

 

With my TRRS plug, I had no trouble getting windows machines to recognize that a microphone was plugged in.  The standard recognition condition seems to be to have a 1k to 10kohm resistor shorting the microphone input to ground.

 

The two macs I've tried however, are much more problematic.  (I've tried both TRRS standards: mic on S and mic on the innermost R, with ground on the corresponding other pin.) 

 

One recent, high end mac recognized the existence of the mic, but could never be configured without error by Sound Input Configure.vi.  The internal mic could be configured, so this does not appear to be a labview issue.  One curious thing was that both the minimum and maximum sample rate was listed as 11.05kHz by Sound Device Info.vi for the external mic only.  This seems unlikely to be correct.

 

The other mac was an old MacBook Air. Here I was able to get it to work...but not with just a simple mic-gnd resistor.  I also needed a capacitor of ~1uF between either the mic or the gnd going to one of the headphone channels.  I stumbled upon this fix; it makes no sense to me at all.  But once the capacitor is inserted, the mac hardware recognizes the mic.  (Precisely, this means recognizes in mac properties, not any labview software, so this is not a labview quirk.) 

 

Once recognized, however, the signal is noisy.  Moreover, the frequency response was far from flat, varying by a factor of almost 2 from 1kHz and 10kHz. and being essentially zero at 100Hz.  The high side cutoff was about 12kHz.   This can't be the intended case as the response varies wildly in the audio range. (This curve was taken with a signal generator, not a mic, so the input signal was flat.)

 

In contrast, on windows machines the response was dead flat from about 200Hz to over 20kHz.

 

Any explanations?

Joel

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

@Joel wrote:

Once recognized, however, the signal is noisy.  Moreover, the frequency response was far from flat, varying by a factor of almost 2 from 1kHz and 10kHz. and being essentially zero at 100Hz.  The high side cutoff was about 12kHz.   This can't be the intended case as the response varies wildly in the audio range. (This curve was taken with a signal generator, not a mic, so the input signal was flat.)

 

In contrast, on windows machines the response was dead flat from about 200Hz to over 20kHz.


This sounds like a filter/driver optimization for a human speak range mic. There's not many human frequences outside that range. The flat PC curve sounds ... PC. Give the user raw data and let you handle it.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 7
(2,489 Views)

Hi Yamaeda,

   Optimizing for a human voice would be a reasonable choice, but with a peak response at 5.5kHz, that's not what was done here.  See the attached response for both the MacBook and for an HP laptop.  I don't think I made a basic technique error or programming error because the HP laptop spectrum is so flat this would not have happened if there was something fundamentally wrong.  It is possible that the TRRS plug needs to be wired differently for the mac, but I tried many different combinations.  It is also possible that there is something broken about the mic input on this particular mac.  Unfortunately, I haven't gotten two other macs to respond at all, though I am still working on it.

Joel 

Download All
0 Kudos
Message 6 of 7
(2,481 Views)

5,5kHz? o.O

That reminds me of this!

https://youtu.be/4s5yHUpumkY

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 7 of 7
(2,451 Views)