New version page

Berkeley ELENG 40 - Filter Lab Prototype

Documents in this Course
Lecture 3

Lecture 3

73 pages

Lecture 1

Lecture 1

84 pages

Guide 4

Guide 4

8 pages

Diodes

Diodes

7 pages

Quiz

Quiz

9 pages

Load more
Upgrade to remove ads
Upgrade to remove ads
Unformatted text preview:

For this lab, bring a music playing device if you happen to have one. Anything with an 1/8th inch out should work. Active Filters In this lab, you build a circuit that takes a song playing from an audio source (laptop, mp3 player, etc.), isolates its bass drum, and blinks an LED in response to each drumbeat. Figure 1 Block diagram of the circuit. Play a song from your audio source and probe the signal with your oscilloscope. Adjust the horizontal and vertical scales so you can see several seconds of the signal at once. The energy of a bass drum lies mainly in frequencies under 200Hz. To isolate the bass drum, we need to eliminate the song’s high frequencies with a low pass filter. The ideal low pass filter has the magnitude response shown in Figure 2(a), where all frequencies below the cutoff are passed through untouched, and all frequencies above the cutoff are blocked completely. This magnitude response is impossible in reality, but you will implement one of the filters shown in Figure 2(b) as an approximation. When you design your low pass filter, you will be faced with many important choices. As an engineer, you must guide your decisions by considering the cost and effectiveness of each implementation: 1. Effectiveness. The filter must attenuate the high frequencies so the LED blinks only in response to the bass drum, and not any other instruments.2. Cost. The filter must be as simple as possible (but still be effective). We could use a monstrous 10th order filter, but that is far more complicated than necessary. In the real world, higher complexity translates to higher cost. Figure 2 Magnitude responses of different filters. (a) Ideal filter. (b) Real filters. You will now design a low pass filter that satisfies both of these design objectives. To help you, we have coded a LabVIEW virtual instrument (VI) that simulates your circuit and allows you to experiment with different filter topologies.Open the VI and upload your WAV file (or a WAV file that we have provided) under “path” in the front panel. Run the VI. In the waveform graph on the front panel, you can see the original song’s signal at the top, and at the bottom, a slew of signals superimposed over each other. These are the signals you will see at various stages in your circuit. Figure 3 Waveform graph in LabVIEW. The gray signal is the original song. The black signal is the filtered song. The blue signal is the output of the peak detector. The light green signal is the threshold signal. The red signal is the final output of the entire circuit; it is the signal fed to the LED. As the VI runs, tweak the filter parameters on the front panel – topology, order, cutoff frequency, stopband attenuation, and ripple – and the VI will simulate the new filter. Your concern right now is the red signal. It is the final output of your circuit. When it is high, the LED is on. When it is low, the LED is off. You want to have it be high for each drumbeat and low otherwise. Below, you will find useful information about the different filter topologies.Figure 4 Example filter magnitude response and general terminology. The passband and stopband are the ranges of frequency that are nominally passed through and blocked by the filter. The cutoff frequency separates them. Stopband attenuation is the minimum attenuation of all stopband frequencies. Roll-off is how quickly stopband frequencies are attenuated as frequency increases. Ripple is how much the magnitude response ripples in passband or stopband. 1. Bessel. The Bessel filter has the slowest roll-off of all 5 filters. Its chief advantage is its maximally flat group delay in the passband. Group delay is simply the derivative of the phase response (both are plotted vs. frequency). It is a measure of the time it takes for a signal to pass through a filter. Group delay increases with increasing filter order and decreasing cutoff frequency, which is bad. We do not want the LED to blink AFTER we hear the beat; we want the blink and the beat to coincide or be so close together we cannot perceive the delay. The Bessel’s flat group delay means all frequencies in the passband are delayed the same amount, which means there is no signal distortion at the output due to different frequencies being delayed different amounts. The filter parameters stopband attenuation and ripple have no effect on this filter. 2. Butterworth. The Butterworth filter is the easiest of the 5 topologies to implement in analog circuits. Its magnitude response is characterized by a maximally flat passband, -3dB attenuation at the cutoff frequency, and a roll-off of –20N dB/decade beyond cutoff, where N is the order. This roll-off is the slowest, with the exception of the Bessel filter. Stopband attenuation and ripple have no effect on the Butterworth. 3. Chebyshev/Inverse Chebyshev. These filters roll off more steeply than the Butterworth, but exhibit ripple in passband (Chebyshev) or stopband (Inverse).The value of stopband attenuation has no effect on the Chebyshev filter; ripple has no effect on the Inverse Chebyshev. 4. Elliptic. The elliptic filter rolls off more steeply than all other filters, but exhibits ripple in both passband and stopband. Write down your choice of filter, and explain your choice. It turns out that a first order Butterworth is effective enough for our circuit. A first order Butterworth also happens to be the very first filter you studied, the RC low pass filter. Because we want you to learn something new, however, you will instead be using the Sallen-Key topology. (Later, if you wish to test the Butterworth, replace the Sallen-Key filter with the RC filter followed by a voltage buffer. It should work as well as the Sallen-Key filter.) Figure 5 Sallen-Key low pass filter schematic. The Sallen-Key low pass filter is a second-order active filter that rolls off at –40dB/decade after the cutoff frequency (this is just a fancy way of saying that the magnitude of the frequency response decreases with , we’ll talk more about this on Wednesday). As mentioned in class, we call this an active filter, because it is a filter that uses at least 1 active component. Shown in Figure 5, the Sallen-Key’s active component is an operational amplifier. The operational amplifier acts as a buffer between the Sallen-Key filter and the previous and following stages, thus making the Sallen-Key’s frequency response independent of the rest of the circuit. This


View Full Document
Download Filter Lab Prototype
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Filter Lab Prototype and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Filter Lab Prototype 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?