NTC_THERMISTOR Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Public Attributes | List of all members
ntc_thermistor::Curve Struct Reference

What the thermistor is: a table, Steinhart-Hart coefficients, or R at a reference temperature and the beta value. More...

#include <ntc_thermistor_types.hpp>

Public Attributes

std::span< const TablePoint > table = {}
 
uint32_t r0_ohm {0}
 R at ref_temperature_mc (R25), 1 to kMaxR0Ohm; beta mode.
 
int32_t ref_temperature_mc {25'000}
 T0 of r0_ohm: 25 degC for nearly every part.
 
uint32_t b_kelvin {0}
 Beta mode: B in kelvin, kMinBetaKelvin to kMaxBetaKelvin.
 
int32_t b_t2_mc {85'000}
 The second temperature of the B pair (B25/85: 85 degC).
 
uint32_t r_tol_ppm {0}
 
uint32_t b_tol_ppm {0}
 
int64_t sh_a_e15 {0}
 
int64_t sh_b_e15 {0}
 
int64_t sh_c_e15 {0}
 Steinhart-Hart C in units of 1e-15 per kelvin (the cubic term).
 
uint32_t curve_error_mc {0}
 

Detailed Description

What the thermistor is: a table, Steinhart-Hart coefficients, or R at a reference temperature and the beta value.

A non-empty table selects table mode. Otherwise a non-zero sh_b_e15 selects Steinhart-Hart mode (1/T = A + B ln R + C (ln R)^3, R in ohms, T in kelvin) and a zero one selects beta mode, which uses r0_ohm, ref_temperature_mc and b_kelvin. A curve is data: a part is added by writing a Curve, never by changing the driver. tools/ntc_table.py makes a table from any of these descriptions or from a vendor list.

Member Data Documentation

◆ b_tol_ppm

uint32_t ntc_thermistor::Curve::b_tol_ppm {0}

Tolerance of B (beta and table modes; 0 = not declared); not with SH.

◆ curve_error_mc

uint32_t ntc_thermistor::Curve::curve_error_mc {0}

Error of the curve itself (fit, interpolation), added to the bound.

◆ r_tol_ppm

uint32_t ntc_thermistor::Curve::r_tol_ppm {0}

Tolerance of R at the reference and of the rows; 0 = not declared.

◆ sh_a_e15

int64_t ntc_thermistor::Curve::sh_a_e15 {0}

Steinhart-Hart A in units of 1e-15 per kelvin (0.00087676 is 876'760'000'000).

◆ sh_b_e15

int64_t ntc_thermistor::Curve::sh_b_e15 {0}

Steinhart-Hart B in units of 1e-15 per kelvin; non-zero selects SH mode.

◆ table

std::span<const TablePoint> ntc_thermistor::Curve::table = {}

2 to 256 rows, any spacing, resistance strictly falling as temperature strictly rises. The span is not copied: the rows must outlive the driver (a static constexpr array).


The documentation for this struct was generated from the following file: