+ All Categories
Home > Documents > Project Analog Sensor_ Temperature Using LM35

Project Analog Sensor_ Temperature Using LM35

Date post: 10-Dec-2015
Category:
Upload: muhammedsabrisalim
View: 26 times
Download: 5 times
Share this document with a friend
Description:
data logger
9
Home Projects Forum Cytron Technologies Official Website Navigation open all | close all Getting Started rero Buying Guides Product Guides Projects Seminars & Events News Useful Tools / External References Live Search
Transcript

Sign In

User Password

Remember me Send

Become a MemberRecover Password

Recent Comments

malefetsane on Project 17 – interface with 4×4 keypad and 2×16 LCDober on Wireless Communication between Arduino and Computer with RFBee.Danielle on Identify Terminal Pins of A Relay Without Reference to Datasheetbryan on Project 17 – interface with 4×4 keypad and 2×16 LCDneo on Control and Monitor via SMS

Home › Product Guides › PIC Development Tool › SK40C (PIC StartUp Kit) › Project 5 – Analog Sensor: Temperature using LM35

Tags: Display LCD, LM35, Temperature sensor

Project 5 – Analog Sensor: Temperature using LM35 Published by: tonynwk88 on August 9, 2011.

PROJECT 5

ANALOG SENSOR: TEMPERATURE USING LM35Back to Project 4 Go to Project 6

5

Share Share Share Share

Nowadays, there are many type of temperature sensor is come with different output form and also the temperature range such as thermocouple, thermistor,infrared, RTD. In here, we pick LM35 as our temperature sensor due to it have a linear output and also suitable for normal use like weather temperaturemeasuring.

COMPONENT NEEDED

————————————————————————————————————————————————————————

16 x 2 LCD Display

LM35 TEMPRETURE SENSOR

BREADBOARD

JUMPER WIRES

CONNECTION

————————————————————————————————————————————————————————The connection for the LM35 are very easy. Just connect one end to VDD (RED wire)(4V to 20V) and the other end to GND(BLACK wire) while themiddle pin (YELLOW wire) is connected to RA0. By referring to the PIC16F887, there are total 14 analog pins that we can choose. In here we use RA0as out ADC input pin.

ADDITIONAL INFORMATION

————————————————————————————————————————————————————————The LM35 series are precision integratedcircuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade)temperature. The LM35 does not require any external calibration or trimming to provide typical accuracies of ±1∕4˚C at room temperature and ±3∕4˚C overa full −55 to +150˚C temperature range. Low cost is assured by trimming and calibration at the wafer level. The LM35’s low output impedance, linearoutput, and precise inherent calibration makeinterfacing to readout or control circuitry especially easy. It can be used with single power supplies, or withplus and minus supplies. As it draws only 60 µA from its supply, it has very low selfheating, less than 0.1˚C in still air. The LM35 is rated to operate overa −55˚ to +150˚C temperature range.

Features

~ Calibrated directly in ° Celsius (Centigrade)~ Linear + 10.0 mV/°C scale factor~ 0.5°C accuracy guaranteeable (at +25°C)~ Rated for full −55° to +150°C range~ Suitable for remote applications~ Low cost due to waferlevel trimming~ Operates from 4 to 30 volts~ Less than 60 μA current drain~ Low selfheating, 0.08°C in still air~ Nonlinearity only ±1∕4°C typical~ Low impedance output, 0.1 W for 1 mA load.

CODE OVERVIEW

————————————————————————————————————————————————————————

celsuis=adc_value/2;LM35 have already designed to give an exact value of temperature in Celsius. By referring to the graph, the ADC output are only need to divide by 2 toget the result in Celsius.

kelvin = ((celsius*100)+27315)/100;Kelvin formula are (Celsius + 273.15). But for microcontroller, it will not read the result after the DOT. E.g. : if result is kelvin = 300.15, themcrocontroller will only read 300 only and will ignore .15. In order to get the result after the DOT, we times the result in 100 so that we can get the resultafter the DOT.

fehrenheit = ((celsius*18)/10)+32;Fahrenheit formula are ([celsuis*1.8]+32). In the coding, the formula have been times will 10 times to get the exact result.

reaumur = (celsuis*8)/10;Reaumur formula are (celsius*0.8). Same as the previous technic, in order to let microcontroller to get the more accurate result, we times it with 10 to getthe result after the DOT.

Back to Project 4 Go to Project 6

————————————————————————————————————————————————————————

ATTACHMENT

1.P5 User Manual.pdf

2.Project_5_code.zip

You may also like:Related Posts:

6 Responses to “Project 5 – Analog Sensor: Temperature using LM35”

1. roy says:October 19, 2012 at 7:22 pm

can you briefly explain why adc value must divide by two to get celcius

2. could you kindly send me complete wiring diagram of project 5 says:November 9, 2012 at 8:21 pm

Thank you in advance

3. nite says:December 10, 2012 at 12:00 am

the coding is failed..this is what it show and please advised

PROJECT 6 –TEMPERATURESENSOR TO LCD

DISPLAY

SK28A – TemperatureSensor with Fixed

Voltage…

PROJECT 9 – LM35CONTROL DCMOTOR SPEED

PROJECT 12 –SERIAL

COMMUNICATIONCONTROL DC

MOTOR

5

Build E:\MP Lab\1st LM35 for device 16F877AUsing driver C:\Program Files (x86)\HITECH Software\PICC\PRO\9.60\bin\picc.exe

Executing: “C:\Program Files (x86)\HITECH Software\PICC\PRO\9.60\bin\picc.exe” –pass1 “E:\MP Lab\LM35\Project_5\Project_5.c” q –chip=16F877A P –runtime=default –opt=default D__DEBUG=1 g –asmlist “–errformat=Error [%n] %f; %l.%c %s” “–msgformat=Advisory[%n]%s” “–warnformat=Warning [%n] %f; %l.%c %s”Error [192] E:\MP Lab\LM35\Project_5\Project_5.c; 43.1 undefined identifier “ANSELH”

********** Build failed! **********

4. ober says:December 11, 2012 at 4:10 pm

The sample code is for PIC16F887, you are using PIC16F877A Anyway, please do come to our technical forum to discuss.

5. sham says:February 19, 2013 at 4:42 pm

could u send me schematic diagram…i want to try my own self..

6. hyng says:February 20, 2013 at 4:35 pm

Hi Sham,

There is no schematic diagram as this is a simple project.Please refer to the breadboard view diagram in this article.

Thanks.

Leave a Reply

Name (required)

Mail (will not be published) (required)

Website

Submit Comment

Help us improve the wiki Send Your Comments

© 2012 Tutorial by Cytron | Powered By Wordpress


Recommended