Sound Cards Work in Some Data-Acquisition Applications We compared a generic sound card to an industrial data-acquisition card to find out when you can digitize signals with hardware you already have. By Brad Thompson, Contributing Technical Editor |
|
Looking
for more information about the main products mentioned in this article? See our list of manufacturers. Looking for more information about Web sites that cover
sound-card technology? |
If you use or plan to use
your PC for data acquisition, dont overlook the data-acquisition card you may
already ownyour PCs sound card. To find out what a sound card can do, I
compared a vintage 16-bit sound card, Creative Labs Sound Blaster AWE-32, with a
conventional 16-bit data- acquisition cardNational Instruments PCI MIO-16XE-10. For a reality check, I also briefly looked at two other sound cards. If you measure or analyze one or two periodic audio-frequency signals that dont include a DC component, a sound card and its supporting softwaresome of which is freewaremay do the job at a fraction of the cost of a full-featured data-acquisition card. If you need to process multiple channels, analyze a waveform containing a DC component, or demand infrequent calibration, youll need a conventional data-acquisition card. Virtually every PC built in the last few years contains a sound card or sound functions on its motherboard (see Whats in a Sound Card?). Sound cards use a delta-sigma ADC that typically costs less than the successive-approximation ADC used in data-acquisition cards. Mass production further reduces sound-card prices. You can purchase entry-level sound cards for $20 or less, or you can choose feature-laden professional models for hundreds of dollars. At its introduction in mid-1995, the Creative Labs AWE-32 listed for $399 and sold at a street price of approximately $169, or about what a higher-performance version from the same vendor costs today. In comparison, the National Instruments package includes a PCI-bus MIO-16XE-10 data-acquisition card ($1995) and an SCB-68 multipoint I/O connector block ($295). Table 1 compares some of the features of the sound card and data-acquisition card. To explore relative performance, I used the MIO-16 and the AWE-32 to measure several signals: 1-kHz sine wave outputs from a Hewlett-Packard 200CD audio oscillator and a Global System 2001 function generator, and a repetitive pulse train from a Datapulse Model 110B pulse generator. I installed the MIO-16 in a PCI-bus slot adjacent to the AWE-32 card. I ran my tests on a 233-MHz PC with 128 Mbytes of memory. Installation of the hardware, drivers, and NIs VirtualBench measurement software proceeded without a hitch, and I displayed my first waveforms an hour after the delivery truck departed. The Hardware The AWE-32 sound card has two sets of two-channel (stereophonic) analog line and microphone inputs, both AC-coupled. Professional quality sound cards feature more input channels, higher resolution, and DC input response at prices approaching those of typical multifunction data-acquisition cards such as the MIO-16. These sound cards, however, may require proprietary software. National Instruments SCB-68 screw-terminal connection panel offers ready-to-wire convenience, while a newly purchased sound card may include only a pair of general-purpose audio cablesor none at all. Youll need to purchase or build external I/O wiring or connector panels to put your sound card to work. Designed to be small and flexible, commercially available audio cables fitted with plastic miniature 1/8-inch stereo plugs may use served (spiral-wire) shielding or no shielding at all, making the cables vulnerable to noise pickup. For better shielding, build your own cables using RG-174 miniature coaxial cable and metal-shell 1/8-in. plugs. While designers of data-acquisition cards typically include overvoltage protection (e.g., 615 V for an unpowered MIO-16), sound cards are probably more vulnerable to destructive overloads. Older sound cards may include permanently enabled automatic gain control (AGC), which can produce misleading measurements because it compresses signal peaks. Always use an oscilloscope to examine an input signal before connecting it to any data-acquisition device. A sound cards signal return connects to AC power ground through the PCs chassis. Therefore, you cant perform differential measurements with a sound card. Plus, the signal return path opens the way for ground-loop interference. If a signal includes no unbalanced DC component, you can use a 1:1 turns ratio audio transformer for signal isolation or for differential to single-ended input conversion. In contrast, most data-acquisition cards offer true differential inputs. The Software To exercise the AWE-32 sound card, I explored several commercial and shareware packages and selected SpectraPro 3.32, a versatile spectral-analysis package from Sound Technology. You order SpectraPro as a combination of options starting at $595, a flexible and economical approach that lets you purchase only the functions you require. SpectraPro also includes convenient canned signal-processing routines for calculating signal-to-noise ratio, frequency response, and more. (You can find information about this and other sound-card software products on the Internet. The Resource List in the online version of this article contains links to such information: www.tmworld.com/articles/2000/03_sound_reference.htm). In contrast, National Instruments VirtualBench instrument-control and data-display software suite offers an entire toolkit for $495. You select from nine general-purpose instruments, including a dynamic signal analyzer, an oscilloscope, and an arbitrary waveform generator. Each instrument includes its own online help file. The Test Setup Select a sampling rate that meets or exceeds the Nyquist rate for the signal youre processing. Basic sound cards offer 11.025 kHz (telephone quality), 22.05 kHz (music quality), and 44.1 kHz (CD quality) sampling rates. While some sound cards sample both inputs only at 22.05 kHz or lower, others can simultaneously sample both inputs at speeds up to 48 kHz. (SpectraPro software fixes its sampling rate at twice the selected input-frequency span.) Before you can make measurements with a sound card, you need to calibrate it. A data-acquisition card has provisions for calibration, but the cost-sensitive sound-card market precludes built-in calibration. My NI MIO-16 card arrived in calibrated condition. Before I took measurements, I manually calibrated the AWE-32 sound card. Using a signal generator and a Tektronix TX-3, a 3-3/4-digit true-rms DMM, I applied a 1 Vrms input signal to the sound card and fed the measured value to the software. Then, I set the software to read 1 Vrms, thereby calibrating the sound card. You should perform a calibration at the beginning of each measurement session. Before beginning my tests, I compared the cards noise floors. The AWE-32s noise spectrum (displayed with SpectraPro in peak-detection and noise-floor modes) didnt appear significantly different (105 dBV) with the cards line inputs either opened or shorted through an external mini-phone plug. (Remember that moving a sound card to another PC-bus slot may significantly affect its noise level). VirtualBench displayed a noise floor of approximately 108 dBV (1/2 LSB better than the AWE-32) for the MIO-16 (with input cable short-circuited; an MIO-16s open input saturates quickly because of normal leakage currents).
The Tests Both cards agree on the sine waves amplitude and distortion. SpectraPro reports a slightly higher THD (0.14446%) to Virtual Benchs 0.1097%. With VirtualBench, I used the first five harmonics for the latter reading. (According to its users notes, SpectraPro computes THD using the entire spectrum and thus includes more harmonics.) Selecting additional harmonics raised VirtualBenchs reported THD to 0.1283%. Its unlikely that the rightmost digits of either measurement offer much significance. Now that I had confidence in the AWE-32s capability to measure a sine wave, I tried measuring a sine wave of lesser quality. Figure 3 shows SpectraPros plot of the Global System 2001 function generators spectrally impure sine wave output as captured by the AWE-32. Labels indicate a 60-Hz hum component, with the 1-kHz fundamental flanked by a phalanx of higher-order harmonics. Next, I applied a variable-duty-cycle pulse trainfrom the Datapulse Model 110B pulse generatorto the AWE-32 and its software. The test produced expected and unexpected results. In SpectraPros oscilloscope display, the pulse trains waveform shifts with respect to the zero-volt reference line as its duty cycle varies. The AWE-32s AC-coupled input blocks the pulse trains DC component, producing equal waveform areas above and below the zero-volt reference line. So, dont measure signals with DC components with your sound card unless you need to capture the AC components only. While the MIO-16 correctly displays a pulsed input, I noted with surprise that the AWE-32 inverts pulsesa misleading measurement if youre attempting to use the card as an oscilloscope (see Fig. 4 and Fig. 5). As a reality check, I substituted two other sound cardsa Creative Labs SB16 and an AzTech 1023 (sold as a Hi-Val Wave 96)for the AWE-32. Neither card inverted the pulses. (Creative Labs technical support department didnt respond to my requests for circuit details.) What if you need a more complex measurement system than you can get with a single sound card? Suppose you need to produce an excitation signal and perform measurements. A sound card certainly has a DAC to produce audio outputs. I wanted to know if I could both produce a signal and make a measurement with a sound card. Unfortunately, you cant, at least not with a single sound card, because it cant simultaneously measure an input and produce an output. If you need a signal source, youll need either another sound card or a card that can produce an audio signal. Because I had the MIO-16 in my PC, I used it as a source together with the AWE-32 to measure an audio transformers frequency response. This test requires a sine-wave signal and two ADC channels. I configured VirtualBenchs arbitrary waveform generator and the MIO-16s analog output to drive a DUT with a swept-frequency sine wave. Then, I could use the AWE-32s right and left channels to sample the transformers input and output voltages, respectively. SpectraPro computes and displays the ratio of the inputs, and generates amplitude- and phase-vs.-frequency plots. Recommendations A sound card and third-party data-analysis software, however, can provide an inexpensive alternative thats good for relative measurement and complex display of audio-frequency periodic signals and their spectra. My test showed that a sound cards THD-measurement capabilities compare to those of the data-acquisition card. Use your PCs sound card with caution, and only after careful calibration and common-sense analysis of what the software displays. Its easy to get lost in a sound cards almost-limitless sonic possibilities. For companies already using sound cards and PCs to measure machinery-bearing noise or to record and analyze vibration patterns and other sonic signatures, the savings are sweet music indeed. T&MW You can contact Brad Thompson at tmw@cahners.com. |
|||||||||
What's in a Sound Card? A typical sound cards external I/O connectors consist of 1/8-in., two-circuit miniature jacks commonly used for stereo headphone connections. Some cards include a DB-15 socket for attachment of an optional joystick or other game-related positioning control. All inputs are AC-coupled, with one pair of inputs including preamplifiers for boosting low-level signals from a stereo microphone that provides a signal of at least 10 mV. Another pair feeds line-level signals directly into the cards analog multiplexer/mixer, with a typical 500-mVrms to 2-Vrms maximum level, a 10-kV minimum input impedance, and a nominal 20-Hz to 20-kHz frequency response. Specifications may vary widely among vendors. After selection and level-shifting in the mixer/multiplexer, an input undergoes digitization in a delta-sigma ADC thats part of the sound cards codec chip. Once digitized, data gets stored in system RAM or as a file on the host PCs hard-disk drive. On the output side, another pair of capacitively coupled 1/8-inch jacks provide line-level and amplified audio outputs suitable for driving efficient loudspeakers. Sound cards provide only a modest amount of audio power (2 W to 3 W) into an 8-V impedance with total-harmonic distortion levels of 0.5% or less. You create signals with a sound cards FM synthesizer by combining harmonically related sine waves, or by selecting data from a wave table that contains digitized samples from various musical instruments. A third option uses a plug-on daughter boarda Musical Instrument Digital (MIDI) synthesizerto produce a wider range of sounds. Another connector feeds audio from a PCs CD-ROM drive directly into the analog mixer, enabling use of audio signals stored on disk. Brad Thompson |
|||||||||
For
More Information For information about the main products used in the test, contact the manufacturers: Creative Labs National Instruments Sound Technology For more information about Web sites that cover sound-card technology, consult the Resources list: www.tmworld.com/articles/2000/03_sound_reference.htm. |
|||||||||
Copyright 2000, Test & Measurement World. Published by Cahners Business Information, Newton, MA. |
Copyright © 2001 Cahners Business Information, a division of Reed Elsevier. All rights reserved. Privacy Policy Trademark Information & Terms of Use Test &
Measurement World, 275 Washington Street, Newton, MA 02458-1630, USA |