# Making Accurate Measurements With PC-Based Data Acquisition Systems A Tutorial

July 1, 1996

Before the computer age, most data was recorded manually or on strip-chart recorders. Today, the emergence of microprocessors has spawned a new generation of data acquisition products that enables real-time gathering, analysis, logging and viewing of data through your desktop or laptop PC.

This advancement in technology has made easy the mechanics of data acquisition; however, it has also created a need for you to understand the operation of the data acquisition system. Without this understanding, the data being recorded may not be what you think it is.

Factors Affecting Data Acquisition Accuracy

The data acquisition process begins with a real-world phenomenon. For example, a thermocouple measures temperature by producing a voltage. This voltage varies with changes in temperature. The data acquisition hardware converts this analog signal into a digital signal that can be processed by the computer.

To take accurate measurements with a PC-based data acquisition system, the following criteria must be factored into both the selection and the application of the system:

Sampling Rate.

Resolution.

Input Signal Range.

Calibration Errors—gain error, offset error, linearity error and drift.

Noise.

Sampling Rate

If the input signal frequency is faster than the sampling rate of the data acquisition system, the measured waveform will not accurately reflect the input signal waveform. This is called an alias.

The Nyquist Theorem states that the waveform must be sampled at a rate of more than twice its highest-frequency component to obtain enough data to accurately represent the frequency of that signal. If the input signal has a 100-Hz frequency, then the sample rate must be greater than 200 Hz. In practice, signals are sampled at least three to five times faster than the highest component frequency to guarantee that the sampling rate is fast enough to avoid aliasing.

To reproduce the waveform with a high degree of precision, it may be necessary to sample from 10 to 100 times the frequency of the signal. It is essential that the data acquisition system sample fast enough to avoid aliasing to provide you with accurate waveform measurements.

Resolution

Resolution defines the smallest change in the input signal that the data

acquisition system can measure. Using a 12-bit analog-to-digital (A-to-D) board, the

resolution is 1 or 1 , or 0.024% of the input range. On a 0 to 10-V scale, this

212 4,096

resolution is 2.4 mV. Changes less than this in the input signal would not be detected by the A-to-D converter.

A 16-bit converter resolves down to one part in 65,536 or 0.0015% of full scale. On the same 0 to 10-V input range, the resolution of a 16-bit board is 0.15 mV (Figure 1).

The required resolution must be factored into the selection decision for an A-to-D converter to provide the desired measurement precision.

Input Signal Range

Since the average A-to-D converter has a limited and fixed resolution, 0.024% of the range for a 12-bit converter, it is important to use the smallest input range that will accommodate your input voltage. Measuring a 50-mV input signal using a 0 to 10-V input range would provide you with an input resolution of only 2.4 mV or approximately 5% of the measured voltage. Using a J-type thermocouple, the temperature resolution would be approximately 60°

C.

Using a more sensitive input scale, such as 0 to 50 mV, the voltage resolution will be 12

mV and the temperature resolution will be within the limits of the thermocouple or about 0.1°C to 0.2°

C.

Be sure that the data acquisition system you use for an application has an input range that will provide the required resolution for your measurement.

Calibration Errors

Many items contribute to measurement inaccuracies: gain error, offset error, linearity error and drift. Here are brief descriptions of each and methods to overcome the inaccuracies.

Gain Error—Characterized by a measurement error that is a constant percentage of the input voltage throughout the input voltage range. For example, if an input is measured as 1.1 V and 2.2 V for inputs of 1.0 V and 2.0 V, respectively, the gain error is 10%. Gain error usually changes over time as the semiconductor components age.

Offset Error—An error in the measured value at 0-V input. This error is a constant voltage error throughout the input range.

Linearity Error—Characterized by different measurement errors at different input levels. Increasing the input signal from 0 to 1 V will exhibit a different change in the measurement than increasing the input from 2 V to 3 V.

Drift—Changes in the gain, offset and linearity errors as the ambient temperature changes and as the semiconductor components age.

The solution to these measurement problems is to calibrate your data acquisition board. Many boards require that you either send the board back to the supplier for calibration or do it yourself. With a precision voltage source, you can manually calibrate the board by adjusting the potentiometers.

More sophisticated boards have a high-accuracy voltage source on the board. By sampling this voltage source at software-configured intervals, the gain, offset and drift errors can be corrected automatically.

Linearity errors must be compensated for via a look-up table. This is very infrequently required because this source of error is usually quite small.

Noise

Noise is probably your worse enemy when measuring analog inputs. The characteristics are random variations from reading to reading and on all input signal ranges. Noise is a larger percentage of the input signal for low-level inputs like strain gauges or thermocouples, so these signals require special precautions to attenuate the noise.

The sources of noise are many, such as electrical power lines, fluorescent lights, motors, radio stations, power supplies, hand-held radios and computers. The faster a data acquisition board samples, the greater the level of noise in the measured signal. Even when measuring slowly changing signals, a fast measuring board will pick up higher-frequency noise.

The peak-to-peak noise level is usually greater than the resolution of the board. This means that you won’t use all the resolution of the A-to-D converter.

To improve this unacceptable situation, you can either invest in signal- conditioning hardware that dampens or filters the input voltage sufficiently to reduce the noise, or use a data acquisition board with a noise-rejecting converter such as an integrating converter. The integrating A-to-D converter attenuates the noise by integrating the input signal over a time period, effectively averaging out the noise. With low-level signals like thermocouples and strain gages, integrating the signals over the period of the AC power (60 Hz or 50 Hz) is ideal for attenuating the noise because it virtually eliminates power-line noise, the primary source of low-frequency noise (Figure 2).

Some noise originates from the A-to-D board itself. Faster boards usually emit more noise. Unfortunately, you cannot cure this source of noise.

Conclusion

Understanding the operation of a data acquisition system can help you make a better system selection. No system is ideal for all measurement applications. To provide the best measurement quality, the system must be matched to the application by answering these questions:

Do the hardware and software meet the sampling-rate requirements?

Does the hardware provide the required resolution and input ranges to deliver the required accuracy?

Does the hardware offer the type of A-to-D converter that provides noise-free measurements or do you need to buy signal conditioning? Board noise specs do not cover noise attenuation.

Does the data acquisition board offer self-calibrating software features or the manual calibrating features you desire?

After answering these questions, you can select the best hardware and software for your application and position yourself well on your way toward a successful data acquisition project.

Rod Bulcher is a chemical engineering graduate from the University of Idaho. He has worked in the operations management and process control industries for 20 years prior to his current position as North America Sales Manager with Strawberry Tree. Strawberry Tree, 160 S. Wolfe Rd., Sunnyvale, CA 94086, (408) 736-8800.

Sidebar

A-to-D Converters

Successive Approximation Converters

are the most commonly used A-to-D converters in PC-based data acquisition. They are inexpensive and can sample at rates fast enough to satisfy most sampling-speed requirements (nominally 100,000 S/s on one channel). However, they do a poor job of eliminating noise, so expensive signal-conditioning hardware may be required to provide a usable measurement in many applications (Figure 3).

The converter compares a 1- or 2-

m

s sample of the analog input signal to an internal value that is 50% of the defined input range. If the signal is higher than the internal standard, the first bit of the converter is set to a 1. The remaining range (50% of the original range) is halved and a second comparison of the new internal standard to the signal is performed. This establishes the value of the second bit. This process is executed 12 consecutive times for a 12-bit converter; hence the name successive approximation.