Skip to content

Arduino libary for reading the temperature of a negative thermo coefficient (NTC) thermometer in an voltage divider

License

Notifications You must be signed in to change notification settings

MarsTheProtogen/ntcThermsistorCalculator

Repository files navigation

Aurduino NTC Thermistor Reader

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.

https://github.com/MarsTheProtogen/ntcThermsistorCalculator/blob/3f9f5748b12179a5a9c11175c609fd50e9f29678/ntcThermsistorCalculator.zip



Inputs (in order) and function syntax

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 )



Voltage divider circut to mesure the temperature



usage example for a basic reflow oven

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"



syntax

ntcThermsistorCalculator.calculate(int pin, float Vin, float To, long Ro, int B, long R1, int bit_depth)



NOTES:

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.