Test & Measurement World, March 2000

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?
Consult our resources list.

If you use or plan to use your PC for data acquisition, don’t overlook the data-acquisition card you may already own—your PC’s 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 card—National 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 don’t include a DC component, a sound card and its supporting software—some of which is freeware—may 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, you’ll 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 “What’s 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.

03F3Table.gif (19724 bytes)

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 NI’s VirtualBench measurement software proceeded without a hitch, and I displayed my first waveforms an hour after the delivery truck departed.

The Hardware
The MIO-16 data-acquisition card includes a successive-approximation ADC, a DC-coupled programmable-gain amplifier, and an input multiplexer. The mux provides connection of up to eight differential or 16 single-ended inputs. To use the single-ended mode, you must tie inverting inputs to analog ground. Otherwise, you get erratic readings.

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 cables—or none at all. You’ll 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 card’s signal return connects to AC power ground through the PC’s chassis. Therefore, you can’t 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 put a sound card to work, you can choose from a range of sound-card
oscilloscope and spectrum-analyzer emulation software at prices ranging from free (or bundled with the hardware) to thousands of dollars.

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
If you use a sound card, I suggest you use its line inputs and outputs as opposed to its microphone inputs. You’ll avoid noise introduced by the easily overloaded microphone preamplifier and distortion imposed by the audio power amplifier.

Select a sampling rate that meets or exceeds the Nyquist rate for the signal you’re 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-32’s noise spectrum (displayed with SpectraPro in peak-detection and noise-floor modes) didn’t appear significantly different (–105 dBV) with the card’s 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-16’s open input saturates quickly because of normal leakage currents).

TMW00_03F3fig1.gif (31848 bytes)
Figure 1. VirtualBench can display a signal captured by a data-acquisition card and perform an FFT on the data.
TMW00_03F3fig2.gif (36462 bytes)
Figure 2. SpetraPro captures data from a sound card’s ADC and plots the signal’s frequency spectrum with an FFT.
TMW00_03F3fig3.gif (29827 bytes)

Figure 3.
A different signal generator than the one used in Figures 1 and 2 has harmonics in its sine wave output.
TMW00_03F3fig4.gif (33849 bytes)
Figure 4. The data-acquisition card properly captures a repetitive pulse with a short duty cycle.
TMW00_03F3fig5.gif (18494 bytes)
Figure 5. My PC’s sound card inverted the pulses from the pulse generator.

The Tests
Finally, it was time to start the main part of my tests. I measured the HP 200CD audio oscillator’s relatively pure sine-wave output with both cards. Virtual Bench’s captured sine wave and its FFT appear in Figure 1. Figure 2 contains SpectraPro’s sine wave and FFT version of the same HP 200CD signal. You can select from among several built-in utility routines that display peak frequency, peak amplitude, total harmonic distortion (THD), and more in floating windows.

Both cards agree on the sine wave’s amplitude and distortion. SpectraPro reports a slightly higher THD (0.14446%) to Virtual Bench’s 0.1097%. With VirtualBench, I used the first five harmonics for the latter reading. (According to its user’s notes, SpectraPro computes THD using the entire spectrum and thus includes more harmonics.) Selecting additional harmonics raised VirtualBench’s reported THD to 0.1283%. It’s unlikely that the rightmost digits of either measurement offer much significance.

Now that I had confidence in the AWE-32’s capability to measure a sine wave, I tried measuring a sine wave of lesser quality. Figure 3 shows SpectraPro’s plot of the Global System 2001 function generator’s 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 train—from the Datapulse Model 110B pulse generator—to the AWE-32 and its software. The test produced expected and unexpected results. In SpectraPro’s oscilloscope display, the pulse train’s waveform shifts with respect to the zero-volt reference line as its duty cycle varies. The AWE-32’s AC-coupled input blocks the pulse train’s DC component, producing equal waveform areas above and below the zero-volt reference line. So, don’t 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 pulses—a misleading measurement if you’re attempting to use the card as an oscilloscope (see Fig. 4 and Fig. 5).

As a reality check, I substituted two other sound cards—a 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 didn’t 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 can’t, at least not with a single sound card, because it can’t simultaneously measure an input and produce an output. If you need a signal source, you’ll 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 transformer’s frequency response. This test requires a sine-wave signal and two ADC channels. I configured VirtualBench’s arbitrary waveform generator and the MIO-16’s analog output to drive a DUT with a swept-frequency sine wave. Then, I could use the AWE-32’s right and left channels to sample the transformer’s input and output voltages, respectively. SpectraPro computes and displays the ratio of the inputs, and generates amplitude- and phase-vs.-frequency plots.

Recommendations
If your signal-analysis problems require high accuracy, long-term calibration, flexible configuration, and high-performance measurements, then a conventional data-acquisition card and software provides the better all-around choice.

A sound card and third-party data-analysis software, however, can provide an inexpensive alternative that’s good for relative measurement and complex display of audio-frequency periodic signals and their spectra. My test showed that a sound card’s THD-measurement capabilities compare to those of the data-acquisition card.

Use your PC’s sound card with caution, and only after careful calibration and common-sense analysis of what the software displays. It’s easy to “get lost” in a sound card’s 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 card’s 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 card’s 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 that’s part of the sound card’s codec chip. Once digitized, data gets stored in system RAM or as a file on the host PC’s 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 card’s 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 board—a Musical Instrument Digital (MIDI) synthesizer—to produce a wider range of sounds.
  Another connector feeds audio from a PC’s 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
Milpitas, CA
www.sblive.com

National Instruments
Austin, TX
www.ni.com

Sound Technology
Campbell, CA
www.soundtechnology.com

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
Tel: 617-558-4671    Fax: 617-558-4470    E-mail & Webmaster: tmw@cahners.com
 Web Site Developer: WebGrow