Digital Thermometer with LM35

A simple use of the LM35 shipped with the Fritzing Starter Kit.

This example shows a simple use case of the LM35 temperature sensor.

The sensed temperature is displayed with 6 LEDs in a range from 20 – 31°C.

Inspired by ladyada http://www.ladyada.net/learn/sensors/tmp36.html

pscmpf http://pscmpf.blogspot.com/2008/12/arduino-lm35-sensor.html

By Stefan_Hermann
Created on September 12, 2011, 12:52

Category: Analog

Difficulty: kids

License:  Creative Commons Attribution 3.0 Unported License

Tags: temperature, sensor, temp, degree, heath, analog, sensing, cold, fritzing, starter, kit

Files

Comments

  1. xomz # Feb. 7, 2012, 7:19 p.m.

    how i can get it working with negative temperatures?
  2. Stefan Hermann # March 15, 2012, 8:50 a.m.

    The LM35 can meassure temperatures from -55 to 150 °C. So you only have to change the Arduino code at int startTemp=20; to something smaller like int startTemp=-10;
  3. shivashakti # Jan. 5, 2013, 10:48 p.m.

    Lm 35 is a voltage generator; to generate negative value, you need to lift up the GND pin of the LM35 from ground, then it can generate negative voltage. For lifting up the pin you can use one or two diodes ( or a Zener diode ) between the pin and the ground. A sensing should connected to ground via 18k resistor, then the voltage of the sensing pin can be negative or positive related to a refference potencial, which is the opening voltage of the diodes.. You can see an exmple in the datasheet, when you google for the official datasheet of LM35..
  4. mbjohan # May 12, 2013, 12:42 p.m.

    Please notice that there are some differences between the LM35 and the TMP36 which is used for many of these beginner Projects. For example: The LM35 has an output range between 0 and 1 Volts. So you could have much more precise readings if you use the internal 1.1 V internal reference for analog readings. You can set this in the setup part of the code (analogReference(INTERNAL);). This will change the calculations in the code.

Login to post a comment...
  • Print this
© 2007 - 2011 University of Applied Sciences Potsdam