## LM35 TEMPERATURE SENSOR TO ATMEGA16

3 posts / 0 new
Author
Message

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!

Total votes: 0

There is really not very different interfacing to LM35 to mega16 than to any other AVR with a ADC.

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