Computer interfacing to laboratory instruments: How to minimize noise

Suggestions for replacing mechanical, analog data recorders with computer-based data-acquisition systems, ...
0 downloads 0 Views 2MB Size
Computer Interfacing to Laboratory Instruments How to Minimize Noise Interferences Mary Karpinski Interactive Microware, Inc., P. 0. Box 139, State College, PA 18804 relatively slowly, with the sampling time Many laboratories are now discovering window lone enoueb to intemste out the the power, versatility, andcost effectiveness effects of hiih frequency norse'.'~ithrapidly of microcomputers. Microcomputers have changrng signals, faster sampling rates are been very successfully applied to the tradirequired and mure noise may be picked up tional laboratory tasks of data d e c t i o n , in your signal. report generation, data management, data To find solutions for minimizing the efanalysis, and graphics. Performing these fects of noise, it is best to start with its defitasks with this new tool does, however, renition. The Dictionary of Electronics (3) quire some rethinking of our methods. Redefines electrical noise &"unwanted elecplacing a mechanical chart or multipoint retricnl aienals. oresent in the inout to a recorder with a eomputer-based data-acquisiceiver or amplifier, or generated within the t i o n system may lead t o increased apparatus itselr'. Noise falls into three catesusceptibility to noise, especially with very gories: intrinsic, transmitted, and interferlow-level signals. ence. Two of these three types of noiseMicrocomputer A/D converter boards retransmitted and intrinsic-are inherent in place analog recorders. These boards, residlaboratory instruments. Transmitted noise ing in the computer, read analog (continuis received with the original input signal and ously variable) electronic signals and conis difficult ta distimisb from it. Intrinsic vert them into digital (on or of0 numbers (or component) noise originates within the that the computer can use. Some scientists devices that make up the circuit. The third who replace analog recorders with A D kind of noise, interference noise, is environboards may see "noise" coming from their mental in origin and is pickedup in a variety previously "quiet" signal. This is because of ways from outside the circuit. Possible strip-chart recorders are leas suceptible to sources of interference noise are electric monoise problems than are A/D converters. tors, radios, electronic telephones, fluoresStrip-ehart recorders have mechanical and cent light fixtures, blowers, and computers electronic parts that dampen or "smooth" themselves (4). noise due to a time delay factor involved in Solutions to transmitted and intrinsic the mechanism that moves the recorder pen. noise are best left to design and electrical In contrast, A D converters work on a much engineers. Interference noise is due to envifaster time scale and lack any mechanical ronmental conditions which the end user damping (I).The rapid response of the eleccan minimize. This article details how to tronic circuitry on A D converters allows for connect . nronerlv . - a laboratow instrument ta high speed data collection. However, this an ADconverter and gives practicalsugges. speed allows detection of high-frequency tiona on how to obtain an analog signal free electrical noise that is "invisible" to chart of interference noise. recorders. The rate of sampling with an A D converter determines the detection bandMstch the Slgnal Levels for Best width. In other words, the amount of noise Resolution detected in a signal depends upon how fast you sample the signal (2). If the signal voltTable 1 summarizes seven points to conage changes slowly, sampling can be done sider before connectine-. "our instrument to your computer. Manufacturers of laboratoryequipment label their instrumentsdifferMary Kamimkl received her BS In ently For example, one manufacturer of chemistry from the University of Wyoming dvomatograpby instruments labels their (1978). where ahe continued her graduate three analog outputs as strip-chart recorder, studies in chemical inrtrumentatlon and integrator, and computer. Intuitively, you analysis. She has wwked fw the W E in would be led to use the analog output laq~sntitativeand qualitative analysis of beled "computer". Without further reading shales and their oils. Omer laboratory exand investigation on your part, however, you periences include waste-water researdl might be supplying 10 V to an A D convertand analysis, pilot-plant water purlflcation er that allows a maximum input voltage of 5 studies, and analytical services faa variV. Damage to your equipment could result. ety 01 samples. Currently, she is utilizing Therefore, it is very important that you beher talents In the technical aervlce departcome familiar with all pertinent labels and ment of Interactive Miaoware helping sciterminology used by the manufacturers beentists m use mlcracomputers in the labfore any connections are made. This applies oratcry for data acquisition and instrument to both the instrument and the A D conControl. verter. ~~

~

.~~~~~ ~

A100

Journal of Chemical Education

Table 1.

Check Llst lor Flndlng the Best Analog Slgnal

1. Read your in~trumentmanual. 2. inspect your instrument's connection Points. 3. Read yaw AID convener manual. 4. Inspect your A I D converter's connection

poims. 5. Determine me best voltage levels and connec-

tion points m me. Whenever possible, choose differential input over single-ended input. 7. Verify your insrmment's full-scale output with a 6.

""ltmata.~

As mentioned, your instrument may have mare than one analog output, each at different voltage levels. Your decision as to which one to use will be based upon the input voltage range selected for the A D converter. This voltage setting may be jumper selectable. A jumper or shunt is a connector between two circuits. A good rule of thumb is to chooae the analog voltage setting on your instrument that will produce the closest match to the full-scale voltage jumper on your A D converter. This will allow the greatest accuracy and the fewest problems witbnoise. For example, your A D converter may allow choices of i0.5, i1,+4, or i 5 V full scale, while your instrument gives you a choice of 10 mV, 1V, or 10 V. If you set the A D converter on the i5 V range and the instrument output ranges from 0 to 1V, you would use only one-tenth ofthe A D convertor's full-scale range. In this example, the best choice would be to use the 1V range for both your A D converter and your instrument. This allows the maximum possible signal resolution with the given A/D converter. Another point to keep in mind when choosing the proper voltage range from your instrument is to avoid selecting a low-level signal that needs to be amplified before conversion. When you amplify any signal, you also amplify any noise that is picked up along the path that the cable travels. Signal transmitters that can be located near your sensor, detector, or instrument are available from many sources. These transmitters amplify the signal near the source, before interference noise is induced and before the noise is amplified. Some instruments provide both singleended and differential output. Single-ended Continued on page A102

output uses one wire t o carry the signal, and the measurement is made with respect to the chassis ground of the instrument. This aooroach is often troublesome due t o voltage dlfferenrea hetwem ground ot the experment and ground ofthe equlpmcnt Dlfferential output is a two-wire system in which both wires carry a signal that "floats" above chassis ground. Not only does this eliminate the groundingproblem, but i t also "balances" the signal that is received by the A i D converter. Both wires are suhiect t o the same enwonmental cmdltrons ( 5 ) .If your Am board has differential inputs, the A i D cuv,vertrr will inearwe the difference in potential between theae two wircsas the input vultogs, and reject the ground potential difference between the signal sourceand thc A D converter board. ~ n voltage y that is common t o both signal leads will he cancelled out. This is termed common mode rejection (6). While differential input is the preferred way of obtaining the analog signal, it is not available on some A I D converters. When you have a choice of wiring types with yaur instrument, it is best to use differential. The last step prior to making the connections between your instrument and the computer is toverify your full-scale output. This may seem trivial and a waste of time. However, it will save ci great deal of time and frustration later on. Documentation and laheling may he incorrect, or your equipment may he faulty. You never know until it is verified. A voltmeter connected t o ground (or low) andsignal (or high) will measure the actual analoe outnut. Force the instrument t o output itsbighist voltage, and verify that it is within the range of your A I D converter. Now that you have properly examined the signal Levels of yaur instrument and A D converter, you can make the physical connection between computer and instrument. Interference noise, being environmental in origin, can be greatly enhanced or diminished by how and where these connections are made.

..

Connections that Mlnimize interference Nolse A number of suggestions for reducing noise in analog signals are listed in Table 2. Manvmethods are used, end the best method in-one case may he ineffective in the next. (It is far this reason that many electrical engineers have said that solving noise interference is "black magic".) We shallnaw discuss in greater detail each listed method. First, connect the computer and instrument to the same Hz outlet to help prevent common mode noise and alternating current (60 cycle) noise problems. This provides a common ground for both pieces of equipment. In some buildings, especially older ones, outlets may he few and far between. To help extend an outlet, power strips and/ or extension cords are used. If you use one of these, make sure that you do not overload the capacity of the electrical wiring in that circuit. To insure the same ground potential, use the same outlet. Even though your outlets may be on the same circuit hreaker, they do not necessarily have the same ground potential. The ground depends on the continuity of the bond wire or ground wire (the third opening in a wall outlet), A102

Journal of Chemical Education

Steps to Mlnlmlze Nolse in Analog Slgnal

Table 2.

inArumentation

1. Connect computer and instrument to the Jam8 BC wall outlet. ill one of U?e .oluas. has onlv 2

-

2. 3. 4.

5.

8.

prongs, try reversing it.) Use shielded cable whenever possible. Ground only one end of the shield. Keep signal cables as short as possible. Keep signal wires separate from o w r cabling. DO not tie cables together. Avoid leading 6isnaI wires over or near power wirer. For a differential input wiUl sinusoidal noise, try using a 10-Kfl resistor (or wire) from analog ground to signal gmund (or low) signal lead. Filtering may also be effective. On a differentlai input, try a 20-Kfl series resistor with a 0.1-1pF capacitw connected to ground.

while the line and neutral (almost ground) may be carelessly interchanged a t any outlet. The wiring from various outlets may travel in opposite directions before meeting a t the breaker, and therefore may be suhjected to different environments. If it is physically impossible t o use the same outlet, there is another way to ensure that you have the same eround ~otential:connect a wire f n m the chassis uf yoLr instrument to the case of yvur computer's power supply. A uurd of rautiun: it ir best to have the romputer and instrument residing as near each other as possible. Using a wire to establish a common ground when the equipment is separated by more than 6 ft will not he effeetive. If either piece of equipment has anonpolarized (two-prong) power plug, i t sometimes helps t o reverse its orientation in the outlet. Second, use shielded cahle whenever possible. The type, length, environment, and grounding of the cable all play an important role in noise reduction. The choice of cahle type is simplified when the manufacturer of the computer andlor instrument includes the cables with your purchase. You should also check your manuals for specific recommendations if cables were not included. A shielded, "twisted pair" cable is usually best. A braided wire shield is sometimes satisfactory, hut a lapped foil shield (e.g., Belden #8641) is better, since it allows only one-tenth as much capacitance leakage to eround Der foot. As a eeneral rule. vou should gnund theshield of any signal cable at only o m end, prrferaldy at the end nith the greatest noise interference (normally the instrument end). This prevents any ground loops between the instrument and the computer (7). The third and fourth points may a t first seem trivial. Remember that theeable sends the signal from your instrument to the computer. If the cable is lying over a fan motor or if it is traveling 150 ft, the quality of the analog signal will he affected. Keep the cable as short as possible, and separate the cahle from other cables and equipment in order t o keep the signal free of noise. Fifth, if you have a sinusoidal noise pattern in your differential analog signal (such as Hz-induced, 60-cycle noise), you may find some relief by installing a wire between analog ground and signal ground (or low). This can be attached a t either computer or instrument end. If this wire does not reduce the noise, try substituting a 10-KQ resistor for the wire. The sixth and Inat iuggestim has to do withclrctrical rilrerrngof thcuutput w l t n g ~ ~

~~~~~

~

from your instrument. A low pass filter can reduce noise very effectively, a t the expense of lengthening the system response time. For example, a 20-KQ resistor in series with a 0.5-pF bipolar capacitor yields a time constant (7') of 10 ms (20E3 * 0.5E - 6). The cutoff frequency for such a filter is 1 I T = 100 Hz. Unless you are sampling a t a rate greater than 20 samplesls, this should not interfere with the accuracy of the A I D converter. A low-oass filter should use a 0.1 to 1.0 uF bioola; caoacitor (Mvlar. . . nolvester. . . or polystyrene, hut not electrolgtir or tantalum, to allow for both positive nnd negative voltages. The figure details a low-pass filter circuit. The filter is connected t o AD+ and/or AD-. The best connection will need to be determined for your particular system. Start with the filter on AD-, then AD+, and finally both. For those interested, Vassos and Lopez (8) have illustrated an experiment on signal filtering. Further technical information on this subject (and noise, in general) may be found in references 9-16.

. ~.

Conclusion Interference noise ia a n individual problem that varies from laboratory to labaratory. There is no "cookbook" formula to minimize noise. This article outlines a number of suggestions for reducing noise. I t is best to follow these steps in order, since they are Listed in the order of increasing effort or expense, with preventive measures coming first. I t is bettertoprevent the problem than to try to correct it. If you s t a t with the strongest analog signal, the shortest shielded cable, and make sure that all of your equipment uses a common ground, a good portion of your noise problems will he eliminated. Literature Cited 1. Liscourki,J.G. ComputsrAppl.Lob. i984,2(3).153. 2. Horowitz, P.; Hill. W. The Art olElerfronica: Cambridge University: Cambridge, 19Q p 290. 3. carter. H. Dictionary a/ Elacfronics: Nnunea: England, 1972; p203. 4. Rich. A. Analog Dioiogu~1983.16l3). 72. 6. Ref I, p 159. 6. ~ e f 2 , 80. 7. Vogt. R. ADALAB-PCHordwnre lor the IBM-PC;Interactive Microware: State College, PA, 1935: pp5-8. 8. Varsos. 9. H.; Lopez, E. J. Chem Educ. 1985.62,542. 9. Morrison.R. Oravoding and Shielding Techniquas in Instrummlafion: Wiley: New York,1977. 10. Sheingold, D. H., Ed. Analog-Digital Conuersion Hondbook: PrenLice-Hall: Englevood Cliffs. NJ, 1986;pp 55&553. 11. Dessey,R.,Ed.Anol. Chem. 19S6,58,793A. 12. Lua, K. T. Intelligent Ihrtruments and Compulera

p

1986.4(1),37.

13. Rich, A. Analog Didague 1983.17(1). 50. 14. Ott, H. W. NoisaRadueiion Technique in El~ctronic S y L r m : Wiley: New Yark, 1975. IS. Brokw. A. P. Amlog Diologua 1977,11(21,10. 16. Br0ksw.A. P. Analog Dsuices Dolo-AequisilionDotobook 1982; Prentice-Hall: New York. 1982:Vol. 1. pp 21~13toZl-20.

Possible connections using an RC filter