LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquiring sound signals from a microphone using USB-6009 DAQ hardware

I'm trying to get a microphone connected to the USB-6009 analog input to acquire and display the sound signal. I'm just trying complete an excercise in a labview tutorial which involved the use of a microphone.

 

The tutorial includes a schematic which was wasn't well explained. I've included a copy of the tutorial and it actually contains a diagram of the USB-6009 DAQ device and microphone connected together. 

 

The actual problem is in excercise 3.2 but I just can't get the microphone to measure the sound signal.   

 

 Link to tutorial: http://grundpraktikum.physik.uni-saarland.de/scripts/Introduction_to_LabVIEW_8_in_3_Hours.pdf

 

I'll appreciate any help here. Thanks

 

 

0 Kudos
Message 1 of 41
(8,621 Views)

What is the output level of your microphone?  Most microphones put out millivolts.  With the DAQ device set to a +/-2 V range as specified in the exercise, the millivolt output of a microphone is a very small fraction of the full scale output of the A/D converter.  The USB-6009 has a 14-bit converter.  For a 4 V range this means that the LSB is about 0.24 mV.  A 2 mV signal from the microphone would produce a raw output of about 8 or 9 out of a maximum of 16384.  Hardly enough to do any useful analysis.

 

You need a microphone with a higher output level or an amplifier to boost your signal up close to the range of the DAQ device.

 

Lynn 

0 Kudos
Message 2 of 41
(8,575 Views)

Hi Johnsold,

 

I was able to figure it out after looking at the microphone spec and circuit diagram.  I do have another question though.

 

 I'm trying to complete an example- electronic lab but I found the coding confusing in the sense that two cases within a case structure were connected together. I've always thought the cases should be separate and conditional. Can you or anyone else here explain that case structure code to me? 

 

I've attached a picture file of the block diagram. See the link to the electronic lab exercise below:

http://cnx.org/content/m13775/latest/

0 Kudos
Message 3 of 41
(8,543 Views)

The case structure is only one structure.

Within this structure, there are two or more cases.


On the top, the current case is displayed, with arrows on either side of it that can select other cases

For example, cases could be True or False.

Or when x = 1  case A, x = 2 case B .... etc

 

There is a green ' ? ' on the left of the structure. You wire the condition to this symbol.

For example, the function that outputs the True or False , or the value of x.

 

This is how you use the case structure:

You put the code that pertains to each case in the corresponding case.

 

For example:

When true, put all the code that should occur. Then switch to false.

Put all the code for false in that case.

 

* 1 case and ONLY 1 case will execute 

Cory K
0 Kudos
Message 4 of 41
(8,540 Views)

Nested case structures are used when multiple sets of conditions may determine which code should execute.

 

Because the conditions look similar, it may be confusing.  The outer case is selected by whether the Maximum of Statistics is > 0.8.  The inner case is selected by the Maximum of Statistics2  > 0.8. So the IiTunes:PlayPause executes when Statistics:Maximum > 0.8 AND Statistics2:Maximum <= 0.8.

 

The Acquire Sound could run before or after the code in the case structures because there is no data dependency between them.

 

Lynn 

0 Kudos
Message 5 of 41
(8,530 Views)

Hi Johnsold and others,

 

The code made more sense to me after seeing your response. Another question I have has to do with input and output operations. I'm using the usb-6009 and the tutorial that I'm studying was done with a different DAQ device so I didn't quite understand some things fully well. I understood data acquisition with analog input but I found analog output a bit ambiguos.

 

The questions are as follows:

  

Does it mean that your are using the DAQ device as a signal source when performing output operations?.

 

Does it mean that the DAQ device is driving the transducer/sensor?.

 

When do you need to use for example "voltage output" for an experiment?. Though it was mentioned in the tutorial that VO is used mostly in "digital to analog" conversion, it still didn't answer my question above.

 

This same question applies to "counter output". 

 

I'll appreciate your inputs. Thanks

0 Kudos
Message 6 of 41
(8,490 Views)

Mbdeck,

 

 Does it mean that your are using the DAQ device as a signal source when performing output operations?

Analog Output  generates a voltage (or current on some devices) which may be used as a signal source.

 

 Does it mean that the DAQ device is driving the transducer/sensor?

This is a common use for the Analog Outputs. It is important to verify that the DAQ device can supply sufficient power to run the transducer/sensor.  For example a 350 ohm strain gauge excited at 10 volts requires about 28 mA which is more than many DAQ devices can provide.

 

 The "When do you need ..." question is more general.  You can use the Analog Output anytime you need a voltage signal in your circuits.  The counter outputs are used when a logic level signal is needed and its timing can be generated by a counter.

 

Lynn 

0 Kudos
Message 7 of 41
(8,471 Views)

Johnsold

 

As I stated ealier in my post, the DAQ device that was used in the tutorial that I'm going through is different from my DAQ device. I have the usb-6009.  

 

 I'm trying to complete a counter input exercise but the device wiring instruction is vague. I don't want to damage my device by making a bad connection so here is the instruction as stated in the tutorial:

 

"On the DAQ Signal Accessory, wire the A output of the quadrature encoder to the SOURCE input of counter 0"

 

I don't quite undersand this so if any of you here knows what the correct action is please let me know.  I've also attached a picture of my DAQ device pinouts. It's  counter spec is 32 bits.

 

Thanks

0 Kudos
Message 8 of 41
(8,440 Views)

The Counter input pin for the USB6009 is PFI 0 (pin 29).  It can be configured as the counter source or a trigger.

 

So long as your signal is a 5 volt logic signal, it should be compatible with the counter and digital inputs.  They use the standard TTL levels of 0.8 and 2.0 volts for input low and input high.  It also has a 4700 ohm pull up to +5 volts internally.

 

Lynn

0 Kudos
Message 9 of 41
(8,431 Views)

         Johnsold,

       Which pin is the "counter ouput" then?. The quadracture encoder is an external device and isn't part of DAQ ..right?

0 Kudos
Message 10 of 41
(8,416 Views)