Skip to main content
The most simple filter circuit and a lab measurement setup to characterize it [Fusion Core VCF #2]

The most simple filter circuit and a lab measurement setup to characterize it [Fusion Core VCF #2]

Hi!

Next planned module for the Fusion Core synth is an own filter. In the article ‘Making acid sounds with a low-pass filter [Fusion Core VCF #1]’, I advertised filters and why they are useful for sound design. Let’s begin with a real, simple filter circuit and measuring it by automating some lab devices!

The most simple filter setup
#

Basic implementation
#

Setup
Figure 1: Setup
Sound signal chain
Figure 2: Sound signal chain

The filter is a circuit on the breadboard, consisting of a resistor and a capacitor connected in series and used as a voltage divider. The voltage of the audio source of the ipad (left channel) is applied over both components, the filtered output signal is the voltage over only the capacitor.

Basic test
#

Here are some sound samples I recorded using different resistor values:

volume_up
Audio 1: Beat, dry (original)
volume_up
Audio 2: Beat, wet (modified) R=100 Ohm C=4.7nF
volume_up
Audio 3: Beat, wet R=500 Ohm, C=4.7nF
volume_up
Audio 4: Beat, wet R=1kOhm C=4.7nF
volume_up
Audio 5: Beat, wet R=5kOhm C=4.7nF
volume_up
Audio 6: Beat, wet R=10kOhm C=4.7nF

What do you notice when increasing the resistor value?

I notice the sound gets more dampened - like a low-pass filter with decreasing cut-off frequency!

Using maths to estimate the filter behavior
#

Breadboard close up with corresponding circuit
Figure 3: Breadboard close up with corresponding circuit

Using concepts from university courses, one can actually derive the filter behavior analytically! Skip it if you don’t want to do math, but I encourage you to look at the bottom right, the green curve is the same as the filter transfer function from last article!

Analytical derivation
Figure 4: Analytical derivation

So the final important fact is the cutoff frequency of $f=\frac{1}{2\pi R C}$. So be choosing a bigger resistance $R$, the cutoff frequency $f$ becomes smaller.

Do you remember? The filter transfer function from last article looked similar!

Low-pass filter spectrum with low cutoff frequency on the left (big resistor) and high cutoff frequency (small resistor)
Figure 5: Low-pass filter spectrum with low cutoff frequency on the left (big resistor) and high cutoff frequency (small resistor)

There is more to it: The phase delay
#

Actually, filters not only attenuate frequency components of a filter, but also delay them / changes their “phase”. The phase delay can also be plotted – together with the magnitude plot, they form a “Bode” plot, fully characterizing the filter behavior.

Example of a full bode plot of a 1 pole low pass filter with amplification of 20dB (Annotated)
Figure 6: Example of a full bode plot of a 1 pole low pass filter with amplification of 20dB (Annotated)

The challenge
#

In the future, I want to develop my own filter module for my synthesizer module that should be able to dynamically change the cutoff frequency, set by an input voltage. That is not possible with just a resistor-capacitor circuit! However, when testing other circuits, I need to measure the filter behavior to make sure it works. Analytical derivation and simulation are nice and cool, but measurements give more confidence!

The filter frequency response measurement
#

From function generator to filter, to oscilloscope: The filter frequency response measurement setup
Figure 7: From function generator to filter, to oscilloscope: The filter frequency response measurement setup
Signal chain
Figure 8: Signal chain

Actually, it is not so difficult to get to the frequency response: We need a sound source that tests all frequencies, apply its output to the filter and compare the filters output to the original output. However, we replace some components:

  • The ipad sound source is replaced with a function generator lab device for its capability of precisely generating voltage signals with a given frequency.
  • The recording device becomes an oscilloscope. It is an awesome device make voltage signals visible and can be automated to compare the two signals.
  • The headphone cables are replaced with lab-grade BNC-connector cables, since the lab devices use BNC-connectors too.

The image in Figure 8 shows the frequency generator set up to a $8kHz$ sine wave with an amplitude of $1V$. The oscilloscope shows the output of the frequency generator as a yellow trace, the attenuated (and delayed) output of the filter as a pink trace.

The test filter / Device under Test (DuT)

A 10kOhm resistor and 3.3nF capacitor in series form again a low-pass filter, with a cutoff frequency that can be calculated as $f_{cut}=4822.88Hz$, using the formula $\omega=\frac{1}{RC}$ or $f=\frac{1}{2\pi RC}$, derived earlier.

We need automation
#

Now the setup above shows the filter being tested at a sine wave representing a pure frequency component ($8kHz$). To get the full frequency response plot, we need to test sine waves at all frequencies that we are interested in! Since we don’t want to do that manually, the goal is to automate the function generator and the oscilloscope.

With the following pseudocode, we could get the plot (if we have automation capabilities):

attenuation_data = {}
function_generator.set_output_waveform(SINE)

for frequency in exponential_range(20, 20000): # From 20Hz to 20kHz

    function_generator.set_frequency(frequency)
    sleep(3 seconds) # settle time that can be optimized to match the frequency
    pp_original_signal = oscilloscope.measure_peak_to_peak_voltage(channel_1)
    pp_filtered_signal = oscilloscope.measure_peak_to_peak_voltage(channel_2)

    attenuation_in_db = to_dB(pp_filtered_signal / pp_original_signal)

    attenuation_data[frequency] = attenuation_in_db

plot(attenuation)

Taking a closer look at the function generator
#

Function Generator Fluke 81 (newest manuals date back to 2005)
Figure 9: Function Generator Fluke 81 (newest manuals date back to 2005)

Above, you see the function generator “Fluke 81”. It is a quite versatile tool since it allows generating voltage signals in different forms: Sinusoidal, rectangle, sawtooth-style and more. It probably was a quite expensive device back then. Its main purpose is for radio experiments, since its signals can have fundamental frequencies of up to $50MHz$. We however only need $20Hz$ to $20kHz$, the higher range will come some other time!

We need to set the frequency of the function generator to a lot of different values. Let’s take a look on the back for automation capabilities…

GPIB port on the back!
Figure 10: GPIB port on the back!

By looking on the back of the function generator, a blue GPIB port gets revealed. GPIB stands for “General Purpose Interface Bus” and is a pretty old bus system, not included in most lab devices nowadays. The challenge: GPIB adapters are very expensive!

Professional GPIB adapters are expensive! (Screenshot from May 21, 2026)
Figure 11: Professional GPIB adapters are expensive! (Screenshot from May 21, 2026)

Building a DIY GPIB adapter: The AR488 project
#

Fortunately, other people struggled with the price too and implemented a GPIB adapter solution themselves:

Link Preview
github.com

GitHub - Twilight-Logic/AR488: AR488 Arduino GPIB Interface

AR488 Arduino GPIB Interface. Contribute to Twilight-Logic/AR488 development by creating an account on GitHub.

https://github.com/Twilight-Logic/AR488

Using a GPIB-style socket from Aliexpress and an Arduino Nano with 5V logic, one can build an own one that allows transmitting values over a serial connection over USB. As you see below, mine is pretty fragile – I don’t have a case, only the enameled wires provide some stability. Also, there is no circuit protection or decoupling measure, directly connecting the ground of the PC with the Fluke 81. But if one is careful, with the provided firmware, it actually works!

My GPIB adapter build, front
Figure 12: My GPIB adapter build, front
My GPIB adapter build, back
Figure 13: My GPIB adapter build, back

Taking a closer look at the oscilloscope
#

Oscilloscope in action!
Figure 14: Oscilloscope in action!

An oscilloscope is a very versatile tool. Next to visualizing voltage signals, it directly measures a lot of signal properties - like general frequency, mean voltage and many more.

Oscilloscope's screen accessed using its webserver
Figure 15: Oscilloscope's screen accessed using its webserver

Now when exploring a circuit, all these tools help to understand what’s going on!

Ultimate dream combo: Oscilloscope + PC
#

When connecting an oscilloscope via LAN or USB, it does two cool things:

  1. It provides a webserver so that one can get basic infos:

    Oscilloscope accessed using its webserver
    Figure 16: Oscilloscope accessed using its webserver

    There is even a remote screen-viewer, which makes it easy to download screenshots to your PC. It’s also possible to navigate its menus with the cursor from remote!

    Oscilloscope remote screen view & control
    Figure 17: Oscilloscope remote screen view & control
  2. The second cool thing is that one can use the so called SCPI interface, which is a very extensive API, that allows to configure, set and read all values one could wish. The API can be accessed with typical programming languages like Python. Its documentation usually can be viewed on a website or downloaded as a PDF. In the case of my oscilloscope, the documentation has 855 pages, filled with command explanations, examples and more.

In my 1.5 year job as a working student in lab automation at NXP, I built drivers working with these SCPI interfaces, so I already have some experience using this API.

Doing the measurement, finally
#

A python script on my main PC connects to the oscilloscope via ethernet and to the function generator via a USB serial connection to the arduino-gpib adapter.

When executing, it looks like this:

Video 1: Demo showing acid sounds made with a low-pass filter

The python script still is too messy to show, but it in general does the following things:

  • does some settings on the GPIB adapter and the function generator
  • does some settings on the oscilloscope
  • goes through 50 exponentially increasing frequencies between 20Hz and 10 MHz (10 MHz because why not)
    • set function generator frequency
    • puts the oscilloscope in corresponding horizontal scale
    • wait some time for the oscilloscope to settle
    • measure peak to peak value of original and filtered signal
    • vertically zooms in if filtered signal too tiny
    • measure phase using builtin oscilloscope function
    • summarize measurement values
  • generate beautiful bode plot

Comparing measurement, simulation and analytical derivation
#

Full Bode plot, showing both magnitude (attenuation) and phase delay over frequency
Figure 18: Full Bode plot, showing both magnitude (attenuation) and phase delay over frequency

This is the output! We got it - doesn’t it look beautiful?? What we see here again in the top is the magnitude plot – the same type of plot as the green curve here:

Low-pass filter spectrum with low and high cutoff frequency
Figure 19: Low-pass filter spectrum with low and high cutoff frequency

By using filter components $R=10kOhm$ and $C=3.3nF$, we expected a low-pass-filter behavior, passing low frequencies and stopping high frequencies. The phase plot also looks promising.

A few things are different though:

  • With our filter, we expected a cutoff frequency of $f_{cut}=4822.88Hz$, however measurement shows $4755.3Hz$. Consecutive measurements show an even wider deviation until $4566.9Hz$. However, considering component variance of the resistor ($\pm 5$%) and the capacitor (unknown, worst $\pm 20$%), the real cutoff frequency can range from $3828Hz$ to $6346Hz$.
  • The behavior of both plots deviates from the expected behavior weirdly above $500kHz$. When arriving at those frequencies during the measurement, the filtered signal becomes very small and the oscilloscope needs to scale it up very much, resulting in a very noisy signal. Thus, it’s difficult to decide on magnitude and phase. Also, cable wiring can start playing a role.

Outlook - measuring more parameters of the filter
#

Yeah, that’s it! The measurement automation is set up and ready for measurement tasks of unknown filters!

A few things might be upgraded in the automation pipeline:

  • The raw measurement data values get stored in a file (currently, I am just saving an image)
  • It would be cool to measure non-linearity (if the output signal clips to a maximum voltage)
  • Add another programmable voltage source to configure the cutoff frequency and repeat the complete bode-plot measurement automatically
  • I might update the UI to look something like this
Build a nice UI
Figure 20: Build a nice UI

I am interested in your thoughts! - Reply with a simple Email

Have a nice day,

Carl