home   articles   archive   forum   masthead  
Published at 25.11.1999
Author: Ronny Ziegler
Translator: Andy Ziegler
Languages: de it
Printer printer-version
Support Us!
 

The soundcard used as an oszilloscope

oscilloscope The idea is simple, but the result is impressive. Every soundcard has a line-in input and this input can be used as a computer oscilloscope of course.
With the program OSCOPE, you get a useful fronted for an interesting feature.


A soundcard with a microphone input does nothing else than translate analog voltage changes into digital signals. If these signals were written in a file (wave format) the voltage curve could be read out and displayed as a curve. That's what programs which are used to edit wave files do.
An oscilloscope does the same thing: the voltage is read out and displayed. So it should be possible to use any sound card, in combination with a wave-edit program, as an oscilloscope. But the display and interface of these programs is not designed to simulate an oscilloscope and it is not so easy to get a reasonable result.
OSCOPE is designed to simulate an oscilloscope on the computer. You can record signals on some channels, display and save them. Even the use of filters you programmed by yourself is supported.
In addition, the program offers an X-windows frontend that makes it possible to work comfortably.

Installation

You should use OSCOPE with a Pentium-class processor (at least) because the continuous display of the measured values needs a lot of CPU power. In addition, you of course need a sound card. If possible, you should get one with a stereo input (in all new cards this should be standard). With a stereo input you can use two channels at the same time. The soundcard has to be recognized by Linux and be accessible via the device /dev/dsp (this should be standard, too).
Before you start compiling you have to edit one line in the Makefile to get the GTK frontend.
Therefore, you delete the comment letter (#) in the corresponding line:

File Makefile
  [...]
   # !! uncomment this line if you don't want console-based oscope
   SCOPES	= xoscope
  [...]
  

Then type
  >> make
  
and the program will compile if you correctly installed the GTK libraries.
To change the height of the input signal, you can use any mixer (e.g. kmix or gmix. Other mixers can be found at ftp://sunsite..unc.edu/pub/Linux/apps/sound/mixers/). These mixer change the pre-amplifier of the sound card. But you should never try to measure a 110V or 230V AC coming out of your wall.
Before you start measuring signals using your soundcard, you should read the manual and find out what the maximum allowed signal is supposed to be.
The "granularity" of the displayed signal depends on the maximum bit rate that the soundcard supports. If you chose a very fine display the curve would not be plotted smoothly but in steps.
If you wanted to use a PC as a scope, you should buy a special designed card. These cards offer more than two channels, too.
Oscope and Linux only support the special card "Radio Shack ProbeScope" (Cat. No. 220-0310), available in the USA. It is also known by the name osziFOX.
If you wanted to use another card,you would have to dive into the depths of kernel hacking and produce a necessary module.
For every hobby user, two channels should be enough to check your electronics. You would also save about US$200 (DM 400) if you didn't have to buy a cheap scope.

Links:
   Homepage Oscope: http://xoscope.sourceforge.net/
   Radio Shack Probe Scope: http://support.tandy.com/support_meters/33352.htm
   osziFOX: http://www.wtt-germany.com/index.html
   Mixer: ftp://sunsite.unc.edu/pub/Linux/apps/sound/mixers/




Talkback Area




Enter Own Comment