Data Aquisition Tutorial

DownOverview DownData Transfer Methods
DownDifferential/Single Ended DownAnalog Calibration
DownA/D Converter DownDigital I/O
DownInput Amplifier DownCounter/Timers
DownThroughput DownAccessories
DownBurst Mode Sampling DownSoftware Support
DownHardware Triggering DownSummary
DownAnalog Outputs  

Data acquisition interfaces help measure information presented by both digital and analog signals. Digital signals can come from a variety of sources such as switch closures, relay contacts or TTL compatible interfaces. With the proper interface they can be directly read and processed by computers.

Analog signals come from instruments, sensors, or transducers that convert things like pressure, position or temperature into voltage or current. Analog signals cannot be directly read or processed by computers. The analog signals must first be converted to a digital number. This process is called analog-to- digital conversion or A/D.

The complementary process, digital to analog conversion or D/A, changes digital data into analog voltage or current signals. Many data acquisition interfaces have both A/D and D/A converters. This permits computerized measurement and control of industrial processes and laboratory experiments.

Differential vs. Single Ended
The number of input channels determines the number of devices that can be connected to an interface. Input channels can be either single-ended or differential.

A single-ended input measures the voltage between the input channel and the ground of the A/D converter. Each input channel can be used to interface with a different device. The device to be measured must output a signal that can be referenced to the interface's ground. These devices are often referenced to as floating, capacitor coupled, isolated, or battery powered.

A differential input measures the voltage between two input lines. This requires two input channels per device but has two important advantages over single-ended inputs. Differential inputs are able to measure devices that cannot be referenced to the A/D converter's ground. Differential inputs can also cancel common mode noise or interference from motors, AC power lines, or other electrical or mechanical sources that inject noise into the transducer or the wiring to the A/D converter. By measuring the difference between the two inputs the external noise that is common to both inputs can be rejected.

A/D Converter
The A/D converter converts the input signal into a digital value. The accuracy of the conversion is dependent on the resolution and linearity of the converter. Gain and offset errors from the input amplifier also affect accuracy.

Resolution is the number of levels used to represent the analog input range. True fourteen bit converters, for example, can assume 214 different states and so divide their input range into 16,384 pieces. More bits yield exponentially higher potential resolution. Input gain, or amplification, can increase the apparent resolution of signals that have a maximum amplitude less than the input range of the A/D converter.

Linearity is a measure of how evenly the levels are spread within the input range. Differential nonlinearity is the error between adjacent levels. If this is greater than 1 LSB some of the digital levels are unused. In this case the true resolution of the converter is less than the digitized value width. Integral nonlinearity gives the difference between the digitalized level and the ideal level. An ideal converter would have an integral nonlinearity of 1/2 LSB.

Input Amplifier
The input amplifier is used to buffer the input signal and to provide gain for the input signal. The gain for each input channel is normally set so that the input signal uses as much of the A/D converters range as possible. When the gain is increased, the effective input range seen by the A/D converter is decreased causing each digitizing level to become finer.

For example, a 12-bit A/D can digitize an input signal with a gain of 4 with the same resolution as a 14-bit A/D at a gain of 1. Since the input amplifier directly affects the accuracy of the digitized waveform it should provide performance equal to the A/D converter. The gain accuracy should be specified as a low percentage of the total gain.

The amplifier noise and voltage offset should also be low. The amplifier noise is usually referred to the input. To find that actual noise level at the converter, this specification should be multiplied by the gain. The voltage offset can be specified referred to the input or at the A/D converter. If specified at the input, it also must be multiplied by the gain. The offset is often specified in LSB when it is measured at the A/D converter.

The input amplifiers used on the TransEra boards settle at the maximum sampling rate regardless of the gain selected. Any channel may use any gain regardless of the channel order.

Three elements specify A/D throughput: conversion time, acquisition time, and transfer time. Conversion time is the time required by the A/D converter to produce a digital value that corresponds to the analog input.

Acquisition time corresponds to the time needed by the associated analog circuitry to acquire a signal. Transfer time corresponds to the time needed to transfer data from the interface to the computers memory. Throughput is the rate at which all three can be completed.

Throughput is often the most important factor in choosing a data acquisition interface. The Nyquist Theorem specifies that an input signal should be sampled at least twice as fast as the input's highest frequency component. For example to accurately measure a 1kHz signal, the minimum A/D throughput is 2kHz. This avoids signal aliasing. Aliasing occurs when high frequency components appear in the digital values as erroneous lower frequencies.

Most transducers act as low pass filters limiting the bandwidth of the measured signal. In many applications over sampling is sufficient to reduce aliasing to acceptable levels. To reduce the sampling speed requirements, low pass filters can be used to further limit the bandwidth of the signal being measured. This filter can range from a simple resistor capacitor filter to expensive multiple pole active filters. The choice depends on the frequency distribution of the input signal and the amount of oversampling used.

Most multi-channel analog input circuits share a common A/D converter. The larger the number of input circuits being converted the lower the per channel throughput. If you wish to sample 10 channels at 10kHz each, you need a data acquisition system with a throughput of at least 100kHz.

Burst Mode Sampling
During a typical data acquisition process one or more channels are read at a set time interval. One reading of all of the desired channels is called a scan. The time between scans is called the scan interval and is the per channel sampling rate. Typically either distributed or burst mode sampling is used.

Older data acquisition systems usually provide distributed mode sampling. This sampling method divides the scan interval by the number of channels. That time is then used as the time between conversions. This can result in significant skew between channels in a scan. Skew makes it more difficult to interpret the data and makes the use of simultaneous sample and hold amplifiers difficult due to the long hold times required.

Burst mode sampling (sometimes referred to as pseudo-simultaneous sampling) sequences through the channels in the scan at the fastest possible rate. This minimizes the timing skew between channels and in some applications allows the data to be treated as if all channels were sampled simultaneously. Overall sampling rate is controlled by the scan interval time. This method allows simultaneous sample and hold amplifiers to hold for a minimum amount of time. The timing diagram Burst vs. Distributed Sampling compares the two schemes. See Illustration.

Hardware Triggering
Hardware triggers allow an external event to control data collection. In some cases it reduces the amount of data that must be taken, in other cases it may be the only way to collect the data of interest. Flexible triggering allows data storage before and/or after the trigger. Helpful trigger sources are analog voltages, digital patterns and TTL signals.

Analog voltage triggers cause a trigger as a result of an analog voltage. This allows physical changes such as temperature, pressure or strain to cause the trigger. Analog voltage triggers should be able to use any channel at any gain and provide a choice of several different triggering conditions such as channel voltage above a level, below a level, outside two levels, between two levels, at a level when rising, and at a level when falling.

The digital pattern trigger becomes valid when a bit pattern on a digital port matches a stored pattern. This allows the acquisition to be controlled from a certain state of a controller or from a combination of digital input sources.

TTL trigger signals are usually edge sensitive TTL compatible inputs. This allows a relay closure or button press to be the trigger. Ideally the input will have hysteresis to prevent multiple triggers from a single slow edge.

All trigger sources provided with TransEra supplied boards work regardless of the sampling rate or the data transfer method. The Model 420 and 430 boards support all of the described trigger sources.

Analog Outputs
Analog outputs are used by the interface to provide DC voltage levels or arbitrary waveforms. The output levels are set by a D/A converter. Bipolar D/A converters output voltages that are *the reference voltage. Unipolar D/A converters output voltages that range from 0 to the reference voltage. In either case the D/A converter outputs the fraction of the reference voltage that the digital word represents.

Key specifications for D/A's are settling time, linearity and reference voltage. Settling time is the period a D/A converter needs to reach the rated accuracy after receiving a full- scale output change. While a D/A converter's output begins to change as soon as it receives a new data value, the output is not guaranteed to have reached the actual level until after the settling time. This time is a worst case value: smaller than full-scale changes settle in less time. Linearity refers to the ability of the D/A to accurately divide the reference into even levels just like A/D linearity does with input signals. The reference voltage sets the range of output voltages possible.

A single digital output level provides a DC output voltage. To simulate a waveform the DC output of the D/A is modified at a fixed frequency. This produces an output waveform that steps from level to level. If needed, the steps can be smoothed out with a low pass filter. For accurate waveform generation the D/A converter must be updated in real time. This requires a timing signal to update the D/A and a data transfer method that can guarantee that the D/A will have data ready for each update.

TransEra supplied boards that support D/A allow internal and several external timing sources that can update the output voltages at the maximum transfer rate without data-not-ready gaps.

Data Transfer Methods
Data transfer on a PC is generally performed with either Polled, Interrupt driven or DMA transfers.

Polled mode is used by very simple boards or when the computer has no interrupt or DMA resources available. In Polled mode the program polls the board to see if a value is available, from the A/D, or can be accepted, by the D/A, and then one value is transferred at a time. This mode requires considerable computer time and the software can do little else except check the data acquisition card.

Unless the board has a substantial FIFO or the data rate is very slow, data can not be transferred without missing some values. These values are missed because of unavoidable system interrupts that pause polled mode transfers.

The interrupt mode does away with the overhead of polling the card and allows the computer to perform other operations while the data acquisition process occurs. When a data value is available an interrupt notifies the computer to transfer data. As with polled mode, missing data can occur during system interrupts without a FIFO.

DMA, or direct memory access, mode transfers data directly to or from the computers memory and the data acquisition card without intervention from the computer. This method provides the highest throughput with the only limitation being the size of the DMA buffer. Since it is not affected by system interrupts this transfer method can guarantee no missing data. For long DMA transfers, data can be lost during DMA controller reconfiguration unless the board has a substantial FIFO or dual mode DMA.

Due to the use of large dedicated FIFOs, the TransEra data acquisition boards can sustain the specified data rates without missing data.

Analog Calibration
To maintain accuracy the A/D, input amplifier and D/A circuits require periodic calibration. This resets key points in the converter's range, and compensates for the tendency in analog circuits to change characteristics or drift over time.

Historically potentiometers have been used for calibration and continue to be widely used. These perform the necessary calibration but are susceptible to vibration and require access to the interface to perform the calibration.

A better hands-off approach is to use DACs on the interface to electronically calibrate the analog components. The calibration values can be stored and updated without ever having to gain access to the board. The calibration DACs are not affected by vibration and cannot be accidentally changed.

Digital I/O
The digital input output section of a data acquisition interface provides bi-directional TTL level control and status ports that can be set and read by the computer. These can be used to control devices or to monitor switch or contact closures. Handshaking is sometimes provided to allow communication with peripheral devices.

To perform multiple conversions at precisely-defined time intervals, data acquisition boards are equipped with counters and timers. The counter/timers are used to control both A/D and D/A data conversion. They work by counting an accurate fixed frequency oscillator provided by the interface or some external source. This clock frequency determines the granularity of the available settings. Higher frequencies offer finer granularity.

Some boards provide counter/timers channels for the user. These can be extremely flexible and used in dozens of configurations. Some applications include external clock generation, pulse width and frequency measurements, and timing for complicated external triggering. They can be used singly or in combination with other counters, using external or internal clock sources.

Optional components for the TransEra data acquisition interface cards include a terminal board and cable accessory for sensor wire connection.

The board includes 110 DIN screw terminals, each connected to two plated through holes. In addition there is a breadboard area with 650 plated through holes for any signal conditioning add-on components that might be required. All signal lines are brought to the terminals.

The cable has a 100 pin mini-champ quick disconnect connector at both ends for secure wiring between the termination panel and the data acquisition interface card.

Software Support
The TransEra Data Acquisition interface cards are supported by both TransEra HTBasic drivers and C language callable drivers.

The TransEra HTBasic data acquisition drivers use familiar control statements to operate the Data Acquisition interface cards, these include, CONTROL, STATUS, OUTPUT, ENTER and TRANSFER. Drivers are also supplied for many of the most popular data acquisition interface cards from other manufactures.

Microsoft and Borland C drivers are supplied as libraries of functions that simplify programming of the TransEra data acquisition interface cards.

A data acquisition interface can be used with a PC to perform a wide range of measurement and control functions. This coupled with the ease of use that comes with the supplied drives provides a cost effective solution to testing requirements for many applications.


Copyright 2007 © TransEra Corp.