Using a Soundcard For Test &
Measurements
This document is intended as a suppliment to the Help files for
various DazyWeb Laboratories software products such as the DS-2002
oscilloscope, SA-3002 spectrum analyzer, TMS-1 test and measurement system and
the SG-2102a signal generator applications. All rely on the pc soundcard as the
hardware platform to obtain audio measurement data or produce test signals. The
soundcard for a PC has been designed as a consumer-grade media product, not
unlike your Hi-Fi receiver or VCR. The inputs and outputs are minimally
protected and are intended to hook to PC speakers, a microphone and possibly a
TV capture card. To use them for general test purposes requires care and some
knowledge of measurement techniques.
The soundcard has, at a minimum, a stereo line input and a
monophonic microphone input for recording and a stereo line output sufficient
to drive amplified loudspeakers or headphones directly. Many newer soundcard
also have multichannel outputs that rely on proprietary decoding techniques
such as Dolby Digital 5.1 from a DVD player to fully utilize those extra
outputs. The microphone input typically has poorer signal to noise and
frequency response than the line inputs so will not be discussed in this text,
nor will extra multichannel outputs. If your purpose is to do microphone-based
frequency response measurements, then buy the best mic you can and consider one
with a built in preamp such that you can still use the line inputs. If your
soundcard has digital input or output jacks, they may be utilized directly if
connected to a preamp or processor that also has digital input and output
jacks. The soundcard will convert to and from the SPDIF digital standard
interface and provides all the buffering needed in that case.
In figure 1 below is a typical hookup for measuring a small
signal product such as a mixer panel or a Hi-Fi preamplifier. If the device
uses vacuum tubes then treat it as a power amplifier as output voltages may be
in the tens of volts. Most mixers and preamps are capable of up to 7V rms out
but it is limited by a 1000-2000 ohm resistor in those devices and will not
hurt your soundcard even though the level technically exceeds the 2-4V maximum
input of the soundcard.
Just monitor the incoming
waveform from the preamplifier using one of the apps with a scope built in
(TMS-1, DS-2002, SA-3002) and find the point where flat-topping occurs, no
matter what the recording input level is set to on your mixer panel on the pc.
That point then is the maximum you can drive the soundcard directly without an
attenuator. Note the settings of the preamp (or mixer) gain controls and the pc
mixer panel settings, and any settings in the app being used that provide the
drive signals.
FIGURE 1.

For measuring power amplifier at the speaker terminals or vacuum
tube preamplifiers or equipment you are unsure of the level of it's output, see
Figure 2 below. The Soundcard Isolation Circuit is detailed in Figure 3. The
Souncard Isolation circuit only shows 1 of 2 channels and you will need to
build a version for each input channel. There is a company in Australia called
JAYCAR Electronics that makes a kit with all parts that performs the same
function, although I have not gotten one and verified it's operation. Here is
the link:
http://www1.jaycar.com.au/index.asp
The model number is the
KA1811 and it cost about $26.00 US at the time of this writing.
Figure 2.

Figure 3.

For general purpose probing done cheaply, or as a quick divider
off of a power amplifier binding post, you can use the resistor divider shown
in figure 4. Just build that into a cable between the soundcard line in and the
speaker output on the amplifier and this will alleviate overload on amplifiers
of 100W or less. For 100-400W amplifiers, use a 20:1 divider by increasing the
10K to a 20K resistor in the top of the divider leg. Any soundcard including
any add-on isolation or divider circuits will need to be calibrated if absolute
voltage measurements are desired. You will need to own or borrow a digital
voltmeter of good AC accuracy. My reference standard is a Fluke 8060A. If only
relative frequency response or relative displays of waveforms are needed then
calibration is not required.
Figure 4.

The line output is generally good for 2V rms output into fairly
low impedance loads. Walkman style headphones are 39 ohms per side and it
drives them very well. An output buffer is generally not required. If you need
to drive insensitive circuits that need 3-12V peak drive or desire maximum
buffering of your soundcard then you may add an output buffer as shown in
Figure 5 below.
Figure 5.
Oscilloscope probes designed for hardware oscilloscopes are
generally 10:1 with a 1:1 divider option on a lot of the models. The 10:1
relies on the fact that an oscilloscope has a 1M input impedance. Any soundcard
out there will be in the 10K-50K range for input impedance and will not be
usable directly with a store bought scope probe. To provide a decent signal to
noise and frequency bandwidth, the isolator shown above has only a 10K input
impedance so it also won't work directly with a scope probe. I suggest using
DVM meter probes instead and being careful what you probe. Although most all
soundcards are ac coupled as is the Soundcard Isolation Circuit shown above,
voltages greater than +/-15V in circuits may exceed the ratings of the coupling
capacitors in the soundcard or Isolation Circuit. When using unshielded DVM
probes, take care to not route the probe near devices containing high magnetic
fields (power transformers, soldering irons) as hum will be induced into your
measurements. Connect the ground connection to the nearest ground point in the
circuit under test. The PC always has a 3-wire cord with an earth ground. If
the circuit or device you are measuring also has a 3-wire cord with a ground
prong then you may get excess hum in your measurements. Use ground isolators
from the hardware store at your own discretion, preferably on the device under
test NOT the PC. Alternatively an isolation transformer may be used on the
device under test. These may be obtained from Mousser Electronics. Get one
without the safety ground routed through to the output side.
FREQUENCY MEASUREMENTS: The
maximum frequency that a soundcard can measure or reproduce is one half the
sample rate. If you are using 44,100 as the sample rate, then you can measure
up to 22,050 Hz. Many new soundcards claim 96 kHz sample rates, but read the
specs carefully. This may only apply to the digital in/outs and not the analog
record ins. Often they are limited to 48 kHz sample rate or 24,000 Hz maximum
measureable frequency. Since fewer samples are available as you approach one
half the sample rate, the oscilloscope waveform will degrade rapidly. Likewise,
the accuracy of level measurements suffers. Soundcards vary in low frequency
performance. The Soundblaster 16 is rolled off over 5 dB at 20 Hz whereas a
Lynx Studio One is flat to within 0.1 dB at 10 Hz. You will be able to get
something out of any soundcard down to 3-4 Hz with sine waves but the max level
out will not be as great.
NOTE: SOUNDCARDS WILL NOT
WORK TO MEASURE DC VOLTAGES DIRECTLY*. EVEN IF THE AC COUPLING COMPONENTS ARE
BYPASSED, THE D/A SECTION OF THE CODEC IS GENERALLY NOT DESIGNED FOR DC
OPERATION.
*A chopper circuit can be
used in combination with measuring the new ac peak level, as a means to measure
dc. The current software, as provided, does not integrate the chopped signal
back to a fixed dc level for viewing, however. Also, due to the 20-20kHz range
of the soundcard, both droop below 200 Hz and overshoot above 2 kHz will
complicate a chopper method. The software will have to window the center of the
chopped square wave (frequency ideally at 1 kHz) for best accuracy. A voltagr
to frequency convertor is another design method that could be used. It will not
be possible to accurately see an ac waveform riding on a dc waveform since
either the chopper method or the ac coupled method would be used but not both.
Sometimes there is no substitute for a real hardware oscilloscope.
Notice: No liability is assumed by the author or
DazyWeb Laboratories for the integrity of your soundcard or PC, based on
recommendations in this document. All circuits and discussions are based on
good engineering practices and hands-on practical experience in the state of
the audio art. However, even in the best of hands, accidents can happen during
test and measurement. Power should be disconnected from devices under test when
they are hooked up to the soundcard and the PC should be powered down when
cables are hooked directly to the soundcard. Care should be taken during any
measurement sessions and all hookups rechecked before power is reapplied to
devices under test. If you have an assistant (or are the assistant) have
someone else double check your work before re-applying power.
Considering that you are working with nearly free test techniques
(the soundcard was already there on a PC you owned anyway and the DazyWeb
Laboratories software is free), you now have means to do some measurements that
previously was prohibitive to those of us on limited (hobby) budgets. Good
oscilloscopes cost $700-1000 minimum and new Audio Precision test systems start
at about $14,000. Any links or recomendations for additions or corrections to
this document would be most welcome and you may E-mail the author at:
vic@infinitespectra.com
Copyright 2003 DazyWeb
Laboratories
document revision
07-May-2010
Author: Vic Richardson