Noise in LJStreamM vs LJLogM | LabJack
 

Noise in LJStreamM vs LJLogM

4 posts / 0 new
Last post
bds
bds's picture
Noise in LJStreamM vs LJLogM

I'm trying to measure currents from 0 - 100 mA using a 25 mR shunt. I set the AIN1 range to -0.01 to 0.01 V and setup differential mode with AIN0 in Kipling.

Using LJLogM, the measured current looks ok @ 40Hz sampling (0.2 mA noise). When I do exactly the same measurement using LJStreamM @ 40 Hz, I see 20 mA noise, making the measurements unusable.

Where is this difference coming from? Is it possible to use streaming for a measurement as specified?

LabJack Support
labjack support's picture
A few things come to mind:

A few things come to mind:

1.  I suggest you do a basic test where you remove your signals and instead jumper the 2 channels to GND.  Note the noise levels and make sure they agree with Appendix A-3-1 (the default ResolutionIndex in stream mode is 1 and in command-response mode is 8 for a T7 and 9 for a T7-Pro).  At this point you should find that the T7 is operating as expected and will know if your signal is simply noisy at those levels or if your signal has additional noise.

2.  Settling problems due to weak signal.  We can look at this more if #2 is not the issue, but my first questions would be do you have a ground reference and what is your common mode voltage?  In other words, do you have your system ground connected to T7-GND (that is one possible way to make a ground reference) and what is the voltage on either side of the shunt versus GND?

https://labjack.com/support/app-notes/differential-analog-inputs

3.  Command-response mode and stream mode using different settings.  You mentioned you have set the range to 0.01 and have set the negative channel for AIN0 to AIN1, and those are the same settings for C-R and stream, so should be good there.  The 2 settings that are different are ResolutionIndex (AIN_ALL_RESOLUTION_INDEX and STREAM_RESOLUTION_INDEX) and Settling (AIN_ALL_SETTLING_US and STREAM_SETTLING_US).  Settling is a little trickier and ties in to #1 above, but res index is a quick one to check first.  I suggest you use the AIN tab in Kipling to set your ResolutionIndex=1 (this is for C-R), which is what stream uses by default, so you can see if LJLogM then has the 20 mA noise.

bds
bds's picture
When I set the resolution

When I set the resolution index to 1 and use LJLogM, I'm getting the same noise.

I tried streaming with resolution index 8, but with the default STREAM_SETTLING_US = 0, I get LabJack Error #2621:  STREAM_SETTLING_INVALID occurred at LJM_eStreamStart.vi. After setting STREAM_SETTLING_US = 1, everything seems to work. Is there a difference between 0 and 1 here? The register description says everything <= 5 should behave the same way, no?

LabJack Support
labjack support's picture
"Is there a difference

"Is there a difference between 0 and 1 here?"

When STREAM_SETTLING_US is set to zero the T7 will set the settling time to the best fit based on the resolution and range settings. Normally the AIN circuity needs ~10 ms to get a good reading with resolution set to 8 and range set to ±0.01V. If only one channel is being used we can get away with less settling.

"The register description says everything <= 5 should behave the same way, no?"

The "<= 5" is an error. It should say "< 1". I will update the register definition.