2.6 - AIN [U3 Datasheet] | LabJack
« Close

Datasheets and User Guides

App Notes

Software & Driver


2.6 - AIN [U3 Datasheet]

AIN Overview

The LabJack U3 has up to 16 analog inputs available on the flexible I/O lines (FIO0-FIO7 and EIO0-EIO7). Single-ended measurements can be taken of any line compared to ground, or differential measurements can be taken of any line to any other line. See our Configuration and Analog Inputs pseudocode pages for programming guidance.

Analog input resolution is 12-bits. The range of single-ended analog inputs is normally about 0-2.44, and there is a “special” 0-3.6 volt range available. The range of differential analog inputs is typically ± 2.4 volts, but is pseudobipolar, not true bipolar. The difference (positive channel minus negative channel) can be -2.4 volts, but neither input can have a voltage less than -0.3 volts to ground. For valid measurements, the voltage on every low-voltage analog input pin, with respect to ground, must be within -0.3 to +3.6 volts. See Appendix A for voltage limits to avoid damage.

On the U3-HV, compared to the -LV, the first four flexible I/O are fixed as analog inputs (AIN0-AIN3), and have scaling such that the input range is a true bipolar ±10 volts normally, and -10 to +20 volts when using the “special” range. The input impedance of these four lines is roughly 1 MΩ, which is good, but less than the normal low voltage analog inputs. Analog/digital configuration and all other digital operations on these pins are ignored. FIO4-EIO7 are still available as flexible I/O, same as the U3-LV.

To get the special 0-3.6 volt or -10/+20 volt range, you do a differential reading request with the negative channel set to 32.  The U3 will then do a special range single-ended reading on the specified positive channel.  The U3 is using differential ADC techniques internally, but the external reading is single-ended.

Because the scaling on the high-voltage inputs on the U3-HV (AIN0-AIN3) is inherently single-ended, a factory calibration is not possible for differential readings. If a differential reading is requested where either channel is a high-voltage channel, the driver will return the raw binary reading and the user must handle calibration/conversion.  Note that 0 counts is about -20V and 65520 counts is about +20V, and no high-voltage channel can be less than -12.8V or more than +20.1V.

The analog inputs have a QuickSample option where each conversion is done faster at the expense of increased noise. This is enabled by passing a nonzero value for put_config special channel LJ_chAIN_RESOLUTION. There is also a LongSettling option where additional settling time is added between the internal multiplexer configuration and the analog to digital conversion. This allows signals with more source impedance, and is enabled by passing a nonzero value for put_config special channel LJ_chAIN_SETTLING_TIME. Both of these options are disabled by default.  This applies to command/response mode only, and the resulting typical data rates are discussed in Section 3.1.  For stream mode, see Section 3.2.

Note that sinking excessive current into digital outputs can cause substantial errors in analog input readings. See Section for more info.


how fast? I'm amazed how much i have to dig to get the BW on Analog inputs.

Sounds like the "bandwidth" you are looking for is data rates.  We can throw out a quick answer, max data rate is 50 ksamples/second, but there is much more information that needs to be provided.  I added references above that point you to Sections 3.1 and 3.2.  A quick summary is the last 2 marketing bullets near the top of the U6 product page:


  • Maximum Input Stream Rate of 50 kHz (Depending on Resolution)
  • Capable of Command/Response Times Less Than 1 Millisecond


Another meaning of "bandwidth" relates to the analog cutoff frequency of the analog inputs.  I could try to measure a value if needed, but would guess something like 1 MHz, and can say for sure it is substantially higher than the max Nyquist frequency in this case of 25 kHz.


I am very surprised to find your reference to the "special" 0-3.6V range?  I just purchased three U3-LV for 3.3V application based on your very clear product spec that says:

  • Up to 16 12-bit Analog Inputs (0-2.4 V or 0-3.6 V, SE or Diff.) (Note - NO mention of "Special")
  • Sorry but this seems to be a bit of a bait and switch, and now do I need to install an additional voltage divider?


    By "special", we don't mean that it requires a hardware change.  Just that it is not the default range and software has to tell it to use the "special" range if desired.  Your U3 has all mentioned ranges.  The test panel in LJControlPanel is an easy way to try it out.  In fact, the last step of U3 Quickstart #3 has you do this.

    'To get the special 0-3.6 volt or -10/+20 volt range, you do a differential reading with the negative channel set to 32, although the reading is actually single-ended.'

    I couldn't understand this properly.

    By differential reading, what I understand is, I can sense voltage between 2 points say voltage across a resistor.

    What do you mean by negative channel set to 32?

    or can you tell me how can I sense voltage across resistor using 2 channels?

    Murugan K's picture

    I am develooping labview code to acquire continous data. I am not finding a vi to configure sampling rate. Help me please

    labjack support's picture

    Start with the 8 getting started steps on the LabVIEW for UD page:


    Then decide if you will use command-response mode or stream mode:


    If using software timed acquisition (command-response), your LabVIEW program controls timing.  This is typically used at roughly 100 scans/second or slower.  Start with "U3 AIN CR Loop with Chart.vi" and "U3 Multiple IO Example Loop.vi".


    If using hardware timed acquisition (stream mode), you tell the hardware how fast to scan the list of channels and it does it.  This is typically used at roughly 100 scans/second or faster.  Start with "U3 easy Stream Example.vi".



    georgsoerensen@gmail.com's picture

    Are these 2 parameters (quick sample and Long Settling) independent?

    If you set one, is the other turned off? Or as in the AllIO example: you set the quick sample to zero (off) first,  and then the longsettling to 1 (on). Is order important?





    labjack support's picture

    They are independent.  You can do either or both.  The order of setting them does not matter.  LongSettling affects the settling time allowed before the ADC conversion starts, and QuickSample affects the conversion time of the ADC.