LM35 Sensor Interfacing With Arduino

The LM35 is an electronic sensor that measures temperature and its output is proportional to degrees Celsius. The LM35’s low output impedance, linear output, and accurate self-calibration make it especially easy to interface with read or management circuitry. This sensor no longer requires external calibration or trimming to provide standard accuracy.

LM35 Sensor Interfacing With Arduino

Components Required:

A) 1 Arduino UNO

B) 1 LM35 Temperature Sensor

C) Jumper Wires

D) System with Arduino IDE

E) USB to Arduino connecting Cable

Description:

In this experiment we’ll learn to interface the LM35 sensor with an Arduino UNO.

Circuit Diagram:

lm35-sensor-interfacing-with-arduino

Steps to Follow:

1. Open Arduino IDE.

2. Click on File.

3. Go to New. – A new File will open

4. Remove the Pre-Written code.

5. Paste the code given below, in the code section.

6. Check whether your UNO has been detected by the ID by going to Tools.

7. Click on Port – Select the COM-Port on which Arduino UNO is detected.

Code:

float temp;
int tempPin = 0;

void setup()
{
  Serial.begin(9600);
}
void loop()
{
  temp = analogRead(tempPin);
  temp = temp * 0.48828125;
  Serial.print("TEMPRATURE = ");
  Serial.print(temp);
  Serial.print("*C");
  Serial.println();
  delay(1000);
}

Leave a comment