Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

Analog Input Crosstalk/Spikes on eAIN call


  • Please log in to reply
9 replies to this topic

#1 mortens

mortens
  • Members
  • 6 posts

Posted 25 January 2013 - 12:25 PM

Hi, I've got a stubborn problem I can't beat. I'm using a U6 to read 4 voltages between 0-5 VDC using AIN0-3. Single ended. I'm communicating with the U6 using Pascal and the Pascal interface is working great. I'm using eAIN as you see below. I'm executing 4 similar eAIN statements in a row on each pass 4 times/second. Each of the 4 calls goes to channel 0 thru 3 (AIN0-3). The voltages I'm reading are roughly between 1-4 VDC. I'm running on a Windows 7 desktop. Very high end custom build with super duty power supply. Here's my problem. The U6 is putting spikes on the input voltage levels when I execute more than one eAIN call. When I execute all channel calls as shown below, voltage spikes show up on the other inputs. Somehow, in the act of reading an AIN, the U6 is able to disturb the other voltage levels during execution of the eAIN's. If I only execute 1 single eAIN call to a single input, all is well. Reads the voltage just fine and no spikes on the other 3 inputs. Read 2 or more and spikes happen. You can see what the spikes look like per the attached snapshot. There's a pulse/spike every 250 msec each time the 4 eAIN calls are made. What's going on here? I've spun my wheels for 2 days on this? Ugh!! Thanks, Morten lngRange := LJ_rgBIP10V; lngResolution := 8; lngBinary := 0; lngSettlingFactor := 0; lngChannel := 0; //get VR-Hi lngErrorcode := eAIN (lngHandle, lngChannel, 0, VR_Hi, lngRange, lngResolution, lngSettlingFactor, lngBinary, 0, 0); ErrorHandler(lngErrorcode, 0); lngChannel := 2; //get VR_Lo lngErrorcode := eAIN (lngHandle, lngChannel, 0, VR_Lo, lngRange, lngResolution, lngSettlingFactor, lngBinary, 0, 0); ErrorHandler(lngErrorcode, 0); lngChannel := 1;// get right channel VL-Hi lngErrorcode := eAIN (lngHandle, lngChannel, 0, VL_Hi, lngRange, lngResolution, lngSettlingFactor, lngBinary, 0, 0); ErrorHandler(lngErrorcode, 0); lngChannel := 3;// get left channel VL-Lo lngErrorcode := eAIN (lngHandle, lngChannel, 0, VL_Lo, lngRange, lngResolution, lngSettlingFactor, lngBinary, 0, 0); ErrorHandler(lngErrorcode, 0);

Attached Thumbnails

  • inputspikes.PNG


#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 25 January 2013 - 01:54 PM

First test: Disconnect your signals from AIN2 and AIN3, and instead connect GND and VS. See what you see then. Is the noise the same on AIN0 and AIN1? How do AIN2 and AIN3 look?

#3 mortens

mortens
  • Members
  • 6 posts

Posted 25 January 2013 - 02:48 PM

First test: Disconnect your signals from AIN2 and AIN3, and instead connect GND and VS. See what you see then. Is the noise the same on AIN0 and AIN1? How do AIN2 and AIN3 look?


AIN2 and AIN3 are now at GND and +5V with no spikes. AIN0 and AIN1 still have spikes (related to 250 msec call frequency) but their magnitude have been reduced reduced.

#4 mortens

mortens
  • Members
  • 6 posts

Posted 25 January 2013 - 03:12 PM

First test: Disconnect your signals from AIN2 and AIN3, and instead connect GND and VS. See what you see then. Is the noise the same on AIN0 and AIN1? How do AIN2 and AIN3 look?


After working with it some more I'd say that that the spikes are almost but not quite gone from AIN0/1 after disconnecting and GND/VS'ing AIN2 and AIN3.

#5 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 25 January 2013 - 04:42 PM

Where do the signals come from? Perhaps they are based on some excitation voltage that is affected by the sampling?

#6 mortens

mortens
  • Members
  • 6 posts

Posted 25 January 2013 - 05:01 PM

Reduced to it's simplest for, it's a voltage divider with 1 fixed, and 2 variable resistors. Like this. +5 (from U6) | R1 (fixed - 47k) | V1 (measured - AIN0) | R2 (variable) | V2 (measured - AIN2) | R3 (variable) | GND (from U6) There are two of these running in parallel with same +5V source from U6 and same GND. On the 2nd string I use AIN1 and AIN3 respectively. The second string has similar fixed R4 (47k) and R5 and R6 are variable. It's quite a simple circuit except for the variable R's and shouldn't think it would be that challenging but I get noise spikes on V1 and V2 etc. when making calls to eAIN. I didn't used to several weeks ago. Is it possible the U6 is damaged? Thanks, Morten

#7 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 25 January 2013 - 05:30 PM

I doubt the U6 is damaged. I suspect the spikes are really there. If sampling caused a spike on VS, that would show up in your signal since VS is the excitation for your circuit. Instead of VS, perhaps try using DAC0 set to 4.5 volts (you can use "config defaults" in LJCP to set the power up default).

#8 mortens

mortens
  • Members
  • 6 posts

Posted 25 January 2013 - 09:46 PM

I doubt the U6 is damaged. I suspect the spikes are really there. If sampling caused a spike on VS, that would show up in your signal since VS is the excitation for your circuit. Instead of VS, perhaps try using DAC0 set to 4.5 volts (you can use "config defaults" in LJCP to set the power up default).


Ah yes, I forgot to mention that when I monitor VS itself, it's solid - no spikes. It would appear the spikes are caused by the AIN's (sampling/whatever) but they don't show up at VS. I've tried other external 5V power sources and can confirm that same is true with them. Spikes are only showing up on the AIN's and only when the call's to the eAIN's are made.

Note that I tried this without the eAIN's using instead ePuts, AddRequest, GoOne and then GetFirstResult & GetNextResult but the same spiking behavior is present.

Flummoxed in Florida,
Morten

#9 mortens

mortens
  • Members
  • 6 posts

Posted 26 January 2013 - 07:14 AM

I doubt the U6 is damaged. I suspect the spikes are really there. If sampling caused a spike on VS, that would show up in your signal since VS is the excitation for your circuit. Instead of VS, perhaps try using DAC0 set to 4.5 volts (you can use "config defaults" in LJCP to set the power up default).


I'm also convinced that the spikes are there. They act as impulse inputs into the circuit and are able to cause instability under certain conditions - which is the problem I've been chasing more so than the spikes per se. I came up with a work around which was to put a 1uF poly bypass cap off of each 47k which provided a 3HZ filter. That filtered out the impulse spikes and stabilized the circuit.

Which still leaves the question - why is the U6 causing the spikes in the first place? Is that normal?

Thanks for your help.
Morten

#10 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 28 January 2013 - 11:59 AM

I would describe this as a settling issue. Say AIN0 is connected to 0V and AIN2 is connected to 5V. When you acquire AIN0 the entire signal chain is driven to 0V. See the signal chain in Figure 2-2 here:

http://labjack.com/s...6/users-guide/2

When you request a measurement from AIN2, the input multiplexers switch and the signal chain must be driven to 5V. Your signal source will see a small spike of current as it charges the signal chain capacitance up to 5V. If you have too much resistance, it slows down this charging.

On the U6 the default settings can handle a source impedance up to 1k at any range or resolution, without significant error. If your source impedance is greater than 1k, then some combinations of range/resolution might require more settling time. See note #9 in Appendix A:

http://labjack.com/s...uide/appendix-a

One way to add settling time is doing a PUT_CONFIG with the special channel LJ_chAIN_SETTLING_TIME:

http://labjack.com/s...ers-guide/4.3.3

Another way is to acquire a junk sample from a channel, wait in software, and then acquire the real sample.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users