Copy of lab7_active_filters_v2.docx

pdf

School

University of Michigan *

*We aren’t endorsed by this school

Course

215

Subject

Electrical Engineering

Date

Feb 20, 2024

Type

pdf

Pages

17

Uploaded by GeneralTarsierMaster519

Report
EECS 215 Laboratory 7 –Filters L ABORATORY 7 – A CTIVE F ILTERS Name: Section Number: Submission instructions: This is a one-week lab. Use this document as your lab final report. Submit report to Gradescope by 5PM Thursday, Dec 8, 2022. You also need to save the data you get into csv files for further analysis. Laboratory 7 – Active Filters 1 Parts List 1 Introduction 1 Laboratory: Part One - Sallen-Key 1st Stage 4 Laboratory: Part Two - Sallen-Key 2nd Stage 7 Laboratory: Part Three - Connecting The Stages 10 1. P ARTS L IST 1. 2 LM741 operational amplifiers 2. 1 4.7K Ohm resistor 3. 1 10K Ohm resistor 4. 1 68K Ohm resistor 5. 1 200K Ohm resistor 6. 2 1nF capacitors 7. 2 100pF capacitors 2. I NTRODUCTION In this lab you will learn how to build a two stage Sallen-Key low pass active filter, while using your AD2 to record responses. Using those responses from your WaveForms application, you will then compare this to theory. Filter circuits are discussed in section 9-4 through 9-6 of the 1 of 17
EECS 215 Laboratory 7 –Filters book [Circuit Analysis and Design: Ulaby, Maharbiz, and Furse, 2022], with active filters discussed in section 9-6. For all of the measurements in this lab, connect scope channel 1 to the input along with wavegen 1. This will be the reference channel. Connect scope channel 2 to the output. All of the measurements in this lab will be looking at measured output characteristics vs. the measured input signal. The two stage Sallen-Key filter will be constructed using 2 LM741 operational amplifiers. The first two parts of the lab are to build each stage independently, then in the final part we will connect the output of one to the input of the other. Figure 1: Single Stage Sallen-KeyFilter A new function of waveforms will be used to examine the frequency response of the filter. On the WELCOME tab the NETWORK button pulls up a Bode plot which will be used to define the characteristics of the filter. Bode plots are discussed in section 9-3 of the book. Note that the y-axis of the magnitude is in dB and the phase is measured in degrees. The conversion between normal magnitude and dB is: XdB = 20*log10(X). The phase difference is between channel 1 and channel 2, with channel one being the default reference (the input signal). When you set-up your bode plot measurement under NETWORK, be sure that the PHASE option is turned on. 2 of 17
EECS 215 Laboratory 7 –Filters Figure 2: Depiction of where the Network Analyzer is Figure 3: An example of a measured Bode plot 3 of 17
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
EECS 215 Laboratory 7 –Filters 3. L ABORATORY : P ART O NE - S ALLEN -K EY 1 ST S TAGE In this part of the lab we will form the first stage of the Sallen-Key filter. We will need: 1 LM741 operational amplifier 1 68K Ohm resistor 1 10K Ohm resistor 1 1nF capacitor 1 100pF capacitor Figure 4: LM741 chip diagram. Figure 5: Single Stage Sallen-Key Filter Build the circuit as shown in the diagram above with R 1 = 10k Ohm, R 2 = 68k Ohm, C 1 = 1nF, and C 2 = 100pF. Remember: the operational amplifier needs a supply voltage of +/- 5V going into pins 4 and 11 respectively. 4 of 17
EECS 215 Laboratory 7 –Filters Now to add the AD2 wires. For this we only need 1 ground wire (solid black), 1 waveform generator (1) wire (solid yellow), and 1 pair of scope wires(solid orange and orange with a white stripe). Connect the ground wire to the base of capacitor C 2 . Connect the scope reference wire (orange with a white strip) to ground as well. Connect the waveform generator(1) wire (solid yellow) and scope 1 to v in . Connect the scope 2 measure wire to v out . Also add the V+ (solid red) and V-(solid white) wires to the operational amplifier so that it receives power. Once the circuit is built connect the AD2 to your computer and launch Waveforms. Open the Network tab. Configure the following settings in the Network tab: Scale: logarithm Start: 1 kHz Stop: 500 kHz Samples (Steps): 151/ decade Magnitude range: 10 to -60 dB Phase: 0 to 360° Run the Network tab, and you should see the similar Bode plot as Figure 3. Take a screenshot of the Bode plot Also save the CSV data file from Waveforms for use in Matlab Go to File -> Export to save the CSV data, and double check that it contains 4 columns of data. The screenshot of your Network Bode plot 5 of 17
EECS 215 Laboratory 7 –Filters Then use the starter matlab code from Canvas to calculate the theoretical transfer function, calculate the complex poles, and generate a bode plot comparing the ideal transfer function to your measured data. Read your measured data into Matlab and compare the measured frequency response to the theoretical transfer function. You will see deviations from theory at higher frequencies due to the complex output impedance of the opamp. Enter your data below. Briefly comment on the agreement of theory and experiment. Transfer function H(s): - 1/(c2r1s-c2r2s+c1c2r1r2s^2 - 1 Magnitude (kHz) Phase (deg) Complex pole 1: 19300 -118.2 Complex pole 2: 19300 118.2 6 of 17
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
EECS 215 Laboratory 7 –Filters The screenshot of your bode plot in Matlab Comment on differences between theory and experiment: No major differences between ideal and experiment 3. L ABORATORY : P ART T WO - S ALLEN -K EY 2 ND S TAGE In this part of the lab we will form the second stage of the Sallen-Key filter. We will need: 1 LM224N operation amplifier (use the same on that you used in part one) 1 4.7K Ohm resistor 1 200K Ohm resistor 7 of 17
EECS 215 Laboratory 7 –Filters 1 1nF capacitor 1 100pF capacitor Figure 6: Single Stage Sallen-Key Filter Build the circuit as shown in the diagram above with R 1 = 4.7k Ohm, R 2 = 200k Ohm, C 1 = 1 nF, and C 2 = 100pF. Build the circuit next to the previous one with a separate operational amplifier on the same breadboard. Move the measurement wires from the previous circuit to this one. Once the circuit is built, connect the AD2 to your computer and launch Waveforms. Open the Network tab. Configure the following settings in the Network tab: Scale: Logarithmic Start: 1k Hertz Stop: 500k Hertz Samples (Steps): 151/ decade Magnitude range: 10 to -60 dB Phase: 0 to 360° Run the Network tab, and you should see the Bode plot. Take a screenshot of the Bode plot Also save the CSV data file from Waveforms for use in Matlab 8 of 17
EECS 215 Laboratory 7 –Filters After the header data, our CSV file should contain 4 columns as in the stage 1 measurement. Check your file to be sure you have collected all the necessary data. The screenshot of your bode plot Then use the starter matlab code from Canvas to calculate the theoretical transfer function, calculate the complex poles, and generate a bode plot comparing the ideal transfer function to your measured data. Read your measured data into Matlab and compare the measured frequency response to the theoretical transfer function. You will see deviations from theory at higher frequencies due to the complex output impedance of the opamp. Enter your data below. Briefly comment on the agreement of theory and experiment. Transfer function H(s): - 1/(c2r1s-c2r2s+c1c2r1r2s^2 - 1 9 of 17
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
EECS 215 Laboratory 7 –Filters Magnitude (kHz) Phase (deg) Complex pole 1: 22880.0 180.0 Complex pole 2: 11780.0 180.0 The screenshot of your bode plot in Matlab 10 of 17
EECS 215 Laboratory 7 –Filters Comment on differences between theory and experiment: No major differences between ideal and experiment 11 of 17
EECS 215 Laboratory 7 –Filters 4. L ABORATORY : P ART T HREE - C ONNECTING T HE S TAGES In this part of the lab we will place a jumper cable from the output of stage one to the input of stage two. Cascaded active filters are discussed in section 9-7 of the book. We will need: 1 Jumper cable Disconnect the waveforms generator(1) wire(sold yellow) going into the input of the second stage. Add the jumper cable, connecting the output of stage one to the input of stage two. The new input to stage two is now the output of stage one instead of the voltage source we used in part 2. The combined circuit should look like this: Figure 7: Two Stage Sallen-Key Filter 12 of 17
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
EECS 215 Laboratory 7 –Filters Figure 8: Example circuit for the two stage Sallen-Key filter Once the circuit is built connect the AD2 to your computer and launch Waveforms. Click the Network option on the welcome screen. Configure the following settings in the Network tab: Scale: Logarithmic Start: 1k Hz Stop: 500k Hz Samples: 151/decade Decade: 10 to -90 dB Phase: 0 to 360° Run the Network tab, and you should see the Bode plot. We will not be analyzing this circuit with Matlab. Take a screenshot of the Bode plot. The screenshot of your bode plot 13 of 17
EECS 215 Laboratory 7 –Filters Next we will simulate a step response to the system. Close the Network tab as we will no longer be worried about the frequency domain analysis the Bode plot gives us. Instead, open up the Scope which does time domain analysis along with Wavegen. Keep the same circuit as we used for the Bode frequency analysis. Add a scope to the input waveform. Configure the following settings in the Wavegen 1 tab: Type: Square Frequency: 18k Hz Period: 55.55u sec Amplitude: 1V Offset: 1V Run the Waveform generator and go to Scope, scale the x and y axis appropriately to see the periodic waveform. Display the input square wave (Ch2) and output signal (Ch1) together. Take a screenshot of the Scope The screenshot of your Waveforms for the scope 14 of 17
EECS 215 Laboratory 7 –Filters Configure the following settings in the Wavegen 1 tab: Type: Square Frequency: 5k Hz Period: 200u sec Amplitude: 1V Offset: 1V Run the Waveform generator and go to Scope, scale the x and y axis appropriately to see the periodic waveform. Display the input square wave (Ch2) and output signal (Ch1) together. Take a screenshot of the Scope The screenshot of your Waveforms for the scope 15 of 17
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
EECS 215 Laboratory 7 –Filters Configure the following settings in the Wavegen 1 tab: Type: Square Frequency: 80k Hz Period: 12.5u sec Amplitude: 1V Offset: 1V Run the Waveform generator and go to Scope, scale axis appropriately to fit the graph. Display the input square wave (Ch2) and output signal (Ch1) together. The output should be a straight horizontal line at 1V. Take a screenshot of the scope: The screenshot of your Waveforms for the scope 16 of 17
EECS 215 Laboratory 7 –Filters 17 of 17