Lesson 14 LM35 Temperature Sensor
LM35 is a temperature sensor produced by National Semiconductor. It has very high operational accuracy and a wide operating range. With small size, low cost and reliability, LM35 is widely applied in engineering. Since it uses internal compensation, the output can begin with 0℃. LM35 has many different packages. Under the normal temperature, the LM35 requires no additional calibration to reach the accuracy of plus or minus 1/4℃. The power supply mode can be classified as single power source and positive-and-negative double power supply. Its pins are as shown below. Under the positive-and-negative dual power supply mode, it can measure a negative temperature. Under the single power supply mode and 25℃, the quiescent current is about 50μA and it has a wide operation voltage range - between 4 to 20V, thus saving electricity.
- 1* SunFounder Uno board
- 1 * Breadboard
- 1 * USB data cable
- 1 * LM35 Temperature Sensor
- 1 * I2C LCD1602
- Several jumper wires
The output voltage of the LM35 is proportional to Celsius temperature. When placed in 0℃ ambient temperature, it will output 0V. The output voltage will increase 10mV each time the temperature increases by 1℃. The calculation formula is as follows:
Step 1: Build the circuit
Note: Here you need to add a library. Refer to the description in Lesson 4 previously in the manual.
Step 3: Compile the code
Step 4: Upload the sketch to the SunFounder Uno board
Now, you can see the current temperature displayed on the I2C LCD1602.
#define lmPin A0 //LM35 attach to
float tem = 0;
Copyright © 2012 - 2016 SunFounder. All Rights Reserved.
Previous chapter: Lesson 13 Voice Sensor
Next chapter: Lesson 15 Water Level Sensor