Lesson 12 LM35 Temperature Sensor
LM35 is a temperature sensor produced by national semiconductor. It has very high operational accuracy and wide operating range. With small size, low cost and reliability, LM35 is widely applied in engineering. Since it uses internal compensation, so the output can begin with 0℃. LM35 has many different packages. Under 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 positive and negative dual power supply mode, it can measure negative temperature. Under single power supply mode and 25℃, the quiescent current is about 50μA and has wide operation voltage. It can work between 4 to 20V, thus save electricity.
- 1* SunFounder Uno board (or SunFounder Mega2560 board)
- 1*USB data cable
- 1*LM35 Temperature Sensor
- 1* 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. As the ambient temperature increases by 1℃, its output voltage will increase 10mV. The calculation formula is as follows
Step 1: Build the circuit
The schematic diagram
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 LCD1602.
//LM35 output voltage has a linear relation with the Celsius temperature, output of 0 v when 0 ℃,
float tem = 0;
Copyright © 2012 - 2016 SunFounder. All Rights Reserved.