Pc Sound Card as a Function Generator and Oscilloscope

Topics: Oscilloscope, Square wave, Sine wave Pages: 5 (865 words) Published: January 10, 2013
Use of Sound Card as an Oscilloscope
and Function Generator
Saad Pervaiz
LUMS School of Science and Engineering

Winter 2010

MATLAB. DAQ . Sound card. Oscilloscope . Signal Generator .

Sound Card
Sound card present in personal computers facilitates the input and output of audio signals, under the control of a driving software e.g. in multimedia. This device can be used as an oscilloscope for signals up to a frequency of 20 kHz.

The following text shows how sound card can be utilized as an oscilloscope and as a signal generator using the Data Acquisition Toll box provided by MATLAB. Data Acquisition tool box needs to be installed for this purpose.

We will be using two channel sound card for this purpose. The input signal is provided in the jack named “mic” by the use of a two channel probe, and the output is taken from the “earphone” jack.

Scopes Provided by MATLAB
The following text emphasizes on the following two GUI for oscilloscopes provided by MATLAB 1. Daqscope
2. softscope

Daqscope is a simple scope that displays the waveform of the input signal from either of the channels, and provides options for the maximum and minimum limits of the waveform. This scope can be initiated by typing the following keywords in the MATLAB command window: daqscope

The following daqscope window appears:

The buttons at the top left corner provide the start and stop control. User can select the required channel; can modify the sampling rate, scale. It also provides the Auto set option which adjusts the amplitude and the x-axis scale according to the signal being provided. Following screen shot shows the oscilloscope in action for a sine wave of 1 kHz.

This is another scope provided by MATLAB, which provides many more features than the daqscope. The following text throws some light on a few of these features.

Softscope can be initiated by typing the following keywords in the command window: softscope
The following screen appears:

After selecting the required properties e.g. sample rate or the required channel, the following oscilloscope screen appears:

This window provides the Horizontal and vertical adjustment properties under the channel setting and various trigger options.

After applying a sinusoidal signal (319 Hz) at the left channel (channel 1), and triggering the scope, the following signal is shown by the scope:

After applying a triangular (1.5 kHz) signal on one channel and a square wave (1 kHz) signal on the other channel,
The output of scope is shown as:

Softscope provides the following measurement tools that are not available in daqscope that make it a useful scope for various measurements:

After selecting required properties from the measurement tool box, the following window of softscope appears:

From the menu, the required measurement type is selected. The following screen shot shows the measurement of mean value of two signals mentioned above:

Similarly, various other measurements can be done. Softscope also provides the facility to make any new measurement as defined by the user, in form of a defined MATLAB function.

Protection Circuit:
Usually, whenever sound card is used to acquire external signal, the signal is given through a voltage limiter circuit, so that very high voltages do not get to the sound card that can damage it. Usually, one of the following two circuits is used for this purpose:


This circuit gives output range between +1.4 V – -1.4V.

The main advantage of this circuit is that the output voltage is independent of input voltage. However large the input is, the output always lies in the above mention range. The disadvantage of using the circuit is that if the voltage lies outside the range, it is clipped. So the output waveform might not be the same as input waveform.


The above circuit gives output by the given formula:

Vout = - (R2/R1)Vin
So if the ratio is...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • The Oscilloscope Essay
  • Oscilloscopes Essay
  • Essay about Sound
  • Function Generator Using Ic 741 Essay
  • History of the Sound Card Essay Example
  • Video Card: Definition, Function and Types Essay
  • sound Essay
  • Essay on Image and Sound

Become a StudyMode Member

Sign Up - It's Free