Hi everyone.Being newbie to amazing arduino world ,I want help from you guys in getting my temperatue measurement system with Lm35 sensor to get properly work.
I want to design a system to measure water temperature in tank with lm35 and arduino.As a first step I browse through many tutorial in making lm 35 as water proof one and found one on youtube with following
I tried to sealed my sensors as shown in vedio but instead of plastic case I attached to it copper tube case and started with general code as available on various links.
float temp;
int tempPin = 0;
void setup()
{
Serial.begin(9600);
}
void loop()
{
temp = analogRead(tempPin);
temp = temp * 0.48828125;
Serial.print("TEMPRATURE = ");
Serial.print(temp);
Serial.print("*C");
Serial.println();
delay(1000);
}
But to my surprise I found sensor giving different values each time .Now I am cluless for any problem in not getting correct reading with the system.
I came across many articles suggesting to use 1023 instead of 1024 but that also didn't work.Can anyone suggest me more proper code for lm 35 and necesary changes required to make.also my tank is at distance of around 10m from my computer would that create any problem.