A especially for hobbyists interesting solution is to use a standard PC sound card as main component for signal measuring.
Generally every PC available on the market is equipped with this kind of device and ready for basic measurement.
The microphone or line-in input of the sound card is then used to input the measured signal. +
Sound cards are usually a feature of PC or notebook mainboards, but are also available as external USB devices. +
A typically sound chip, as it is located on mainboards, can be seen in figure 1. Figure 2 shows an USB solution.
{empty} +
image::https://es.technikum-wien.at/openlab/openlab_wiki/wikis/img/SOTA_osci/SOTA_osci_SC_ALC892.jpg[caption="Figure 1: ",title="Realtek ALC892 sound chip installed on the ASUS P8Z68-V PRO PC mainboard (1)",height=320,align="center"]
{empty} +
image::https://es.technikum-wien.at/openlab/openlab_wiki/wikis/img/SOTA_osci/SOTA_osci_SC_USB.jpg[caption="Figure 2: ",title="Hama USB Sound Card (2)",height=320,align="center"]
{empty} +
== Characteristics of sound cards
Sound cards not only vary in their number of input and output channels, for example surround-sound versus stereo sound, but also regarding more specific characteristics like the maximum allowed input voltage.
Those specifications are often not mentioned in any publicly available document.
So to get those informations it is common to measure the value of interest by yourself or to rely on estimations. +
The amount of input channels also depends on the manufacturer and model of the sound card. Generally their are two different methods to input signals into a PC audio device.
{empty} +
=== Microphone input (MIC-IN)
The first one is the Microphone Input (MIC-IN) often labeled by a pink connector. This connector is available by the majority of PCs and notebooks.
A considerable disadvantage of this port is the bias voltage which is needed for some microphones to work.
This DC voltage shifts any input signal by its value. So for developing a sound card oscilloscope this means that an offset is constantly added to the input signal.
This will require either a conditioning circuit before connecting the signal to the sound card, or a software filter. +
More information about the characteristics of a microphone input can be found on www.hobbyhour.com
{empty} +
=== LINE-IN input
The second one is called LINE-IN and is generally labeled by a light blue connector. This connector is less often used by todays sound cards.
It differs from the microphone input by the fact that this input does not use any bias voltage.
LINE-IN is used to connect self powered devices, for example CD/DVD-players or television sets. +
The following picture, figure 3, shows a standard sound card used in computers with its connectors labeled.
{empty} +
image::https://es.technikum-wien.at/openlab/openlab_wiki/wikis/img/SOTA_osci/SOTA_osci_SC_BOARD.jpg[caption="Figure 3: ",title="Connectors of a standard sound card (3)",height=320,align="center"]
{empty} +
=== Specification
Because of the great variety of available sound cards, the specifications of such devices can not be generalized.
However, most sound cards are able to sample signals at a max frequency of about 44.1kHz and a resolution of 16bits.
This limits the bandwidth of the measurable signal to around 20khz. The voltage of the input signal should not exceed 3V peak to peak.
With the usage of the output of a sound card, it is possible to implement a function generator as well. +
To extend the maximum voltage range a conditioning circuit, which usually consists of a few analog components, can be used.
{empty} +
=== Sound card measurement example
During this state of the art research a first sample measurement has been taken. The device under
test, a ALC662[4] audio codec by Realtek, is used as a typical internal sound card for standard
computers. At the University of Applied Sciences Technikum Wien[5] this specific model is used
in nearly every student accessible PC. +
The ALC662 audio codec is directly integrated on the mainboard of the Lenovo ThinkCentre M92p
Tower-PC[6]. It features one LINE-IN, one LINE-OUT as well as an MIC-IN port at the rear of
the computer. The front panel adds an additional MIC-IN and a headphone out port. All audio
ports are implemented as 3.5mm plug connectors. However, this test handles only the front audio
out(respectively headphone out) connector. +
In the course of this analysis, the maximum peak- and peak to peak output voltage of the ALC662
should be measured. To generate waveforms with different frequencies a software called "Wav
Test Tone Generator" was used. The program can be downloaded for free at the project page
wavb.sourceforge.net. Figure 4 shows the graphical user interface of the software.
{empty} +
image::https://es.technikum-wien.at/openlab/openlab_wiki/wikis/img/SOTA_osci/SOTA_osci_SC_GEN.jpg[caption="Figure 4: ",title="Main window of the test tone generator program",height=320,align="center"]
{empty} +
This software enables the user to easily generate waveforms and save them as files. Additionally it allows the user to adjust the frequency, amplitude and sample rate in fine steps. +
During this test, a sinus wave was outputed by the program. The start frequency was set to 1.0Hz and goes step wise up to 20kHz.
The output of the sound card was then measured by a professional oscilloscope and entered in a table.
In figure 5 one can clearly see, that the maximum frequency, generated without distortion, lies around 16.2kHz.
{empty} +
Figure 6 shows the minimum and maximum peak voltage during measurement.
{empty} +
image::https://es.technikum-wien.at/openlab/openlab_wiki/wikis/img/SOTA_osci/SOTA_osci_SC_Peakpeak.png[caption="Figure 5: ",title="Peak to Peak voltage output, of the ALC662 sound card, versus frequency",height=320,align="center"]
{empty} +
image::https://es.technikum-wien.at/openlab/openlab_wiki/wikis/img/SOTA_osci/SOTA_osci_SC_Peak.png[caption="Figure 6: ",title="Minimum and maximum Peak voltage of the ALC662 sound card",height=320,align="center"]
{empty} +
In conclusion, the results of the analysis shows that a maximum of 3.4V peak to peak can be outputted at a maximum frequency of 16.2kHz.
Of course those values differ from sound card to sound card but they can be used as an estimation.
{empty} +
=== PC-Software
To display the waveform of a signal captured by the sound card, a program processing the sampled
data is needed. Most of this programs found during this research are free to use but closed source.
An example of such a program is the Soundcard Oscilloscope by Christian Zeitnitz[7]. This software
is structured like a real oscilloscope with an area displaying the captured signal on the right and
the controls on the left side of the interface. If the sound card used is capable of recording sound in
stereo, the program can act as a dual channel oscilloscope.
The main window of the Soundcard Oscilloscope program can be seen in figure 7.
{empty} +
image::https://es.technikum-wien.at/openlab/openlab_wiki/wikis/img/SOTA_osci/SOTA_osci_SC_scope.png[caption="Figure 7: ",title="Main window of the Soundcard Oscilloscope by Christian Zeitnitz (7)",height=320,align="center"]
{empty} +
As an additional feature this software is capable of using the output of a sound card to generate waveforms.
{empty} +
== Pros and Cons
The following listing, Table 1, summarizes the advantages and disadvantages of using a sound
card as the main component of a measurement equipment.
{empty} +
image::https://es.technikum-wien.at/openlab/openlab_wiki/wikis/img/SOTA_osci/SOTA_osci_SC_PROS_CONS.PNG[caption="Table 1: ",title="Pros and Cons using a sound card based solution",align="center"]
{empty} +
== Bibliography
. Hardware Canucks: _Picture of the Realtek ALC982 installed on a PC mainboard_ [Online] http://images.hardwarecanucks.com/image/eldonko/P8z68/Board/Lboard23.jpg[Picture of the Realtek ALC982 installed on a PC mainboard]
. Hama: _Picture of the Hama USB sound card_ [Online] https://https://at.hama.com/00051620/hama-usb-soundkarte-71-surround[Picture of the Hama USB sound card]
. computer-hardware-explained.com: _Labeled picture of a typical PC sound card_ [Online] http://www.computer-hardware-explained.com/computer-sound-card.html[Labeled picture of a typical PC sound card]
. Realtek: _Product page of the ALC 662 audio chip_ [Online] http://www.realtek.com.tw/products/productsView.aspx?Langid=1&PFid=37&Level=5&Conn=4&ProdID=144[Product page of the ALC 662 audio chip]
. University of Applied Sciences Technikum Wien: _Main webpage_ [Online] http://www.technikum-wien.at/en/[Main webpage]