Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
bluetoothanu
PostPosted: Apr 08, 2010 - 11:43 AM
Newbie


Joined: Mar 29, 2010
Posts: 11


Hello everyone!
I need to interface LM35 temperature sensor to atmega16 microcontroller and i want to display the temperature reading on the PC.Please help me with the C coding..i wish to use avr studio... i googled many times...but could not find any satisfying program..please help me!
 
 View user's profile Send private message  
Reply with quote Back to top
kherseth
PostPosted: Apr 08, 2010 - 12:59 PM
Resident


Joined: Oct 02, 2007
Posts: 513
Location: Norway

here: http://lmgtfy.com/?q=AVR+LM35

There is really not very different interfacing to LM35 to mega16 than to any other AVR with a ADC.
 
 View user's profile Send private message  
Reply with quote Back to top
sbennett
PostPosted: Apr 08, 2010 - 09:29 PM
Posting Freak


Joined: Nov 19, 2001
Posts: 1064
Location: San Luis Obispo

-- Assumption: The LM34 and LM35 are equally available in the desired package.
-- LM34: 10.0 mV/°F scale factor, -50° to +300°F range [Fahrenheit]
-- LM35: 10.0 mV/°C scale factor, -55° to +150°C range [Celsius]

For temperature monitoring microcontroller projects the LM35 seems to be preferred over the LM34.
The LM34 should be considered first for two reasons:

1) With a single +5V supply to Vs:
--- LM34 can sense to -15°C or +5°F minimum.
--- LM35 can sense to +2°C or +36°F minimum, cannot measure the freezing point of water.

2) The output of the of the LM34 is 1.8 times that of the LM35 for a given temperature change.

With 5V to Vs the LM34 the temperature range will be -15°C to +149°C or +5°F to 300°F, with an output of +0.05V to 3.00V.

With 5V to Vs the LM35 the temperature range will be +2°C to +150°C or +36°F to 302°F, with an output of +0.02V to +1.50V.

Adding a pull-down resistor with a negative Voltage to the output will allow the LM34 and LM35 to
sense to -50°C and -55°F respectively, however the ADC input would need to measure negative Voltages.

The LM34 has significantly higher output Voltage than the LM35 which may be important if being read by a 10-bit ADC
with limited span capability. That the scaling is Fahrenheit or Celsius matters not as the microcontroller can easily calculate
to the desired units.

Stan
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits