The important electronic component that is used in daily life to measure the temperature is the temperature sensor. It is always used in every component to know the temperature parameter.

In this session, ARDUINO interfacing with Temperature Sensor is discussed. This Sensor is used to estimate the temperature of the surroundings. Temperature Sensor is commonly known as LM35. It is used to give the output temperature in degree Centigrade.

  •         The Operating Temperature of this sensor varies from -55 degree Centigrade to 150 degree Centigrade.
  •         LM35 Sensor gives the output more accurate than it is measured with the Thermistor
  •         It consists of three terminals known as VCC, OUTPUT and GROUND.
  •         LM35 is a type of Contact Temperature Sensor.
  •         It is a type of Semiconductor based sensor.
  •         LM35 is a very low cost and easily available sensor.
  •         The output of this temperature is Analog based output.






This sensor can be connected to the ARDUINO and can be programmed accordingly to obtain the temperature output values.

This sensor contains three pins VCC, GROUND and OUTPUT pins.

Initially VCC pin of the Sensor is connected with the 5V pin of the ARDUINO board by using male to female jumper wire.

Next the GROUND pin of the ARDUINO is connected to the GROUND of the ARDUINO board by using the male to female jumper wire.

Next finally the OUTPUT pin of the sensor is connected to the Analog pin on the ARDUINO board by using the male to female jumper wire.

With this the interfacing of the temperature sensor with the ARDUINO board is completed and after the successful execution of the program the output values can be retrieved from the LM35 and can run it according to our requirement.




float temp;

int tempPin = A1;


void setup() {



void loop() {

   temp = analogRead(tempPin);

   // read analog volt from sensor and save to variable temp

   temp = temp * 0.48828125;

   // convert the analog volt to its temperature equivalent

   Serial.print(“TEMPERATURE = “);

   Serial.print(temp); // display temperature value



   delay(1000); // update sensor reading each one second


After the successful writing of the ARDUINO program in the ARDUINO IDE then you can dump the code to the ARDUINO development board after successful execution and running of the program without any errors.



The temperature sensor works on the principle of resistance change with the increase in the temperature reading. A change in 10mV in voltage will be there for a change in 1 degree centigrade of temperature. Thus it shows the accurate change in temperature over the given specific temperature range.

This sensor can be used in various applications related to the autonomous robotic projects and this sensor is completely designed by using the semi conductor material. This sensor can only be used for small projects and specific temperature ranges. For the requirement of higher temperature accurate and effective values then different other sensors designed by the upgradation of this LM35 sensor.



After the successful connection of the component to the ARDUINO board as explained in the above discussion and successful execution of the program the temperature sensor starts functioning by showing up the temperature of the surrounding environment.

Initially the output pin of the temperature sensor is assigned to the A1 pin .

Then baud rate of 9600 is set up to have the serial communication with the ARDUINO.

Then Analog Read command is used to read the temperature from the Analog pin.

Then formula is used to extract the accurate temperature value from the obtained information from the sensor.

Finally the temperature is printed on the screen that is detected by the LM35 sensor.

Later on the temperature values are detected and printed on the screen with a delay of one second.



The above discussed information is all about the detailed explanation of the Interfacing of LM35 with the ARDUINO Development Board.

This shows that the use of temperature sensor to detect the temperature and ensures its importance in the field of Autonomous Robotic Projects.

Thus this knowledge and detailed explanation helps you to show your advancement of your hands on experience with the temperature sensor and makes you perfect and efficient in handling the projects by inclusion of mechanics, electronics and programming field with higher output results.

Leave a Reply

Your email address will not be published. Required fields are marked *