Electronic – arduino – Temperature sensor TMP36 Arduino problem

arduinosensor

I have a TMP36 temp sensor. I already did the programmation of it, tried different settings, different code found on the internet.

The sensor keeps giving me a temperature approximatly 10°C above real temp.
Can it be broken or something ?

Weirdly it reacts when I put it outside the temp is reduced, and changes back when I put it inside.

What am I doing wrong ?

Best Answer

I had a similar problem to this with the LM35, which was caused by the LM35 oscillating due to a long cable length between the sensor and Arduino. I fixed this by adding a 100Ohm Resistor to the signal line.

Changing to the TMP36 also fixed this problem for me because it is more robust when driving capacitive loads. But even so, the datasheet recommends a resistor for large capacitive loads.

Also don't forget the bypass cap across the supply.

enter image description here