LCD Thermometer LM35 Using AT Mega8

Summary of LCD Thermometer LM35 Using AT Mega8


This article describes a digital thermometer project using the LM35 precision temperature sensor and an ATmega8 microcontroller. The system converts the sensor's analog voltage output via the microcontroller's ADC to display temperature on a 20x4 LCD in both discrete degrees Celsius and as a bar graph, covering a range of 0°C to 40°C with 0.5°C resolution.

Parts used in the LCD Thermometer:

  • LM35 temperature sensor
  • ATMega8 microcontroller
  • Crystal oscillator
  • 20x4 LCD module
  • BASCOM AVR compiler

Description

The LM35 of National Semiconductors that is used in this project is a precision centigrade temperature sensor, which has an analog output voltage. It has a range of -55ºC to +150ºC and a accuracy of ±0.5ºC . The output voltage is 10mV/ºC . The output voltage is converted by the AD convertor of the AT Mega8. The temperature is displayed on an LCD module. In this example the thermometer has a range of 0ºC to 40ºC and a resolution of 0.5ºC. If you want to have a readout in Fahrenheit you can use the LM34.
LCD Thermometer LM35

Hardware

In the circuit the LM35 is connected to the ADC port of the ATMega8. The ATMega8 uses a crystal as an oscillator for the clock pulses. At PORTD of the ATM8 an 20×4 LCD display is hooked to display the temperature in a discrete value and in a analog bar.

Software

The software for this project is written in BASCOM AVR. The BASCOM AVR compiler has build in commands for reading out the ADC port of a AVR microcontroller. The result is displayed on a LCD module in a discrete value of the temperature and in a bar-graph. The AT Mega8 has a A/D converter which can give an output of 210 = 1024 discrete values. When a 5V supply is used you have a resolution of 5000mV/1024 = 4.8mV. Because the LM35 has a output of 10mV/C the resolution of the thermometer is 10mV/4.8mV ~ 0.5ºC . The LCD module has 20 columns. In the scale of 0ºC to 40ºC every column represents 2ºC . For more details, click: LCD Thermometer LM35 Using AT Mega8
 

Quick Solutions to Questions related to LCD Thermometer:

  • What is the function of the LM35 sensor?
    The LM35 is a precision centigrade temperature sensor with an analog output voltage ranging from -55ºC to +150ºC.
  • How does the system convert voltage to temperature?
    The output voltage is converted by the AD converter of the AT Mega8 microcontroller.
  • What is the accuracy of the LM35 sensor?
    The sensor has an accuracy of ±0.5ºC.
  • Can this project measure temperature in Fahrenheit?
    You can use the LM34 if you want to have a readout in Fahrenheit.
  • What software is used for this project?
    The software for this project is written in BASCOM AVR.
  • How is the temperature displayed on the screen?
    The temperature is displayed on an LCD module in a discrete value and in an analog bar.
  • What is the resolution of the thermometer in this example?
    The thermometer has a resolution of 0.5ºC.
  • How many discrete values does the A/D converter provide?
    The AT Mega8 A/D converter can give an output of 1024 discrete values.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top