Syntax
public class SteinhartHartCalculatedThermistor : Thermistor, IObservable<IChangeResult<Temperature>>, ITemperatureSensor, ISamplingSensor<Temperature>, ISensor<Temperature>
Constructors
SteinhartHartCalculatedThermistor(IAnalogInputPort, Resistance)
Creates a new SteinhartHartCalculatedThermistor object using the provided analog input and the thermistor's nominal resistance (i.e. 10kOhm)
Declaration
public SteinhartHartCalculatedThermistor(IAnalogInputPort analogInput, Resistance nominalResistance)
Parameters
Type | Name | Description |
---|---|---|
IAnalogInputPort | analogInput | The analog input reading the thermistor voltage divider output |
Resistance | nominalResistance | The nominal resistance of the thermistor (e.g. 10kOhm for a 10k thermistor) |
Remarks
The fixed resistor value will be assumed to match the thermistor's nominal resistance
SteinhartHartCalculatedThermistor(IAnalogInputPort, Resistance, Resistance)
Creates a new SteinhartHartCalculatedThermistor object using the provided analog input and the thermistor's nominal resistance (i.e. 10kOhm) and the fixed resistor value of the voltage divider circuit.
Declaration
public SteinhartHartCalculatedThermistor(IAnalogInputPort analogInput, Resistance nominalResistance, Resistance seriesResistance)
Parameters
Type | Name | Description |
---|---|---|
IAnalogInputPort | analogInput | The analog input reading the thermistor voltage divider output |
Resistance | nominalResistance | The nominal resistance of the thermistor (e.g. 10kOhm for a 10k thermistor) |
Resistance | seriesResistance | The resistance of the fixed-value series resistor in your voltage divider circuit |
SteinhartHartCalculatedThermistor(IAnalogInputPort, Resistance, Resistance, double)
Creates a new SteinhartHartCalculatedThermistor object using the provided analog input and the thermistor's nominal resistance (i.e. 10kOhm) and the fixed resistor value of the voltage divider circuit.
Declaration
public SteinhartHartCalculatedThermistor(IAnalogInputPort analogInput, Resistance nominalResistance, Resistance seriesResistance, double betaCoefficient)
Parameters
Type | Name | Description |
---|---|---|
IAnalogInputPort | analogInput | The analog input reading the thermistor voltage divider output |
Resistance | nominalResistance | The nominal resistance of the thermistor (e.g. 10kOhm for a 10k thermistor) |
Resistance | seriesResistance | The resistance of the fixed-value series resistor in your voltage divider circuit |
double | betaCoefficient | The beta coefficient of the thermistor used in the Steinhart-Hart equation |
SteinhartHartCalculatedThermistor(IAnalogInputPort, Resistance, double)
Creates a new SteinhartHartCalculatedThermistor object using the provided analog input and the thermistor's nominal resistance (i.e. 10kOhm) and the fixed resistor value of the voltage divider circuit.
Declaration
public SteinhartHartCalculatedThermistor(IAnalogInputPort analogInput, Resistance nominalResistance, double betaCoefficient)
Parameters
Type | Name | Description |
---|---|---|
IAnalogInputPort | analogInput | The analog input reading the thermistor voltage divider output |
Resistance | nominalResistance | The nominal resistance of the thermistor (e.g. 10kOhm for a 10k thermistor) |
double | betaCoefficient | The beta coefficient of the thermistor used in the Steinhart-Hart equation |
Remarks
The fixed resistor value will be assumed to match the thermistor's nominal resistance
Fields
DefaultBetaCoefficient
The common default beta coefficient (3950) for many thermistors
Declaration
public const double DefaultBetaCoefficient = 3950
Field Value
Type | Description |
---|---|
double |
Properties
BetaCoefficient
Gets the beta coefficient of the thermistor used in the Steinhart-Hart equation
Declaration
public double BetaCoefficient { get; }
Property Value
Type | Description |
---|---|
double |
NominalResistance
Gets the nominal resistance of the thermistor (e.g. 10kOhm for a 10k thermistor)
Declaration
public override Resistance NominalResistance { get; }
Property Value
Type | Description |
---|---|
Resistance |
Overrides
SeriesResistance
Gets the resistance of the fixed-value series resistor in your voltage divider circuit
Declaration
public Resistance SeriesResistance { get; }
Property Value
Type | Description |
---|---|
Resistance |
Methods
ReadSensor()
Update the Temperature property
Declaration
protected override Task<Temperature> ReadSensor()
Returns
Type | Description |
---|---|
Task<Temperature> |