LM 35 sensor distance issue

Hello everyone.I recently bought a LM35 Linear Temperature Sensor to measure temperature and everything worked fine when I had the temperature sensor attached to the Arduino using just short wires (around 10cms). It was giving a stable and correct reading.

However after I setup the system fully, the LM35 was connected to the exact same PINs but using a 10 metre shielded cable. Now this time using the same code, same PINs and everything ,the temperature reading jumping all over the place. It is showing 17, 9, 56, 15 degrees for same static condition all within the space of 10 seconds!

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)

Yes, that is how it behaves with 10 meters cable.

Click on "Technical Documents" and on "datasheet".
Figure 14 and 15 show what to do. You can start with a resistor at the output.

It is a well known issue with CMOS product not only LM35.
Explanations and solutions are given in the datasheet (National Semiconductor version) -> see extract in attach picture
With NS solution I have best result with 4.7 Kohms with 50 m of ethernet cable.

I have an other solution with ethernet cable. Ethernet cable is 100 ohms characteristic impedance.
I match the cable as you can see on other atachement.
My solution needs more component but has better results.

LM35_adaptation.png

wires have a resistance/meter, that it's negligible at short distances, but adds up in long distances(called impedence).
Ethernet cables have lower impedence, or use wires with bigger sections.
Or it may because of electromagnetic noise, in such case try averaging many values and if the average makes sense keep it or use a band pass filter to discard excessive values.

It is not a problem of electromagnetic noise, neither wire resistor (-> I= very few µ amps)
It is mainly a problem of Stationary Wave Ratio and cable mismatch.
The cable must be matched.

A cable not matched show inductor and capacitor. And CMOS IC does not like capacitor load, they can self-oscillate.
A matched cable shows only a resistor equal to his characteristic impedance, for ethernet cable Zc= 100 ohms.
A 4.7 k serial Resistor hides the problem, to adapt cable, input and output, prevents the problem.

hi everyone.thanks to you all guys for posting their kind suggestions on this topic.specially thankful to you 68tjs for elaborately addressing my issue through your views.

68tjs:
I have an other solution with ethernet cable. Ethernet cable is 100 ohms characteristic impedance.
I match the cable as you can see on other atachement.
My solution needs more component but has better results.

hey 68tjs though as adviced I somehow achieved stability in my temp reading using 4.7k resistor at analog output terminal and capacitor of 1uf across vcc nd ground terminal at sensor end.but still I am having error of around 1.5 to 2 deg in my readings.I tried increasng resistance but it failed to work.

should I go with the solution in your second attachment using 100ohm resistor and 100nf capacitor or I can achieve same with above configuration with some changes.please tell me whether that 100 ohm resistor in your sketch is connected to anlog out pin at both ends? also correct me on this,whether using DS18B20 digital sensor can solve this problem as output signal is digital one.

Another solution is to change sensor to one that uses a digital signal between sensor and Arduino...

The Dallas 1-Wire chips are long established in the Arduino world, and aren't nearly as hard to use as it might seem to someone just getting started with them! And getting started opens the door to a host of good, useful chips.