Path: EDN Asia >> Design Ideas >> Test & Measurement >> Employ sound card to measure resistance and temp
Test & Measurement Share print

Employ sound card to measure resistance and temp

23 Jul 2012  | Zoltan Gingl, Peter Kocsis

Share this page with your friends

Unless you incorporate a measurement instrument to your computer, you have only the sound card as an analog I/O port. You can use the sound card to digitize ac analog voltages but only within a limited range. You can, however, add some signal processing and measure a wider variety of signals, even those that produce dc or low-frequency outputs. For example, you can directly connect a thermistor to make a sound-card thermometer to monitor or record the temperature on printed-circuit boards (PCBs), circuits, heat sinks, and more.

Thermistors are popular temperature sensors because they allow easy detection of changes in resistance. Once you measure a thermistor's resistance, you can apply the following equation to find the temperature:

where RT is the thermistor resistance and TO is the temperature in Kelvins at which the thermistor's resistance is RO. You can find the value of β in a thermistor's data sheet.

Figure 1 shows the easiest way to interface a thermistor to a sound card. The microphone input has an internal bias resistor, R, with a typical value of 2 to 5 kΩ. A dc bias voltage drives this resistor. The bias resistor connects the thermistor between the line or the headphone output and the microphone input, which forms a voltage divider with the internal bias resistor. Those components are all the circuit needs. Note that some microphone inputs may have different internal connections, so check yours before use.

You also need a sinusoidal signal because the sound card's inputs are ac-coupled. The sound card's audio output can produce an ac voltage at the microphone input, whose amplitude is proportional to R/(R+RT). You can do a simple calibration to find the output signal's amplitude and the value of R by replacing RT with known values, such as 0 and 10 kΩ.

A sound card's measurement accuracy is worse than what you could achieve using a commercial data-acquisition card, but this ratiometric arrangement and calibration keep errors to approximately 1% for resistor values of 1 to 100 kΩ. Even without temperature calibration, you should get temperature errors of 1 to 2K with a 10-kΩ thermistor at room temperature. Accuracy degrades to 3 to 5K over the thermistor's operating temperature.

You can download simple, free, and open-source software in Java that you can use as a simple ohmmeter, thermometer, or chart recorder under Windows or Linux. You can download a Java executable or the Java source code (reference 1).

You should consider adding protection to the sound card's audio I/O ports by inserting series resistors. Typically, a few kilohms is all the circuit needs. You can also use an inexpensive USB (Universal Serial Bus) sound card to spare and protect your PC sound card's inputs.

You can add second and third thermistors to your system by adding an external resistor divider (figure 2). This approach lets you use both audio channels and a third thermistor at the microphone input. In addition to using thermistors, you can use the sound card with other resistive sensors, such as photoresistors or potentiometric displacement sensors. You can even connect capacitive sensors if you add some more components and signal processing (reference 2).

1. Gingl, Zoltan, and Peter Kocsis, "Sound-card thermometer/ohmmeter."
2. Klaper, Martin, and Heinz Mathis, "2-Pound RLC Meter impedance measurement using a sound card," Elektor, June 2008, pg 64.

About the authors
Zoltan Gingl and Peter Kocsis are from University of Szeged in Hungary.

To download the PDF version of this article, click here.

Want to more of this to be delivered to you for FREE?

Subscribe to EDN Asia alerts and receive the latest design ideas and product news in your inbox.

Got to make sure you're not a robot. Please enter the code displayed on the right.

Time to activate your subscription - it's easy!

We have sent an activate request to your registerd e-email. Simply click on the link to activate your subscription.

We're doing this to protect your privacy and ensure you successfully receive your e-mail alerts.

Add New Comment
Visitor (To avoid code verification, simply login or register with us. It is fast and free!)
*Verify code:
Tech Impact

Regional Roundup
Control this smart glass with the blink of an eye
K-Glass 2 detects users' eye movements to point the cursor to recognise computer icons or objects in the Internet, and uses winks for commands. The researchers call this interface the "i-Mouse."

GlobalFoundries extends grants to Singapore students
ARM, Tencent Games team up to improve mobile gaming

News | Products | Design Features | Regional Roundup | Tech Impact