2.1 - AI0-AI7 [U12 Datasheet] | LabJack

# 2.1 - AI0-AI7 [U12 Datasheet]

Hardware
The LabJack U12 has 8 screw terminals for analog input signals. These can be configured individually and on-the-fly as 8 single-ended channels, 4 differential channels, or combinations in between. Each input has a 12-bit resolution and an input bias current of ±90 µA.

• Single-Ended: The input range for a single-ended measurement is ±10 volts.
• Differential channels can make use of the low noise precision PGA to provide gains up to 20. In differential mode, the voltage of each AI with respect to ground must be between +20 and -10 volts, but the range of voltage difference between the 2 AI is a function of gain (G) as follows:

``````G=1    ±20 volts
G=2    ±10 volts
G=4    ±5 volts
G=5    ±4 volts
G=8    ±2.5 volts
G=10   ±2 volts
G=16   ±1.25 volts
G=20   ±1 volt
``````

The reason the range is ±20 volts at G=1 is that, for example, AI0 could be +10 volts and AI1 could be -10 volts giving a difference of +20 volts, or AI0 could be -10 volts and AI1 could be +10 volts giving a difference of -20 volts.

The PGA (programmable gain amplifier, available on differential channels only) amplifies the AI voltage before it is digitized by the A/D converter. The high level drivers then divide the reading by the gain and return the actual measured voltage.

Figure 2.1-1 shows a typical single-ended connection measuring the voltage of a battery. This same measurement could also be performed with a differential connection to allow the use of the PGA. In general, any single-ended measurement can be performed using a differential channel by connecting the voltage to an even-numbered analog input, and grounding the associated odd-numbered analog input (as shown by the dashed connection to AI1 in Figure 2.1-1).

Figure 2.1-1. Single-ended measurement.

Figure 2.1-2 shows a typical differential connection measuring the voltage across a current shunt. A differential connection is required when neither leg of the shunt is at ground potential. Make sure that the voltage of both AI0 an AI1 with respect to ground is within ±10 volts. For instance, if the source (Vs) shown in Figure 2.1-2 is 120 VAC, the difference between AI0 and AI1 might be small, but the voltage from both AI0 and AI1 to ground will have a maximum value near 170 volts, and will seriously damage the LabJack.

Whether or not the ground (GND) connection is needed (Figure 2.1-2) will depend on the nature of Vs.

Figure 2.1-2. Differential measurement.

Figure 2.1-3 shows a single-ended connection used to measure the output voltage of a typical voltage-divider circuit. The voltage divider circuit is a simple way to convert a varying resistance (thermistor, photoresistor, potentiometer, etc.) to a varying voltage. With nothing connected to Va, the value of the unknown resistance, R2, can be calculated as:

``R2 = Va*R1 / (Vs-Va)``

where Vs is the supply voltage (+5V in Figure 2.1-3).

When Va is connected to AI0, as shown in Figure 2.1-3, the input bias current of the LabJack affects the voltage divider circuit, and if the resistance of R1 and R2 is too large, this effect must be accounted for or eliminated. This is true for any signal with too high of a source impedance.

All measuring devices have maximum analog input bias currents that very from picoamps to milliamps. The input bias current of the LabJack U12’s analog inputs varies from +70 to -94 microamps (µA). This is similar to an input impedance of about 100 kΩ, but because the current is nonzero at 0 volts, it is better to model the analog input as a current sink obeying the following rule:

``Iin = 8.181*Va - 11.67 µA``

Figure 2.1-3. Single-ended measurement with voltage divider circuit.

Because the input bias current is known, as a function of input voltage, the simple voltage divider equation can be modified as follows to account for input bias current:

R2 = Va / [((Vs-Va)/R1) – (8.181µ * Va) + 11.67µ]

As an alternative to the equation above, Va can be buffered by a single-supply rail-to-rail operational amplifier, and the original simple voltage divider equation can be used. This solution works for any single-ended signal which stays between 0 and +5 volts. Some op-amp choices are:

• TLV2462
• LMC6482
• MAX4166

Software

EAnalogIn is a simplified (E is for easy) function that returns a single reading from 1 analog input channel. Execution time is up to 20 ms.

AISample returns a single reading of 1-4 channels, and takes up to 20 ms to execute, providing a maximum date rate of about 50 Hz per channel.

AIBurst acquires multiple samples of 1-4 channels at a hardware-timed sample rate of 400-8192 Hz. The acquisition can be triggered based on a change of state on IO0 or IO1. This function also returns the states of the IO pins (which are read every 4 samples).

Internally, the actual number of samples collected and transferred by the LabJack during an AIBurst call is the smallest power of 2, from 64 to 4096, which is at least as big as numSamples. The execution time of this function, in milliseconds, can be estimated as:

``````Turbo (default)  =>  30+(1000*numSamplesActual/sampleRate)+(0.4*numSamplesActual)
Normal           =>  30+(1000*numSamplesActual/sampleRate)+(2.5*numSamplesActual)
``````
``````numSamples = numScans * numChannels
sampleRate = scanRate * numChannels
``````

AIStreamRead is called periodically during a stream acquisition started by AIStreamStart. Each call retrieves multiple samples of 1-4 channels from the LabJack stream buffer, along with the states of the IO pins (read every 4 samples). Hardware-timed sample rates of 200-1200 Hz are available. If any function besides AIStreamRead is called while a stream is in progress, the stream will be stopped.

### The burst mode of the U12 can

The burst mode of the U12 can be externally triggered. This should be mentioned in the software description for AIBurst.

### I see it mentioned in the

I see it mentioned in the software description above, and in the programming reference (Section 4.7) it is documented in the parameter descriptions.  Let us know if you need more information on this page or 4.7.

### How many ADCs are in the U12

How many ADCs are in the U12 device? I looks like only one with MUX.

Do I understand correctly that in the Burst regime when 2 or 4 channels are sampled it does not scan the channels simultaneously - and it switches among the channels instead (time multiplex among the input) so that the corresponding samples of each channel are acquired with delay of 1/SampleRate? I haven't seen it written explicitly in the datasheet

michal

### That is correct for the U12.

That is correct for the U12.  See the description of "Channel-To-Channel Delay" on the U12 data rates page.  Newer devices (U3/U6/UE9) are also multiplexed, but the channels within each scan are sampled as fast as possible, not necessarily 1/SampleRate.

Is the actual AD-Conversion Time a function of the sample rate?

If I measure a square wave (e.g. from -5V to 5 V) using a small sample rate, I start seeing in between values (e.g. 4V) a lot. Using higher sample rates I don't see the in between values.

### This is strange behavior, can

This is strange behavior, can you provide any additional details?  It may also be helpful to email us at [email protected] and attach your code, so we can try to reproduce it on our end.  The sampling rate should not influence the voltages, unless the source impedance was very high.  (pH sensors have very high source impedance, but most other kinds of analog sensors should not have this issue).  Also, if the source impedance was very high, I'd expect the voltages to be wrong at the higher sample rates, and good at lower sample rates, not the other way around.

### Good morning, I have have

Good morning,

I have have torque sensor with 1mV/V, 10 V supply voltage and I have to use Labjack U12 (analog Input and USB Output). The maximum voltage from the sensor will be 10 mV. As far as I understand it is necessary to use an amplifier to get the up to 10 volts for measuring. To find an amplifier to get the right voltage range is not a problem, but what's about the amperage / current? Your U12 User's Guide says the input current with +10 volts is 70.1 µA. Now I am a little bit confused because the amplifiers I found range from 2.2 to 20 mA. Would this work anyway? And which restriction I have to care about? I do not want to harm the U12. (Any other tips on this case are welcome)

Thanks

### So you want to pre-amplify an

So you want to pre-amplify an analog signal going into the LabJack U12?  We sell the EI1040 instrumentation amplifier for this purpose, it will output with a gain of 1, 10, 100 or 1000 (depending on jumper setting).

It's also possible to make your own amplifier circuit, but you will have to provide your own stable rail voltages(±10V typ), and also think about how noise will factor in.  For instance, if your noise is ±2mV, and your signal is 10mV, the amplification stage will simply amplify the noise as well as the signal, so a gain of 10 would leave you with 20mV of noise on a 100mV signal.  The instrumentation amplifiers that output between 2.2 and 20mA will not harm the U12.  Basically the U12 only needs a little bit of current to get the reading, and those amplifiers can output current in abundance of what's required, such that you only use a little bit of what the amp is capable of, but that's okay.