Common Issues with PC-based Data Acquisition
Aside from software and programming, the most common problem users run into when putting together DAQ systems is a noisy measurement. Unfortunately, noise in DAQ systems is a complicated issue and difficult to avoid. However, it is useful to understand where noise typically comes from, how much noise is to be expected, and some general techniques to reduce or avoid noise corruption.
The Low-Noise Voltmeter Standard
One of the most common questions asked of technical support personnel of DAQ vendors concerns the voltmeter. Users connect their signal leads to a handy voltmeter or digital multimeter (DMM), without worrying too much about cabling and grounding, and obtain a rock solid reading with little jitter. The user then duplicates the experiment with a DAQ board and is disappointed to find that the readings returned by the DAQ board look very noisy and very unstable.
The user decides there is a problem with the DAQ board and calls the technical support line for help. In fact, the user has just demonstrated the effects of two different measurement techniques, each with advantages and disadvantages. DAQ boards are designed as flexible, general-purpose measurement devices. The DAQ board front end typically consists of a gain amplifier and a sampling analog-to-digital converter. A sampling ADC takes an instantaneous measurement of the input signal. If the signal is noisy, the sampling ADC will digitize the signal as well as a noise. The digital voltmeter, on the other hand, will use an integrating ADC that integrates the signal over a given time period. This integration effectively filters out any high-frequency noise that is present in the signal.
Although the integrating input of the voltmeter is useful for measuring static, or DC signals, it is not very useful for measuring changing signals or digitizing waveforms, or for capturing transient signals. The plug-in DAQ for board, with its sampling ADC, has the flexibility to perform all of these types of measurements. With a little software, the DAQ board can also emulate the operation of the integrating voltmeter by digitizing the static signal at a higher rate and performing the integration, or averaging, of the signal in software.
Where Does Noise Come from?
There are basically four possible sources of noise in a DAQ system:
✁ Signal source, or transducer
✁ Environment (noise induced onto signal leads)
✁ PC environment
✁ DAQ board
Although the signal source is commonly a significant source of noise, that topic is beyond the scope of this chapter. Most measurement noise problems are the result of noise that is radiated, conducted, or coupled onto signal wires attaching the sensor or transducer to the DAQ equipment. Signal wires basically act as antennas for noise.
Placing a sensitive analog measurement device, like a plug-in DAQ board, inside a PC chassis might seem like asking for trouble. The high-speed digital traffic and power supplies inside a PC are prime candidates for noise radiation. For example, it is a good idea to not install your DAQ board directly next to your video card.
Probably the most dangerous area for your analog signals is not inside the PC, but on top of it. Keep your sig- nal wires clear of your video monitor, which can radiate large high-frequency noise levels onto your signal. The DAQ board itself can be a source of measurement noise. Poorly designed boards, for example, may not properly shield the analog sections from the digital logic sections that radiate high-frequency switching noise. Properly designed boards, with well-designed shielding and grounding, can provide very low-noise measurements in the relatively noisy environment of the PC.
Proper Wiring and Signal Connections
In most cases, the major source of noise is the environment through which the signal wires must travel. If your signal leads are relatively long, you will definitely want to pay careful attention to your cabling scheme. A variety of cable types are available for connecting sensors to DAQ systems. Unshielded wires or ribbon cables are inexpensive and work fine for high-level signals and short to moderate cable lengths. For low-level signals or longer signal paths, you will want to consider shielded or twisted-pair wiring. Tie the shield for each signal pair to ground reference at the source. Practically speaking, consider shielded, twisted-pair wiring if the signal is less than1V or must travel farther than approximately 1 m. If the signal has a bandwidth greater than 100 kHz, however, you will want to use coaxial cables.
Another useful tip for reducing noise corruption is to use a differential measurement. Differential inputs are available on most signal conditioning modules and DAQ boards. Because both the (+) and (−) signal lines travel from signal source to the measurement system, they pick up the same noise. A differential input will reject the voltages that are common to both signal lines. Differential inputs are also best when measuring signals that are referenced to ground. Differential inputs will avoid ground loops and reject any difference in ground potentials. On the other hand, single-ended measurements reference the input to ground, causing ground loops and measurement errors.
Other wiring tips:
✁ If possible, route your analog signals separately from any digital I/O lines. Separate cables for analog and digital signals are preferred.
✁ Keep signal cables as far as possible from AC and other power lines.
✁ Take caution when shielding analog and digital signals together. With a single-ended (not differential) DAQ board, noise coupled from the digital signals to the analog signals via the shield will appear as noise. If using a differential input DAQ board, the coupled noise will be rejected as common-mode noise (assuming the shield is tied to ground at one end only).
Source Impedance Considerations
When time-varying electric fields, such as AC power lines, are in the vicinity of your signal leads, noise is introduced onto the signal leads via capacitive coupling. The capacitive coupling increases in direct proportion to the frequency and amplitude of the noise source and to the impedance of the measurement circuit. Therefore, the source impedance of your sensor or transducer has a direct effect on the susceptibility of your measurement circuit to noise pickup. The higher the source impedance of your sensor or signal source, the larger the amount of capacitive coupling. The best defense against capacitive noise coupling is the shield that is grounded at the source end. Table 18.4 lists some common transducers and their impedance characteristic.
Pinpointing Your Noise Problems
If your system is resulting in noisy measurements, follow these steps to determine the source of the noise and how best to reduce it. The first step can also give you an idea of the noise performance of your DAQ board itself. The steps are
1. Short one of the analog input channels of the DAQ board to ground directly at the I/O connector of the board. Then, take a number of readings and plot the results. The amount of noise present is the amount of noise introduced by the PC and the DAQ board itself with a very low-impedance
input. Typical results are shown in Fig. 18.46. This plot shows a reading that jumps between 0.00 and 2.44 mV. Because this particular board uses a 12-b ADC and the amplifier was set to a gain of 1, this deviation corresponds to only 1 b, or LSB. In other words, the 12-b ADC toggled between binary values 0 and 1. If this test yields large amount of noise, your DAQ board is not operating properly, or another plug-in board in the PC may be radiating noise onto the DAQ board. Try removing other PC boards to see if the noise level decreases.
2. Attach your signal wires to the DAQ board. At your signal source or signal conditioning unit, ground or short the input leads. Acquire and plot a number of readings as in step 1. If the observed noise levels are roughly the same as those with the actual signal source instead of the short in place, the cabling and/or the environment in which the cabling is run is the culprit. You may need to try relocating your cabling farther from potential noise sources. If the noise source is not known, spectral analysis can help identify the source of the noise.
3. If the noise level in step 2 is less than with the actual signal source, replace the short with a resistor approximately equal to the output impedance of the signal source. This setup will show whether capacitive coupling in the cable due to high impedance is the problem. If the observed noise level is still less than with the actual signal source, then cabling and the environment can be dismissed as the problem. In this case, the culprit is either the signal source itself, or improper grounding configuration.
Noise Removal Strategies
After you have optimized your cabling and hardware setup, you may still need additional techniques to reduce noise that is unavoidable with proper cabling and grounding.
Signal Amplification
If you must pass very low-level signals through long signal leads, you will want to consider amplifying the signals near the source. An amplifying signal conditioner could boost the signal level before it is subject to the noise corruption of the environment. The same amount of noise will be radiated onto the signal, but will have a much smaller effect on the high-level signal.
Averaging
A very powerful technique for making low-noise measurements of static, or DC, signals is data averaging. For example, suppose you were monitoring the output of a thermocouple in an environment known to contain high amounts of 60-Hz power line noise. For each required temperature reading, therefore, you collect 100 readings over a time period of i /60 s, where i is some integer, and average the 100 data readings. Because the data were collected over an integer number of 60-Hz power cycles, the averaging of the data will average out any 60 Hz noise to zero. For 50-Hz power noise, collect the readings over a time period equal to i /50 s. This averaging has the same filtering effect as the integrating voltmeter.
Filtering
Of course, one method of removing noise from a electrical signal is with a hardware filter. There are a couple of options. First, you can use commercial signal conditioners that implement low-pass filters. Or, for simple filtering needs (moderate amounts of noise), you might consider building a simple RC filter on the input of your DAQ board. Figure 18.47 shows a single-pole RC filter that you could easily build and would attenuate signals with a frequency higher than the cutoff frequency Fc . Fc will be equal to
Grounding
Another very common source of problems in DAQ systems is grounding. In fact, noisy measurement problems are often due to improper grounding of the measurement circuit. You can avoid most grounding problems with the following steps before you configure your DAQ system:
1. Determine your signal source type—grounded or floating.
2. Identify and use the proper input measurement mode––nonreferenced (differential or nonreferenced single ended) or ground referenced (single ended).
3. If using a differential measurement system with a floating signal source, provide a ground reference for the signal.
Grounded and Floating Signal Sources
Signal sources can be grouped into two types, grounded or floating. A grounded source is one in which the voltage signal is referenced to the building system ground. Because they are connected to the building ground, they share a common ground with the DAQ board. The most common examples of a grounded source are devices that plug into the building ground, such as signal generators and power supplies.
A floating source is a source in which the voltage signal is not referred to an absolute reference, such as Earth or building ground. Some common examples of floating signal sources are batteries, battery-powered signal sources, thermocouples, transformers, isolation amplifiers, and any instrument that explicitly floats its output signal. Notice that neither terminal of the source is referred to the electrical outlet ground. Thus, each terminal is independent of Earth.
Types of Measurement Inputs
In general, with regards to ground-referencing of the inputs, there are three types of measurement systems. Following is a description of each type.
Differential Inputs
A differential, or nonreferenced, measurement system has neither of its inputs tied to a fixed reference such as Earth or building ground. DAQ boards with instrumentation amplifiers can be configured as differential measurement systems.
An ideal differential measurement system responds only to the potential difference between its two terminals, the (+) and (−) inputs. Any voltage measured with respect to the instrumentation amplifier ground present at both amplifier inputs is referred to as a common-mode voltage. The term common-mode voltage range measures the ability of a DAQ board in differential mode to reject the common-mode voltage signal.
Ground-Referenced Inputs
A grounded or ground-referenced measurement system is similar to a grounded source, in that the measurement is made with respect to ground. This is also referred to as a ground-referenced single-ended (GRSE) measurement system.
Nonreferenced Single-Ended Inputs
A variant of the single-ended measurement technique, known as nonreferenced single-ended (NRSE) measurement system, is often found in DAQ boards. In an NRSE measurement system, all measurements are still made with respect to a single-node analog sense, but the potential at this node can vary with respect to the measurement system ground.
Now that we have identified the different types of signal sources and measurement systems, we can discuss the proper measurement system for each type of signal source.
Measuring Grounded Signal Sources, Avoiding Loops
A grounded signal source is best measured with a differential or NRSE measurement system. With this configuration, the measured voltage Vm is the sum of the signal voltage Vs and the potential difference ΛVg that exists between the signal source ground and the measurement system ground. This potential difference is generally not a DC level; thus, the result is a noisy measurement system often showing power- line frequency (50 or 60 Hz) components in the readings. Ground-loop introduced noise may have both AC and DC components, thus introducing offset errors as well as noise in the measurements. The potential
difference between the two grounds causes a current to flow in the interconnection. This current is called ground-loop current.
The preferable input mode for a grounded signal is differential or NRSE mode. With either of these configurations, any potential difference between references of the source and the measuring device appears as common-mode voltage to the measurement system and is subtracted from the measured signal.
Measuring Floating Signals
You can use differential or single-ended inputs to measure a floating signal source. With a ground- referenced input, the DAQ board provides the one ground reference. When using differential inputs to measure signals that are not ground referenced, however, you must explicitly provide a ground reference to make accurate measurements. The differential input can be referenced by simple grounding of the (−) lead of the signal input. Alternatively, resistors can be connected from each signal lead to ground. This configuration maintains a balanced input and may be desirable for high-impedance signal sources. Many signal conditioning accessories include provisions for installing these resistors or direct connections to ground. Figure 18.48 summarizes the analog input connections.
Basic Signal Conditioning Functions
In general, signal conditioners exist to interface raw signals from transducers to a general-purpose measurement device, such as a plug-in DAQ board, while simultaneously boosting the quality and reliability of the measurement. To accomplish this goal, signal conditioners perform a number of functions, including the following.
Signal Amplification
Many transducers output very small voltages that can be difficult to measure accurately. For example, a J- type thermocouple signal varies only about 50 µV/◦C over most of its range. Most signal conditioners, there-fore, include amplifiers to boost the signal level to better match the input range of the analog-to-digital converter and improve resolution and sensitivity. Although many DAQ boards and I/O devices include onboard amplifiers for this reason, it may be necessary to locate an additional signal conditioner with amplification near the source of low-level signals, such as thermocouples, to increase their immunity to electrical noise from the environment. Otherwise, any small amount of noise picked up on lead wires can corrupt your data.
Filtering
Additionally, signal conditioners can include filters to reject unwanted noise within a certain frequency range. For example, most conditioners include low-pass filters to reduce high-frequency noise, such as the very common 60- or 50-Hz periodic noise from power systems or machinery. Some signal conditioners that are used for more dynamic measurements, such as vibration monitoring, include special antialiasing that feature programmable bandwidth (variable according to the sampling rate) and very sharp filter rolloff.
Isolation
One of the most common cause of measurement problems, noise, and damaged I/O equipment is improper grounding of the system. These nagging problems tend to disappear when isolated signal conditioners are introduced into the measurement system. Isolated conditioners pass the signal from its source to the mea- surement device without a galvanic or physical connection. Besides breaking ground loops, isolation blocks high-voltage surges and rejects high common-mode voltage, protecting expensive DAQ instrumentation. For example, suppose you are to monitor the temperature of an extrusion process. Although you are using thermocouples with output signals of 0 and 50 mV, the thermocouples are soldered to the extruder. The extruder machines are powered by a dedicated power system and your thermocouple leads are actually sitting at 50 V. Connecting the thermocouple leads directly to nonisolated DAQ board would probably damage the board. However, you can connect the thermocouple leads to an isolated signal, which rejects the common-mode voltage (50 V), safely passing the differential 50-mV differential signal on the DAQ board for measurement.
A common method for circuit isolation is using optical, capacitive, or transformer isolators. Capacitive and transformer isolators modulate the signal to convert it from a voltage to a frequency value. The frequency signal is then coupled across capacitors or a transformer, where it is then converted back to the proper voltage value. Optical isolators, commonly used for digital signals, use LEDs to convert the voltage on/off information into light signals to couple the signal across the isolation barrier.
Transducer Excitation and Interfacing
Many types of sensors and transducers have particular signal conditioning requirements. For example, thermocouples require cold-junction compensation for the thermoelectric voltages created where the thermocouple wires are connected to the data acquisition equipment. Resistive temperature devices (RTDs) require an accurate current excitation source to convert their small changes in electrical resistance into measurable changes in voltage. To avoid errors caused by the resistance in the lead wires, RTDs are often used in a 4-wire configuration. The 4-wire RTD measurement avoids lead resistance errors because two additional leads carry current to the RTD device, so that current does not flow in the sense, or measurement. Strain gauge transducers, on the other hand, are used in a Wheatstone bridge configuration with a constant voltage or current power source. The signal conditioning requirements for these and other common transducers are listed in Table 18.2.
Linearization
Most sensors exhibit an output that is nonlinear with respect to the measurand. Therefore, many signal conditioners include circuitry or onboard intelligence to linearize the transfer function of the sensor. This onboard linearization is designed to offload some of the processing requirements of the DAQ system. With the increased use of PCs, however, this need is diminished and you can easily perform this linearization function in software. Unlike hardware linearization, software linearization is a very flexible solution, making it possible for a single signal conditioning module to be easily adapted via software for a wide variety of sensors. In fact, you can even implement your own customized transducer linearization routines if necessary.
Variety of Signal Conditioning Architectures
Signal conditioning systems come in all different forms, ranging from single-channel I/O modules to multichannel chassis-based systems with sophisticated signal routing capabilities. In addition, several products commonly classified as signal conditioners include an onboard ADC with digital communications interface. Here, we will concentrate on nondigitizing conditioning systems used as a front-end for data acquisition and control systems, such as plug-in DAQ boards.
The typical single-channel I/O module is a fixed-function conditioner designed for a particular type of transducer and signal range. You cable the conditioned output signal, usually a voltage signal, directly to a DAQ board input channel. Some modules are DIN rail-mountable, whereas others install into a backplane that holds 8–16 modules. Newer versions of the single-channel modules feature programmability and added intelligence for scaling and diagnostics. Because the modules do not incorporate signal multiplexing, they are best suited for applications with fewer I/O channels.
Many DAQ board vendors supply specialized signal conditioning boards for use with their DAQ boards. These signal conditioning boards, usually designed for a particular transducer type, tend to provide a less flexible system. Meanwhile, other DAQ vendors incorporate signal conditioning directly on the PC plug-in DAQ board. Although this approach can provide a low-cost system for simpler applications, the benefits of locating your high-voltage isolation barrier inside the PC are questionable. In addition, you do not have the option of amplifying your low-level sensor signals before they enter the potentially noisy PC.
Signal Conditioners Offer I/O Expansion
A final class of signal conditioners incorporate signal multiplexing to significantly expand the I/O capabilities of the DAQ system. These systems consist of a chassis that houses a variety of signal conditioning modules. Instead of simply passing the conditioned signals to an outgoing connector, each module multiplexes the conditioned signals onto a single analog output channel. You can cable the multiplexed output directly to a DAQ board or pass it to the chassis backplane bus. This backplane bus routes the conditioned analog signals, as well as digital communications and timing control signals, among the modules. Such a system is expandable; adding channels is accomplished by plugging a new multiplexing module into the backplane bus. Because the bus also incorporates a digital communications path, you can also incorporate digital I/O and analog output modules into the same chassis.
The multiplexing architecture of these signal conditioning systems is especially well suited for applica- tions involving larger numbers of channels. For example, some systems can multiplex 3072 channels into a single PC plug-in DAQ board. More importantly, these multiplexing signal conditioners offer significant advantages in cost and physical space requirements. By switching multiple inputs into a single processing block, including amplification, filtering, isolation, and ADC, you can achieve a very low cost per channel not attainable with single-channel modules. Even though single-channel modules are being developed that are smaller and slimmer, systems with a multiplexing architecture will always be able to pack many more I/O channels into a given physical space.
Defining Terms
Alias: A false lower frequency component that appears in sampled data acquired at too low a sampling rate.
Conversion time: The time required, in an analog input or output system, from the moment a channel is interrogated (such as with a read instruction) to the moment that accurate data are available.
Data acquisition (DAQ): (1) Collecting and measuring electrical signals from sensors, transducers, and test probes or fixtures and inputting them to a computer for processing. (2) Collecting and measuring the same kinds of electrical signals with A/D and/or DIO boards plugged into a PC, and possibly generating control signals with D/A and/or DIO boards in the same PC.
Differential nonlinearity (DNL): A measure in LSB of the worst-case deviation of code widths from their ideal value of 1 LSB.
Integral nonlinearity (INL): A measure in LSB of the worst-case deviation from the ideal A/D or D/A transfer characteristic of the analog I/O circuitry.
Nyquist sampling theorem: A law of sampling theory stating that if a continuous bandwidth-limited signal contains no frequency components higher than half the frequency at which it is sampled, then the original signal can be recovered without distortion.
Relative accuracy: A measure in LSB of the accuracy of an ADC. It includes all nonlinearity and quantization errors. It does not include offset and gain errors of the circuitry feeding the ADC.
References
House, R. 1993. Understanding important DA specifications. Sensors 10(6):11–16.
House, R. 1994. Understanding inaccuracies due to settling time, linearity, and noise. National Instruments European User Symposium Proceedings, Nov. 10–11:17–26.
McConnell, E. 1994. PC-based data acquisition users face numerous challenges. ECN 38(8):11–12.
McConnell, E. 1995. Choosing a data-acquisition method. Electronic Design 43(13):147–156.
Potter, D. and Razdan, A. 1994. Fundamentals of PC-based data acquisition. Sensors 11(2).
Potter, D. 1994. Sensor to PC—Avoiding some common pitfalls. Sensors Expo Proceedings, Sept. 20:12–20.
Potter, D. 1995. Signal conditioners expand DAQ system capabilities. I&CS 68(8).
Further Information
Johnson, G.W. 1994. LabVIEW Graphical Programming. McGraw-Hill, New York.
McConnell, E. 1994. New achievements in counter/timer data acquisition technology. MessComp 1994 Proceedings, Sept. 13–15.
McConnell, E. 1995. Equivalent time sampling extends DA performance. Sensors 12(6).