LM35 temperature is far too high or low

  • LM35

Stay safe: If the LM35 is hot to touch, unplug the power at once: it's in backwards.

Why it happens

  • The formula / 9.3 works only with the 1.1 V reference.
  • The sensor is the wrong way round: it gets hot and reads nonsense.

How to fix it

  1. Flat side facing you, legs down: left is 5V, middle is output, right is GND.
  2. With the normal 5 V use analogRead(pin) * 500.0 / 1023.
  3. Use float, not int, for the answer.

It worked if: It shows about room temperature and rises when you hold it.

From how the part works. Follows the corrected formula in our LM35 lesson.

Didn't help? Search another error or ask us.