Sunday, November 16, 2014

Interfacing LM35 Temp sensor with PIC16F877A Microcontroller

Hi Hello Everybody today I am going to show you that how to make Temperature monitor project using LM35 sensor and Pic microcontroller.

Why we chose PIC16F877A not 8051 Microcontroller?

The answer is simple in this project we are using LM35 sensor which is analog sensor here we need another ic (Analog to Digital) to convert the sensor analog reading in to digital so If you are going to chose 8051 microcontroller for this project you must attach another A2D ic because 8051
have no bulletin A2d converter but Pic microcontroller have so that’s why we select PIC16F877A instead of 8051 because it’s easy, cheap and simple.

Sensor LM35 pin out?

This is Temperature sensor which you can get easily from the market with low price The LM35 pin out is so simple the first pin is for input power maximum 5v Dc and the Middle pin is for Analog input and the third pin is for Ground

10mV ===> 1C
20mV ======> 2C
370mV ====> 37.0C and so on…...

Software and Other Tools :

First you need to install the Proteus vsm on your computer the good news is that you people can download Proteus Setup free from our blog and the second one is PIC-C compiler where you people can compile the C-code and will get the Hex file.
Schematic :
Interfacing LM35 Temp sensor with PIC16F877A Microcontroller
Schematic Diagram
The Relay Load Is optional if you want to connect Load so go ahead .....
Simulation On Proteus:
Interfacing LM35 Temp sensor with PIC16F877A Microcontroller
Hardware Level :
After completing everything at the software level then you can go easily at hardware side at hardware
you just need Pickit 2 Burner just put ic and Burn program on it and enjoy ...
Interfacing LM35 Temp sensor with PIC16F877A Microcontroller
Interfacing LM35 Temp sensor with PIC16F877A Microcontroller
Finally the Code :
Download everything the full package in one Zip file
1) Proteus simulation
2) code hex file
3) pic-c Compiler
i upload the Zip file to Mediafire click to Download   
if You have any Question Regarding this Project so you can Ask anytime  leave a comment 

  12 comments:

  1. hi, i want to ask why when im try to run in proteus, it show that it unable to open the Hex file temp.hex

    ReplyDelete
    Replies
    1. This project is tasted many time it,s working correct you can see the pictures.
      1) Try to uninstall proteus and install again may be problem in your software
      2) Double click on the ic and chose the .hex file.. enjoy

      or share screen shots with me ...if you found any difficulty Ask

      Delete
  2. Hi i got my temperature reading to be 0, evrytime. why is this?

    ReplyDelete
    Replies
    1. Maybe its the crystal value, i used 8Mhz.

      Delete
    2. you need to check connection points between Temp sensor and Microcontroller .... may be Hardware problem ...you need to check your connection properly again very carefully ......i am here to help you if the issue not resolved then share screenshots of your circuits with me

      Delete
    3. crystal value is given in source code it,s """ clock=4000000 """ it,s mean the crystal value must be 4Mhz

      Delete
    4. My bad, in had connected on a wrong adc channel. It works now, thank you so much for the post. !!

      Delete
  3. 0 304 C:/Users/bennani/Desktop/mikroC PRO for PIC/Examples/Development Systems/EasyPIC6/Led Blinking/LedBlinking.c:7: error: Can't open include file "16f877a.h"
    I had this problem please an answer thanks

    ReplyDelete
  4. 0 304 C:/Users/bennani/Desktop/mikroC PRO for PIC/Examples/Development Systems/EasyPIC6/Led Blinking/LedBlinking.c:7: error: Can't open include file "16f877a.h"
    I had this problem please an answer thanks

    ReplyDelete



  5. Your style is unique compared to other people I have read stuff from.Thank you for posting when you have the opportunity, Guess I will just bookmark this page.

    8051 microcontroller training in chandigarh

    ReplyDelete
  6. The post is informative really, it offers real good information for how to consider a perfect art work deco wedding ring. Good facts. rangefinder reviews

    ReplyDelete


Popular Posts

ElectronicsLovers. Powered by Blogger.

Contact Form

Name

Email *

Message *