LM35 TEMPERATURE SENSOR TO ATMEGA16

Last post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

-- 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