0% found this document useful (0 votes)
15 views20 pages

AR Unit3 Temp

This document provides information about interfacing a temperature sensor (LM35) with an Arduino Uno board. It includes details about the LM35 sensor such as its features, pinout, configurations, and how to calculate temperature readings from the output voltage. It also shows the circuit diagram and Arduino sketch for reading temperature values from the LM35 sensor and displaying them on the serial monitor.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views20 pages

AR Unit3 Temp

This document provides information about interfacing a temperature sensor (LM35) with an Arduino Uno board. It includes details about the LM35 sensor such as its features, pinout, configurations, and how to calculate temperature readings from the output voltage. It also shows the circuit diagram and Arduino sketch for reading temperature values from the LM35 sensor and displaying them on the serial monitor.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

AUTONOMOUS

ROBOTS EX612
APV EC5
2022-23
COURSE OUTCOMES

• CO1 - Understand the concept of Arduino processor and IOT


• CO2 - Apply the basic protocol and working principle of interfacing modules
• CO3 - Analyse various application programs for a wide range of Arduino processors
• CO4 - Design, debug and troubleshoot Arduino/IOT based project
UNIT 3 - SENSOR MODULE INTERFACING WITH
ARDUINO UNO

12 hours, 18 marks
3.1 Motion detector: tilt sensor, PIR sensor 3.5 Sound detector: microphone
3.2 Light detector: LDR 3.6 Temperature Sensor: LM35
3.3 Distance measurement: ultrasonic Sensor, IR sensor 3.7 Rotary encoder
3.4 Vibration detector: piezo sensor 3.8 GPS
[Note: Knowledge of interfacing any of above Sensor module with Arduino is of LEVEL 2
and writing Arduino sketch for such interfacing is of LEVEL3]
TEMPERATURE SENSOR LM35

• LM35 is a temperature sensor that outputs an analog signal which is proportional to the
instantaneous temperature
• The output voltage can easily be interpreted to obtain a temperature reading in Celsius
• The advantage of LM35 over thermistor is it does not require any external calibration
• The coating also protects it from self-heating
• Low cost and greater accuracy make it popular
TEMPERATURE SENSOR LM35 FEATURES

• Calibrated Directly in Celsius (Centigrade) • Low Self-Heating, 0.08°C in Still Air

• Linear + 10-mV/°C Scale Factor • Non-Linearity Only ±¼°C Typical


• Low-Impedance Output, 0.1 Ω for 1mA Load
• 0.5°C Ensured Accuracy if operated at optimal
temperature (at 25°C) and humidity levels • Lm35 has many family members a few names
are LM35CA, LM35C, LM35CA,
• Rated for Full −55°C to 150°C Range LM35D, LM135, LM135A, LM235, LM335.
• Suitable for Remote Applications • All LM35 family members work on the same
principles but temperature measuring capacity
• Input voltage for operation from +4 volts to varies and also they are available in many
+30 volts packages (SOIC,TO-220,TO-92,TO ).
• Less than 60-µA Current Drain
LM35 OUTPUT

• In the features of LM35 it is given to be +10 mV per degree centigrade.


• It means that with increase in output of 10 mills volt by the sensor Vout pin, the
temperature value increases by one. For example, if the sensor is outputting 100 mills
volt at vout pin the temperature in centigrade will be 10-degree centigrade. The same
goes for the negative temperature reading. If the sensor is outputting -100 mills volt the
temperature will be -10 degrees Celsius.
LM35 PINOUT
LM35 CONFIGURATIONS
LM35 CONFIGURATIONS

• LM35 can be used in two circuit configurations. Both yield different results.
First configuration:
• Can only measure the positive temperature from 2 degrees Celsius to 150 degrees
Celsius.
• Power LM35 and connect the output directly to analog to digital converter
• Recommended to connect an 80 k to 100 k resistor between Vout and GND
LM35 CONFIGURATIONS

Second configuration:
• Can utilize all the sensor resources and can measure the full range temperature from -55 degree
centigrade to 150-degree centigrade.
• Complex but yields high results
• Connect an external resistor, in this case, to switch the level of negative voltage upwards. The external
resistor value can be calculated from the formula given below the configuration circuit. The second
configuration circuit can be made in various ways (LM35 datasheet Texas Instruments.
The accuracy parameters for both configurations are different. The average accuracy level is +- 1 degree
Celsius for both configurations. But the accuracy level decreases for temperature between 2 degrees to 25-
degree centigrade.
CALCULATION OF TEMPERATURE

Steps to calculate temperature using Formula to convert voltage to


LM35 temperature sensor temperature
•Following the above steps and tutorial, you The formula to convert the voltage to
can easily interface LM35 temperature centigrade temperature for LM35 is
sensor with any microcontroller that has a Centigrade Temperature = Voltage
built-in analog to digital converter pins. Read by ADC / 10 mV(mills Volt)
Almost all the microcontrollers today have I divided by 10 mV because Linear scale
built-in ADC. factor is for LM35 is 10mV.
INTERFACING DIAGRAM – TEMPERATURE SENSOR

Requirements:
• Arduino Uno
• LM35 Temperature Sensor
• Jumper Wires
• USB Data Cable
• Breadboard
INTERFACING DIAGRAM – TEMPERATURE SENSOR

Connections:
LM35 >> Arduino Uno
• Vcc >> +5V
• GND >> Ground
• Analog ouptput >> A1 analog input
INTERFACING DIAGRAM – TEMPERATURE SENSOR
CIRCUIT SCHEMATIC
ARDUINO SKETCH – TEMPERATURE SENSOR

int val;
int tempPin = 1;

void setup()
{
Serial.begin(9600);
}
ARDUINO SKETCH – TEMPERATURE SENSOR

void loop()
{
val = analogRead(tempPin);
float mv = ( val/1024.0)*5000;
float cel = mv/10;
float farh = (cel*9)/5 + 32;
//Temperature in celsius
Serial.print("TEMPRATURE = ");
Serial.print(cel);
Serial.print(“ deg C");
ARDUINO SKETCH – TEMPERATURE SENSOR

Serial.println();
delay(1000);

//Temperature in fahrenheit
Serial.print("TEMPRATURE = ");
Serial.print(farh);
Serial.print(“deg F");
Serial.println();
}
REFERENCES

• https://create.arduino.cc/projecthub/infoelectorials/project-003-arduino-lm35-
temperature-sensor-project-0a43ba
• https://www.alldatasheet.com/view.jsp?Searchword=Lm35%20datasheet&gclid=CjwKCAi
AyfybBhBKEiwAgtB7fhyY-rW85jQryVgp2UqVQoPzRzeK7QchJXsTOXvIz-
2LeW_bADTRJxoCIFsQAvD_BwE
• Thank you !

You might also like