top of page

Interfacing of Temperature Sensor (LM35) with Arduino Uno.


What is a Temperature Sensor?


LM35 is a precision temperature sensor with its output proportional to the temperature (in C). With LM35, temperature can be measured more accurately than with a thermistor. It also possess low self heating and does not cause more than 0.1 C temperature rise in still air.


The operating temperature range is from -55°C to 150°C. The output voltage varies by 10mV in response to ambient temperature; its scale factor is 0.01V/ C.



Material Required:


Material Quantity

Arduino Uno 1

Temperature Sensor(LM35) 1

Jumper cables 4



Pinout Diagram:



Circuit Diagram:


Parameter Value

VCC 5 V DC from your Arduino

Ground GND from your Arduino

Out Connect to Analog Pin A0


Tested Programming Code:


float tempC;

int reading;

int tempPin = 0;

void setup()

{

analogReference(INTERNAL);

Serial.begin(9600);

}

void loop()

{

reading = analogRead(tempPin);

tempC = reading / 9.31;

Serial.print("Temprature= ");

Serial.print(tempC);

Serial.print("*C");

Serial.println();

delay(1000);

}


Precautions:

1. Double check the connections before powering on the circuit. 2. Don’t use loose jumper cables. 3. Check whether proper board is selected from Arduino IDE. 4. Ensure proper placement of Temperature Sensor for correct working. 5. Don’t lose hope if Temperature Sensor does not run properly for the first time, try again.

Conclusion:


Once your sketch is running, you have to open your serial monitor. There you can see the Temperature of the surroundings.




GET IN TOUCH

We'd love to hear from you

bottom of page