9 #ifndef SENSOR_KTY81_1XX_HPP__
10 #define SENSOR_KTY81_1XX_HPP__
33 size_t averaged_samples = 32;
35 size_t moving_average_filter_len = 32;
37 float temp_fsr_lower_lin = 0.0f;
38 float temp_fsr_upper_lin = 100.0f;
41 int32_t v_in_fsr_upper_lin = 1428;
46 int32_t v_in_fsr_upper_lut = 1646;
55 std::array<float, 32> lut_temp_kty81_121 {
57 -55.0 , -48.22273805, -41.51141124, -34.84623091,
58 -28.34434926, -22.05459193, -15.78849403, -9.53746745,
59 -3.3772341 , 2.7675195 , 8.9372679 , 15.0916243 ,
60 21.14820431, 27.2082161 , 33.34543424, 39.41134763,
61 45.57173941, 51.73398583, 57.85244115, 64.10680179,
62 70.45422093, 76.763773 , 83.14712256, 89.64071316,
63 96.17984636, 102.82297981, 109.58309561, 116.4296579 ,
64 123.60532846, 131.27866698, 139.78106609, 150.0};
66 std::array<float, 32> lut_temp_kty81_110_120 {
67 -55.0 , -48.16279303, -41.39749472, -34.8911357 ,
68 -28.54294667, -22.192432 , -15.83544756, -9.56004681,
69 -3.43833483, 2.66313257, 8.80135444, 14.90432723,
70 20.97767882, 27.03976174, 33.13792626, 39.28966437,
71 45.38382931, 51.48407173, 57.67841773, 63.97159787,
72 70.30279723, 76.61562129, 83.00362829, 89.50586837,
73 96.07234208, 102.68301035, 109.39886725, 116.34253305,
74 123.5137051 , 131.2558412 , 139.76912438, 150.0};
165 _common_conf.lut_temp_kty81_121}
169 delete _interpolator;
184 _common_conf.lut_temp_kty81_110_120}
188 delete _interpolator;
Application, network and hardware settings, constants and preset configuration.
ESP32 ADC 1 channel access with configurable moving average filter. Moving average filtering/smoothin...
Definition: esp32_adc_channel.hpp:106
KTY81-110 or KTY81-120 type silicon temperature sensor readout using the ESP32 ADC in its high-linear...
Definition: sensor_kty81_1xx.hpp:179
KTY81-121 type silicon temperature sensor readout using the ESP32 ADC in its high-linearity region.
Definition: sensor_kty81_1xx.hpp:160
KTY81-1xx type silicon temperature sensor readout and conversion functions using the ESP32 ADC in its...
Definition: sensor_kty81_1xx.hpp:107
SensorKTY81_1xx(adc1_channel_t channel, EquidistantPWLUInt16< _common_conf.lut_size > *interpolator)
Initialize the analog ADC channel for use with the sensor.
Definition: sensor_kty81_1xx.cpp:15
float get_temp_pwl()
Excellent precision temperature sensing using piecewise linear interpolation of Look-Up-Table values ...
Definition: sensor_kty81_1xx.cpp:41
void update_filter()
Updates the moving average with a new sampled value from ADC.
Definition: sensor_kty81_1xx.cpp:33
float get_temp_lin()
Fairly precise temperature conversion if the temperature sensor voltage has good linearisation....
Definition: sensor_kty81_1xx.cpp:49
Configuration constants and Look-Up-Table values which are supposed to be the same for all sensors.
Definition: sensor_kty81_1xx.hpp:23
int32_t v_in_fsr_lower_lut
Definition: sensor_kty81_1xx.hpp:45
size_t lut_size
Look-Up-Table temperatures for 31 equidistant voltage steps. Table only valid for linearised circuit ...
Definition: sensor_kty81_1xx.hpp:54
int32_t v_in_fsr_lower_lin
Definition: sensor_kty81_1xx.hpp:40
adc_atten_t adc_ch_attenuation
Suggested ADC input voltage Range for ESP32 using ADC_ATTEN_DB_6 is 150 ~ 1750 millivolts according t...
Definition: sensor_kty81_1xx.hpp:31