Description
The LM35 device has an advantage over linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large constant voltage from the output to obtain convenient Centigrade scaling.
- Calibrated Directly in Celsius (Centigrade)
- Linear + 10-mV/°C Scale Factor
- 0.5°C Ensured Accuracy (at 25°C)
- Rated for 0°C to 100°C Range
- Suitable for Remote Applications
Documents
Getting started with the LM35 Temperature Sensor
Now make your own temperature sensor by Arduino and LM35 Sensor
Hardware required
Connecting the Hardware
Connect the LM35 Temperature Sensor to the arduino UNO as shown below.
UPLOAD THE FOLLOWING CODE ON ARDUINO BOARD.
int val;
int tempPin = 1;
void setup()
{
Serial.begin(9600);
}
void loop()
{
val = analogRead(tempPin);
float mv = ( val/1024.0)*5000;
float cel = mv/10;
float farh = (cel*9)/5 + 32;
Serial.print(“TEMPRATURE = “);
Serial.print(cel);
Serial.print(“*C”);
Serial.println();
delay(1000);
/* uncomment this to get temperature in farenhite
Serial.print(“TEMPRATURE = “);
Serial.print(farh);
Serial.print(“*F”);
Serial.println();
*/
}
NOTE: IF you get stray ‘223’ errors The problem is with your “
and ”
characters. Replace them with ordinary quotes, "
, and you should be fine.