+++ title = "Temperature Sensors" author = ["Dehaeze Thomas"] draft = false +++ Tags : ## Temperature sensors types {#temperature-sensors-types} There are three main types of temperature sensors: - [RTD](#org-target--sec-temperature-sensor-rtd) (Resistance Temperature Detectors): made of pure metals (Pt, Ni or Cu) They are all PTC (Positive Temperature Coefficient): PT100, PT1000, Ni100, Ni1000, ... - [Thermistor](#org-target--sec-temperature-sensor-thermistor): made of metal oxide mixtures (semiconductor materials). It can have a NTC (Negative Temperature Coefficient) or a PTC (Positive Temperature Coefficient). - [Thermocouple](#org-target--sec-temperature-sensor-thermocouple) (Seebeck effect): - Type K (-180 to 1200 degC) - Type T (-250 to 350 degC) ### RTD {#rtd} Sensitivity of PT100 is typically around 0.004 Ohm/Ohm/deg. ### Thermistor {#thermistor} Sensitivity of NTC is typically around -0.05 Ohm/Ohm/deg. ### Thermocouple {#thermocouple} ### Comparison of sensor types {#comparison-of-sensor-types} | | RTD | Thermistor | Thermocouple | |---------------|------|------------|--------------| | Accuracy | Good | Non-Linear | | | Stability | | | | | Sensitivity | Bad | Good | | | Response time | | | | | Self heating | | | | ## Accuracy of Temperature measurement {#accuracy-of-temperature-measurement} ### Accuracy of the resistance measurement {#accuracy-of-the-resistance-measurement} #### Resistor measurement principle and associated errors {#resistor-measurement-principle-and-associated-errors} Measurement is typically performed using a [wheatstone bridge]({{< relref "wheatstone_bridge.md" >}}), and the accuracy depends on: - the quality of the ADC measuring the voltage in the bridge - the values of the resistors in the bridge For measuring ranges from \\(200\\,\Omega\\) to \\(5\\,k\Omega\\), the measurement accuracy can be in the order of +/-50ppm to +/-100ppm (here based on the [ELM3704](https://www.beckhoff.com/en-en/products/i-o/ethercat-terminals/elmxxxx-measurement-technology/elm3704-0001.html)). For a Pt100 at \\(0^oC\\), this corresponds to an accuracy of \\(< \pm 0.04\\,K\\). #### 2, 3 and 4 wires sensors {#2-3-and-4-wires-sensors} The measured resistance is the sum of the resistance of the sensitive element and the resistance of the wires. This corresponds to the 2-wire measurement ([Figure 1](#figure--fig:temperature-sensor-rtd-2-wires)). The errors associated with this effect are large when the resistance of the sensitive element is small and then the resistance of all cables and connectors are large. For instance, the effect of contact/wire resistance less important for the PT1000 than for the PT100. The use of 2 wire PT1000 is possible (whereas for PT100, 4 wire is more accurate). {{< figure src="/ox-hugo/temperature_sensor_rtd_2_wires.png" caption="Figure 1: 2-wire measurement" >}} The effect of the resistance of the wires (cables, connectors, etc..) can be mitigated by using the 4-wire configuration ([Figure 2](#figure--fig:temperature-sensor-rtd-4-wires)). {{< figure src="/ox-hugo/temperature_sensor_rtd_4_wires.png" caption="Figure 2: 4-wire measurement" >}} ### Temperature {#temperature} #### Thermal contact and response time {#thermal-contact-and-response-time} The measured temperature is the temperature of the sensitive element. It may not be equal to the temperature of the element on which the sensor is fixed. It depends on the thermal contact and the response time in play. #### Self heating effect {#self-heating-effect} (Ebrahimi-Darkhaneh 2019) In order to measure the resistance, some current through the resistance. This leads to heat generation (known as "self heating") according to "Joule effect": \\[ P = I V = V^2/R \\] Typically, a constant voltage is applied, such that the generated current is lower when the resistance is larger.
The applied voltage is typically in the order of 1V. For a Pt100 (\\(R \approx 100\\,\Omega\\)), this would lead a heat generation of \\(P \approx 10\\,mW\\). For a NTC with \\(R\approx 10\\,k\Omega\\), the heat generation will me much lower \\(P\approx 100\\,\mu W\\).
### Converting Resistance to Temperature {#converting-resistance-to-temperature} #### First order approximation {#first-order-approximation} \\[ \Delta R = k \cdot \Delta T \\] #### Beta formula {#beta-formula} \\[ R(T) = R(T\_0) \cdot e^{\beta(\frac{1}{T} - \frac{1}{T\_0})} \\] #### Steinhart-Hart equation {#steinhart-hart-equation} \\[ T = \frac{1}{A + B \cdot \ln( R) + C \cdot (\ln( R))^3} \\] #### Lookup table {#lookup-table} Manufacturers usually provides a lookup table that links the resistance and the temperature. ## Typical Temperature/Resistance graphs {#typical-temperature-resistance-graphs} ### PT100 {#pt100} A PT100 resistance is quite linear with respect to the temperature as shown in [Figure 3](#figure--fig:temperature-sensor-pt100-resistance). {{< figure src="/ox-hugo/temperature_sensor_pt100_resistance.png" caption="Figure 3: Resistance of a PT100 as a function of the temperature" >}} The coefficient of resistance \\(\alpha\\) is defined as the ratio of the rate of change of resistance with temperature to the resistance of the thermistor at a specified temperature: \\[ \alpha(T) = \frac{1}{R(T)}\frac{dR(T)}{dT} \\] For a PT100, it is displayed in [Figure 4](#figure--fig:temperature-sensor-pt100-sensitivity). At \\(0^oC\\), \\(\alpha(0^oC) \approx 0.004\\,\Omega/\Omega/{}^oC\\). {{< figure src="/ox-hugo/temperature_sensor_pt100_sensitivity.png" caption="Figure 4: Sensitivity of a PT100 as a function of the temperature" >}} ### NTC {#ntc} A NTC is much more non-linear than a PT100 as shown in [Figure 5](#figure--fig:temperature-sensor-rtd-resistance). The NTC used here is "Type F" from Amphenol Thermometrics. ```matlab T_rtd = [-50:5:150]; R_rtd = 1e4*[68.60 48.16 34.23 24.62 17.91 13.17 9.782 7.339 5.558 4.247 3.274 2.544 1.992 1.572 1.250 1.000 0.8056 0.6530 0.5326 0.4369 0.3604 0.2989 0.2491 0.2087 0.1756 0.1485 0.1261 0.1075 0.09209 0.07916 0.06831 0.05916 0.05141 0.04483 0.03922 0.03442 0.03030 0.02675 0.02369 0.02103 0.01872]; ``` {{< figure src="/ox-hugo/temperature_sensor_rtd_resistance.png" caption="Figure 5: Resistance of a RTD as a function of the temperature" >}} The huge advantage of RTD compared to PT100 is that the sensitivity is much larger than Pt100 as shown in [Figure 6](#figure--fig:temperature-sensor-rtd-sensitivity). {{< figure src="/ox-hugo/temperature_sensor_rtd_sensitivity.png" caption="Figure 6: Sensitivity of a RTD as a function of the temperature" >}} ## Compute temperature from the measured resistance {#compute-temperature-from-the-measured-resistance} ### Pt100 and Pt1000 {#pt100-and-pt1000} The resistance as a function of temperature is approximated by the Callendar–Van Dusen equation: \\[ R(T) = \begin{cases} R\_0 (1 + A \cdot T + B \cdot T^2), & \text{for } T>0^oC \\\\ R\_0 (1 + A\cdot T + B \cdot T^2 + C \cdot (T - 100) \cdot T^3), & \text{for } T<0^oC \end{cases} \\] with \\(R\_0\\) the resistance value at 0 degrees (\\(100\\,\Omega\\) for a Pt100 and \\(1000\\,\Omega\\) for a Pt1000). Values for A, B, C and D are depending on the exact model (summarized in [Table 1](#table--tab:pt100-values)).
Table 1: Values of the Callendar-Van Dusen equations
| TCR | A | B | C | |------------|----------------------------|------------------------------|------------------------------| | 3850 ppm/K | \\(3.9083 \cdot 10^{-3}\\) | \\(-5.775 \cdot 10^{-7}\\) | \\(-4.183 \cdot 10^{-12}\\) | | 3911 ppm/K | \\(3.9692 \cdot 10^{-3}\\) | \\(-5.829 \cdot 10^{-7}\\) | \\(-4.3303 \cdot 10^{-12}\\) | | 3750 ppm/K | \\(3.8102 \cdot 10^{-3}\\) | \\(-6.01888 \cdot 10^{-7}\\) | \\(-6 \cdot 10^{-12}\\) | | 3770 ppm/K | \\(3.8285 \cdot 10^{-3}\\) | \\(-5.85 \cdot 10^{-7}\\) | | ```matlab %% Pt100 (3850 ppm/K) R0 = 100; % [Ohm] A = 3.9083e-3; % [degC^-1] B = -5.775e-7; % [degC^-2] C = -4.183e-12; % [degC^-4] T1 = -200:0; % [degC] T2 = 0:850; % [degC] T = [T1,T2]; % [degC] R = [R0*(1 + A*T1 + B*T1.^2 + C*(T1-100).*T1.^3), R0*(1 + A*T2 + B*T2.^2)]; % [Ohm] ``` {{< figure src="/ox-hugo/temperature_sensor_pt100_curve.png" caption="Figure 7: Resistance as a function of the temperature for a Pt100" >}} For temperatures above 0 degrees, the temperature \\(T\\) can be easily computed from the measured resistance \\(R\\) using: \\[ T = \frac{-A + \sqrt{A^2 - 4 B ( 1 - R/R\_0 )}}{2 B} \\] For temperatures below 0 degrees, the equation is harder to solve analytically, and a lookup table is more appropriate. Let's compare the temperature given by a Loopup table and the temperature given by the analytical formula in two cases: - linear interpolation with one point every degree - cubic interpolation with one point every 10 degrees The error is less than 0.1mK over the full range, validating the use of a lookup table to convert the resistance to temperature ([Figure 8](#figure--fig:temperature-sensor-lut-errors)). ```matlab %% "Perfect" temperature and resistance R0 = 100; % [Ohm] A = 3.9083e-3; % [degC^-1] B = -5.775e-7; % [degC^-2] C = -4.183e-12; % [degC^-4] T1 = -200:0.1:0; % [degC] T2 = 0.1:0.1:850; % [degC] T_true = [T1,T2]; % [degC] R_true = [R0*(1 + A*T1 + B*T1.^2 + C*(T1-100).*T1.^3), R0*(1 + A*T2 + B*T2.^2)]; % [Ohm] %% Lookup table for Pt100 (3850 ppm/K) - Linear dT = 1; interp_method = 'linear'; T1 = -200:dT:0; % [degC] T2 = dT:dT:850; % [degC] T_lut_linear = [T1,T2]; % [degC] R_lut_linear = [R0*(1 + A*T1 + B*T1.^2 + C*(T1-100).*T1.^3), R0*(1 + A*T2 + B*T2.^2)]; % [Ohm] T_meas_linear = interp1(R_lut_linear,T_lut_linear,R_true,interp_method); % interpolate the resistance using the LUT to find the corresponding temperature %% Lookup table for Pt100 (3850 ppm/K) - Makima dT = 10; interp_method = 'makima'; T1 = -200:dT:0; % [degC] T2 = dT:dT:850; % [degC] T_lut_makima = [T1,T2]; % [degC] R_lut_makima = [R0*(1 + A*T1 + B*T1.^2 + C*(T1-100).*T1.^3), R0*(1 + A*T2 + B*T2.^2)]; % [Ohm] T_meas_makima = interp1(R_lut_makima,T_lut_makima,R_true,interp_method); % interpolate the resistance using the LUT to find the corresponding temperature ``` {{< figure src="/ox-hugo/temperature_sensor_lut_errors.png" caption="Figure 8: Interpolation errors in two cases when using a LUT for a Pt100" >}} ### NTC thermistor {#ntc-thermistor} The resistance of the NTC thermistor as a function of the temperature can be well approximated with the following equation: \\[ R\_t = R\_{25} \cdot e^{A + B/T + C/T^2 + D/T^3 \\] where \\(T\\) is the temperature in kelvins, \\(R\_{25}\\) the nominal resistance at \\(25^oC\\), \\(A\\), \\(B\\), \\(C\\) and \\(D\\) are coefficients which are specific for a given thermistor. Typically, coefficients A, B, C and D are varying with temperature as shown in [Table 2](#table--tab:temperature-sensor-ntc-coefs).
Table 2: Example of A, B, C and D coeficients for an NTC thermistor (DC95F202VN)
| | A | B | C | D | |------------|----------------|---------------|----------------|----------------| | -50 to 0 | -1.4122478E+01 | 4.4136033E+03 | -2.9034189E+04 | -9.3875035E+06 | | 0 to 50 | -1.4141963E+01 | 4.4307830E+03 | -3.4078983E+04 | -8.8941929E+06 | | 50 to 100 | -1.4202172E+01 | 4.4975256E+03 | -5.8421357E+04 | -5.9658796E+06 | | 100 to 150 | -1.6154078E+01 | 6.8483992E+03 | -1.0004049E+06 | 1.1961431E+08 | ```matlab %% Compute the resistance as a function of the temperature for a given NTC (DC95F202VN) R0 = 2e3; % Resistance at 25deg T1 = 273.15+[-50:0]; % [degK] T2 = 273.15+[1:50]; % [degK] T3 = 273.15+[51:100]; % [degK] T4 = 273.15+[101:150]; % [degK] R = R0*exp([[-1.4122478E+01 + 4.4136033E+03./T1 - 2.9034189E+04./T1.^2 - 9.3875035E+06./T1.^3]'; [-1.4141963E+01 + 4.4307830E+03./T2 - 3.4078983E+04./T2.^2 - 8.8941929E+06./T2.^3]'; [-1.4202172E+01 + 4.4975256E+03./T3 - 5.8421357E+04./T3.^2 - 5.9658796E+06./T3.^3]'; [-1.6154078E+01 + 6.8483992E+03./T4 - 1.0004049E+06./T4.^2 + 1.1961431E+08./T4.^3]'])'; % [Ohm] T = -273.15+[T1,T2,T3,T4]; % [degC] ``` {{< figure src="/ox-hugo/temperature_sensor_ntc_curve.png" caption="Figure 9: Resistance as a function of the temperature for a given NTC" >}} To calculate the actual thermistor temperature as a function of the measured thermistor resistance, use the following equation: \\[ T = \frac{1}{a + b \ln(R\_t/R\_{25}) + c (Ln Rt/R25)^2 + d (Ln Rt/R25)^3) \\]
Table 3: Coefficients used to compute the temperature as a function of the resistance
| Rt/R25 range | a | b | c | d | |--------------------|---------------|---------------|----------------|----------------| | 68.600 to 3.274 | 3.3538646E-03 | 2.5654090E-04 | 1.9243889E-06 | 1.0969244E-07 | | 3.274 to 0.36036 | 3.3540154E-03 | 2.5627725E-04 | 2.0829210E-06 | 7.3003206E-08 | | 0.36036 to 0.06831 | 3.3539264E-03 | 2.5609446E-04 | 1.9621987E-06 | 4.6045930E-08 | | 0.06831 to 0.01872 | 3.3368620E-03 | 2.4057263E-04 | -2.6687093E-06 | -4.0719355E-07 | ## Commercial Temperature Sensors {#commercial-temperature-sensors} ### 20 degC {#20-degc} ### 20 degC, Vacuum compatible {#20-degc-vacuum-compatible} From (Neto et al. 2022), UHV compatible: > **Ceramic Amphenol DC95F202WN negative temperature coefficient (NTC)** sensors were used above 270 K, usually at room temperature components equal to 297 K. > The part-though-hole (PTH) sensors were soldered to thin, 30 AWG, varnish insulated copper wires with small amounts of tin-lead (70/30) alloy. ### Cryogenic temperatures {#cryogenic-temperatures} - - From (Neto et al. 2022) > The temperature sensors also had design iteration since the beginning of the commissioning of the first cryogenic beamline instrumentation.Initially, **10k Ohm (0°C nominal) Platinum thin-film RTD sensors from IST (P10K.520.6W.B.010.D)** were used for parts in operating temperature below 123 K, whereas ceramic Amphenol DC95F202WN negative temperature coefficient (NTC) sensors were used above 270 K, usually at room temperature components equal to 297 K. The part-though-hole (PTH) sensors were soldered to thin, 30 AWG, varnish insulated copper wires with small amounts of tin-lead (70/30) alloy. > The set was then encapsulated with the same Stycast resin into small aluminium cases for thermal conductivity and mounting features. > > [...] > > Furthermore, the thin platinum wire of the 10 kΩ RTDs presented bad solderability and its assembly process was too laborious, resulting in unreliable mechanical bonds and a failure rate beyond acceptable for a robust beamline instrumentation. > The alternative was to use **2 kΩ IST RTDs (P2K0.232.3FW.B.007)** with custom-made flat gold-platted terminals, resulting in a full range sensor with better solderability and temperature **resolution below 0.4 mK** over the entire measurable range ## Bibliography {#bibliography}
Ebrahimi-Darkhaneh, Hadi. 2019. “Measurement Error Caused by Self-Heating in Ntc and Ptc Thermistors.” Tex. Instrum. Analog. Des. J. Q 3: 001–7.
Neto, Joao Brito, Renan Geraldes, Francesco Lena, Marcelo Moraes, Antonio Piccino Neto, Marlon Saveri Silva, and Lucas Volpe. 2022. “Temperature Control for Beamline Precision Systems of Sirius/Lnls.” Proceedings of the 18th International Conference on Accelerator and Large Experimental Physics Control Systems ICALEPCS2021 (nil): China. doi:10.18429/JACOW-ICALEPCS2021-WEPV001.