diff --git a/content/zettels/temperature_sensors.md b/content/zettels/temperature_sensors.md index 9268103..d8aa331 100644 --- a/content/zettels/temperature_sensors.md +++ b/content/zettels/temperature_sensors.md @@ -245,46 +245,7 @@ Let's compare the temperature given by a Loopup table and the temperature given - 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" >}} +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 9](#figure--fig:temperature-sensor-lut-errors)). ### NTC thermistor {#ntc-thermistor} @@ -327,7 +288,7 @@ 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" >}} +{{< figure src="/ox-hugo/temperature_sensor_ntc_curve.png" caption="Figure 8: 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) \\] @@ -346,6 +307,108 @@ To calculate the actual thermistor temperature as a function of the measured the | 0.06831 to 0.01872 | 3.3368620E-03 | 2.4057263E-04 | -2.6687093E-06 | -4.0719355E-07 | +### Approximation of formulas using lookup tables {#approximation-of-formulas-using-lookup-tables} + +First, let's compare the analytical formula with a LUT for a Pt100 ([Figure 9](#figure--fig:temperature-sensor-lut-errors)). +The error (accuracy) is bellow 0.1mK for relatively small LUT. + +```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 9: Interpolation errors in two cases when using a LUT for a Pt100" >}} + +NTC thermistors are more non-linear and therefore require finer LUT to have low accuracy errors. +In order to have less than 0.1mK of accuracy, a LUT with linear interpolation requires approximately one point every 0.1 degree ([Figure 10](#figure--fig:temperature-sensor-lut-errors-ntc)). + +```matlab +%% "Perfect" temperature and resistance of NTC (DC95F202VN) +R0 = 2e3; % Resistance at 25deg +dT_true = 0.01; + +T1 = 273.15+[-50:dT_true:0]; % [degK] +T2 = 273.15+[0+dT_true:dT_true:50]; % [degK] +T3 = 273.15+[50+dT_true:dT_true:100]; % [degK] +T4 = 273.15+[100+dT_true:dT_true:150]; % [degK] + +R_true = 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_true = -273.15+[T1,T2,T3,T4]; % [degC] + +%% Lookup table for NTC (DC95F202VN) - Linear +dT = 0.1; +interp_method = 'linear'; + +T1 = 273.15+[-50:dT:0]; % [degK] +T2 = 273.15+[0+dT:dT:50]; % [degK] +T3 = 273.15+[50+dT:dT:100]; % [degK] +T4 = 273.15+[100+dT:dT:150]; % [degK] +T_lut_linear = -273.15+[T1,T2,T3,T4]; % [degC] +R_lut_linear = 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_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 = 1; +interp_method = 'makima'; + +T1 = 273.15+[-50:dT:0]; % [degK] +T2 = 273.15+[0+dT:dT:50]; % [degK] +T3 = 273.15+[50+dT:dT:100]; % [degK] +T4 = 273.15+[100+dT:dT:150]; % [degK] +T_lut_makima = -273.15+[T1,T2,T3,T4]; % [degC] +R_lut_makima = 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_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_ntc.png" caption="Figure 10: Interpolation errors in two cases when using a LUT for a NTC" >}} + + ## Commercial Temperature Sensors {#commercial-temperature-sensors} @@ -360,7 +423,7 @@ From (Neto et al. 2022), UHV compatible: > 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} +### Cryogenic temperatures (77K / -200degC) {#cryogenic-temperatures--77k-200degc} - - diff --git a/content/zettels/wheatstone_bridge.md b/content/zettels/wheatstone_bridge.md new file mode 100644 index 0000000..1d10310 --- /dev/null +++ b/content/zettels/wheatstone_bridge.md @@ -0,0 +1,25 @@ ++++ +title = "Wheatstone Bridge" +author = ["Dehaeze Thomas"] +draft = false ++++ + +Tags +: + +Wheatstone Bridge are used to measure an electrical resistance. + +They are used to read various sensors: + +- [Strain Sensors]({{< relref "strain_sensors.md" >}}) +- [Temperature Sensors]({{< relref "temperature_sensors.md" >}}) + + + +{{< figure src="/ox-hugo/wheatstone_bridge.jpg" caption="Figure 1: Electrical schematic of a Wheatstone bridge" >}} + + +## Bibliography {#bibliography} + +
+
diff --git a/static/ox-hugo/temperature_sensor_lut_errors_ntc.png b/static/ox-hugo/temperature_sensor_lut_errors_ntc.png new file mode 100644 index 0000000..aa22f7c Binary files /dev/null and b/static/ox-hugo/temperature_sensor_lut_errors_ntc.png differ diff --git a/static/ox-hugo/wheatstone_bridge.jpg b/static/ox-hugo/wheatstone_bridge.jpg new file mode 100644 index 0000000..86eacda Binary files /dev/null and b/static/ox-hugo/wheatstone_bridge.jpg differ