Xoscope - a microphone oscilloscope for Linux
That's right, an oscilloscope that is free. And costs no money either. Almost as cool a Frits'o'scope.
Xoscope is a piece of software that runs on Linux. Windows users, google "winscope", not the same software though.
It listens to the sound card and analyses it as if it were an oscilloscope (o-scope for short). This here is a screenshot of a signal registered on my laptop's microphone input.
The horizontal division is set to 500 ms. The entire frame covers 5 whole seconds. The signal is the power consumption of my Picaxe, Volts measured over a 1 kOhm series resistance.
Notice, there is no indication of the voltage along the vertical axis. That's because sound cards do not measure absolute voltages. They don't care about that. This is a serious shortcoming of this kind of o-scope! BTW, my multi-thingey says the peak-peak voltage is approx. 800 mV.
After you STOP the o-scope, it will freeze the last frame it filled and you now can zoom in on the recorded signal trace.
Look at the number of samples per frame. This time-scale can only display 2206 samples inside the entire recording. This zoom level only shows about 50 of them. That's because the sound chip in my laptop (ahem, the ADC chip in my o-scope) can only sample 44000 times per second. That's sufficient for digitizing audible sound, but not for fast signals, like for instance, an ultra sonic distance sensor or the modulation on an IR TV remote.
Also notice how the signal in the vertical direction becomes quite "blocky". That is because I zoomed in a factor of ten on the vertical axis (I digitally amplified my input signal). In the white square it now reads 10/1. The ADC has a limited voltage resolution.
Two channels or one?
I am showing just one channel in these pictures. But my microphone has a left plus a right channel for stereo sounds. You can use both channels in Xoscope, but at a price. The mic input is providing 2.8 Volts on the signal lines. That voltage is needed by electret microphones as a tiny power supply. Most circuits you want to read will be influenced by that 2.8 V. And screw up your findings. You need to protect your project from your sound card, not the other way around*).
I know of three strategies so far:
1) put some caps in the line - this will separate DC from AC. Only voltage changes are conducted to your sound chip. Experiment with capacitor values. Slower signals need bigger caps. Don't worry about polarity. Too much.
2) put some diodes in the line - this will only show you positive voltage signals. Or negative ones. Choose wisely.
3) don't measure the two channels against GND, but against each other. There is no potential difference ("voltage") between the mic's channels. This is what I used in the above examples. Too bad, you loose one channel...
*) Oh, right, safety almost first: your sound chip could be in danger as well. I don't worry too much as long as I am measuring voltages that are native to my laptop. The internal coupling capacitors will prevent serious currents from flowing through my computer. But they are only rated up to so many Volts. Say 10V, maybe 16V. I am only exposing them to 5V or less, or I will use my own coupling capacitors.