A Simple Way to Read Analog Sensors with a PC Sound Card
Ruslan Nagimov describes an easy method of reading resistive and capacitive sensors using a standard PC sound card.
Access to sensors and the equipment required to read them is more of a question with so many students studying from home or just conducting DIY experiments. In a new post on the Spaghetti Code with Beer blog, Ruslan Nagimov describes a method to turn virtually any laptop or desktop into a data acquisition system, with most components totaling under one dollar. The central component — a standard PC with an integrated sound card — may even be found for free through recycling old PC motherboards, thanks to the moderate system requirements. With such a low cost, the project can make science and physics experiments more accessible for those who want or need to perform them at home.
Although PC sound cards can be useful for projects that require kHz-rate analog inputs, they can’t be directly used for measuring DC signals as audio ADCs reject the DC component. This means that sound cards are often written off as useless for reading any sensors, even though the majority of them aren’t inherently DC. Interfaces often use DC signals, but many underlying elements are resistive, capacitive, or inductive. The example setup in the blog post uses a 10k thermistor and a DIY level probe, but the same methods can be extended to any number of these elements.
The system is demonstrated using an old AM2 motherboard running Debian but should work on any modern Linux distribution — the only OS-dependent part is the interface used to play and record .wav files, and this is adaptable. The post walks users through the concept — complete with simplified circuit diagrams for resistive, capacitive, or inductive measurements — from the basics through both hardware and software setup for the example use case. The sound card can be interfaced with either by using audio pig cables into 3.5mm audio jacks or Dupont-style sockets plugged into motherboard audio headers, though other necessary hardware may be experiment-dependent.
The project also hopes to demonstrate the often-overlooked usefulness of old PC motherboards in DIY projects, noting that even old ATX motherboards have plenty of potentially useful capabilities, including audio ADCs and DACs and multiple voltage references. While the resulting measurement tools should only be used for educational purposes — not for industrial or lab-grade data acquisition — its accessibility is still perfect for students.