Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
ECE 3300 Lab 2 ECE 1250 Lab 5 Name __________________________ Lab Section ___ Student Folder # ____ Resistive Sensors Background: In Lab 1 you used the MyDAQ to measure resistance. You will repeat those measurements for several types of resistive sensors, including some you will build. In Lab 2 you built an LED resistance indicator. In this lab you will build a different kind of circuit – an op amp switch to respond to changes in resistance. In Lab 9 you will build a sensor system of your own choosing. You may choose to use some of the sensors from this lab. Overview: In this lab you will: Test several types of resistive sensors: o Thermistor (R changes with temperature) o Photoresistor (R changes with light) o Graphite resistor (R changes with width, length – use this as a moisture sensor) Build two types of circuits that respond to changes in resistance: o Op amp switch (for your thermistor and one other sensor of your choice) o Op amp inverting amplifier (for your thermistor) Equipment List: MyDAQ board with cables. (You can hook them to the lab computers if you don’t want to bring your laptop.) Multisim software. (This is also running on the lab computers) Protoboard & wire kit 2 Alligator clips (to clip onto hand-drawn resistors) Small amount of tap water in a cup. Thermistor RL0503-5820-97-MS Photoresistor PDV-P8103 LM324N Op Amp (or other op amp, look up the data sheet online to find pin diagram) Graphite pencil, paper Resistors: 1k, 10k ohm (from previous labs) Potentiometers: 50k,100k (ok to substitute smaller pots in series with regular resistors) LED (any color) (from previous lab) Instructions & Reference Material: (See Online Lab Page for data sheets, etc.) 1 UNIVERSITY OF UTAH DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 50 S. Central Campus Dr | Salt Lake City, UT 84112-9206 | Phone: (801) 581-6941 | Fax: (801) 581-5281 | www.ece.utah.edu ECE 1250 Lab 5 I. Resistive Sensors (20 points) A. Thermistor A thermistor changes resistance (R ) with temperature. Measure the resistance of your thermistor in several conditions. Estimate the temperature of each measurement above using the data sheet1 for the thermistor. Table 1: condition R (ohms) Measured Approx T(C) (from data sheet) Room Temp (about 25 C) Body Temp (hold between your fingers) Cold (use ice, please don’t pop ice pack) Hot (use hot pack) Resistance Range for Thermistor: Rmin = Rmax = B. PhotoResistor A photoresistor changes resistance (R ) with light. Measure the resistance of your photoresistor in several conditions: Table 1: condition Totally covered (no light) Half covered (use paper or tape) Totally uncovered (full light) Resistance Range for PhotoResistor: Rmin = R (ohms) Rmax = C. Graphite Resistors / Moisture Sensor Tear out the following page. Use a graphite pencil to fill in the rectangular boxes to create graphite resistors. Fold the paper over to make it easy to clip alligator clips onto the resistors you have made, as shown. Measure the dry resistance of each configuration. Make up and try an additional configuration. Repeat with a drop of water (from your finger) in the center of the resistor. This gives you Rwet. Resistance Range for Moisture Sensor: Rmin = Rmax = 1 http://media.digikey.com/pdf/Data%20Sheets/Thermometrics%20Global%20Business%20PDFs/RL0503%20 Series.pdf 2 UNIVERSITY OF UTAH DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 50 S. Central Campus Dr | Salt Lake City, UT 84112-9206 | Phone: (801) 581-6941 | Fax: (801) 581-5281 | www.ece.utah.edu ECE 1250 Lab 5 Test Sheet for Graphite Resistors (Remove from report before wetting) Rdry = Rwet = Rdry = Rwet = Rdry = Rwet = Rdry = Rwet = 1. 2. 3. 4. Fold Fold choice (make one up). Try to get the 5. Your largest possible range of Rmin to Rmax 3 UNIVERSITY OF UTAH DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 50 S. Central Campus Dr | Salt Lake City, UT 84112-9206 | Phone: (801) 581-6941 | Fax: (801) 581-5281 | www.ece.utah.edu ECE 1250 Lab 5 4 UNIVERSITY OF UTAH DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 50 S. Central Campus Dr | Salt Lake City, UT 84112-9206 | Phone: (801) 581-6941 | Fax: (801) 581-5281 | www.ece.utah.edu ECE 1250 Lab 5 I. Op Amp Switch: (40 points) In the first part of the lab, you experimented with resistive sensors for temperature, light, and moisture. In this part of the lab, you will design, build, and test an op amp switch that can turn on an LED or other device when resistance changes. We will experiment with the thermistor first, but the switch (section II) and amplifier circuits (section III) you build can be used for other sensors, too, which you will do in section IV. A. Simulate an Op Amp Switch:2 Simulate the op amp switch below. You should have simulated something very similar to this in your op amp homework. Use an LM324N Op Amp, a +15V power supply (V1), and a ground (0V) as the ‘negative’ power supply, as shown. Figure 1 Op Amp Switch (Note: it is ok to substitute a 10k or 20k pot for the 50k pot if needed, but your tuning will be less sensitive. Also Note: The 20k pot shown here is actually the thermistor, NOT a pot.) Start with the room temperature value of your thermistor R4 = 10kohms (the R4 potentiometer at 50%). Tune (adjust) the R2 potentiometer until the LED is barely off. Then increase and decrease the sensor resistance (adjust the R2 potentiometer), and notice when the LED is on/off. R4 Is LED Vo (expect 0 on or off? or +15V) OFF 10kohms (R4 at 50%) <10k ohms > 10k ohms Now swap Vp and Vn and repeat: R4 Is LED Vo (expect 0 on or off? or +15V) 10kohms OFF (R4 at 50%) <10k ohms > 10k ohms 2 Notes: Adjust R2 so LED is barely off R2 = k ohms Notes: Adjust R2 so LED is barely off R2 = k ohms Multisim file is available online. 5 UNIVERSITY OF UTAH DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 50 S. Central Campus Dr | Salt Lake City, UT 84112-9206 | Phone: (801) 581-6941 | Fax: (801) 581-5281 | www.ece.utah.edu ECE 1250 Lab 5 B. Build and test the Op Amp Switch: 1) Start by placing the op amp in your protoboard, as shown. Note the small circular cutout at the top of the op amp DIP package. Sometimes this is just a small round dot in the upper left corner. This tells you which side is up, and where pin ‘1’ starts. Pin numbers always start in the upper left and proceed counter clockwise to the upper right. The LM324N package has FOUR op amps in one package. For example, use pins 1(1OUT as your Vo), 2 (1IN- as your Vn), and 3 (1IN+ as your Vp). Note that Multisim will indicate which pins to hook up if you have chosen the correct package in your simulation. Figure 2 LM324 Op Amp Pin Out Diagram (See online video for details on hooking up an op amp) 2) Connect power. Vcc (+15V) is pin 4. Gnd (AGND=0V) is pin 11. Wire these up to your MyDAQ. 3) Build the circuit in Figure 1. Put the Thermistor in place of the R4 pot. Remember to place the flat part of the LED pointing down to the ground. With the thermistor at room temperature, adjust R2 until the LED is barely off. Cool the thermistor to turn the LED on. Swap Vp and Vn. Warm the thermistor to turn the LED on. It works! Ok, what if it doesn’t? Debug: Check Vcc and Gnd at every point where you expect them to be (top/bottom of each voltage divider, at the op amp chip, and in the LED circuit). Especially be sure you powered your op amp (pin 4 = 15V and pin 11 = 0V). Is your op amp in the right direction ? (see dibet at top, shown in Figure 2) Is your LED in the right direction? (flat side towards ground) Check Vp and Vn. They should be approximately equal at room temp. Multisim will tell you the values to expect throughout the circuit. Check Vo. If Vp>Vn, Vo should be +15V. If Vp<Vn, Vo should be 0V. Is your op amp burned out? Try another one… 6 UNIVERSITY OF UTAH DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 50 S. Central Campus Dr | Salt Lake City, UT 84112-9206 | Phone: (801) 581-6941 | Fax: (801) 581-5281 | www.ece.utah.edu ECE 1250 Lab 5 II. Op Amp Inverting Amplifier (40 points) In this part of the lab, you will design, build, and test an inverting amplifier (see Figure 3) for your thermistor. The goal is to be able to get as large a voltage difference on Vo as possible for the range of resistances of your thermistor. Figure 3 Thermistor Amplifier. The values of components indicated here are approximate. Record on this figure the actual values you use. 1) What is the resistance of your thermistor at room temp? (from part I) R_roomtemp = =R1 When you build the circuit, you will adjust R1 to be equal to R_roomtemp, so Vo=0 at room temp. Use this value for R1 for the rest of the design. 2) What is the range of resistances for your thermistor (from part I)? Rmin = Rmax= 3) What is the range of input voltage Va for the range of resistances of your op amp? Calculate Va from the bipolar voltage divider (See Voltage Divider Cookbook in your course notes): 2 R1 Va V 1 1 R1 R 4 Va_min = Va_max = 4) We want to get the largest possible swing (change) in Vo for the range of input voltages above. Is the absolute value of Va_min or Va_max larger? Use this value to design the amplification. We want to amplify this value until it reaches the rail voltage (+/- 15V). a) For an inverting amplifier: Vo = Va (-R3/R2) = (+/-) 15V 7 UNIVERSITY OF UTAH DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 50 S. Central Campus Dr | Salt Lake City, UT 84112-9206 | Phone: (801) 581-6941 | Fax: (801) 581-5281 | www.ece.utah.edu ECE 1250 Lab 5 b) There is one other important consideration for R2,R3, and that is to limit the current going through them. If you don’t limit the current, it will change the voltage divider (R1-R4), and mess up your calculation for Va. Choose R2+R3 > 100kohms. Choose values for R2 and R3. Use either standard value resistors or potentiometers. R2 = R3= 5 ) Simulate your circuit with Multisim to be sure it will work. (the file for Figure 3 is on the lab website) . Adjust the values for R4 (thermistor) to be Rmin, Rmax, and Rroom temp, and measure the associated Vo values. Record the values of components used in Figure 3 above. R4 thermistor Rmin = Rroomtemp = Rmax = Va expected Vo expected 0V 5) Build and test your circuit. For this circuit, use +15V on pin 4 of the op amp and -15V on pin 11. Note that -15V is used at the bottom of the voltage divider (connected at the bottom of R1) Be sure to include the values of the components you use in Figure 3. R4 thermistor Rmin = Rroomtemp = Rmax = Va measured Vo measured TA initial here that it worked _________ 8 UNIVERSITY OF UTAH DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 50 S. Central Campus Dr | Salt Lake City, UT 84112-9206 | Phone: (801) 581-6941 | Fax: (801) 581-5281 | www.ece.utah.edu