
Apparently a multimeter is bad for wet stuff
For unmentionable reasons I was faced with the challenge of measuring the impedance of liquid solutions. Without being able to elaborate on the reason I thought I would still share some of the things I found out.
When starting the project I did not think much of it, -measuring impedance is just using a multimeter or whatever.. Turns out that is a bit more complicated than that.
I very quickly realized that most DC measurement methods are off the table since electrolysis, and ion effects greatly affects the outcome.
If you stick the probes of your multimeter into a glass of water the resistance you measure will change as you watch (I am not kidding go try it now).
So how then?
I needed a proper impedance set-up that would properly measure both resistance and reactance at multiple frequencies, not including DC.
Unlike my friend Thomas Scherrer I do not have fancy-pants impedance bridges laying around so I opted to build one.
What I DO have was a SDG6022X signal generator and a ADS2204X Oscilloscope both controllable via SCPI.
Made this setup:
A simple way of measuring impedance is to connect a known component (Rs) in series with the device (DUT) you want to measure:

( Boring mandatory part here, skip at your leisure )
By running a known signal through this series connection you can infer the behavior of the DUT by knowing the impedance of the known component Rs:
Unfortunately CH1 and CH2 here are not just two voltages you actually need both the amplitude of the signal seen by the scope cannels AND the phase between them (this make them complex values). Most modern oscilloscopes will just measure this for you.
In practice you really want to know the magnitude and the phase of Z:
These value pairs (phase and magnitude) are typically the ones plotted as the impedance curve along with the frequency they are measured at.
Doing it in style
As a start I would just set some frequency on the generator, read the voltages and the phase between them, using the oscilloscopes built in functions, and do the calculation by hand.
Obviously this got boring really fast so I quickly had a Python script made that would control the generator and read the values from the scope. While I was at it I got a bit carried away and also made a fancy user interface to get the results right away:
The left plot shows the amplitude/phase plot and the right shows the same data as a Smith chart.
The system runs of a local Python server and spawns a browser based user interface.
In the UI above three measurements show a 100nF capacitor, a 10µH inductor a 1k resistor and a parallel resonant circuit with the 100nF and 10µH together.
It is interesting to see that resonance occurs when the two components impedance is exactly equal.
The UI allows to do additional sweeps in areas where the values changes rapidly to fill in the gaps.
The UI also lets you point at the different measurements and read the equivalent component values at different frequencies (Yes component values change with frequency).
This shows two measurements of clean water and water with 5% milk added. I used milk as a substitute for the actual solutions I am measuring ( really that is all the hook for this post is 🙂 ).
To get a realistic conductance measurement I changed from using the two forks to a probe that has a defined contact area with the liquid. Otherwise the liquid level would have an effect.
Obviously temperature matters so I tried to keep that constant after adding the ‘milk’.
How else can you do this
Obviously not everyone have a SCPI controlled signal generator and oscilloscope. Most people do however have a sound card so I wondered if you could use the same method just with a regular audio interface taking the role of the generator and oscilloscope.
One output channel from the audio interface serves as generator and Right, Left input channels serves as CH2,CH1.
So I made a web app version of the measuring tool that uses Audio input/output.
How it works
The tool plays a sine wave through the audio output and steps through frequencies one at a time. At each frequency it captures both input channels simultaneously and applies the Goertzel algorithm — a single-bin DFT — to extract the complex voltage at exactly that frequency, rejecting noise and harmonics. From the two voltages it computes impedance as:
where CH1 is the voltage across the whole series arm and CH2 is the voltage across the DUT alone. The result is plotted as magnitude and phase on a Bode plot and as a reflection coefficient on a Smith chart.
Bring on the Audio Interfaces
I got a selection of audio interfaces to see what kind of accuracy I could get:

The ones I got was in the categories from cheap to fancy.
I started with the Motu M4 which is considered pro-grade and capable of 48kHz sampling rate at 24 bit resolution.
24 bit, that is 144dB of dynamic resolution for those who care. In comparison my oscilloscope has a puny 60 dB at 10 bit.
On the flip side the soundcard is only able to work up to 1/2 the sampling frequency. This allows measurements of 20-ish Hz to 24kHz (22kHz more realistically). While this is a bit low for e.g. component analysis, where you want to find resonances and the like, it is great for stuff like speaker crossover filters and transducers.
I made a version of the software that runs purely in browser + JavaScript using the Web Audio API.
To allow the UI page to access the system audio interfaces it has to be served from a secure location and I thus have to use the same local server trick as for the SCPI based system.
You can simply run the single .html file from the local filesystem but you are only able to access the system default audio input and audio output which may be good enough sometimes. I covered this in this article and some in this.
You also need to disable any audio enhancement features in your operating system for the used audio interface or the measurements will be screwed up.
The good ones
Trying the different sound interfaces showed that there was a huge difference in performance.
Unsurprisingly the Motu M4 performed flawlessly and provided accurate measurements out of the box.
I was able to confirm the accuracy by measuring known components, like a resistor, and get its value perfectly over the whole frequency range.
The Culilux CA7 also performed well out of the box. This device have similar specs as the M4 in terms of sampling rate and resolution.
The not-so-good ones
The same was not to be said for the Behringer UCA222. This device only had a 16 bit ADC/DAC and was struggling with phase coherency between right and left input.
Somehow there was a one sample delay between the right and left input channel. This is a huge problem and gets progressively worse at higher frequencies. It also had a very bad handling of low frequencies with a weird frequency roll off across the whole audio range.
The CSL – USB 7.1 was a bit of a mix. With 16 bit DAC and 24 bit (at least according to the driver) ADC. This device also had some filter roll off problems in both ADC and DAC.
To use these cheaper interfaces some sort of calibration was needed. I ended up implementing the option to do a open/load calibration where the software sweeps once with the DUT disconnected and once with a known resistance connected as DUT.
Conclusion
So all in all you can totally use a audio interface for impedance measurements.
I was able to make a setup where I could identify known components at different audio frequencies and determine the frequency dependent impedance of networks.
Off script I also tried different piezo transducers and were able to characterize their drive impedances. I imagine you can do this with speaker systems as well.
You can do it too
You may not have the same use case as me but being able to very accurately measure the impedance of low frequency circuits may be your jam somehow.
For your entertainment I have thus included the impedance analyzer here.
Use this guide for setup and use.
For fun and giggles only, – I PROVIDE NO SUPPORT! –
Future work
There are many improvements that can be done to this.
Other parameters could be logged along with the measurements such as temperature.
I think it could be interesting to try and use tightly coupled transducers to do measurements on acoustic systems like speaker cabinets and audio transmission lines, perhaps even exhaust pipes or intake manifolds for engines.





