2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* @file thermistors.cpp
|
|
|
|
*
|
|
|
|
* @date Feb 17, 2013
|
2020-01-13 18:57:43 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* http://en.wikipedia.org/wiki/Thermistor
|
|
|
|
* http://en.wikipedia.org/wiki/Steinhart%E2%80%93Hart_equation
|
|
|
|
*/
|
|
|
|
|
2021-07-25 22:05:17 -07:00
|
|
|
#include "pch.h"
|
|
|
|
|
2019-10-02 18:00:10 -07:00
|
|
|
void setDodgeSensor(ThermistorConf *thermistorConf, float pullup) {
|
|
|
|
thermistorConf->config = {-40, 30, 120, 336660, 7550, 390, pullup};
|
2015-07-10 06:01:56 -07:00
|
|
|
}
|
|
|
|
|
2023-03-27 20:57:56 -07:00
|
|
|
void setAtSensor(ThermistorConf *thermistorConf,
|
|
|
|
float tempLow, float rLow,
|
|
|
|
float tempMid, float rMid,
|
|
|
|
float tempHigh, float rHigh) {
|
|
|
|
thermistorConf->config.tempC_1 = tempLow;
|
|
|
|
thermistorConf->config.resistance_1 = rLow;
|
|
|
|
|
|
|
|
thermistorConf->config.tempC_2 = tempMid;
|
|
|
|
thermistorConf->config.resistance_2 = rMid;
|
|
|
|
|
|
|
|
thermistorConf->config.tempC_3 = tempHigh;
|
|
|
|
thermistorConf->config.resistance_3 = rHigh;
|
|
|
|
}
|
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
// todo: better method name?
|
2019-10-02 18:00:10 -07:00
|
|
|
void setCommonNTCSensor(ThermistorConf *thermistorConf, float pullup) {
|
2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* 18K Ohm @ -20C
|
|
|
|
* 2.1K Ohm @ 24C
|
|
|
|
* 294 Ohm @ 80C
|
|
|
|
* http://www.rexbo.eu/hella/coolant-temperature-sensor-6pt009107121?c=100334&at=3130
|
|
|
|
*/
|
2023-06-12 16:32:49 -07:00
|
|
|
thermistorConf->config = {/*temp*/-20, /*temp*/23.8889, /*temp*/120,
|
|
|
|
/*resistance*/18000, /*resistance*/2100, /*resistance*/100, pullup};
|
2015-07-10 06:01:56 -07:00
|
|
|
}
|
|
|
|
|
2023-08-09 23:59:50 -07:00
|
|
|
void setGmCltSensor(ThermistorConf *thermistorConf, float pullup) {
|
|
|
|
thermistorConf->config = {-40, 40, 130, 100'000, 1459, 70, pullup};
|
|
|
|
}
|
|
|
|
|
2019-10-02 18:00:10 -07:00
|
|
|
void set10K_4050K(ThermistorConf *thermistorConf, float pullup) {
|
2019-03-04 11:37:23 -08:00
|
|
|
// see https://www.taydaelectronics.com/datasheets/A-409.pdf
|
2019-10-02 18:00:10 -07:00
|
|
|
thermistorConf->config = {-30, 25, 130, 108000, 10000, 225, pullup};
|
2019-03-04 11:37:23 -08:00
|
|
|
}
|