IPFW First-year Engineering Program ENGR 127 Computer Lab Lab 1

advertisement
IPFW First‐year Engineering Program ENGR 127 Computer Lab Lab 1: Equivalent Resistance Lab (Introduction to MATLAB) ‐ Part the First In this lab we will be measuring resistors in various configurations and comparing those measurements to calculations in MATLAB. The primary goal is to get introduced to using MATLAB as a calculation and programming tool. You will also become familiar with measuring resistance, calculating equivalent resistances for different configurations, using a solderless circuit breadboard. You will work with one other student to take the data. However, both you and your partner should record the data, carry out your own MATLAB work and prepare individual lab report memos. All calculations must be done in MATLAB. Instructions: 1. Measuring Resistance (Entering variables in workspace) a) Goal: Measure the values of your three resistors b) Using the Digital Multimeter. Follow steps outlined in Figure 1. 1. Move selector to a resistance (Ω) scale 2. Turn meter ON (please be sure to turn meter off when not in use) 5. Hold leads on the two resistor leads to measure resistance. If the meter displays a 1 on the left go to a higher scale. If value is < 10% of scale maximum go to a lower scale. The three highest scales read in kOhms; the lower scales in Ohms. 3. Plug red lead into the VΩmA plug 4. Plug black lead into the COM plug Figure 1: Steps required to measure resistance. Numbers in the boxes indicate the order to complete steps. Watch units; some scales are in ohms and some are in kiloOhms. Turn off when not in use. The scale markings are the maximum value for the associated range. c) Measure and record the resistance of the three resistors Resistor 1: ___________ Ohms Resistor 2: ___________ Ohms Resistor 3: __________ Ohms a) Enter these three resistance values as variables in MATLAB. Use “R1” for the smallest resistance, “R2” for the middle resistance and “R3” for the largest resistance. 2. Set up and measure the resistance of pairs of resistors in series and in parallel (Simple Calculations) Resistors in Series and Parallel are shown in Figure 2. It also shows the equations for the equivalent resistance of these networks. Series: Parallel:
1
1
1
Figure 2: These schematics show the configuration and equations for series and parallel networks of two resistors. RE represents the equivalent resistance of the arrangement and shows where to measure it. Figure 3 diagrams how a solderless breadboard is laid out and one way of configuring two resistors in series. Can you figure out how to put the resistors in parallel on the board? The two rows nearest each long edge are connected together. RE
Each column of 5 holes on one side of the center channel are connected together.
Two resisters in series on a breadboard (a) (b) Figure 3: The layout of a standard solderless breadboard. Picture (a) shows the layout of the entire breadboard. A component is inserted by pushing its leads into the holes on the board. Picture (b) shows a layout for two resistors in series on a breadboard. Specific Instructions: a) There are three possible pairings of the three resistors for each possible pairing construct a series network and measure its total resistance. Then construct the parallel network and measure its total resistance. Record the results in Table 1. b) MATLAB (do individually and compare): Calculate equivalent resistance for each of the measurements you made in part (a). Use the resistance variables (i.e., R1, R2, R3) you previously entered into MATLAB. Record your calculated resistances in Table 1. Table 1: Equivalent Resistance for Pairs of Resistors in Series and Parallel Resistances Series Configuration Parallel Configuration Used Measured R Calculated R Measured R Calculated R 1 2 3 c) What patterns do you notice in the network resistances? (discuss with your partner) Show the results to your instructor and discuss the answer to the question IPFW First‐year Engineering Program ENGR 127 Computer Lab Lab 1: Equivalent Resistance Lab (Introduction to MATLAB) ‐ Part the Second 3. MATLAB (individually): Organize the Part the First MATLAB calculations into a script. Write a single script that has two resistances in the input section and calculates the equivalent resistance for the resistors in series and the equivalent resistance for the resistors in parallel. Then execute this script three times with varying input values to cover all possible pairings. This script should include a hard coded input section and a calculation sections for each configuration. For comments include:  Introductory comments: that include the word “program”, the file name for the script, the purpose of the script and how to use it. Your name and the date.  Variable definitions: the meaning and units for all variables used clearly presented.  Program Section Descriptions: comments identifying the input section, the parallel network calculation and the series network calculation Copy the script and its execution to a word document to save for your lab report memo. Important Note: all of the computer work (MATLAB calculations, scripts and any word processing) is to be done individually. 4. Three resistors in series and in parallel (Vector Calculations) a) Set up a series network using all three resistors, measure its resistance. R =____________Ohms b) MATLAB (individual): Create a vector (R) containing the three resistances. Calculate the equivalent resistance of this series circuit using vector calculations and the sum function c) Set up a parallel network using all three resistors measure its resistance. R =____________Ohms d) MATLAB (individual): Calculate the equivalent resistance of this parallel circuit using vector calculations e) MATLAB (individual): Organize these calculations for a series network and a parallel network of three resistors into a second script. Copy the script and its execution to a word document to save for your lab report memo. 5. Combined Series and Parallel Network a) Design an arrangement of the three resistors where some resistors are in series and some in parallel. Do a hand diagram of your network (similar to those in Figure 2) showing where it will be measured. Check: Have the instructor check your circuit and diagram. b) Measure the total resistance of this network. R = __________________Ohms c) Calculate the equivalent resistance of your network with a MATLAB script (see example script). This calculation may be included in the previous three‐resistor script. Lab Report Memo Requirements: Due: next computer lab Individually prepare a memo summarizing this exercise. Memo header, figure and table formats from ENGR 127 must be followed. Include the following elements in your memo: 1. A memo header and well formatted overall memo 2. All figures and tables are formatted according to the format standards from ENGR 127 and available on the ENGR 128 website. 3. An introduction of one or more paragraphs that summarizes the goal and key results of your memo. An Acknowledgement your partner 4. Table 1: A short table with the resistances of the three resistors 5. Table 2: A table of results for two resistor networks (i.e. Table 1 from this document but filled in). 6. Add a row to the above table with the measured and calculated resistance of series and parallel networks of using all three of your resistors 7. Figure 1: A figure diagraming your combined Series/Parallel Network. Your diagram should be similar to the schematics shown in Figure 2 in this memo. 8. Table 3: A table of the measured and calculated total resistance of this network. 9. Appendices: Include appendices of the MATLAB scripts and their execution for calculating all required values (e.g. you could have two scripts: one for two‐resistor series and parallel calculations, one for the three resistor series, parallel and combined network calculations). These scripts must include introductory comments (file name, your name, and what the script does), comments defining all variables with units and comments on the program steps. Resistance Network Lab – Score Area Expectation 1 2 3 4 5 6 7 8 9. 10. Memo Header & overall format. Figure and Table Formats Introduction Table 1: Initial Resistance Table Table 2: Two Resistor Networks 3 Resistor Networks row Series‐Parallel Circuit: Diagram and Table Appendices: Scripts 2 pts each Memo header is complete and correctly formatted. Overall memo is well formatted with clear written presentation. Figure and table formats from ENGR 127 must be followed. Partner is acknowledged An introduction of one or more paragraphs that summarizes the goal and key results of your memo A short table with the resistances of the three resistors A table of results for two resistor networks (i.e. Table 1 from this document but filled in). Row added to table 2 with the measured and calculated resistance of series and parallel networks of using all three of your resistors. Figure 1: Circuit Diagram: A figure diagraming your combined Series/Parallel Network. Table 3: A table of the measured and calculated total resistance of this network. Includes some clearly presented scripts and their execution Includes scripts & execution for all calculations (two resistors ‐ series and parallel, three resistors ‐ series, parallel and mixed) with full comments 
Download