hello all,
i'm using ysi 400 thermister sensor with arduino uno for my project testing.currently i'm handle one issue that is the thermister read by analog read(..) this analog value increases gradually during cool condition and decreasing gradually during heat mode.i don't know this is hardware issue or software issue. i'm using following code is below for your reference.any one help me to solve this issue.
thanks in advance.
reference link: Interfacing Thermistor with Arduino to Measure and Display Temperature on LCD
//////////////////////////////////////////////////
my code is...
#include <math.h>
#include "LiquidCrystal.h"
LiquidCrystal lcd(44,46,40,52,50,48);
float A = 1.009249522e-03, B = 2.378405444e-04, C = 2.019202697e-07;
float T,logRt,Tf,Tc;
float Thermistor(int Vo)
{
logRt = log(10000.0*((1024.0/Vo-1)));
T = (1.0 / (A + BlogRt + ClogRtlogRtlogRt)); // We get the temperature value in Kelvin //from this Stein-Hart equation
Tc = T - 273.15; // Convert Kelvin to Celcius
Tf = (Tc * 1.8) + 32.0; // Convert Kelvin to Fahrenheit
return T;
}
void setup(){
lcd.begin(16,2);
lcd.clear();
}
void loop()
{
lcd.setCursor(0,0);
lcd.print("Temp:");
lcd.print((Thermistor(analogRead(0))));
lcd.print("k ");
lcd.setCursor(0,1);
lcd.print((Tc));
lcd.print(" C ;");
lcd.setCursor(9,1);
lcd.print((Tf));
lcd.print(" F");
delay(800);
}