diff --git a/README.md b/README.md index 9223932..51049be 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,38 @@ -# soundthermo +# SoundThermo -Simple thermometer using sound card input and output, a thermistor and couple of resistors \ No newline at end of file +Simple thermometer using sound card input and output, a thermistor and couple of resistors. + +# Hardware + +One should assemble components as shown on scheme below: + +![Thermometer scheme](https://raw.githubusercontent.com/denis-ftc-denisov/soundthermo/master/scheme.png + +* Lout should be connected to left channel of sound card output +* Rout should be connected to right channel +* Mic In is for microphone input +* GND should be connected to ground (both on input and output) + +# Using the software + +First, one should compile the project (target is .NET Core 3.1). After that (assuming your executable +is named `SoundThermo.exe` one should enumerate all sound devices in the system with: +`SoundThermo.exe list` + +You will get list of all sound devices with their GUIDs. Identify your device and note its GUID. + +After that one should run `SoundThermo.exe measure --input --output --duration `. +Duration means amount of time spent for measuring (longer the measurement, more precise results). As for me, one second +is enough. + +# How it works + +The idea is to generate harmonic signal with some amplitude `Vin` on sound output and then measure +`Vout` - amplitude of same signal on microphone input. + +If we consider just left or just right channel, we could not that `Vout = R2 * Vin / (R1 + R2)`, +where `R1` and `R2` are resistor values. Unfortunately, due to different volumes in input and output, +really equation is like `Vout = R2 * Vin * k / (R1 + R2)`. So firstly we do measurement via right +channel (where we know both `R1` and `R2`), to determine `k`. After that we repeat same measurement +using left channel. Knowing `Vin`, `Vout`, `R2`, and `k` we can determine value of thermistor. +After that we compute real temperature via approximation formula. \ No newline at end of file diff --git a/scheme.png b/scheme.png new file mode 100644 index 0000000..f8d9b35 Binary files /dev/null and b/scheme.png differ