Implementation of MAX31865 based temperature sensor.
More...
#include <MAX31865.h>
Inherits SPI::Device.
|
| | MAX31865 (Sink< SPI::Request > &bus, DIO cs, Config c={ .wires=PT2WIRE,.Rnom=100,.Rref=430, }) |
| | configure temperature sensor
|
| |
| double | tempLin () |
| | linear temperature approximation
|
| |
| double | temp () |
| | quadratic temperature approximation
|
| |
|
void | sense () |
| | async read temperature data from sensor
|
| |
|
void | readFault () |
| | async read fault data from sensor
|
| |
|
void | readAllData () |
| | async read all data from sensor
|
| |
|
void | callback (const SPI::Request rq) override |
| | is called as soon as requested data arrived over wire
|
| |
| uint8_t | fault () |
| |
|
void | clearFaults () |
| | clear faults on sensor
|
| |
| void | setLThr (uint16_t thr) |
| | set low fault threshold value
|
| |
| void | setHThr (uint16_t thr) |
| | set high fault threshold value
|
| |
| void | select (bool sel) |
| | chipselect activation
|
| |
Implementation of MAX31865 based temperature sensor.
supports 2 to 4 wire sensors of arbitrary nominal resistances, and arbitrary reference resistors.
- Warning
- reference resistor must be greater than sensor resistor (for platinum based resistors Rref = 4 * Rnom works best)
-
implemented only for temperatures > 0 degrees C. see https://analog.com/media/en/technical-documentation/application-notes/AN709_0.pdf for details
◆ MAX31865::Config
| Class Members |
|
Type |
wires |
number of wires |
|
double |
Rnom |
nominal resistance |
|
double |
Rref |
reference resistor |
◆ Type
Sensor Type.
| Enumerator |
|---|
| PT2WIRE | 2 wire
|
| PT3WIRE | 3 wire
|
| PT4WIRE | 4 wire
|
◆ MAX31865()
configure temperature sensor
- Parameters
-
| bus | SPI request queue |
| cs | Digital In/Out pin of chip select line |
| c | Hardware configuration of sensor |
configures sensor for auto conversion with 50Hz filter
◆ tempLin()
| double MAX31865::tempLin |
( |
| ) |
|
|
inline |
linear temperature approximation
- Returns
- temperature in °C, NAN if sensor fault
◆ temp()
| double MAX31865::temp |
( |
| ) |
|
|
inline |
quadratic temperature approximation
- Returns
- temperature in °C, NAN if sensor fault
◆ fault()
| uint8_t MAX31865::fault |
( |
| ) |
|
|
inline |
- Returns
- fault byte read from sensor
◆ setLThr()
| void MAX31865::setLThr |
( |
uint16_t |
thr | ) |
|
|
inline |
set low fault threshold value
- Parameters
-
◆ setHThr()
| void MAX31865::setHThr |
( |
uint16_t |
thr | ) |
|
|
inline |
set high fault threshold value
- Parameters
-
◆ select()
| void SPI::Device::select |
( |
bool |
sel | ) |
|
|
inlineinherited |
chipselect activation
- Parameters
-
The documentation for this struct was generated from the following file: