|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Classes | |
| struct | CVDCoeffs |
Functions | |
| double | temp_to_resistance_cvd (double t_c, const CVDCoeffs &cvd=CVDCoeffs{}) |
| Resistance (Ω) at temperature (°C), IEC 60751 Callendar-Van Dusen, the C term below 0 °C. | |
| double | resistance_to_temp_cvd_full (double resistance_ohms, const CVDCoeffs &cvd=CVDCoeffs{}) |
| The full CVD inverse: exact above 0 °C (the quadratic), Newton on the C term below it. | |
| double | rtd_board_adc_to_temp_c (int32_t adc_raw, double adc_ref_voltage, double excitation_ua, double r0_ohms) |
| An ESP32 RTD board's reading -> °C: the ADC code (2^31 = adc_ref_voltage) is the voltage across the element carrying excitation_ua, so R = V / I, then the full CVD inverse. | |
| double | resistance_to_temp_cvd (double resistance_ohms, const CVDCoeffs &cvd=CVDCoeffs{}) |
| Convert resistance (Ω) to temperature (°C) using iterative CVD inverse. | |
| double | counts_to_resistance (int32_t counts, double gain, double offset) |
| Convert ADC counts to resistance (assuming linear relationship). | |
|
inline |
Convert ADC counts to resistance (assuming linear relationship).
Definition at line 215 of file SensorCalibration.hpp.
|
inline |
Convert resistance (Ω) to temperature (°C) using iterative CVD inverse.
Definition at line 205 of file SensorCalibration.hpp.
Referenced by main().
|
inline |
The full CVD inverse: exact above 0 °C (the quadratic), Newton on the C term below it.
resistance_to_temp_cvd() drops the C term and reads cold below 0 °C: 0.2 °C at -100 °C, 1.76 °C at -183 °C (LOX), 2.25 °C at -196 °C. NaN when the resistance is off the curve or the temperature is outside the standard's -200..850 °C (5 °C of slack each side): an open element reads a huge resistance and a shorted one about -242 °C, and neither is a temperature.
Definition at line 161 of file SensorCalibration.hpp.
Referenced by main(), rtd_board_adc_to_temp_c(), and fsw::t7::rtd_c().
|
inline |
An ESP32 RTD board's reading -> °C: the ADC code (2^31 = adc_ref_voltage) is the voltage across the element carrying excitation_ua, so R = V / I, then the full CVD inverse.
NaN when there is no temperature to report, so the caller publishes nothing rather than a plausible one:
Definition at line 192 of file SensorCalibration.hpp.
References fsw::calibration::rtd::CVDCoeffs::R0, and resistance_to_temp_cvd_full().
Referenced by convert_rtd_adc_to_temp_c(), main(), and read().
|
inline |
Resistance (Ω) at temperature (°C), IEC 60751 Callendar-Van Dusen, the C term below 0 °C.
Definition at line 149 of file SensorCalibration.hpp.
Referenced by code_at(), anonymous_namespace{t7_bridge_main.cpp}::fake_signal(), and main().