Electronic Design

VCO Transforms Sound Card Into Precision DC-Coupled ADC

Personal-computer sound cards are sometimes used for analog audio signal acquisition. Also, the Web features many free programs that implement virtual two-channel oscilloscopes by acquiring signals through the sound card. However, sound cards suffer serious limitations when employed for data acquisition.

For one, they're ac-coupled through series capacitors on the signal path. Typical high-pass cutoff frequencies are above 20 Hz, making it impossible to record waveforms containing dc or low-frequency components. Furthermore, so-called "consumer-grade" sound cards often exhibit poor sound-recording quality characteristics—especially the lack of passband flatness and excessive harmonic distortion.

But a voltage-controlled oscillator (VCO) and some software can turn a sound card into a precision dc-coupled analog-to-digital converter (ADC). The VCO of Figure 1 generates an audio tone that varies in frequency as a function of a control signal input. The VCO's output is a whistling sound that's easily recorded by even low-end sound cards. Then the original signal is recovered by software FM demodulation of the recorded VCO audio. IC3 is an Exar XR-2206 function generator that implements the VCO. The carrier frequency, CF, (in hertz) is:

CF = 1/(R13 + R14)C4

Good performance is achieved with most sound cards by setting the carrier frequency somewhere in the 2- to 10-kHz range. Oscillation frequency is modulated by applying a control current in the ±3-mA range to pin 7, which is biased within the XR-2206 at +3 V. R16 sets the offset voltage of IC2A such that zero control voltage applied to IC2B results in zero current across R15 and R18, which adjusts the modulation level (frequency deviation per volt). A good range for most sound cards is around ±80% of the carrier for the full control-voltage input range. The sound card sampling rate should be selected to be at least five times higher than the highest expected VCO frequency.

R6 and R7 trim the harmonic distortion of IC3's sinusoidal output. The unadjusted distortion is specified at less than 2.5%, so R4, R6, R7, and R9 are optional. R3 should be adjusted together with the sound card's slider volume control to produce a clean-sounding tone. The Matlab code in the code listing shows how easy it is to obtain digitized data (vector x) from the VCO audio (vector y). You can use the following Matlab command to look at the actual frequency shift and distortion of the VCO signal sampled through the sound card:


Figure 2 displays a signal acquired through this method. The artificial electrocardiogram (ECG) test signal was generated by an Agilent 33120A arbitrary function generator. Note that the demodulated signal faithfully reproduces the dc offset and low-frequency components of the ECG.

Because the VCO output is in the audible range, the modulated signal can be transmitted to the sound card via a voice radio or telephonic link for remote data acquisition. Or, use a small 1:1 audio isolation transformer and a floating power supply to turn the VCO into an isolated data-acquisition front end. In addition, multiple VCOs can share the full bandwidth of one sound card channel. These VCOs can occupy separate audio bands to convey various simultaneous low-frequency signals to an array of software bandpass filters and demodulators.

The complete VCO circuit (one channel) can be built for under $10. But if you have a cost-sensitive application that can tolerate somewhat lower precision and linearity, you may design a simpler VCO implemented with two op amps or a 555 timer IC.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.