While working with the PC sound-card oscilloscope and signal generator I found the following limitations:
1. A low Input Impedance of the order 10 Kilo Ohms
2. Input voltage range limited to 2.8 V p-p
3. AC coupling of the I/O signals
4. Output voltage limited to 2V p-p
5. Sampling rate limited to 44kbps
Not much can be done about the sampling rate as it is a limitation of the sound card but the scope interface presented here attempts to improve the other factors.
Most significant is the addition of circuitry to estimate the positive and negative peak DC values of the signal and use this to offset the waveforms providing a realistic DC-coupled scope display.
Let me illustrate this with an two Examples
Step 1: 555 Timer Example
The 555 Timer IC when operated as an astable oscillator from 5V provides a square wave of 0-5V and the waveform at the timing capacitor varies from 1/3 to 2/3 of 5V.
The first screen shot shows the timer IC 555 AC coupled waveforms as captured by the PC sound-card. It can be seen that the zero settles at the average value. (The input has been scaled by 1:10 to remain within the input voltage limits.)
The square wave shows a peak value of 171mV instead of 5V and the capacitor waveform appears to be centered at 0V with a peak value of 66.59mV.
The interface circuit provides two peak-hold circuits which provide the positive and negative peak DC value of the input waveforms. Using a multimeter to measure these values gave 468mV and 283mV as the positive peak values for the square and capacitor waveforms respectively.
We can compute that the square wave needs to be offset by 468mV -171mV = 297mV and the capacitor waveform by 283mV - 66mV = 217mV.
Waveform after DC restoration
The second figure shows the waveforms after entering the offset values 297mV and 217mV into the offset boxes for CH1 and Ch2.
After DC restoration the square wave varies from 0 to 455mV and the capacitor waveform from 1/3 to 2/3 of 5V.
This would be the display we would see on a scope with DC coupling.