1/20/2016
Temper atur e Sensor usi ng PIC mi cr ocontr ol ler
HOME
PROJECTS
GENERA RAL L AR ARTI TICL CLE ES GENE
TUTORIALS
PROJECT IDEAS
PRO ROJE JECT CT SE SER RVICES
Temperature sensor Temperature sensor using PIC16F877A PIC16 F877A microcontroller micro controller BILAL Malik J Ju uly 26, 2014 31 Comments Comments
PIC microcontro microcontrollers llers
ADVERTISEMENT
Emaar Luxur Lux ur y Apartments Apart ments emaar.com/Lu em aar.com/Luxury-Apar xury-Apar
Launch 23rd Jan in K Harbour Views at Dub Creek. Learn More.
100% Fr ee ee DataSheet DataShe et (PDF) Siemens Simatic Parts Page Contents [hide hide]] 1 OBJECTIVE:
Application Application Form Online
2 Components: 3 Implementation: 4 Circuit diagram: 4.0.1 NOTE: Before making this project , I recommend you should learn about LCD interfacing with microcontroller especially hardware part. because I have seen many students struggling with LCD display. 5 CODE:
OBJECTIVE: http://mi cr ocontr ol ler sl ab.com/tem per atur e- sensor - usi ng- pi c16f877a- m icr ocontr ol l er /
PLEASE SUPPORT OUR WORK Our goal is to discover new solutions and provide working examples with 1/13
1/20/2016
Temperature Sensor using PIC microcontroller
video, pictures, code and Temperature measurement
schematics. Please
Digital display of temperature
support our efforts.
used of microcontroller to measure temperature used of microcontroller to Display temperature value on LCD (liquid crystal display)
COMPONENTS: There are many temperature sensors available in market. But LM35 temperature sensor is used in this project. It is cheapest in price and one can easily find it in market. There are many other advantages of LM35 like:
SUBSCRIBE TO BLOG VIA EMAIL Enter your email address to subscribe to this blog and receive notifications of new posts by email.
It is more efficient than thermistor It is made up of integrated circuit hence no chance of
Join 261 other subscribers
damaging to internal circuitry. It draws current only in micro Amperes.
Email Address
Only 5 volt power supply is required for LM35 and there is no
Subscribe
need of extra circuitry to operate it. PIC16F877A micrcontroller is used to read temperature value. 16X2 LCD is used to display temperature value on LCD. Code of this project written in Mikro C compiler.
FIND US ON FACEBOOK
IMPLEMENTATION: LM35 temperature sensor converts temperature into its
Microcontrollers
proportional analog voltage value. LM35 is three terminal
6,148 likes
device.Pin number one and three are for 5 volt voltage supply. Pin two is analog voltage output with respect to temperature value.Relation between measured temperature and analog Liked
output voltage is:
You like this
1oC = 10m volt Hence for every 1 degree increase in temperature there will be a increment of 10m volt in output voltage of LM35 sensor. PIC16F877A microcontroller is used to measure analog voltage value.
PIC16F877A
digital
converter)
microcontroller built in ADC (analog to is
used
to
measure
analog
voltage. PIC16F877A PORTA have seven built in ADC channels. So
one
can
inerface
upto
seven
sensors
with
this
microcontroller very easily.I will post a project on green house http://microcontrollerslab.com/temperature-sensor-using-pic16f877a-microcontroller/
RELATED POSTS Automatic control of street lights … 2/13
1/20/2016
Temperature Sensor using PIC microcontroller
system.In green house system project I have used four ADC
metal detector
channels to measure temperature , light, humidity and
robot using pic
moisture. Coming back to our digital thermometer, ADC has been used to read analog voltage. After reading ADC value, using
voltage
and
temperature
relationship
voltage
microcontroller …
is
converted back into temperature. A conversion factor is used to
Line follower
convert voltage back into temperature. All these conversion has
robot using
been done through programming. LCD is connected to PORTB of PIC16F877A microcontroller. I will disucss it in programming
microcontroller …
part. LCD is used to display temperature value. zero crossing
CIRCUIT DIAGRAM:
detector circuit using pic
Proteus is used for simulation. Following is a circuit diagram of Digital temperature sensor:
microcontroller … Electronic lock using pic microcontroller … AC Voltage measurement using PIC16F877A microcontroller … Solar power auto irrigation
temperature sensor circuit diagram As shown in above figure both temperature sensor and LCD is displaying same values of temperature. To ensure protection of LM35 and microcontroller you can connect 80k ohm resistor parallel to output of temperature sensor.
NOTE: BEFORE MAKING THIS PROJECT , I RECOMMEND YOU SHOULD LEARN ABOUT LCD INTERFACING WITH MICROCONTROLLER ESPECIALLY HARDWARE PART. BECAUSE I HAVE SEEN MANY STUDENTS STRUGGLING WITH LCD DISPLAY.
system using microcontroller … Digital DC watt meter using pic microcontroller …
CODE: In programming part conversion factor is used to convert voltage back into temperature.The conversion factor is: http://microcontrollerslab.com/temperature-sensor-using-pic16f877a-microcontroller/
3/13
1/20/2016
Temperature Sensor using PIC microcontroller
1 volt = 100 degree temp = ( Output voltage * 100 oC/V ) Code is written in MIKRO C compiler. //************************* LCD module connections**************************************** //********************** written by
[email protected]********************************** sbit LCD_D7 at RB2_bit; sbit LCD_D6 at RB3_bit; sbit LCD_D5 at RB4_bit; sbit LCD_D4 at RB5_bit; sbit LCD_EN at RB6_bit; sbit LCD_RS at RB7_bit; sbit LCD_D7_Direction at TRISB2_bit; sbit LCD_D6_Direction at TRISB3_bit; sbit LCD_D5_Direction at TRISB4_bit; sbit LCD_D4_Direction at TRISB5_bit; sbit LCD_EN_Direction at TRISB6_bit; sbit LCD_RS_Direction at TRISB7_bit; //************************temperature variables****************
int temp; char temper[7]; //************************************************************** void READ_temp(void) { temp = ADC_Read(0); temp = temp * 5/1023; temp = temp * 100; } void data_converstion(void) { inttostr(temp,temper); } void display1(void) { lcd_out(1,1,”TEMPERATURE=”); lcd_out(1,13, Ltrim(temper)); http://microcontrollerslab.com/temperature-sensor-using-pic16f877a-microcontroller/
4/13
1/20/2016
Temperature Sensor using PIC microcontroller
Lcd_Chr_Cp(0xdf); Lcd_Chr_Cp(‘C’); Lcd_Chr_Cp(‘ ‘); } void main() { ADC_Init(); Lcd_Init(); // Initialize LCD Lcd_Cmd(_LCD_CLEAR); // Clear display lcd_cmd(_LCD_CURSOR_OFF); lcd_out(1,4,”DIGITAL TEMPERATURE”); lcd_out(2,6,”SENSOR”); delay_ms(1000); Lcd_Cmd(_LCD_CLEAR); // Clear display while(1) { READ_temp(); data_converstion(); display1(); } } If you want compete simulation and hexa file of this project.Comment on this post.Also comment your issue I will love to reply to your comments. To download circuit diagram and hexa file of digital temperature sensor comment on following link : Temperature sensor using pic microcontroller
Keep visiting my blog for more projects.
http://microcontrollerslab.com/temperature-sensor-using-pic16f877a-microcontroller/
5/13
1/20/2016
Temperature Sensor using PIC microcontroller
Temperature Sensor alibaba.com/Temperature-Sensor
Choose from 2M+ Verified Suppliers. Contact Directly & Get Live Quotes!
pressure sensor Microcontroller Projects LN2 microdosing pump Gul Ahmed
Related Posts
Digital frequency meter using pic microcontroller
Foot step power generation system using pic microcontroller
Automatic control of street lights
About The Author we providing project services to students and industry from last 2 years and working as a freelancer. I also write technical articles related to electrical ,electronics, embedded and power electronics Engineering. Contact me if you need my project services. My email address:
[email protected]
31 Comments http://microcontrollerslab.com/temperature-sensor-using-pic16f877a-microcontroller/
6/13
1/20/2016
Temperature Sensor using PIC microcontroller
Nndonde AUGUST 11, 2014
Great work Bilal please send complete simulation and the hex file most preferably including proteus sketches too Reply
BILAL Malik AUGUST 11, 2014
post your email address in comment to get complete project of digital temperature sensor. Reply
BILAL Malik OCTOBER 9, 2014
Download link is available at the end of this post Reply
microP OCTOBER 6, 2014
can i have a copy of the hex file and also DNS.thank you
[email protected] Reply
amir OCTOBER 9, 2014
hello ,can i have your full source code and hex file .help me please
. my
email –
[email protected] . Reply
BILAL Malik OCTOBER 9, 2014
I have updated this post
with downloading link of temperature sensor.you can download now Reply
amir OCTOBER 10, 2014
excuse me , why i cant compile your coding in mikroC http://microcontrollerslab.com/temperature-sensor-using-pic16f877a-microcontroller/
7/13
1/20/2016
Temperature Sensor using PIC microcontroller
compiler .Its error . Help me pls . I need to edit your coding .thanks Reply
BILAL Malik
OCTOBER 10, 2014
Use link given at the end of this article to download code and simulation and there is no error in this code I have complied it before upload on this post
tarik OCTOBER 11, 2014
hi malik, thank you for this good job, i don’t understand the function Ltrim and how to display a negative temperature thanks a lot Reply
siva NOVEMBER 18, 2014
is the correct code? proteus simulation is availablre? Reply
naqash awan DECEMBER 17, 2014
yar plz send me the full code, hex file and circuit diagram Reply
najib DECEMBER 21, 2014
nice work could please send me the hexa file Reply
Abi JANUARY 31, 2015 http://microcontrollerslab.com/temperature-sensor-using-pic16f877a-microcontroller/
8/13
1/20/2016
Temperature Sensor using PIC microcontroller
I am doing my project on load cell, in that i want to display load cell ouput voltage into load value,for that i am using PIC16f877a..Anyone pls help me Reply
kira FEBRUARY 12, 2015
very nice project please send me the related project & its format Reply
Sam FEBRUARY 15, 2015
Very nice project… Pls send me the complete project and hex file. How do i open .dns file. Thanks Reply
BILAL Malik FEBRUARY 15, 2015
Code and circuit diagram of
temperature sensor project is available in article Reply
Sam FEBRUARY 16, 2015
Thanks man, i have seen it and it is working perfectly. Can you please assist me on how to connect numeric keypad and alarm system(buzzer) so it beeps at a particular temperature. Thank you. Reply
Sam FEBRUARY 16, 2015
Pls my email address is bentumsamuel@g http://microcontrollerslab.com/temperature-sensor-using-pic16f877a-microcontroller/
9/13
1/20/2016
Temperature Sensor using PIC microcontroller
Reply
rahul jkb FEBRUARY 16, 2015
i want complete coding of this project please send me Reply
Sam FEBRUARY 16, 2015
Please it is a build up on your already existing project. I am having challenges interfacing it with a buzzer to beep and lcd at to light red at a temperature of about 80 degree celcius. I really appreciate your assistance. Thank you. Reply
Sam FEBRUARY 17, 2015
The link to the codes is : http://www.4shared.com/get You can download with email:
[email protected] and password: sammie. Thanks. Reply
ashutosh FEBRUARY 18, 2015
plz give me code and hex file of temprature sensor using pic16f877a Reply
BILAL Malik FEBRUARY 18, 2015
Check the link given at the end of post for code and hexa file Reply
Sam APRIL 13, 2015
Pls how do you include a buzzer to the project so it sounds at a particular temperature. Thanks. Reply
http://microcontrollerslab.com/temperature-sensor-using-pic16f877a-microcontroller/
10/13
1/20/2016
Temperature Sensor using PIC microcontroller
Nan APRIL 25, 2015
Nice worl. Implementing it but having challenges displaying on lcd screen. Pls help. Reply
Nan APRIL 25, 2015
Nice work. Implementing it but having challenges displaying on lcd screen. Pls help. Reply
Bentum APRIL 30, 2015
Nice project, Have downloaded zip file.Please which compiler did you use. Everything complete except header files missing in codes. Can you please send me the complete work with header file. Email:
[email protected] Thanks Reply
BILAL Malik MAY 12, 2015
I have used Mikro c pro complier Reply
Raymond Michael JUNE 9, 2015
its a good thing to find your blog today!! I want to do two projects; first; i wants to measure and display room temperature and humidity at real-time , or every 2seconds, I need one pin to be high and low at 1hr intervals, Also i want one pin to be high for only 5 seconds after every 2hrs, these are for alarms, one pin high per each condition ,when temperature is at 34c, 36c, 38c 39c and 39.5c in case of humidity, one pin high per each condition , when humidity is at 50%, 60% and 70% I want it to control my homemade incubator , I hope you can add to a certain pins which will control the heaters for generating temperature and humidity default temp. is 37.8c and humidity http://microcontrollerslab.com/temperature-sensor-using-pic16f877a-microcontroller/
11/13
1/20/2016
Temperature Sensor using PIC microcontroller
is 65%, so any deviation from these defaults the pins assigned will act accordingly from there it will stabilizer the condition is it possible to add several buttons for setting the completed unit? if possible it will be awesome to include. Please kindly suggest the circuit diagram and the codes. Let me end here with only the first . Sorry for my bad English, I am from Africa, Tanzania. I am waiting for you to inbox me via
[email protected] , thanks in advance Reply
hailegebrel nigu JUNE 14, 2015
nice work cued u like to send me full code and hex file? Reply
sujit SEPTEMBER 23, 2015
pls send me project with all files Reply
Leave a Reply Comment Text*
Name*
Email*
Website
http://microcontrollerslab.com/temperature-sensor-using-pic16f877a-microcontroller/
12/13
1/20/2016
Temperature Sensor using PIC microcontroller
Post Comment
Notify me of follow-up comments by email. Notify me of new posts by email.
RECENT POSTS
POPULAR POSTS
SU
Electronic lock using pic microcontroller
Electronic lock using pic
HUMANOID robotic ARM using pic
microcontroller
microcontroller
December 23, 2015
PA No Comments
Insulation materials used in transformers GSM based home devices control system MULTIPLE INPUT CHARGE CONTROLLER FOR RENEWABLE ENERGY
Microcontrollers Lab Copyright © 2016.
http://microcontrollerslab.com/temperature-sensor-using-pic16f877a-microcontroller/
p P S
S
13/13