void readThermister() { // I know it's spelled wrong.
double Temp; // Variable that returns as a temperature value
Temp = log(((12240000/analogRead(A0)) - 10000)); // Fancy math stuff
Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (0.0000000876741 * Temp * Temp * Temp)); // Even fancier
Temp = Temp - 273.15; // Convert Kelvin to Celcius
degreesF = (Temp * 1.8) + 32.0; // Convert to degrees F
}
This is reading my 100k thermistor with a 100k pullup, the result controls my hotplate. This hotplate normally operates around 100F to 145F, my problem is that when I want to go warmer, the thermistor readings peg at 152.0F, so if I set my temp to 153F, it goes rocketing up and up because it doesn't know that it reached 153F.
I'm assuming I'm running into a limit of how large a number can get, or something to that effect? My temps are impeccably accurate between 60F and 150F with this bit of code and my thermistor, I'd just like it to be able to go over 152. Can anyone point me towards the solution to this problem?
You could use different variables for each step of the calculation ( rather than using Temp over and over) and Serial.print() all my of those values to see which was one stops changing as the temperature passes 152. That would tell you what step was hitting a limit. My guess would be the integer divide in the firt bit of fancy math.
Change the / 10000 to the 100K value of your thermistor.
edit: You will need the 100k thermistor datasheet and to follow the directions on this page using the Steinhart-Hart Thermistor Calculator to use your specific 100k thermistor.