Hi,
I'm trying to get a reading of a NTC thermistor, because i want to measure and log water temperature from a garden pond.
I have tryed reading trough the different tutorials on the arduino playground and i can conclude they only work for PTC thermistors.
Same problem with adafruit tutorials.
Arduino Playground - Thermistor2
And guess what, I'm stuck with some NTC thermistors, which is kinda annoying because the initial base value checks out ok.
But when I either increase or decrease the temperature, the value sendt to the arduino is the "inverse"
Meaning, my base value reading is usually "-22.00" degrees, well it's sorta correct, it's really +22.00
Well if that was the only problem, then i would just multiply with -1,
However, as the thermistor heats up, the value drops, well that is also ok i guess. from -22 to -16 is a heat increase of 6 degrees..
So.. how would you suggest i go about reading the temperature correctly ?
Hardware :
NTC thermistor 10k , (I'm worried the seller might have sold me a 100k set)
10k pull down resistor
//Schematic:
// [Ground] ---- [10k-Resistor] -------|------- [Thermistor] ---- [+5v]
// |
// Analog Pin 0
My favorite code is the one from Arduino Playground - Thermistor2
The last one called "The Elaborate, cleaned up a bit"
But I'm getting annoyed to switched to something far simpler
************************************** [code] or #include <math.h> void setup() { Serial.begin(9600); } double Thermister(int RawADC) { double Temp; // See http://en.wikipedia.org/wiki/Thermistor for explanation of formula Temp = log(((10240000/RawADC) - 10000)); Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (0.0000000876741 * Temp * Temp * Temp)); Temp = Temp - 273.15; // Convert Kelvin to Celcius return Temp; } void loop() { double temp = Thermister(analogRead(0)); Serial.println(temp); delay(2000); } Any help would be greatly appriciated