Electronic – arduino – LM35 Temp Sensor Distance Issue

arduinotemperature

I recently bought a LM35 Linear Temperature Sensor off littlebirdelectronics.com (as well as other Arduino stuff) and everything all worked fine when I had the temperature sensor attached up to the Arduino using just short wires (10cms). It was reporting a stable 20 degrees and was nice and happy.

However after I setup the system fully, the LM35 was connected to the exact same PINs but using a 4 metre shielded cable. Using the same code, same PINs and everything the reported temperature now jumps all over the place. It will be -31, 30, 1, 15 degrees all within the space of 10 seconds!

I'm assuming the problem is that the 5V power line is interfering with the analogue data line, thus messing with the results.

My question is, am I doing something wrong, or is this the accepted performance of the LM35 temp sensor? (ie it will only work at small distances)

Also, if I purchase this 18B20 Temperature Sensor instead, will I end up with the same results or should the fact that it's digital allow it to transmit over longer distances?

Thanks!

Best Answer

Have you 'scoped the output? The LM35 is susceptible to EMI (which you have addressed with shielded cable) and load capacitance - which may be an issue. If there is instability due to load capacitance (>50pF) you can isolate this capacitance with a series resistor. If external EMI is still an issue, an RC damper can be added. Both effects are addressed on p7 (figs 3 & 4) of the datasheeet.