0% found this document useful (0 votes)
38 views

LCD Temp Sensor

This document describes a microcontroller project using an LM35 temperature sensor and LCD display. A PIC16F877A microcontroller is used to read the analog voltage output from the LM35 sensor using its onboard 10-bit ADC and display the temperature on a LCD. The LM35 sensor outputs a voltage that is linearly proportional to Celsius temperature and directly calibrated to read temperature without external calibration. The PIC16F877A samples the LM35 output through its ADC and uses the measured voltage to calculate and display the temperature reading on the LCD.

Uploaded by

Yussuf Sherif
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)
38 views

LCD Temp Sensor

This document describes a microcontroller project using an LM35 temperature sensor and LCD display. A PIC16F877A microcontroller is used to read the analog voltage output from the LM35 sensor using its onboard 10-bit ADC and display the temperature on a LCD. The LM35 sensor outputs a voltage that is linearly proportional to Celsius temperature and directly calibrated to read temperature without external calibration. The PIC16F877A samples the LM35 output through its ADC and uses the measured voltage to calculate and display the temperature reading on the LCD.

Uploaded by

Yussuf Sherif
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/ 8

Higher Technological Institute of 10th

Ramadan

Mechanical Engineering: Mechatronics

Micro controller project

(LM35 sensor with LCD )

Submitted By:

Mohamed Mahmoud Osman. ID:20180786


Mohamed Ahmed Mohamed ID:20190856

Yousef Shreif ID:20180985

Group NO: 62 , 61

Submitted To:
Dr. Ahmed Abu-Elfadl
Eng. Ahmed El-Sayed
Components
name quantity notes
Pic 16f877A 1

Resistor 1 10k

LCD 1
L7805 1 Regulator with 5v output

Battery 1 9v

Jumpers -

Lm35 1
ADC
PIC16F877A has an inbuilt 10 bit Successive Approximation ADC which is multiplexed among 8
input pins.
Resolution
The A/D module has high and low-voltage reference input that is software selectable to some
combination of VDD, VSS, RA2 or RA3. With 5v as the Vref the resolution of Pic16f877a ADC can
be determined as
= Vref/(2^{10}-1) = 5/1023 =0.004887 = 4.887mv
Time of conversion :
It is measured I Tad as the normal conversion time requires 12 tad where one tad mustn’t be less than
1.6us
For 8MHZ clock then
1 tad = 1/8MHZ = 125ns which is less than 1.6us
So choosing fosc/64 we get 1 tad =8 us
So conversion time = 12 *8us=96us
The below table shows the ADC input pins multiplexed with other GPIO pins. The ADC pin can be
enabled by configuring the corresponding ACON1 register. When the ADC function is selected for a
pin ,then other Digital signals are disconnected from the ADC input pins.
ADC Channel Pin
Channel 0 RA0/AN0 (Port A)
Channel 1 RA1/AN1 (Port A)
Channel 2 RA2/AN2/VRef- (Port A)
Channel 3 RA3/AN3/VRef+ (Port A)
Channel 4 RA5/AN4 (Port A)
Channel 5 RE0/AN5 (Port E)
Channel 6 RE1/AN6 (Port E)
Channel 7 RE2/AN7 (Port E)

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 (approximately $0.95) and greater
accuracy make it popular among hobbyists, DIY circuit makers, and students.
Many low-end products take advantage of low cost, greater accuracy and used
LM35 in their products. Its approximately 15+ years to its first release but the
sensor is still surviving and is used in any products.
• LM35 is a temperature sensor that outputs an analog signal
• calibrated Directly in Celsius (Centigrade)
• Linear + 10-mV/°C Scale Factor
• 0.5°C Ensured Accuracy (at 25°C)
• Rated for Full −55°C to 150°C
• Range Suitable for Remote Applications Operates from 4 V to 30 V Less
than 60-µA Current Drain Low Self-Heating,
• 0.08°C in Still Air Non-Linearity Only ±¼°C Typical Low-Impedance
Output, 0.1 Ω for 1-mA Load which is proportional to the instantaneous
temperature.

Fig1

LM35 can be used in two circuit configurations. Both yield different results. In
the first configuration, we can only measure the positive temperature from 2
degrees Celsius to 150 degrees Celsius. In this first configuration, we simply
power lm35 and connect the output directly to analog to digital converters. In
the second configuration, we can utilize all the sensor resources and can
measure the full range temperature from -55 degree centigrade to 150-degree
centigrade. This configuration is a little complex but yields high results. We
have to 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.
Code
Schematic

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy