I am facing quite a bit trouble with an LM25 temperature sensor. The readings are a bit too high (90-120*C) for room temprature. I have tried thefollowing things to get an expected result but none seems to work:
- Adding a filter capacitor to the power rails of the LM35 to stabilize the temperature reading.
The fluctuation of temperature output might be the noise from the power supply so it’s better to use an electrolytic capacitor at power supply i.e. connected to Vcc and GND of LM35. (I added 10 uF)
Adding resistance between output pin and GND pin According to datasheet of the LM35 it has low sinking capability. As a result, its output become more sensitive to electromagnetic interference. 1K or 2K resistor between output and GND can solve this issue to some extent and also solve self-heating errors.
Taking average reading rather than single reading. Fluctuation or drift are one of the major issues of the Arduino sensor. One way to make fluctuation less is trying to calculate average reading instead of single reading.
Minimize the error. When we use the default reference i.e. 5V refence at analog input, it is less sensitive to voltage difference. At this reference the Arduino can map 5V input voltage into 1024 steps i.e. 0-1023. This means resolution at 5V = 5/1023 = 4.88 x 10-3V = 4.88mV. So, if we use the default 5V analog reference the minimum temperature deviation that the Arduino can detect is 0.50C. If we use the default Arduino reference voltage we will end up with adding 0.50C extra error. This error can be minimized by selecting the proper reference value for the Arduino. I used the 1.1V internal reference for the Arduino so that the minimum temperature deviation that the Arduino can measure improves.
At the end I even purchased a new sensor assuming the first one was faulty but tono avail. I am still facing the same problem.