In this blog, we will be discussing interfacing LM35 temperature sensor with Arduino Uno.
# Sensor Data Sheet:
Working Voltage: 5V
Working Current: 60 microAmperes
Range: -55 to 120 ( in Degree Celcius )
Scale Factor: 0.01V/Degree Celcius
# Pin-Out:
Vcc = 5V ... Power Supply Pin
Output pin = for taking the sensor reading
Gnd ... Power Supply Pin
# Arduino Connection:
# Working:
LM35 Temperature Sensor basically works on the principle of change in resistance with temperature.
# Arduino Code:
int sensor = A0; //define your analog input pin here
void setup() {
pinMode(sensor,INPUT);
Serial.begin(9600);
}
void loop() {
float a = analogRead(sensor);
float b = (5*a*100)/1024;
//here we are converting the volts(data from sensor) into temperature(degree celcius)
//the analog pin provides the input in form of 10 bits....i.e. from 0 to 1023
//so it needs to be converted into float...
//5 is used bcoz 5V is applied as Vcc to the LM35 sensor
Serial.println("Temperature is: ");
Serial.print(b);
Serial.print(" in Celcius.");
delay(250);
}
# Applications:
1. To measure the temperature
To download the code click here
Thanks for sharing this valuable information.
ReplyDeletelm35 temperature sensor
I have just gone through your blog......your information is so valuable. Thanks for sharing this information. HEATTEC SYSTEMS (PRIVATE) LIMITED made a commitment towards the research and development of new and improved products, abortion thus keeping in mind diversified customers to provide the customers with superior products and services for their individual needs.Thermocouple Sensor
ReplyDelete