Oscilloscope with an audio card

Description of a circuit able to feed signals into an audio card and to use it as oscilloscope

Audio cards are like oscilloscopes, more or less, but they are not provided with special controls and are limited to a narrow band of frequencies, usually 20 Hz to 20 kHz or at most 45 kHz. A real oscilloscope, even if very old, is capable of easily reach 1 MHz or more, therefore being able to show finer details of the input signal. Another important difference is the removal of any DC component in audio cards: the average value is always zero even if a continuous (DC) signal is provided. The last important difference concerns the maximum aplitude of input signals: an audio card accepts signals up to 2.8 V peak to peak or sometimes 3 V p-p, while a real oscilloscope can handle 40 V p-p or more.

The present project aims to build an adaptor to allow a safe connection of generic input signals to the audio card without risking to damage it for overvoltages. The adaptor offers also a DC setting, in case someone is able to modify an audio card to accept signals containing a DC component without eliminating it.

The scheme for a single channel is shown in the following figure, drawn using FidoCadJ. The source for the figure is provided.

Circuit

On the left a voltage divider reduces the input signal by 1, 10, 100 or 1000 times. The resistors have been measured individually and the final accuracy of the divider should be abut 2.5%. The selector S1 has 4 steps to define the division factor.

The selector S2 defines the desired output signal: DC, AC, ground. With a normal audio card the first two settings are equivalent, a custom modification would be required to remove the capacitor that removes such component.

After S2 two Zener diodes 6.2 V are used to limit the voltage and to protect the rest of the circuit in case the wrong voltage divider is used. As result, the maximum allowable voltage range at this point is 12 V p-p, compatible with two 9 V cells in series as power supply. The resistor R5 is used to limit the current on the diodes. The diodes protect both from positive and negative overvoltages.

The resistor R6 is used to stabilize the opamp and not to leave the input floating. The opamp is configured as non-inverting amplifier and the selector S3 is used to define the amplification factor: 1, 10, 100 times. The opamp power supply is double and cleaned with two capacitors.

The output of the opamp is limited by two diodes to protect the audio card in case of excessive amplification. The maximum tension to the audio card is therefore 1.8 V, corresponding to the voltage drop of the red LEDs used. At the end of the circuit there is a connector for the audio card.

At the time of assembly S1 and S3 can be replaced with a single 2-way, 6 positions selector, so that the voltage divider and the amplification factor are set correctly at the same time: in the first 4 positions the amplification is kept to one and the voltage divider changes between 1/1000x, 1/100x, 1/10x, 1x, then the voltage divider is kept to 1x and the last two positions change only the amplification to 10x or 100x.

The following photos show the phases of the assembly.

First test with a simplified circuit, the dynamo is used as AC generator.

First test with a simplified circuit, the dynamo is used as AC generator.

Test with an improved circuit, after the suggestions of Davide Bucci, the author of FidoCadJ. Now there are safety LEDs.

Test with an improved circuit, after the suggestions of Davide Bucci, the author of FidoCadJ. Now there are safety LEDs.

The same circuit (probably) with a better layout.

The same circuit (probably) with a better layout.

The two selectors 2-way, 6 positions (one per channel) with the resistors soldered directly on the pins.

The two selectors 2-way, 6 positions (one per channel) with the resistors soldered directly on the pins.

Beginning of soldering on the board.

Beginning of soldering on the board.

The daughter card with the safety LEDs.

The daughter card with the safety LEDs.

The daughter card was fixed with hot glue close to the AC/DC/GND selector.

The daughter card was fixed with hot glue close to the AC/DC/GND selector.

The mother board.

The mother board.

The box already shows the two coaxial connectors.

The box already shows the two coaxial connectors.

The motherboard with the two channels marked to avoid problems.

The motherboard with the two channels marked to avoid problems.

The box with all cables and the two circuit boards for a test before closing everything. The output signal is sent to an audio jack.

The box with all cables and the two circuit boards for a test before closing everything. The output signal is sent to an audio jack.

Another view of the motherboard.

Another view of the motherboard.

Trying to put everything in the box.

Trying to put everything in the box.

Both 9 V cells are inside, the first one below the motherboard, insulated with tape to avoid short circuits. I left the cables to the batteries uncut.

Both 9 V cells are inside, the first one below the motherboard, insulated with tape to avoid short circuits. I left the cables to the batteries uncut.

The appearance of the box before glueing the prints (a paper glued to a transparent sheet).

The appearance of the box before glueing the prints (a paper glued to a transparent sheet).

The prints separated.

The prints separated.

Back of the print with the cuts painted so that they appear better from the front side (not to do again: it ruins the print on the longer term).

Back of the print with the cuts painted so that they appear better from the front side (not to do again: it ruins the print on the longer term).

The selectors mounted.

The selectors mounted.

Before mounting the handles.

Before mounting the handles.

There are several softwares for Windows and Linux to show the input signal visually and to use the audio card as oscilloscope. Under Mac OS X I used MacCRO X, no more developed. I recompiled it for x86, it was available only for PPC. I I corrected some issues in the sources, but there are many more. The binary is available too. The original website is http://scopeapp.sourceforge.net/ .

Author: Olaf Marzocchi

First revision: 2009-11-14.
Last revision: 2014-02-16.