The analog inputs have variable resolution, where the time required per sample increases with increasing resolution. The value passed for resolution is from 0-17, where 0-12 all correspond to 12-bit resolution, and 17 still results in 16-bit resolution but with minimum noise. The UE9-Pro has an additional resolution setting of 18 that causes acquisitions to use the alternate high-resolution converter (24-bit sigma-delta). Resolution is configured on a device basis, not for each channel.
The analog inputs are connected to a high impedance input buffer. The inputs are not pulled to 0.0 volts, as that would reduce the input impedance, so readings obtained from floating channels will generally not be 0.0 volts. The readings from floating channels depend on adjacent channels and sample rate. See Section 2.7.3.8.
When scanning multiple channels, the nominal channel-to-channel delay is specified in Appendix A, and includes enough settling time to meet the specified performance. Some signal sources could benefit from increased settling, so a settling time parameter is available that adds extra delay between configuring the multiplexers and acquiring a sample. The passed settling time value is multiplied by 5 microseconds to get the approximate extra delay. This extra delay will impact the maximum possible data rates.
The LabJack UE9 has 16 total built-in analog inputs. Two of these are connected internally (AIN14/AIN15), leaving 14 user accessible analog inputs (AIN0-AIN13). The first 4 analog inputs, AIN0-AIN3, appear both on the screw terminals and on the DB37 connector. These connections are electrically the same, and the user must exercise caution only to use one connection or the other, and not create a short circuit. Following is a table showing the channel number to pass to acquire different readings from the internal channels (AIN14/15).
Table 2.7.1-1. Internal Channels
Channel# | |
14 | Vref (~2.43 V) |
128 | Vref (~2.43 V) |
132 | Vsupply |
133 | Temp Sensor |
15 | GND |
136 | GND |
140 | Vsupply |
141 | Temp Sensor |
GND and Vref connect 0.0 volts and about 2.43 volts to the internal channels. These signals come through the same input path as channels 0-13, and thus can be used to test various things. Vsupply connects the 5 volt supply voltage (Vs) directly to the analog to digital converter through a voltage divider that attenuates it by 40%. The attenuation of this voltage divider is not measured during the UE9 factory calibration, but the accuracy should typically be within 0.2%. Note that a reading from this channel returns Vs during the execution of the command, and Vs might dip slightly while increasing a command due to the increased current draw of the UE9, thus this reading might be slightly lower than a comparative reading from an external DMM which averages over a longer time. The channels with the same names are identical. For instance, channel 133 or 141 both read the same internal temperature sensor. See "Section 2.7.4":/support/ue9/users-guide/2.7.4 for information about the internal temperature sensor. The "Mux80":/catalog/mux80 accessory uses multiplexer ICs to easily expand the total number of analog inputs available from 14 to 84, or you can connect multiplexer chips yourself. The DB37 connector has 3 MIO lines designed to address expansion multiplexer ICs (integrated circuits), allowing for up to 112 total external analog inputs. The MAX4051A (maxim-ic.com) is a recommended multiplexer, and a convenient ±5.8 volt power supply is available so the multiplexers can pass bipolar signals (see Vm+/Vm- discussion in "Section 2.12":/support/ue9/users-guide/2.7.4). Note that the EB37 experiment board accessory is a convenient way to connect up to 7 MAX4051A multiplexer chips, but the UE9s ±5.8 volt supply should still be used to power the chips as the ±10 volt supply on the EB37 is beyond the rating of the MAX4051A. Figure 2-2 shows the typical connections for a pair of multiplexers.
To make use of external multiplexers, the user must be comfortable reading a simple schematic (such as Figure 2-2) and making basic connections on a solderless breadboard (such as the "EB37 Experiment Board":/catalog/eb37-experiment-board). Initially, it is recommended to test the basic operation of the multiplexers without the MIO lines connected. Simply connect different voltages to NO0 and NO1, connect ADDA/ADDB/ADDC to GND, and the NO0 voltage should appear on COM. Then connect ADDA to VS and the NO1 voltage should appear on COM. If any of the AIN channel numbers passed to a UE9 function are in the range 16-127 (extended channels), the MIO lines will automatically be set to output and the correct state while sampling that channel. For instance, a channel number of 28 will cause the MIO to be set to b100 and the ADC will sample AIN1. Channel number besides 16-127 will have no affect on the MIO. The extended channel number mapping is shown in Table 2-2. For differential extended channels, the positive channel must map to an even channel from 0-12, and the negative channel must map to the odd channel 1 higher (i.e. 1-13). That means that for extended channel numbers the negative channel must be 8 higher than the positive channel. For example, a valid differential extended channel pair would be Ch+ = AIN70 and Ch- = AIN78, since AIN70 maps to AIN6 and AIN78 maps to AIN7. For more information on differential extended channels, see the "Mux80 Datasheet":/support/mux80/datasheet. In command/response mode, after sampling an extended channel the MIO lines remain in that same condition until commanded differently by another extended channel or another function. When streaming with any extended channels, the MIO lines are all set to output-low for any non extended analog channels. For special channels (digital/timers/counters), the MIO are driven to unspecified states. Note that the StopStream can occur during any sample within a scan, so the MIO lines will wind up configured for any of the extended channels in the scan. If a stream does not have any extended channels, the MIO lines are not affected.
Table 2.7.1-3. Expanded Channel Mapping
UE9 | MIO Multiplexed |
Channel | Channels |
0 | 16-23 |
1 | 24-31 |
2 | 32-39 |
3 | 40-47 |
4 | 48-55 |
5 | 56-63 |
6 | 64-71 |
7 | 72-79 |
8 | 80-87 |
9 | 88-95 |
10 | 96-103 |
11 | 104-111 |
12 | 112-119 |
13 | 120-127 |
14 | 128-135 |
15 | 136-143 |
This information is only needed when using low-level functions and other ways of getting binary readings. Readings in volts already have the calibration constants applied. The UD driver, for example, normally returns voltage readings unless binary readings are specifically requested.
Following are the nominal input voltage ranges for the analog inputs.
Table 2.7.2-1. Nominal analog input voltage ranges
Gain | Max V | Min V | |
Unipolar | 1 | 5.07 | -0.01 |
Unipolar | 2 | 2.53 | -0.01 |
Unipolar | 4 | 1.26 | -0.01 |
Unipolar | 8 | 0.62 | -0.01 |
Bipolar | 1 | 5.07 | -5.18 |
The high-resolution converter on the UE9-Pro only supports the 0-5 and +/-5 volt ranges.
The readings returned by the analog inputs are raw binary values (low level functions). An approximate voltage conversion can be performed as:
Volts(uncalibrated) = (Bits/65536)*Span
Where span is the maximum voltage minus the minimum voltage from the table above. For a proper voltage conversion, though, use the calibration values (Slope and Offset) stored in the internal flash on the Control processor.
Volts = (Slope * Bits) + Offset
In both cases, “Bits” is always aligned to 16-bits, so if the raw binary value is 24-bit data it must be divided by 256 before converting to voltage. Binary readings are always unsigned integers.
Since the UE9 uses multiplexers, all channels (except 129-135 and 137-143) have the same calibration for a given input range.
See Section 5.6 for details about the location of the UE9 calibration constants
Voltage (versus ground): The analog inputs on the UE9 measure a voltage with respect to UE9 ground. When measuring parameters other than voltage, or voltages too big or too small for the UE9, some sort of sensor or transducer is required to produce the proper voltage signal. Examples are a temperature sensor, amplifier, resistive voltage divider, or perhaps a combination of such things.
Impedance: When connecting the UE9, or any measuring device, to a signal source, it must be considered what impact the measuring device will have on the signal. The main consideration is whether the currents going into or out of the UE9 analog input will cause noticeable voltage errors due to the impedance of the source. See Appendix A for the recommended maximum source impedance.
Resolution (and Accuracy): Based on the selected input range and resolution of the UE9, the resolution can be determined in terms of voltage or engineering units. For example, assume some temperature sensor provides a 0-10 mV signal, corresponding to 0-100 degrees C. Samples are then acquired with the UE9 using the 0-5 volt input range and 16-bit resolution, resulting in a voltage resolution of about 5/65536 = 76 µV. That means there will be about 131 discrete steps across the 10 mV span of the signal, and the overall resolution is 0.76 degrees C. If this experiment required a resolution of 0.1 degrees C, this configuration would not be sufficient. Accuracy will also need to be considered. Appendix A places some boundaries on expected accuracy, but an in-system calibration can generally be done to provide absolute accuracy down to the INL limits of the UE9.
Speed: How fast does the signal need to be sampled? For instance, if the signal is a waveform, what information is needed: peak, average, RMS, shape, frequency, … ? Answers to these questions will help decide how many points are needed per waveform cycle, and thus what sampling rate is required. In the case of multiple channels, the scan rate is also considered. See Sections 3.1 and 3.2.
Each analog input on the UE9 measures the difference in voltage between that input and ground (GND). Since all I/O on the UE9 share a common ground, the voltage on a digital output or analog output can be measured by simply connecting a single wire from that terminal to an AINx terminal.
An example of an unpowered isolated signal would be a thermocouple or photocell where the sensor leads are not shorted to any external voltages. Such a sensor typically has two leads. The positive lead connects to an AINx terminal and the negative lead connects to a GND terminal.
An exception might be a thermocouple housed in a metal probe where the negative lead of the thermocouple is shorted to the metal probe housing. If this probe is put in contact with something (engine block, pipe, …) that is connected to ground or some other external voltage, care needs to be taken to insure valid measurements and prevent damage.
A typical example of this type of signal is a 3-wire temperature sensor. The sensor has a power and ground wire that connect to Vs and GND on the LabJack, and then has a signal wire that simply connects to an AINx terminal.
Another variation is a 4-wire sensor where there are two signal wires (positive and negative) rather than one. If the negative signal is the same as power ground, or can be shorted ground, then the positive signal can be connected to AINx and a measurement can be made. A typical example where this does not work is a bridge type sensor, such as pressure sensor, providing the raw bridge output (and no amplifier). In this case the signal voltage is the difference between the positive and negative signal, and the negative signal cannot be shorted to ground. An instrumentation amplifier is required to convert the differential signal to signal-ended, and probably also to amplify the signal.
An example is a box with a wire coming out that is defined as a 0-5 volt analog signal and a second wire labeled as ground. The signal is known to have 0-5 volts compared to the ground wire, but the complication is what is the voltage of the box ground compared to the LabJack ground.
If the box is known to be electrically isolated from the LabJack, the box ground can simply be connected to LabJack GND. An example would be if the box was plastic, powered by an internal battery, and does not have any wires besides the signal and ground which are connected to AINx and GND on the LabJack. Such a case is obviously isolated and easy to keep isolated. In practical applications, though, signals thought to be isolated are often not at all, or perhaps are isolated at some time but the isolation is easily lost at another time.
If the box ground is known to be the same as the LabJack GND, then perhaps only the one signal wire needs to be connected to the LabJack, but it generally does not hurt to go ahead and connect the ground wire to LabJack GND with a 100 Ω resistor. You definitely do not want to connect the grounds without a resistor.
If little is known about the box ground, a DMM can be used to measure the voltage of box ground compared to LabJack GND. As long as an extreme voltage is not measured, it is generally OK to connect the box ground to LabJack GND, but it is a good idea to put in a 100 Ω series resistor to prevent large currents from flowing on the ground. Use a small wattage resistor (typically 1/8 or 1/4 watt) so that it blows if too much current does flow. The only current that should flow on the ground is the return of the analog input bias current, which is on the order of nanoamps for the UE9.
The SGND terminal can be used instead of GND for externally powered signals. A series resistor is not needed as SGND is fused to prevent overcurrent, but a resistor will eliminate confusion that can be caused if the fuse is tripping and resetting.
In general, if there is uncertainty, a good approach is to use a DMM to measure the voltage on each signal/ground wire without any connections to the UE9. If no large voltages are noted, connect the ground to UE9 SGND with a 100 Ω series resistor. Then again use the DMM to measure the voltage of each signal wire before connecting to the UE9.
Another good general rule is to use the minimum number of ground connections. For instance, if connecting 8 sensors powered by the same external supply, or otherwise referred to the same external ground, only a single ground connection is needed to the UE9. Perhaps the ground leads from the 8 sensors would be twisted together, and then a single wire would be connected to a 100 Ω resistor which is connected to UE9 ground.
The best results are generally obtained when a signal voltage spans the full analog input range of the LabJack. If the signal is too small it can be amplified before connecting to the LabJack. One good way to handle low-level signals such as thermocouples is the LJTick-InAmp, which is a 2-channel instrumentation amplifier module that plugs into the UE9 screw-terminals.
For a do-it-yourself solution, the following figure shows an operational amplifier (op-amp) configured as non-inverting:
The gain of this configuration is:
Vout = Vin * (1 + (R2/R1))
100 kΩ is a typical value for R2. Note that if R2=0 (short-circuit) and R1=inf (not installed), a simple buffer with a gain equal to 1 is the result.
There are numerous criteria used to choose an op-amp from the thousands that are available. One of the main criteria is that the op-amp can handle the input and output signal range. Often, a single-supply rail-to-rail input and output (RIRO) is used as it can be powered from Vs and GND and pass signals within the range 0-Vs. The OPA344 from Texas Instruments (ti.com) is good for many 5 volt applications. The max supply rating for the OPA344 is 5.5 volts, so for applications using Vm+/Vm- (~12 volts) or using the ±10 volt supply on the EB37, the LT1490A from Linear Technologies (linear.com) might be a good option.
The op-amp is used to amplify (and buffer) a signal that is referred to the same ground as the LabJack (single-ended). If instead the signal is differential (i.e. there is a positive and negative signal both of which are different than ground), an instrumentation amplifier (in-amp) should be used. An in-amp converts a differential signal to single-ended, and generally has a simple method to set gain.
The EB37 experiment board is handy for building these circuits.
The nominal maximum analog input voltage range for the UE9 is ±5 volts. The easiest way to handle larger voltages is often by using the LJTick-Divider, which is a two channel buffered divider module that plugs into the UE9 screw-terminals.
The basic way to handle higher voltages is with a resistive voltage divider. Figure 2.7.3.6-1 shows the resistive voltage divider assuming that the source voltage (Vin) is referred to the same ground as the UE9 (GND).
The attenuation of this circuit is determined by the equation:
Vout = Vin * ( R2 / (R1+R2))
This divider is easily implemented by putting a resistor (R1) in series with the signal wire, and placing a second resistor (R2) from the AIN terminal to a GND terminal. To maintain specified analog input performance, R1 should not exceed 10 kΩ, so R1 can generally be fixed at 10 kΩ and R2 can be adjusted for the desired attenuation. For instance, R1 = R2 = 10 kΩ provides a divide by 2, so a ±10 volt input will be scaled to ±5 volts and a 0-10 volt input will be scaled to 0-5 volts.
The divide by 2 configuration where R1 = R2 = 10 kΩ, presents a 20 kΩ load to the source, meaning that a ±10 volt signal will have to be able to source/sink up to ±500 µA. Some signal sources might require a load with higher resistance, in which case a buffer should be used. Figure 2.7.3.6-2 shows a resistive voltage divider followed by an op-amp configured as non-inverting unity-gain (i.e. a buffer).
The op-amp is chosen to have low input bias currents so that large resistors can be used in the voltage divider. The LT1490A from Linear Technologies (linear.com) is a good choice for dual-supply applications. The LT1490A only draws 40 µA of supply current, thus many of these amps can be powered from the Vm+/Vm- supply on the UE9, and can pass signals in the ±5 volt range. Since the input bias current is only -1 nA, large divider resistors such as R1 = R2 = 470 kΩ will only cause an offset of about -470 µV, and yet present a load to the source of about 1 megaohm.
For 0-5 volt applications, where the amp will be powered from Vs and GND, the LT1490A is not the best choice. When the amplifier input voltage is within 800 mV of the positive supply, the bias current jumps from -1 nA to +25 nA, which with R1 = 470 kΩ will cause the offset to change from -470 µV to +12 mV. A better choice in this case would be the OPA344 from Texas Instruments (ti.com). The OPA344 has a very small bias current that changes little across the entire voltage range. Note that when powering the amp from Vs and GND, the input and output to the op-amp is limited to that range, so if Vs is 4.8 volts your signal range will be 0-4.8 volts. If this is a concern, use the external wall-wart to supply power to the UE9 as it typically keeps Vs around 5.2 volts.
The EB37 experiment board is handy for building these circuits.
The information above also applies to resistance measurement. A common way to measure resistance is to build a voltage divider as shown in Figure 2.7.3.6-1, where one of the resistors is known and the other is the unknown. If Vin is known and Vout is measured, the voltage divider equation can be rearranged to solve for the unknown resistance.
The best way to handle 4-20 mA signals is with the LJTick-CurrentShunt, which is a two channel active current to voltage converter module that plugs into the UE9 screw-terminals.
Figure 2.7.3.7-1 shows a typical method to measure the current through a load, or to measure the 4-20 mA signal produced by a 2-wire (loop-powered) current loop sensor. The current shunt shown in the figure is simply a resistor.
When measuring a 4-20 mA signal, a typical value for the shunt would be 240 Ω. This results in a 0.96 to 4.80 volt signal corresponding to 4-20 mA. The external supply must provide enough voltage for the sensor and the shunt, so if the sensor requires 5 volts the supply must provide at least 9.8 volts.
For applications besides 4-20 mA, the shunt is chosen based on the maximum current and how much voltage drop can be tolerated across the shunt. For instance, if the maximum current is 1.0 amp, and 2.5 volts of drop is the most that can be tolerated without affecting the load, a 2.4 Ω resistor could be used. That equates to 2.4 watts, though, which would require a special high wattage resistor. A better solution would be to use a 0.1 Ω shunt, and then use an amplifier to increase the small voltage produced by that shunt. If the maximum current to measure is too high (e.g. 100 amps), it will be difficult to find a small enough resistor and a Hall effect sensor should be considered instead of a shunt.
The following figure shows typical connections for a 3-wire 4-20 mA sensor. A typical value for the shunt would be 240 Ω which results in 0.96 to 4.80 volts.
The sensor shown in Figure 2.7.3.7-2 is a sourcing type, where the signal sources the 4-20 mA current which is then sent through the shunt resistor and sunk into ground. Another type of 3-wire sensor is the sinking type, where the 4-20 mA current is sourced from the positive supply, sent through the shunt resistor, and then sunk into the signal wire. If sensor ground is connected to UE9 ground, the sinking type of sensor presents a couple of problems, as the voltage across the shunt resistor is differential (neither side is at ground) and at least one side of the resistor has a high common mode voltage (equal to the positive sensor supply). If the sensor and/or UE9 are isolated, a possible solution is to connect the sensor signal or positive sensor supply to UE9 ground (instead of sensor ground). This requires a good understanding of grounding and isolation in the system. The LJTick-CurrentShunt is often a simple solution.
Both Figure 2.7.3.7-1 and 2.7.3.7-2 show a 0-100 Ω resistor in series with SGND, which is discussed in general in Section 2.7.3.4. In this case, if SGND is used (rather than GND), a direct connection (0 Ω) should be good.
The best way to handle 4-20 mA signals is with the LJTick-CurrentShunt, which is a two channel active current to voltage converter module that plugs into the UE9 screw-terminals.
The reading from a floating (no external connection) analog input channel can be tough to predict and is likely to vary with sample timing and adjacent sampled channels. Keep in mind that a floating channel is not at 0 volts, but rather is at an undefined voltage. In order to see 0 volts, a 0 volt signal (such as GND) should be connected to the input.
Some data acquisition devices use a resistor, from the input to ground, to bias an unconnected input to read 0. This is often just for “cosmetic” reasons so that the input reads close to 0 with floating inputs, and a reason not to do that is that this resistor can degrade the input impedance of the analog input.
In a situation where it is desired that a floating channel read a particular voltage, say to detect a broken wire, a resistor can be placed from the AINx screw terminal to the desired voltage (GND, VS, DACx, …). A 10 kΩ resistor will pull the analog input readings to within 1 binary count of any desired voltage, but obviously degrades the input impedance to 10 kΩ. For the specific case of pulling a floating channel to 0 volts, a 100 kΩ resistor to GND can typically be used to provide analog input readings within 100 mV of ground.
The UE9 has an internal temperature sensor. Although this sensor measures the temperature inside the UE9, it has been calibrated to read ambient temperature. For accurate measurements the temperature of the entire UE9 must stabilize relative to the ambient temperature, which can take on the order of 1 hour. Best results will be obtained in still air in an environment with slowly changing ambient temperatures.
The internal temperature sensor is also affected by the operating speed of the UE9. With Control firmware V1.08 or higher, the UE9 is in high power mode by default, which is assumed by the LabJack UD driver.
With the UD driver, the internal temperature sensor is read by acquiring analog input channel 133 or 141, and returns degrees K.