Electorials Electronics
Published © GPL3+

Project 003: Arduino LM35 Temperature Sensor Project

This simple beginner project makes an excellent tool for everyday applications, utilising a common LM35 temperature sensor and an Arduino.

BeginnerProtip12 minutes187,150
Project 003: Arduino LM35 Temperature Sensor Project

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
You could use any other Arduino board as well. The Keyestudio Uno is used in this example.
×1
USB-A to B Cable
USB-A to B Cable
Depends on the Arduino.
×1
Jumper wires (generic)
Jumper wires (generic)
1 Male to Male Jumper Wire.
×1
Texas Instruments LM35 Temperature Sensor
×1
Breadboard (generic)
Breadboard (generic)
×1
NextPCB
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Circuit Diagram

Schematics

Code

Arduino LM35 Temperature Sensor Project Code

C/C++
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();
*/
}

Credits

Electorials Electronics

Electorials Electronics

85 projects • 63 followers
I'm an electronic hobbyist interested in anything, from Arduino to drones. I plan to educate people with the content on my website.

Comments