LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple channels reading incorrectly

So when I first built my VI I had it only recording one channel. I got the VI working, and it outputted some nice data from a microphone (see the first image below). After finishing the task of inputting from one channel I realized to do the required data calculations I would also need to input a copy of the waveform my DAQ was outputting so I wired the output port directly to an input on my DAQ as well as a speaker it was wired to previosuly. At this time I also updated my VI to read from two channels (this version of the VI is included with this post). After finishing setting up the 2 channel configuration I fould my original graph from the first input was no longer showing the correct data (the first graph of the second image), and I haven't been able to figure out why.

I know it's not an issue with output/input interferance before the signal gets to the pin as I have tried changing my VI back to the previous form of only taking in one input (while leavin the DAQ wired as it was with two inputs), and left the output waveform turned on. Doing so gave me a graph similar to the first image again, however it was not recording the two wave forms as needed. I've double checked my code and as far as I can tell everything looks fine. My main suspicoun now is the waveform is not longer being recorded a the correct rate, so I am in the process of researching this, but haven't gotten too far.

 

EDIT: After looking at the waveforms further I believe the second channel may be causing the first one to rest at 5V before my speaker comes on for some reason, however I am not sure why this would be the case as the output voltage code is the same. Does reading from the channel change the circuitry connections inside the DAQ at all?

 

Could somone please provide insight on what the issue may be?

 

1 Channel Waveform

1Channel.PNG

 

2 Channel Waveform (The first channel should be similar to the one shown above)

2Channels.PNG

Download All
0 Kudos
Message 1 of 6
(3,111 Views)

After further research I have determined this to be a ghosting issue (http://digital.ni.com/public.nsf/websearch/73CB0FB296814E2286256FFD00028DDF?OpenDocument), however I am still unsure of how to solve it. I've tried to decrease the sampling rate to around 5000KS/s, however that does not do much, and placing a ~100kOhm resistor between the signal causing the ghosting and the DAQ doesnt seem to work well either. The only other solution I can think of is to generate a new signal from the output signal using a transistor and passing that into the DAQ's input.

 

EDIT: It looks like decreasing the sampling rate to around 700S/s eliminates the ghosting, however a sampling rate this low is unacceptable for my application.

0 Kudos
Message 2 of 6
(3,093 Views)

The link in your second post does not work.

You should specify and show what do you connect and how to your device? Is it a NI myDAQ?

I have checked the specification of this device, and this is the info at the "Analog input" section:

 

"Number of channels.......................................... 2 differential or 1 stereo audio input
ADC resolution................................................. 16 bits
Maximum sampling rate................................... 200 kS/s"

 

In your VI you specified two channels with a rate of 125 kHz. The maximum rate is 200 kHz, so the max rate per channel is 100 kHz I think.

 

edit: ok, i just had to remove the ")" from the end of the link. I have no idea yet what causes your problem, but a clear explanation of your wiring could help others to give you help...

0 Kudos
Message 3 of 6
(3,069 Views)

I have attached a copy of my circuit below.

 

Yes, I am using the MyDAQ. I considered the sampling rate issue, however even when I decreased the rate to around 5KS/s the problem persisted. 

 

circuit.png

0 Kudos
Message 4 of 6
(3,043 Views)

tecno40, 

 

Have you tried looking at the channels in MAX and making sure the signals are coming out of the device correctly? The scale between your first graph and your second graph is very different--could you just not be seeing the signal? 

 

-aprillest

0 Kudos
Message 5 of 6
(2,996 Views)

I notice that you have one side of the microphone wired to digital ground but have what appears to be a differential connection for analog input. There are two possible problems with that. One is that digital grounds are often much noisier than analog grounds, event though they may be connected internally to the DAQ device. Noise on a digital ground which is substantially larger than a typical micorphone signal is not unusual. Second is that there is no advantage to using a differential connection with a single ended signal source, such as your microphone. Any noise on the Ai1- input (from DGND) gets added to the signal.  This will not be common mode noise that can be removed by a differential amplifier.

 

Is the MyDAQ analog output capable of driving a speaker? I have not looked at the specifications but it is unusual to find a DAQ device which can generate more than a few milliwatts at an analog output.

 

The 5 volt power lines on most DAQ devices may carry a significant amount of "digital" noise. This appears as spikes on the line which occur at the time of switching of digital circuits powered by the line. That noise may appear on the microphone output. The 1 mVpp noise in the first 2.5 ms of your 1 Channel Waveform in the original post could well be that type of noise. Splitting R1 into two series resistors and wiring a bypass capacitor from the resistor junction to ground may reduce the noise at the microphone connection.

 

Regarding your two-channel issue: It may be ghosting. The source impedance of the microphone signal is probably quite high. If you search the Forums for "ghosting" you will find many related posts.

 

Lynn

Message 6 of 6
(2,985 Views)