LCD Thermometer LM35 Using AT Mega8

Summary of LCD Thermometer LM35 Using AT Mega8


This project uses the LM35 temperature sensor connected to an ATmega8 microcontroller to measure and display temperature from 0ºC to 40ºC with 0.5ºC resolution. The LM35 outputs an analog voltage converted by the ATmega8's A/D converter, and the temperature is shown on a 20x4 LCD both numerically and as a bar graph. The system uses a crystal oscillator for clock pulses, and the software is developed in BASCOM AVR, which handles ADC reading and display output.

Parts used in the LCD Thermometer LM35 Using AT Mega8:

  • LM35 Temperature Sensor
  • ATmega8 Microcontroller
  • 20x4 LCD Display Module
  • Crystal Oscillator (for ATmega8 clock)
  • Power Supply (5V)

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
 


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

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top