LM35 sensor gives erratic readouts

Hi. I am using three LM 35 temperature sensors which I soldered onto wires about 3 feet long. I am getting erratic readings, skipping sometimes more than 10°. I think it is unlikely that the sensors are bad since I bought three of them (although they all are from the same batch probably). When I use them just in a bread board, without having extended the leads, I also got erratic readings.

Does anyone know what my problem is? At this point, I cannot use my project due to the erratic readings.

Thanks much for your input

LM53 temperature sensors are very sensitive to the voltage for their accuracy. What power supply are you using for this and does the voltage change?

If you are powering from a USB port I would recommend that you use an external power supply (or at least try it to see if it makes a difference).

Thank you for your reply. I am using the same power supply as for the Arduino itself, a 5 V phone (USB) charger. I understand what you are saying but if I have to use a precision power supply then things will get expensive and also the size of the supply alone would be enormous compared to the actual Arduino board. Any tricks? Thank you

My only comments were with respect to voltage fluctuations. If the voltage changes, then the reading will change, as you are multiplying the 'analog' input by a voltage-per-step and conversion factor to get a temperature. So variation in voltage gets variation in temperature (which is how the temperature is measured in the first place!). Have you check the voltage with a multimeter to verify it stays constant?

For accurate readings you don't need to have precision (ie always 5V) power supply, just a predictable one (ie, constant). I wrote a small library (see the code repository below) that calibrates the voltage against the Arduino internal reference and produces more accurate results for a given voltage level. I don't think this will help you as the readings change over time, but you may want to look at your code compared to the examples & library there to see if there is a significant difference.

You may also want to look at dry or bad solder joints for high resistance, broken wires, etc. With a breadboard you can get unreliable connections, so remove and reinsert components and wires. Standard stuff for when you get voltage variation.