Cover Page for Precalculations – Individual Portion



Name: ______________________________________________

Date of lab: ______________________ Section number: M E 345._______

Precalculations – Individual Portion

Filter Lab: Building and Testing Electrical Filters

|Precalculations Score (for instructor or TA use only): | |

| |_____ / 20 |

| | |

1. (4) Draw the circuit diagram for a simple first-order low-pass filter, constructed from one resistor and one capacitor. Be sure to label both the input and output voltages.

2. (4) Draw the circuit diagram for a simple first-order high-pass filter, constructed from one resistor and one capacitor. Be sure to label both the input and output voltages.

3. (4) Suppose a capacitor is available with a capacitance of 0.0100 microfarads. A low-pass filter is to be constructed with a cutoff frequency around 800 Hz. Calculate the appropriate resistance of the resistor that should be used, in units of k(. Show all your calculations, and be sure to include all units.

Required resistance, R = ___________ k(

4. (4) Suppose that you need a resistance of 15 k(, but all you have available is a bunch of 10 k( resistors. Draw a schematic diagram showing how could use only 3 resistors to generate the desired resistance.

5. (4) Instruments are commercially available that contain Butterworth low-pass filters of various orders (for example n = 1, 2, 4, 6, and 8). Suppose you are using one of these instruments, and have it set to a cutoff frequency of 800 Hz. Compare the gain (both G and GdB) at a frequency of 10,000 Hz for the cases with n = 1, n = 2, and n = 4.

|n |G |GdB |

|1 | | |

|2 | | |

|4 | | |

Cover Page for

Lab Report – Group Portion

Filter Lab: Building and Testing Electrical Filters

Name 1: ___________________________________________________ Section M E 345._______

Name 2: ___________________________________________________ Section M E 345._______

Name 3: ___________________________________________________ Section M E 345._______

[Name 4: ___________________________________________________ Section M E 345._______ ]

Date when the lab was performed: ______________________

Group Lab Report Score (For instructor or TA use only):

|Lab experiment and results, plots, tables, etc. |_____ / 50 |

|Discussion |_____ / 30 |

|TOTAL |______ / 80 |

| | |

Lab Participation Grade and Deductions – The instructor or TA reserves the right to deduct points for any of the following, either for all group members or for individual students:

• Arriving late to lab or leaving before your lab group is finished.

• Not participating in the work of your lab group (freeloading).

• Causing distractions, arguing, or not paying attention during lab.

• Not following the rules about formatting plots and tables.

• Grammatical errors in your lab report.

• Sloppy or illegible writing or plots (lack of neatness) in your lab report.

• Other (at the discretion of the instructor or TA).

|Name |Reason for deduction |Points deducted |Total grade (out of 80) |

| | | | |

| | | | |

| | | | |

| | | | |

| | | | |

| | | | |

| | | | |

| | | | |

| | | | |

Comments (for instructor or TA use only):

Filter Lab: Building and Testing Electrical Filters

Author: John M. Cimbala; also edited by Mikhail Gordin and Savas Yavuzkurt, Penn State University

Latest revision: 13 October 2014

Introduction and Background (Note: To save paper, you do not need to print this section for your lab report.)

This lab involves building some electrical circuits on a breadboard. To refresh your memory, the circuit for two resistors in series is shown below. One way to wire these on a breadboard is also sketched below.

[pic] [pic]

Similarly, the circuit for two resistors in parallel is shown below, along with one way to wire these on a breadboard.

[pic] [pic]

When taking measurements, there is often the presence of “noise” in addition to the desired signal. In such circumstances, the desired signal must be separated from other competing signals. Unwanted signals can arise from external sources such as electrical devices (vacuum cleaner, radio, or television) or can result directly from the measurement technique itself. Generally, a priori knowledge of the desired signal and of the noise is required in order for noise to be adequately reduced while retaining the desired signal. Since the exact results are rarely known before an experiment is performed, selection of a proper filter incorporates some degree of trial and error.

There are four basic categories of filters: low-pass, high-pass, band-pass, and band-stop. These are described in the learning modules, and the details are not repeated here. These filter circuits may be approximated by the response of simple first-order (RC) type circuits.

In practice, a filter does not completely eradicate signals whose frequencies fall above, below, or outside the designated cutoff frequency, but attenuates them to some degree. For example, consider a low-pass filter. The amplitude of the signal at frequencies much lower than the cutoff frequency fcutoff are not attenuated at all. The amplitude of the signal at frequencies near the cutoff frequency are attenuated somewhat, and the amplitude at frequencies which are much greater than the cutoff frequency are attenuated significantly. The rate at which this attenuation occurs, given in dB/octave, depends on the order of the filter. A first-order Butterworth filter has a cut-off rate of 6 dB/octave; a second-order Butterworth filter has a cut-off rate of 12 dB/octave (one octave is defined as two times the original frequency). In general, for an nth-order Butterworth low-pass filter, the gain G is

[pic], and the gain in decibels is [pic], where the cutoff radian frequency for a simple first-order RC filter is [pic]. The physical frequency is [pic].

Filter circuits impart a phase shift to the signal. This phase shift is normally not a problem unless synchronization between the input and output signals is required. Phase shift will be investigated in this lab for a simple first-order low-pass filter. Theoretically, the phase shift for a first-order low-pass Butterworth filter is [pic].

In previous labs (and also in class and homework), it has been shown that aliasing can be a serious problem with digital data acquisition if the experimenter is not careful. One way to avoid aliasing is to employ a low-pass filter to attenuate undesired high frequencies. Such a filter is called an anti-aliasing filter. For example, suppose we are interested in signals around 100 to 500 Hz. For adequate resolution at these frequencies, we choose to sample data at, say, 5000 Hz. But suppose there is also some high frequency noise (above 5000 Hz) in the signal. The problem is that the high frequency noise will cause aliasing. One possible solution is to put in an anti-aliasing filter with a cutoff frequency of around 1000 Hz. This filter will allow the desired signal to pass through without much effect, but will significantly attenuate the high frequency noise, thereby reducing the aliasing. In this lab, such a case will be demonstrated.

Objectives

1. Practice combining resistors in series and/or parallel to produce a desired resistance from available resistors.

2. Construct simple first-order low-pass and high-pass filters, using only resistors and capacitors.

3. Apply a low-pass filter to some music to see how the music is changed

4. Measure the amplitude (gain) and phase characteristics of a low-pass filter as a function of frequency, and compare to theory.

5. Construct Bode plots for a low-pass filter based on experimental measurements.

Equipment

• digital oscilloscope

• function generator

• six resistors of nominal value 10 kohm (10,000 ()

• two capacitors of nominal value 0.010 microfarad (0.010 ( 10-6 F)

• capacitor decade box

• Music player (cell phone, MP3 or MP4 player, iPod, this computer, etc.)

• 2 stereo patch cords (1/8-inch for iPod, cell phones, and MP3 players)

• 2 1/8-inch stereo plugs with connections soldered to jumper wires (green to ground and yellow to signal)

• powered breadboard (plugged in for the ground connection, but turned off – power not needed for this lab)

• various BNC and banana cords and breadboard jumper wires as needed

• digital multimeter

• computer with digital data acquisition system (DAQ) and software

Procedure

Basic set-up and measurements

1. (1) Measure and record the resistance of three of the available resistors. (The nominal value of each resistor should be 10,000 ohms.)

Measured resistances: R1 = ___________ (, R2 = ___________ (, and R3 = ___________ (

2. (1) (a) Measure and record the capacitance of one of the available capacitors. (The nominal value of each capacitor should be 0.010 microfarads.)

Measured capacitance, Ccapacitor = ___________ (F

(1) (b) Dial in the same capacitance value (about 0.010 microfarads) on the capacitor decade box. Measure and record the capacitance of the capacitor decade box.

Measured capacitance from the capacitor decade box, Cdecade box = ___________ (F

From now on, for convenience, you may use the capacitor decade box instead of the physical capacitor.

3. (4) For this capacitance, calculate the resistance needed to create a simple first-order low-pass filter with a cutoff frequency of 1000 Hz. Show your work here, including all units.

Required resistance, R = ___________ (

4. (4) Combine your resistors (in series and/or parallel) on the breadboard in such a way that the total resistance is close to the required resistance (say within 10% or so). Sketch a schematic diagram.

5. (2) Measure and record the equivalent resistance of your resistor circuit, and compare to the theoretical value.

Measured equivalent resistance, R = ___________ (

Percentage error between measured and theoretical equivalent resistance = ___________ %

Important note: In all the circuits you will build in this lab (and in several other labs), it is critical that the ground bus be connected to a physical ground, such as the black ground post of the powered breadboard with the breadboard plugged in (but turned off) to secure the ground.

Low-pass filtering of music

1. Construct a first-order low-pass filter using a combination of resistors and the capacitor decade box, with a cutoff frequency of approximately 1000 Hz. A circuit diagram for a simple first-order low-pass filter is provided below, along with a sketch of one possible wiring configuration on the breadboard.

[pic] [pic]

2. (3) Test your filter by connecting the function generator to the filter input and the filter output to the oscilloscope. Start with a sine wave input of about 100 Hz and amplitude 1 V. Increase the frequency of the sine wave until you start noticing that the output amplitude decreases – the low-pass filter is doing its job. Keep increasing the frequency until the filter output amplitude is 90% attenuated – in other words, G = 0.1; the output amplitude is about 10% of the input amplitude, or 0.1 V. At what frequency does this occur?

Frequency at which G = 0.1: f = ___________ Hz

3. Connect the output of a music player as the input to your low-pass filter, using a stereo patch cord and stereo plug. Note: We use only one channel (Left or Right) – ignore the other channel. The green wire is the ground, and the yellow wire is the signal. Using the second stereo plug and stereo patch cord, connect the filter output directly into the computer’s speaker input.

Note: If you’re trying to play music from a web browser, make sure the speakers are plugged in when you start playing; if the speakers aren’t plugged in to begin with or you need to unplug them for some reason, you will need to refresh the browser window to hear anything.

4. (5) Play a song [a song with good range (both high notes and low notes) is best] on your music player and test whether this simple low-pass filter works – does it attenuate high frequencies and let low frequencies pass through? Hint: A quick way to turn the filter on or off is to dial the capacitance on the capacitor decade box to zero (filter off), and then to the required value (filter on). Record qualitative results in the space below.

5. (3) Adjust the capacitance on the capacitor decade box to decrease the cutoff frequency of the low-pass filter to about 100 Hz, noting that higher capacitance means lower cutoff frequency since fcutoff = 1/(2(RC). Play a song again and record your observations below. How does this low-pass filter affect the music?

Testing the performance of the low-pass filter

1. Connect the output of the function generator to the input of your low-pass filter and to one channel of the oscilloscope (use a T-splitter).

2. Wire the output of the low-pass filter to another channel of the oscilloscope, as sketched to the right.

1. Important: Push the DC offset button on the function generator in (or out in some cases) to remove any DC voltage from the signal, so that the DC offset does not influence the measurements.

2. Notation: Vin is the signal coming into the low-pass filter, and Vout is the signal coming from the low-pass filter, as indicated in the above diagram. Our goal is to compare these two signals.

3. (3) Adjust R and C as necessary to generate a low-pass filter with a cutoff frequency of around 1000 Hz. Measure the values of R and C, and calculate the physical cutoff frequency of the filter, showing your work below. Note: The cutoff frequency should be around 1000 Hz, but may not be exact ( say within 10%.

Measured resistance, R = ___________ (

Measured capacitance, C = ___________ (F

Physical cutoff frequency, fcutoff = ___________ Hz

4. Set the function generator to supply a sine wave of frequency equal to the filter’s cutoff frequency, such that the amplitude of the signal we are calling Vin is around 8 V peak-to-peak.

5. Now we are ready to test the performance of the low-pass filter. The digital oscilloscope can be set up to display the frequency of each signal and the peak-to-peak voltage of both channels as follows:

1. Push the Measure button on the oscilloscope.

2. Select channel 1 by pushing Ch 1.

3. Scroll on the right-side menu to select Frequency and Pk-Pk.

4. Repeat for channel 2.

5. Push Menu Off.

6. At this point, two signals should be visible on the oscilloscope screen: the input to the filter, Vin, and the output from the filter, Vout, along with the frequency and peak-to-peak amplitude of each signal.

7. Consult the instructor or teaching assistant if you are unable to accomplish this yourself.

6. Measure and record the frequency of the signal, the peak-to-peak amplitude going into the low-pass filter, the peak-to-peak amplitude coming out of the low-pass filter, and the time shift (t between the two signals. Then, using these measured values, calculate the gain G of the low-pass filter and the phase angle shift (. Here are some hints regarding these measurements and calculations:

1. Gain G is the ratio of output voltage amplitude |Vout| to input voltage amplitude |Vin|, i.e., G = |Vout| / |Vin|. Note that peak-to-peak voltage is twice the amplitude, i.e., |Vin|p-to-p = 2|Vin| and |Vout|p-to-p = 2|Vout|.

2. The voltage scale on the scope can be adjusted as necessary for better amplitude resolution.

3. To measure the time shift, use the oscilloscope’s cursor feature. You can measure the time increment between peaks or troughs in the two signals. Or, you can measure the time increment between the zero crossing of the input signal and the zero crossing of the output signal. Note: If zero crossings are used, it is critical that the vertical position of each oscilloscope trace be adjusted so that zero volts corresponds to a grid line. Otherwise it will be very difficult to tell (by eye) where the signal crosses zero.

4. The time scale on the scope can be adjusted for better time shift resolution.

5. The period of the signal is calculated as T = 1/f.

6. (4) The absolute value of phase angle ( is then calculated as [pic]. The sign of ( is positive if the output leads the input, and negative if the output lags the input.

Signal frequency, fsignal = ___________ Hz

Peak-to-peak amplitude going into the low-pass filter, |Vin|p-to-p = ___________ V

Peak-to-peak amplitude coming out of the low-pass filter, |Vout|p-to-p = ___________ V

Time shift between the two signals, (t = ___________ (s

Gain of the low-pass filter, G = ___________

Period of the signal, T = ___________ s

Phase angle shift (in degrees) of the low-pass filter, ( = ___________ o

7. Create an Excel file with the following columns of data, one row for each frequency:

1. input frequency f (Hz)

2. normalized input frequency f /fcutoff

3. input peak-to-peak amplitude |Vin|p-to-p (volts)

4. output peak-to-peak amplitude |Vout|p-to-p (volts)

5. gain G = |Vout|p-to-p / |Vin|p-to-p

8. (4 for #7,8) Take data for several frequencies, and enter the results into your spreadsheet. The following are recommended as a minimum to start with:

1. approximately 100 Hz

2. approximately 200 Hz

3. approximately 400 Hz

4. approximately 750 Hz

5. approximately 1,000 Hz

6. approximately 2,000 Hz

7. approximately 4,000 Hz

8. approximately 7,500 Hz

9. approximately 10,000 Hz

9. Create a Bode diagram, namely a frequency response diagram – a plot of gain G as a function of relative frequency f /fcutoff – within your Excel spreadsheet. Use symbols only (no line) for your data points:

Here are some specifics about the plots:

1. Use your actual calculated value of fcutoff, not 1000 Hz, for better accuracy.

2. Use a log scale for both horizontal and vertical axes.

3. At this point, data have been collected for about nine frequencies. This should be sufficient to start to see a trend in the plot. However, many more data points are needed to produce an acceptable plot. Repeat the measurements for a wide range of frequencies.

4. Hint: Enter data and update the plot as data are taken, so that the plot can be used as a guide to determine which frequencies to study.

5. Make sure you take enough data to create a smooth curve of gain vs relative frequency. Start with the lowest possible stable frequency, and end with frequencies at least 100 times fcutoff. (This will generate a minimum of four decades in the horizontal scale.) Fill in with as many frequencies as necessary to obtain a nice-looking plot ( this should be 10-20 data points.

6. A significant part of the grade for this lab report will be determined by the quality of your plot ( make sure there are enough data points before you leave the lab.

10. (2 for #9,10) Attach a printout of your tabulated data.

Excel table – See attached page(s) from the spreadsheet ___________

11. (3) On the same graph as your frequency response diagram, plot the theoretical gain for a first-order passive low-pass filter for comparison. For consistency, use symbols only (no line) for your data, and a line only (no symbols) for the theoretical curve. For plot of theoretical gain line , data should be in descending or ascending order. Label, number and attach your frequency response diagram.

Frequency response diagram – See attached, Figure number ___________

12. When all finished, disconnect your circuits (clean off the breadboard) so that the next group has to build the circuits from scratch like you did.

High-pass filter

1. Construct a simple first-order high-pass filter with fcutoff ( 1000 Hz. The circuit diagram is sketched below, along with one possible wiring configuration on the breadboard.

[pic] [pic]

2. (2) Show here any necessary calculations to verify the cutoff frequency of your circuit.

3. (4) Connect the function generator output as Vin and connect Vout to the oscilloscope. Play around with sine waves of various frequencies and DC offsets, and test whether this simple high-pass filter works – does it remove the DC offset, attenuate low frequencies, and let high frequencies pass? Record qualitative results.

4. Now imagine that the resistor is of infinite value. In other words, it isn’t even there, as sketched below. This circuit represents the simplest possible high-pass filter; it has a cutoff frequency of zero. In other words, all it does is cut off DC (zero frequency) signals, but lets AC signals of any frequency pass through.

[pic] [pic]

5. Remove the resistor from your high-pass filter circuit so that you are left with the simplest possible high-pass filter, as sketched above (just a capacitor in series with the voltage signal).

6. (4) Play around with the input frequency and DC offset of the function generator, and record your observations. In particular, see if this simple circuit removes DC offset from the signal. Just record qualitative results.

7. Remove the high-pass filter from the breadboard – we no longer need it.

Discussion Questions

1. (8) How does a low-pass filter affect music? Discuss how this might be useful in concerts or recordings.

2. (8) Do the experimental gain measurements of your low-pass filter agree with the theoretical values? If not, suggest possible reasons why not.

3. (7) Did the simplified high-pass filter perform as expected? Briefly justify your answer.

4. (7) Discuss how the predicted and actual cutoff frequency compare, based on your Bode plot.

-----------------------

Lab 6

Lab 6

[pic]

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download