Академический Документы
Профессиональный Документы
Культура Документы
Embedded Systems
Fall 2011
9/28/2011 11:21 AM
186
ECE154
Embedded Systems
Fall 2011
For 2011 there will be two options for the temperature sensor. TEMEPEATURE SENSOR OPTION 1 Direct Voltage Sensor with student-designed auxiliary circuitry We have the Analog Devices AD22100KTZ temperature sensor, which outputs a voltage proportional to the current temperature. This sensor may be hooked up with just a simple R-C buffer (as on page 1 of its spec sheet) directly to the ADC input. The disadvantage of using this sensor as is is that it will only exploit a fraction of the available voltage range over the temperature range of interest. This will be unacceptable as is for our lab. If you choose to use the AD22100, you must devise a means for the full dynamic range of the 8-bit ADC to be exploited over the temperature range of interest. IF YOU CHOOSE TO USE THE AD22100: Q1: By studying the spec sheet, what do you expect the voltage range of the unmodified AD22100KTZ corresponding to temperatures between 0C and 100C to be? Q2: What does the range in Q1 imply about the precision of your thermometer compared with one that utilizes the full dynamic range of the ADC? (Quantitative statements please!) Q3: Design a voltage-to-voltage converter circuit or some other equivalent meqans to expand the dynamic range of your sensor to fully exploit the ADC range. TEMPERATURE SENSOR OPTION 2 High resolution current sensor with provided conversion circuit. This is the sensor we have used successfully in past years; along with the support circuit given below it has the advantage of exploiting the full dynamic range of our ADC over the temperature range of interest. We will use the Analog Devices AD590 temperature sensor, its data sheets are on the course web site, as are those for the op-amp referenced below. The AD590 is a 2-terminal device; the packaging we have has a third lead which you can leave unconnected, but better practice would be to ground 9/28/2011 11:21 AM 187
ECE154
Embedded Systems
Fall 2011
this third lead as this will allow the metal case to act as a shield against electrical interference. The AD590 produces a current proportional to the ambient temperature; according to its specifications it produces a linear current output varying by 1 A/K over a wide temperature range (-55C-+150C). Our A/D converter measures voltage, not current, so we will need to convert this temperature-varying current into a linearly varying voltage. We plan to use the on-board power supply (nominally 0-5V) so this specifies the range of our conversion from 0-100C. Thus we want a circuit whose voltage varies by 50 mV/C. Here is an analog signal processing circuit (Figure 1) to generate the desired voltage and a list of the required components (Table 1) (courtesy of EE324 at Penn State):
Figure 1. An analog signal processing circuit for the AD590. Table 1. Components list for the circuit in figure 1. Symbol Component Value or Device Name R1 10 K R2 470 K R3 1K R4 1 K Pot. R5 12 K U1 LMC660 Quad Op Amp
9/28/2011 11:21 AM
188
ECE154
Embedded Systems
Fall 2011
Note that the potentiometer is critical in calibrating the circuit. Operation is very sensitive to adjustment of potentiometer, so use 10-turn pots, not 1-turn pots. It is easy for thermometer to appear nonfunctional if the pot is far away from correct setting. Do your freezing calibration (below) to just above 32 (say 33) so we know we have not pegged the range. Prior to the calibration exercise, (solderlessly) attach your sensor to long lead wires (24 or more) so we can easily put the sensor in the hot and cold baths. Alligator clips with adequate insulation should be ok. Some questions to test your analog analysis capabilities: Q1: Assume that the op-amps are ideal and the component values listed in table 1 are exact; compute the transimpedance of the circuit, v T(t)/ iT(t). If the AD590 produces 1 A/ K as specified in its datasheet, does the circuit in figure 5 produce an output voltage with the desired scale factor, KT, of 50 mV/ C? Explain your answer and justify it by analyzing the operation of the relevant portion of the circuit. Q2: Explain the function of the voltage divider formed by R5 and the potentiometer R4. (Hint: Assume R1 is grounded. What is the output voltage vT(t) when the temperature is 0 C.) Why is the potentiometer output buffered with the voltage follower? Q3: Repeat the computations for Q1 with the actual resistor values and the measured value of your power supply (presumably slightly different from 5V). What is the expected transimpedance of the actual circuit? What is the expected scale factor, KT? Regardless of which sensor you used, you will need to calibrate your thermometer. To calibrate your thermometer, we need to use two known temperatures; two easy targets are waters freezing and boiling temperatures. We will actually use mineral oil for the bath since if we dip the temperature sensor in water we short it out..! We will do the calibration procedure in the lab as part of demonstrating your thermometer to me when it is due. Those who use the AD590 have both a hardware calibration (potentiometer) and a software calibration to make; those using the AD22100 are likely to do their calibration in software.
9/28/2011 11:21 AM
189
Embedded Systems
Fall 2011
Place the sensor in the ice bath and allow the device to reach thermal equilibrium. For the AD590, adjust the potentiometer so that the steady state output voltage vT(t) is 0V For the AD22100, note the measured voltage so you can adjust the appropriate constant in your code.. Q4: For the AD590, measure the voltage across R3 while the sensor is immersed in the ice bath. For the AD22100, measure the sensor output at ice temperature. What is the steady state voltage? Place the sensor in the boiling water bath and allow the device to reach thermal equilibrium. Record vT(t). WARNING! DO NOT move the sensor directly from the ice bath to the boiling water bath as the temperature shock could damage the device! Allow the sensor to come to room temperature before moving to the boiling water bath! Q5: For the AD590, measure the voltage across R3 while the sensor is immersed in the boiling water bath. What is the steady state voltage? What is the steady state value of vT(t)? For the AD22100, measure the senor output. What is the voltage? Q6: (BOTH SENSORS) Based on you measurement of R3 in the AD590 case and the measurements of questions 4 and 5, determine the actual temperature coefficient of your sensor. How does it compare with the specifications? Use this information to compute the actual temperature scale factor KT for your circuit, adjust your software to compensate for this difference, and test the functionality of your completed project. I will want to see this work! With the AD590, a source of problems in past years has been a saturated calibration at either the 0/32 or 100/212 ends; after calibration, do a sanity check at room temperature again as well to make sure the full range is being exercised. In your writeup, follow the same procedures as for earlier labs; dont forget your flowchart(s)!
9/28/2011 11:21 AM
190