I completed this project while studying my final year of high school.
I was in the process of building and tuning an electromagnetic coilgunWikipedia, and as part of that effort I needed to accurately measure the inductanceWikipedia of my prototype coils. Unfortunately, I couldn’t afford the expensive, professional equipment that could make such measurements.
Fortunately, I read about the techniques that this equipment actually used, and I realized I could use my computer’s sound card to do much the same thing. The sound card output could be programmed to produce a sine wave sweep, applied across an RLC circuit with known R and C and unknown L (the inductance of the coil I wished to find).
Similarly, the sound card’s “line in” could be used to measure the frequency-dependent impedance of the coil, and by fitting a curve to the frequency response, I could determine its inductance after just a few seconds. Satisfyingly, I was able to automate this process using Python.
Here is a blog post I wrote shortly after, that reveals (revels in?) all the gory details.