Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Microphone to DAQ

Hello everybody. 

I have been working in a conection between a microphone (Gras 40PP) and a NI Module (NI-9231) to do the data acquisition of audio. 

Now, I have this:

GerardoMasterPro_0-1650979152393.png

 

I am following this formule to calculate the dB and showing in the graph. 

dB= 10Log(P/Po). Is it correct?, and how can I catch the average of the data (without the negative values that the microphone give me)?

GerardoMasterPro_1-1650979414705.png

 

Pls, help 

0 Kudos
Message 1 of 3
(1,116 Views)

Few comments,

  1. You could connect the GRAS 40PP directly to 9231 without the CCP (9231 contains a 2mA constant current source to power IEPE devices)
  2. If directly connecting microphone to 9231, select AI TEDS Microphone as task type and set the current to internal at 2mA
  3. If directly connected, use configure TEDS API to tell DAQ to read the TEDS details from microphone and configure itself (this way you don't need to tell about sensitivity of the mic to DAQ)
    santo_13_0-1651014214230.png
  4. Increase sampling rate to 44.1 or 48kHz (1kHz is too low for audio signals)
  5. Set samples per channel to 100ms worth (1/10th of the sampling rate)
  6. Wire 100ms worth of sample quantity as input to the read N samples API (don't use read 1 sample)
  7. The measurements returned by DAQmx are in Pascal, to convert them into dB SPL, you need to compute
    dB SPL = 20 log (value/20e-6)
    This is because the measurement is amplitude and not power, hence the "20" and not "10"
Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 3
(1,083 Views)

Hello friend, thanks for your support. 

I changed my program and I have this. If I put 100ms in samples per channel, Labview show me an error.  

GerardoMasterPro_0-1651072709861.png

GerardoMasterPro_1-1651072780400.png

 

 

0 Kudos
Message 3 of 3
(1,060 Views)