Humidistat
Arduino firmware for a humidistat (humidity controller)
Loading...
Searching...
No Matches
ThermistorReader Class Reference

Driver for thermistor thermometers. More...

#include <ThermistorReader.h>

Public Member Functions

 ThermistorReader (uint8_t pin)
 Constructor.
 
double readTemp () const
 Get the temperature of the thermistor.
 

Private Member Functions

double getThermistorResistance () const
 Calculate the resistance of the thermistor in the voltage divider.
 

Private Attributes

const uint8_t ref_pin = 5
 Reference (high) voltage pin number.
 
const uint8_t pin
 NTC pin number.
 
const double R_series = 10000
 Resistance of R2 in voltage divider (Ohm)
 
const double B = 3950
 Thermistor's value of B in the thermistor equation (K)
 
const double r_inf = 0.01752
 Thermistor's value of R_inf in the thermistor equation (Ohm)
 

Detailed Description

Driver for thermistor thermometers.

Definition at line 7 of file ThermistorReader.h.

Constructor & Destructor Documentation

◆ ThermistorReader()

ThermistorReader::ThermistorReader ( uint8_t pin)
explicit

Constructor.

Parameters
pinNTC pin number

Definition at line 4 of file ThermistorReader.cpp.

Member Function Documentation

◆ getThermistorResistance()

double ThermistorReader::getThermistorResistance ( ) const
private

Calculate the resistance of the thermistor in the voltage divider.

Returns
Resistance (Ohm)

Definition at line 6 of file ThermistorReader.cpp.

Here is the caller graph for this function:

◆ readTemp()

double ThermistorReader::readTemp ( ) const

Get the temperature of the thermistor.

Returns
Temperature (Celsius)

Definition at line 12 of file ThermistorReader.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ B

const double ThermistorReader::B = 3950
private

Thermistor's value of B in the thermistor equation (K)

Definition at line 12 of file ThermistorReader.h.

◆ pin

const uint8_t ThermistorReader::pin
private

NTC pin number.

Definition at line 10 of file ThermistorReader.h.

◆ r_inf

const double ThermistorReader::r_inf = 0.01752
private

Thermistor's value of R_inf in the thermistor equation (Ohm)

Definition at line 13 of file ThermistorReader.h.

◆ R_series

const double ThermistorReader::R_series = 10000
private

Resistance of R2 in voltage divider (Ohm)

Definition at line 11 of file ThermistorReader.h.

◆ ref_pin

const uint8_t ThermistorReader::ref_pin = 5
private

Reference (high) voltage pin number.

Definition at line 9 of file ThermistorReader.h.


The documentation for this class was generated from the following files: