Anda di halaman 1dari 4

instructables

Arduino Temperature Sensor Using LM35

by salab

Introduction • Rated for Full −55°C to 150°C Range

The LM35 series are precision integrated-circuit • Suitable for Remote Applications
temperature devices with an output voltage linearly
proportional to the Centigrade temperature. LM35 is • Low-Cost Due to Wafer-Level Trimming
three terminal linear temperature sensor from
National semiconductors. It can measure temperature • Operates from 4 V to 30 V
from -55 degree Celsius to +150 degree Celsius. The
voltage output of the LM35 increases 10mV per • Less than 60- A Current Drain
degree Celsius rise in temperature. LM35 can be
operated from a 5V supply and the stand by current is • Low Self-Heating, 0.08°C in Still Air
less than 60uA. The pin out of LM35 is shown in the
figure below. • Non-Linearity Only ±¼°C Typical

Features • Low-Impedance Output, 0.1 for 1-mA Load

• Calibrated Directly in Celsius (Centigrade) PinOuts Of LM35 is Shown in image.

• Linear + 10-mV/°C Scale Factor You can download the datasheet from below file.

• 0.5°C Ensured Accuracy (at 25°C)

Arduino Temperature Sensor Using LM35: Page 1


http://www.instructables.com/ORIG/FYZ/7FK0/JASJNMVP/FYZ7FK0JASJNMVP.pdf
… Download (https://cdn.instructables.com/ORIG/FYZ/7FK0/JASJNMVP/FYZ7FK0JASJNMVP.pdf)

(https://cdn.instructables.com/ORIG/FYZ/7FK0/JASJNMVP/FYZ7FK0JASJNMVP.pdf)

Step 1: Hardware Required and Circuit Diagram

Arduino Board (Any) Buy it from Flipkart


LM35 Sensor Buy it from Flipkart
BreadBoard

Connect the Circuit as shown in image and upload the following code.

Arduino Temperature Sensor Using LM35: Page 2


Step 2: Programming the Arduino

/*Code designed by Sujay Alaspure in SA Lab */ float vout; //temporary variable to hold sensor reading

const int sensor=A5; // Assigning analog pin A5 to void setup() {


variable 'sensor'
pinMode(sensor,INPUT); // Configuring sensor pin as
float tempc; //variable to store temperature in degree input
Celsius
Serial.begin(9600);
float tempf; //variable to store temperature in
Fahreinheit }

void loop() { Serial.print(" ");

vout=analogRead(sensor); //Reading the value from Serial.print("in Fahrenheit=");


sensor
Serial.print("\t");
vout=(vout*500)/1023;
Serial.print(tempf);
tempc=vout; // Storing value in Degree Celsius
Serial.println();
tempf=(vout*1.8)+32; // Converting to Fahrenheit
delay(500); //Delay of 1 second for ease of viewing }
Serial.print("in DegreeC=");

Serial.print("\t");

Serial.print(tempc);

Step 3: Output Result

See the result on Serial Moniter....

First of all, I would like to thank you for reading this guide ! I hope it helps you.

If You have any queries I am happy to help you.....

Drop a Comment. Your feedback is valuable for me.

Arduino Temperature Sensor Using LM35: Page 3


Arduino Temperature Sensor Using LM35: Page 4

Anda mungkin juga menyukai