Data Acquisition
Fundamentals of Data Acquisition
The fundamental task of a data acquisition system is the measurement or generation of real-world physical signals. Before a physical signal can be measured by a computer-based system, you must use a sensor or transducer to convert the physical signal into an electrical signal, such as voltage or current. Often only the plug-in data acquisition (DAQ) board is considered the data acquisition system; however, it is only one of the components in the system. Unlike stand-alone instruments, signals often cannot be directly connected to the DAQ board. The signals may need to be conditioned by some signal conditioning accessory before they are converted to digital information by the plug-in DAQ board. Finally, software controls the data acquisition system—acquiring the raw data, analyzing the data, and presenting the results. The components are shown in Fig. 18.24.
Signals
Signals are defined as any physical variable whose magnitude or variation with time contains information. Signals are measured because they contain some types of useful information. Therefore, the first question you should ask about your signal is: What information does the signal contain, and how is it conveyed? The functionality of the system is determined by the physical characteristics of the signals and the type of information conveyed by the signals. Generally, information is conveyed by a signal through one or more of the following signal parameters: state, rate, level, shape, or frequency content.
All signals are, fundamentally, analog, time-varying signals. For the purpose of discussing the methods of signal measurement using a plug-in DAQ board, a given signal should be classified as one of five signals types. Because the method of signal measurement is determined by the way the signal conveys the needed information, a classification based on these criteria is useful in understanding the fundamental building blocks of a data acquisition system.
As shown in the Fig. 18.25, any signal can generally be classified as analog or digital. A digital, or binary, signal has only two possible discrete levels of interest, a high (on) level and a low (off) level. An analog signal, on the other hand, contains information in the continuous variation of the signal with time. The two digital signal types are the on-off signals and the pulse train signal. The three analog signal types are the DC signal, the time-domain signal, and the frequency-domain signal. The two digital types and three analog types of signals are unique in the information conveyed by each. The category to which a signal belongs depends on the characteristic of the signal to be measured. You can closely parallel the five types of signals with the five basic types of signal information: state, rate, level, shape, and frequency content.
Plug-In DAQ Boards
The fundamental component of a data acquisition system is the plug-in DAQ board. These boards plug directly into a slot in a PC and are available with analog, digital, and timing inputs and outputs. The most versatile of the plug-in DAQ boards is the multifunction input/output (I/O) board. As the name implies, this board typically contains various combinations of analog-to-digital convertors (ADCs), digital-to-analog convertors (DACs), digital I/O lines, and counters/timers. ADCs and DACs measure and generate analog
voltage signals, respectively. The digital I/O lines sense and control digital signals. Counters/timers measure pulse rates, widths, delays, and generate timing signals. These many features make the multifunction DAQ board useful for a wide range of applications.
Multifunction boards are commonly used to measure analog signals. It is done by the ADC, which converts the analog voltage level into a digital number that the computer can interpret. The analog multiplexer (MUX), the instrumentation amplifier, the sample-and-hold (S/H) circuitry, and the ADC comprise the analog input section of a multifunction board (see Fig. 18.26).
Typically, multifunction DAQ boards have one ADC. Multiplexing is a common technique for measuring multiple channels (generally 16 single ended or 8 differential) with a single ADC. The analog mux switches between channels and passes the signal to the instrumentation amplifier and the sample-and-hold circuitry. The multiplexer architecture is the most common approach taken with plug-in DAQ boards. Although plug-in boards typically include up to only 16 single-ended or 8 differential inputs, you can further expanded the number of analog input channels with external multiplexer accessories.
Instrumentation amplifiers typically provide a differential input and selectable gain by jumper or software. The differential input rejects small common-mode voltages. The gain is often software programmable. In addition, many DAQ boards also include the capability to change the amplifier gain while scanning channels at high rates. Therefore, you can easily monitor signals with different ranges of amplitudes. The output of the amplifier is sampled, or held at a constant voltage, by the sample-and-hold device at measurement time so that voltage does not change during digitization.
The ADC digitizes the analog signal into a digital value, which is ultimately sent to computer memory. There are several important parameters of A/D conversion. The fundamental parameter of an ADC is the number of bits. The number of bits of an ADC determines the range of values for the binary output of the ADC conversion. For example, many ADCs are 12 b, so a voltage within the input range of the ADC will produce a binary value that has one of 212 = 4096 different values. The more bits that an ADC has, the higher the resolution of the measurement. The resolution determines the smallest amount of change that can be detected by the ADC. Depending on your background, you may be more familiar with resolution expressed as number of digits of a voltmeter or dynamic range in decibels, than with bits. Table 18.2 shows the relation between bits, number of digits, and dynamic range in decibels.
The resolution of the A/D conversion is also determined by the input range of the ADC and the gain.
DAQ boards usually include an instrumentation amplifier that amplifies the analog signal by a gain factor
prior to the conversion. You use this gain to amplify low-level signals so that you can make more accurate measurements.
Together, the input range of the ADC, the gain, and the number of bits of the board determine the maximum accuracy of the measurement. For example, suppose you are measuring a low-level ±-30 mV signal with a 12-b A/D convertor that has a ±-5 V input range. If the system includes an amplifier with a gain of 100, the resulting resolution of the measurement will be range/(gain × 2bits) = resolution, or 10 V/(100 × 212) = 0.0244 mV.
Finally, an important parameter of digitization is the rate at which A/D conversions are made, referred to as the sampling rate. The A/D system must be able to sample the input signal fast enough to accurately measure the important waveform attributes. To meet this criterion, the ADC must be able to convert the analog signal to digital form quickly enough.
When scanning multiple channels with a multiplexing data acquisition system, other factors can affect the throughput of the system. Specifically, the instrumentation amplifier must be able to settle to the needed accuracy before the A/D conversion occurs. With the multiplexed signals, multiple signals are being switched into one instrumentation amplifier. Most amplifiers, especially when amplifying the signals with larger gains, will not be able to settle to the full accuracy of the ADC when scanning channels at high rates. To avoid this situation, consult the specified settling times of the DAQ board for the gains and sampling rates required by your application.
Types of ADCs
Different DAQ boards use different types of ADCs to digitize the signal. The most popular type of ADC on plug-in DAQ boards is the successive approximation ADC, because it offers high speed and high resolution at a modest cost. Subranging (also called half-flash) ADCs offer very high-speed conversion with sampling speeds up to several million samples per second. Delta-sigma modulating ADCs sample at high rates, are able to achieve high resolution, and offer the best linearity of all ADCs. Integrating and flash ADCs are mature technologies still used on DAQ boards. Integrating ADCs are able to digitize with high resolution but must sacrifice sampling speed to obtain it. Flash ADCs are able to achieve the highest sampling rate (GHz) but typically with low resolution. The different types of ADCs are summarized in Table 18.3.
Analog Input Architecture
With the typical DAQ board, the multiplexer switches among analog input channels. The analog signal on the channel selected by the multiplexer then passes to the programmable gain instrumentation amplifier (PGIA), which amplifies the signal. After the signal is amplified, the sample and hold keeps the analog signal constant so that the A/D converter can determine the digital representation of the analog signal. A good DAQ board will then place the digital signal in a first-in first-out (FIFO) buffer, so that no data
will be lost if the sample cannot transfer immediately over the PC I/O channel to computer memory. Having a FIFO becomes especially important when the board is run under operating systems that have large interrupt latencies.
Basic Analog Specifications
Almost every DAQ board data sheet specifies the number of channels, the maximum sampling rate, the resolution, and the input range and gain.
The number of channels, which is determined by the multiplexer, is usually specified in two forms, differential and single ended. Differential inputs are inputs that have different reference points for each channel, none of which is grounded by the board. Differential inputs are the best way to connect signals to the DAQ board because they provide the best noise immunity.
Single-ended inputs are inputs that are referenced to a common ground point. Because single-ended inputs are referenced to a common ground, they are not as good as differential inputs for rejecting noise. They do have a larger number of channels, however. You can use the single-ended inputs when the input signals are high level (greater than 1 V), the leads from the signal source to the analog input hardware are short (less than 15 ft), and all input signals share a common reference.
Some boards have pseudodifferential inputs, which have all inputs referenced to the same common—like single-ended inputs—but the common is not referenced to ground. Using these boards, you have the benefit of a large number of input channels, like single-ended inputs, and the ability to remove some common mode noise, especially if the common mode noise is consistent across all channels. Differential inputs are still preferable to pseudodifferential, however, because differential is more immune to magnetic noise.
Sampling rate determines how fast the analog signal is converted to a digital signal. If you are measuring AC signals, you will want to sample at least two times faster than the highest frequency of your input signal. Even if you are measuring DC signals, you can sample faster than you need to and then average the samples to increase the accuracy of the signal by reducing the effects of noise.
If you have multiple DC-class signals, you will want to select a board with interval scanning. With interval scanning, all channels are scanned at one sample interval (usually the fastest rate of the board), with a second interval (usually slow) determining the time before repeating the scan. Interval scanning gives the effects of simultaneously sampling for slowly varying signals without requiring the addition cost of input circuitry for true simultaneous sampling.
Resolution is the number of bits that are used to represent the analog signal. The higher the resolution, the higher the number of divisions the input range is broken into and, therefore, the smaller the possible detectable voltage. Unfortunately, some data acquisition specifications are misleading when they specify the resolution associated with the DAQ board. Many DAQ boards specifications state the resolution of the ADC without stating the linearity’s and noise and, therefore, do not give you the information you need to determine the resolution of the entire board. Resolution of the ADC, combined with the settling time, integral non-linearity, differential non linearity, and noise will give you an understanding of the accuracy of the board.
Input range and gain tell you what level of signal you can connect to the board. Usually, the range and gain are specified separately, so you must combine the two to determine the actual signal input range as
signal input range = range/gain
For example, a board using an input range of ±10 V with a gain of 2 will have a signal input range of ±5 V. The closer the signal input range is to the range of your signal, the more accurate your readings from the DAQ board will be. If your signals have different input ranges, you will want to look for a DAQ board that has the capability of different gains per channel.