Best way to convert a voltage output from a circuit into graph software
The line-in and microphone inputs certainly can be used as a recording interface to the computer. The only difference physically between the line-in and mic inputs is their sensitivity; line-in can take about +/- 0.5-1.5v, where mic input can be much less than that, down to +/- a few millivolts depending on how much &quot;boost&quot; is added by the computer. The mic input is also much noisier when the boost is increased, leading to &quot;jitter&quot; in the sampled data.
If you're handy with application coding, consider that a recorded .WAV audio file is nothing more than a raw, 16-bit precision, 2-channel data, sampled 44,100 times per second. 16-bit meaning each one of the samples have a range of 2^16 bits or 65535. The tricky part is that the data is signed, meaning it ranges from -32768 through 0, to +32767. A good example of the actual contents of a .WAV file can be found here. So some fairly straightforward conversion and scalar math is needed to linearize the data if desired. Then it's just a matter of getting that data into visual form. One way would be to convert/export it as a .csv (comma-separated values) file. Most spreadsheet applications can read these, and fairly easily chart the data beautifully. Of course, for the more astute programmer, it's possible to code an entire application and draw directly to the application window.
But there are a few more things to consider about the hardware. Use a large-ish inline cap to block DC, and a recorded value of zero will always be no signal... but then it will have poor DC measurement characteristics. A more practical approach would be to build an op-amp front-end, where you can apply or remove a DC offset from the input signal, as well as scale it to fit in the window of what the soundcard can accept. Then add a switch across the cap, to DC-couple the source, and presto, you almost have a very basic oscilloscope.
This is pretty close to the idea of a &quot;soundcard oscilloscope&quot;, and there are a lot of articles of others doing such a thing, such as this.
It may be a great hobby project, but of course it will not compare to the precision, performance, and reliability of any real oscilloscope. Some will tout fantastic characteristics, but trust me, they always fall short of the real thing. If you have more than a passing interest in electronics, you'll want to get a real oscilloscope. eBay can be a great place to find a bargain, but do ask someone knowledgeable before you buy anything. Dave over at EEVblog has lots of oscilloscope reviews, and can (quickly?) get you up-to-speed in all the features and terminology.