While I've done a few write ups about the basics of digital filters, I was inspired to take a step back into the world of analog filters after I came across my original circuits 101 textbook while setting up my new lab. One of the simplest form of which is the good old resistor capacitor (RC) series circuit. So I decided to break out the breadboard and sent up my USB Scope to measure/verify the frequency response of basic low pass (LPF), high pass (HPF), and band pass filter (BPF) RC circuits.
RC Circuit FiltersResistors behave the same in AC circuits as they do DC circuits, their resistance remains the same regardless of the frequency of the current passing through them. Capacitors on the other had end up with a varying impedance relative to the frequency of an AC current due to the imaginary component of the capacitor's reactance.
There is a really great write-up on All About Circuits for the specific details behind the math so I won't rewrite it here, but the behavior can ultimately be summed up in that the impedance of a capacitor increases as the frequency of the AC current decreases. Usually the rule of thumb is that a capacitor acts like a short for AC and open circuit for DC, which makes it obvious how their functionality is relevant to filtering: a capacitor's impedance is directly related to the frequency of the current passing through it which allows the current to continue or attenuates it down to the point of becoming negligible.
Calculating Cutoff FrequenciesTo create a filter, the first thing to do is define the frequencies the filter allows to pass through. By rearranging the equation for calculating a capacitor's impedance for a given frequency, we get the equation for the frequency at which a given capacitance value starts attenuating the current passing through it. This is referred to as the cutoff frequency of the RC circuit:
For this project, my only constraints on frequency is the range of what my USB scope can measure. Since I'm using the Scope Zmod 1410-40 on my Eclypse Z7 with WaveForms, that frequency range is 0 Hz - 20MHz. And given that my circuit is a breadboard setup with alligator clips connecting to the appropriate measurement points, I decided keeping everything down in the kilohertz range would be a good idea for the sake of signal fidelity. So this gave me a range for what resistor and capacitor values to choose.
Measurement Setup in WaveFormsTo validate my RC circuits with my calculated cutoff frequencies, I used the Network Analyzer function in WaveForms to measure each filter's frequency response.
Measuring frequency response of a circuit like this is done by connecting one channel of a scope and a waveform generator to the input of the circuit, and a second scope channel to the output of the circuit. The software in WaveForms then outputs a sinusoid sweeping from a low frequency to a high frequency from the waveform generator (AWG), and measures the output signal's magnitude/phase on the Scope.
The diagram below shows the hookup where DUT1 is the RC filter circuit, 1+ and 2+ are channels 1 and 2 of the Scope, and W1 is channel 1 of the AWG:
This plot of the frequency response of the RC filter circuits shows exactly where the filter actually attenuates the signal for comparison to the calculations.
Launch Waveforms and select the Eclypse Z7 as the target measurement device. Once in the new workspace, open a Network Analyzer window by selecting Network from the Welcome page.
To well encompass the frequency range of my three RC filters (values stated below), I set the start frequency to 100 Hz and the stop frequency to 2MHz. I left the default values for Steps and Decade since WaveForms will automatically try to adjust them as is appropriate.
Low Pass FilterAs the name implies, a low pass filter allows frequencies below the cutoff frequency pass while attenuating and stopping frequencies above it. Just looking at the equation for the cutoff frequency, one might wonder how the RC circuit attenuations frequencies above versus below the cutoff.
This is determined by the configuration of the circuit. For a low pass filter, the resistor is connected in series with the input (Vin) and output (Vout) of the circuit, with the capacitor in parallel with with output (Vout). So as the frequency of the input signal increases, the impedance of the capacitor eventually lowers to the point that the input signal is shorted to its return/ground:
I chose a 10Ω resistor and 1uF capacitor which gave the filter a cutoff frequency of 15.9kHz.
The cutoff frequency is measured on the plot of the output magnitude where it drop 3dB below the magnitude of the passband output (ie the starting magnitude in the case of the LPF).
I placed a cursor at 15.9kHz, a second cursor at the 3dB point and measured the delta between the two. While my LPF's theoretical cutoff frequency is 15.9kHz, the actual 3dB point measured at 12.2kHz. Which given I was using cheap and old electrolytic capacitors I had lying around from ECE labs 10 years ago, this difference between calculated and measured values didn't surprise me a whole lot.
High Pass FilterFor the configuration of the HPF, since we want to block frequencies below the cutoff frequency, the capacitor and resistor are swapped so that the capacitor blocks in the input signal until it surpasses the cutoff frequency:
I stuck with a 1uF capacitor, but switched to a 100Ω resistor which gave the filter a cutoff frequency of 1.59kHz.
This time, the cutoff frequency is measured on the plot of the output magnitude where it is 3dB below the final output magnitude:
Again, I placed a cursor at 1.59kHz, a second cursor at the 3dB point and measured the delta between the two. The actual cutoff frequency of my HPF measured at 490Hz... so I definitely need to buy some new capacitors.
Band Pass FilterA band pass filter is a LPF and HPF in series such that only the range of frequencies between the two cutoffs are able to pass through:
I specifically chose the cutoff frequencies for my LPF & HPF such that when built them into one circuit, it created a band pass filter instead of a band stop filter (the LPF cutoff frequency is higher than the HPF cutoff frequency).
While I used the same values of resistors and capacitors for the BPF, I didn't use the exact same specific resistors and capacitors to verify that my old capacitors were the cause of the cutoff frequency variation.
And as I suspected, I measured different frequency variations with different capacitors from my old batch of 1 uF electrolytic caps.
Overall, this was a fun little visit back to the analog world and more proof that a USB scope with WaveForms won't be leaving my desk anytime soon.
Comments
Please log in or sign up to comment.