Lab 4: Temperature Sensors

Team size: 2

Submission Sheet: html docx

Prelab Help Sheet: html

Writing Assignment: html

Writing Template: html docx

1 Introduction

In this lab you will build some common sensors for the final project – a pressure sensor and a thermistor-based temperature sensor – perform a non-linear fit to thermistor data, and experiment with a thermocouple. Temperature and pressure have been called the “monarchs of measurements” by some Mudd professors because of their wide applicability in chemical and industrial processes, aerospace applications, and natural sciences (including oceanography), which is why we are working with these measurements this week. You might find some time in this lab to prepare a resubmission, possibly by revisiting data from labs 1-3.

After successful completion of this lab, you will be able to:

This lab will be carried out as sub-teams of two. Policies for sub-teams are discussed in Lab 2.

IT IS YOUR TEAM’S RESPONSIBILITY TO BRING ICE TO LAB. THIS IS PART OF YOUR PRELAB! Hot water will be available from the water heater in the lab.

Warning

Remember that water is an electrical conductor and putting an electronic component that is not waterproofed into water carries some risk. Waterproofing your sensors using electrical tape, heat-shrink tubing, hot glue, or parafilm is essential!

Warning

Water above 50 °C can cause scalds. Determine safety protocols for working with hot water to avoid spilling it or inadvertently touching it.

Note

The only constant-temperature bath in the lab is the 25 °C bath in the E80 lab (B171). Use your digital thermometer to monitor the temperatures of any other baths.

2 Build a Pressure Sensor Interface Circuit

E79 and E80 both rely on the same pressure sensor, the MPX5700, which has a reasonable range of output voltages over the depths that E79/E80 robots can easily traverse. However, that range of output voltages is small compared to the input range of the Teensy, so if you want to use this sensor in your final project, you will get large errors from Teensy quantization unless you build an amplifier. In this section, you will design an op-amp circuit that shifts and scales MPX5700 output Voltage range into the Teensy input range, which is approximately 0 V to 3.3 V. Use the MCP601 op-amp and Vdd = 5 V.

  1. Find the Voltages the MPX5700 will produce when at depths between 0 m and 40 cm. Recall that the sensor will experience atmospheric pressure at 0m. We will call this Voltage range the target Voltage range.
  2. Design an op-amp circuit that will shift and scale MPX5700 output Voltages from the target voltage range to a new Voltage range that is suitable for reading by the Teensy. The new Voltage range should have a maximum of 3.0 V and a minimum of 0.3 V.
  3. Build the op-amp circuit and test it with a function generator to convince yourself it is working.
  4. Build an MPX5700 on your breadboard, and test that it works using a multimeter and a water column in a graduated cylinder. Section 6 in these instructions from E79 might help.
  5. Connect your MPX5700 to your op-amp circuit and test the assembled pressure sensor using a water column in a graduated cylinder. Record a depth vs. Voltage calibration curve, and include regression lines and appropriate measures of uncertainty.
Tip

The MPX5700 is sensitive to supply Voltage, which can mess up your measurements. Set your power supply to exactly 5 V and verify its value with a multimeter.

3 Build a Thermistor Interface Circuit

In another echo of E79, this section is about building a thermistor-based temperature sensor. The sensor will consist of a resistor/thermistor divider circuit and an op-amp circuit. The op-amp circuit will shift and scale the divider circuit’s output Voltage range to better match the Teensy’s input Voltage range. The thermistor you will use is a Murata NXFT15WB473FA2B150. You will need to predict the resistance as a function of temperature, and the formula you will use here shown in Equation 1 where \(R\) is the current resistance of the thermistor at temperature \(T\) in Kelvins, \(R_0\) is the known resistance at reference temperature \(T_0\) in Kelvins, and \(B\) is a constant in the datasheet.

\[ R=R_0 \exp{\left(B(1/T-1/T_0)\right)} \tag{1}\]

  1. Predict the resistance you will see from the thermistor when it is in a 0 °C bath to a 20 °C bath.
  2. Design a Voltage divider that converts the thermistor resistance to Voltage. The divider should use a supply Voltage of 5V, a thermistor in the top position, and a resistor of your choice in the bottom position. Predict the output Voltages of this circuit when the thermistor is in a 0 °C bath to a 20 °C bath. Use appropriate measures of uncertainty.
  3. Design an op-amp circuit using one or more op-amps that will shift and scale the output of the thermistor divider into the Teensy Voltage range (0.3V to 3.0V). Use single-rail op-amps with a supply Voltage of 5V. Note that you need to be careful of loading in this circuit because op-amp circuits can load sensors just like the instruments in lab 2. Think carefully whether adding a second op-amp can improve your results.
  4. Build the divider and op-amp circuits, test them individually, hook them together, then test the combination using a 0 °C bath and a 20 °C bath and compare results to predictions.

It is possible to do this lab by just connecting to thermistor leads using BNC-hook connections. However, this might be mechanically touchy in some situations, and you might find the thermistor wires to be short. You have the option of adding leads to your thermistor temperature probe using the instructions from E79 in section 3. You DO NOT need to make a whole umbilical. You only need to make the temperature sensor. You will certainly need to extend thermistor leads if you choose to use a thermistor in your final project.

4 Measure and Fit Thermistor Resistance vs. Temperature

In this section we will explore the thermistor’s resistance-temperature relation in greater detail. You will measure the resistance of a thermistor directly with a multimeter in this section so that you can focus on the resistance-temperature behavior, modeling and non-linear fitting.

Another equation that relates thermistor resistance and temperature, the Steinhart-Hart Equation, is relevant in this section. The equation is shown in Equation 2, and in this equation, \(T\) is the absolute temperature in Kelvin, \(R\) is the resistance of the thermistor, and \(A_1\), \(B_1\), \(C_1\) and \(D_1\) are fitting coefficients called Steinhart-Hart coefficients. Note that the \(B_1\) variable in Equation 2 is different than the \(B\) variable in Equation 1.

\[ 1/T = A_1 + B_1 \ln R + C_1 \ln^2 R + D_1 \ln^3 R \tag{2}\]

  1. Use the multimeter to measure the resistance of a thermistor at room temperature. While still measuring the resistance, hold the thermistor tightly with your fingers and verify that the multimeter reading changes.
  2. Obtain a digital thermometer to use for “ground truth” temperature measurements.
  3. Prepare a set of eight different temperature baths between 0 °C and 80 °C. You will only have access to a few insulated beakers to prepare these baths, so you may need to prepare them in batches or wait for the first baths you made to cool a bit in order to get extra data points.
  4. Use the multimeter and the digital thermometer to measure the temperatures of your baths and the resistance of the thermistor when it is submerged in each bath.
  5. Use fitting techniques to extract the Steinhart-Hart coefficients for your thermistor with appropriate measures of uncertainty. Don’t forget about the Steinhart-Hart fitting example on the lectures page.
  6. Plot the data points, the Steinhart-Hart fit, and the fit provided by datasheet parameters and Equation 1 on the same axes.
  7. Plot the residuals of your fit.

5 Measure and Decode Thermocouple Voltage vs. Temperature

In this section we will give thermocouples the same attention we’ve just given thermistors. Thermocouples are extremely common temperature probes that have huge ranges and fast response times. We don’t see many thermocouples on E80 final projects (you could change that!) because they have complicated interface requirements, but they’re such important sensors that we want to spend some time working with them in lab. As in Section 4, we’ll use the multimeter to measure properties here so that we can focus on the sensor itself. As a reminder, we use the Greenlee DM-210A Digital Multimeter, and you may need to review the datasheet to understand how to take temperature measurements with the thermocouple. You’ll need the NIST tables to decode your thermocouple Voltages.

  1. Obtain a type-K thermocouple from the instructors. Be sure to return it at the end of lab!
  2. Obtain a digital thermometer to use for “ground truth” temperature measurements.
  3. Prepare a set of five different temperature baths between 0 °C and 80 °C. As in section Section 4, you may be limited by the number of insulated beakers available, so you can prepare the baths in batches or wait for them to cool down between measurements.
  4. Plug the type-K thermocouple into the multimeter and test out the multimeter’s temperature mode.
  5. Submerge the digital thermometer and the type-K thermocouple in a bath simultaneously. Then measure the following and repeat the process for each bath.
    1. Measure the bath temperature using the digital thermometer
    2. Measure the bath temperature using the type-K thermocouple by putting the multimeter in temperature mode
    3. Measure the thermocouple voltage by switching the multimeter to voltage mode.
  6. Use the principles of cold-junction compensation and NIST tables to decode the thermocouple voltages into temperatures. To do this, you will need to identify where the thermocouple cold junction is and guess at its temperature.
  7. Compare the decoded temperatures, the multimeter-reported temperatures, and the digital thermometer measurements. As always, report all three measurements with appropriate measures of uncertainty.

6 Compare Temperature Sensor Settling Times

The response time of temperature sensors is critical to their performance. We’re going to race our temperature sensors to get a sense of their settling time. To avoid building some amplifiers (see the thermocouple reference design if you’re curious), we’re going to do this with the multimeter and a stopwatch instead of hooking everything up to the oscilloscope.

We are going to round out our spread of temperature sensors by revisiting the MCP9701A temperature sensor from E79. This part is an example of an integrated linear circuit.

  1. Find a MCP9701A, solder leads to it and heat shrink the exposed metal.
  2. Prepare two baths at 0 °C and 50 °C.
  3. For each temperature sensor in this lab – the MCP9701A, the thermistor, and the type-K thermocouple – do the following:
    1. Measure the sensor with the multimeter. You’ll use different settings: resistance, temperature and voltage for different sensors.
    2. Immerse the sensor in the cold bath and wait for the reading to stabilize. You’ll need to use your judgement about what it means for a reading to be stable, but ignoring the last digit (which often toggles around) may help.
    3. Move the sensor to the hot bath and start the stopwatch at the same time.
    4. Stop the stopwatch when the reading stabilizes in the hot bath.
  4. Comment on the relative speed of the sensors.
Note

Be sure to return type-K thermocouples to the electronics table.