Code and library for reading temperature of a Negative Thermal Coefficent (NTC) thermsistor Function returns: float temperature
This program is very simple, so it does not calculate the range of temperature
(based on tolerence of the part), or the self heating effect,
as I find it to be neglitable for majority of use cases.
A majority of these inputs can be found in the datasheet of your NTC thermsistor
pin# Vout- connected to aurduino An
Vs- input voltage to the circut
To- temperature normal resistance(Ro) is taken at (in kelvin[°C +273.15]), typicaly 25°c (298.15°k)
Ro- resistance at To (in ohms)
B (β, beta) - coefficient the themsistor curve follows between resistance and temperature
R1- resistance of R1 in series with the NTC
bit depth ( optional, 10 bits on Aurduino uno )
the timings are divided by 100 (t / 100), this prevents issues with the size of numbers
temperatures are in Celsius... what else would they be in? Fahrenheit?! ppfhhh!
note that the examples does not use the library itself, but the original function as "rt"
reflow profile can be adjusted with the arrays "times" and "temps"
ntcThermsistorCalculator.calculate(int pin, float Vin, float To, long Ro, int B, long R1, int bit_depth)
Vss is the same as: Vs, Vin, V+
Vdd is the same as: Vd, V0, V-
It is also important to know that thermsistors have a range of temperatures that they can be used in, you can check this with your datasheet.
There is example of using the library in the examples folder as most other libraries
If you'd like to learn more about NTCs, you may want to start here.