Discussion board help and admin topics > Problems and Solutions for Accurate Measurements

Zero price oscilloscope using the computer's sound device

(1/2) > >>

Now i actually measured the wall adapter, with xoscope, on the first image below is the xoscope screen, and on the second image is the actual circuit. There you see the cable going to the computer's microphone input connected, voltage dividers with 100k and 100 ohms resistors, the blue and red jumper wires go to the wall adapter.

xoscope (linux, open source) had to be compiled from sources, then it used alsa for input, with standard packages it used oss, and this was badly broken.

The wall adapter was 14.3 V ac, as you see the scale is 1:1, even in spite of the 1000:1 voltage divider, so it can be scaled up and down how much one wants. The 1000:1 voltage divider protects the microphone input completely from voltage peaks, etc, when the voltages are not more than a few tens of volts. It's better not to use lesser voltage divider, as it is a too big risk to damage the motherboard, with 1000:1 voltage divider and lower voltages there is no such risk.

The microphone input is high resistance, so there are no further problems. Different from the line in input, that may be low resistance, it's better not to use that input.

Make the circuit as i did. Don't use the circuits said to be used by radioshack, etc, for that purpose. They use much lesser voltage divider and two diodes on opposite directions, also low speed diodes, to protect the microphone input. This doesn't protect from fast voltage peaks, and is completely useless as protection.

The cable can be like the cord from an old headphones, microphone and headphones cables are identical. I measured 78 mV on both channels when there was no output, it has been said some sound cards provide voltage to power the microphone. The actual voltage measured was only 14 mV, so that should not cause any problems. But measure these voltages, as they may be different with your sound device.

The sound device is ac coupled, and it has at least a high pass filter, if not other filters. The sampling rate is 41 k, this enables to measure signals up to a few kilohertz. The sound device is for sound, not for measuring. One may say too bad, but the thinking is different for these who do everything low cost. It is not useless, it can be useful in some cases, especially it may be useful for replicating some experiments, which are maybe done with more advanced measuring instruments.

xoscope also enables to calculate, i think it enables to calculate power from two channels. It can also save images, in a text format that can be read by gnuplot, and are maybe not very difficult to process with python, or other languages.

The typical 3.5 mm audio jackets used for computer sound, are called trs, which stands for tip, ring, sleeve. The tip and ring are left and right channels, or left and right microphone, and the sleeve is ground. On some android devices there are two ring jacks, and the second ring, next to the sleeve, is microphone (even when a normal headphones jack goes in and the headphones work), but this may vary from device to device so find it out first.

Hope it was useful for someone for some purpose.


I like it, interesting:

http://xoscope.sourceforge.net/  (the software)

http://xoscope.sourceforge.net/hardware/hardware.html (elaborate input circuit)

My be you could post schematics of your input circuit?

Greetings, Conrad


--- Quote from: conradelektro on October 24, 2016, 02:59:13 PM ---My be you could post schematics of your input circuit?

--- End quote ---

This circuit from the xoscope project in theory can be used, as it uses an op amp. What is missing though, is power rails on the op amp that restrict its output voltage to the range acceptable for the microphone input. This did protect the microphone input completely. On that diagram, as i understand, the op amp power is +/- 12 V, and with that this circuit doesn't protect the microphone input enough. The right range, as it appeared from my test, is approximately +/- 15 mV. With that change this circuit were better and completely safe for the microphone input, even no matter what the measured voltage is, like measure high voltage and what burns is the op amp, not your computer's motherboard. The 100k potentiometer at the output of the op amp is not a good idea, as microphone input is a high resistance input, and the best is to connect a low resistance output to it, that is the op amp output directly.

My circuit is much simpler, and it protects the microphone input completely what concerns the measured voltages and voltage peaks, when the voltages are not greater than a few tens of volts. What is not entirely clear to me, is the small voltage (78 mV in my case) supplied by the microphone input to the microphone. But it is not better at all in this circuit in the xoscope project mentioned above, nothing is done about it, it is not decoupled by capacitor or anything. Nor is it done in other widely known circuits. I think it shouldn't be a problem, as the voltages are so very small, especially it is not a problem in my case, when the actual voltage on the microphone input is never more than 20 mV, except possible short voltage peaks, this cannot short circuit the whatever voltage source there is, if that can ever happen.

Schematics? There is not much schematics to draw, all is seen on that picture, but ok.

How does this compare to  the Winscope?


As always, putting an uncontrolled input into the sound card can blow it. Fat variable resistors would be a good idea.


--- Quote from: Paul-R on October 24, 2016, 07:11:39 PM ---How does this compare to  the Winscope?

--- End quote ---

The circuit i used should certainly also work with winscope. But, the 10:1 voltage divider there is much too small. It should be at least 1000:1, and as i showed, this also provides the right voltage on the microphone input. The 11k series resistance is also too small, this influences the measured circuit too much. Properly that resistance should be 1M, as in most measuring instruments. But i chose 110k, as mostly good enough, to not make the microphone input voltage too small. 1k as the output resistance is also too great, the microphone input requires small output resistance. Maybe even 100 ohms is too great, 10 ohms may be better, but considering that the input resistance of the microphone input is at least 10k, and mostly much more, this should be enough.

The voltage supplied to the microphone by the microphone input, is i think called phantom power. As in this circuit of the microphone input  http://www.datasheet4u.com/datasheet-pdf/ETC/AS016/pdf.php?id=624331 , it is supplied to the microphone (or whatever is connected to the microphone input) and a 6k resistor in series, by a 48V power supply. 20 mV and much more than that, certainly does nothing to the 48V power supply. The 100 ohms resistor causes because of that a 787 mV constant voltage on the microphone input, but it is even worse with the 1k resistor in the winscope circuit. If the resistance were 10 ohms or less, then that voltage were comparable to the normal voltage on the microphone input. But, the microphone input is ac coupled, that is, it has capacitors in the input, thus a constant voltage should do nothing to the microphone input.

Thus i found nothing that may ever cause any damage to the microphone input with the circuit that i used. This is not exactly so with the other circuits mentioned.


[0] Message Index

[#] Next page

Go to full version