I am doing a project where I need to measure temperature using lm35. I am using arduino's analog A0 to measure, I light up extra LED on an other pin while measuring. Suddenly the alarm triggers. I set the temperature to trigger an alarm when it rises to like 40 degree. It is not supposed to trigger as I haven't done anything yet.
The method I am using to measure the voltage of the lm35 is by using 5 volt as the reference.
Personally, I guess that the battery which I am using does not able to support as it consumes too much current, causing the ADC to be inccurate. Another thing worth to mention is that the same thing does not happens when I uses USB cable port.
I am a bit curious, if the battery low, shouldn't the temeprature detected be lower? But it triggers, it is mostly due to battery but why?