Celsius Scale Digital Thermometer Using 8051 Microcontroller

A Celsius Scale Digital Thermometer is an electronic device that can measure the temperature of its surroundings and convert its Analog data into digital form through a digital display. Today we will be going to make such type of Celsius scale digital thermometer using an AT89C51 microcontroller and LM35 temperature sensor. LM35 has the advantage of providing direct output according to the Celsius scale without any need for calibration.

This project also contains an 8-bit Analog digital converter i.e. ADC0804 which can process an approximate conversion technology. The output of the temperature sensor is shown in the LCD display by converting through ADC0804 and AT89C51 microcontrollers.

Must Read Password Based Door Lock System Using 8051 Microcontroller

Principle Behind Celsius Scale Digital Thermometer

The main principle behind the circuit is to convert Analog data to accurate digital data. When the temperature of the surroundings is sensed by an Analog sensor (LM35), it then goes to ADC0804 ADC ( Analog to Digital Converter ). After that, the whole signal is processed through the AT89C51 microcontroller and displayed in an LCD display.

Project

Circuit Diagram

Celsius Scale Digital Thermometer Using AT89C51 Microcontroller Circuit Diagram

Components Required

  • 8051 Microcontroller (AT89C51)
  • 8051 Development Board
  • Programmer (8051)
  • 16×2 LCD Display
  • ADC0804 Analog to Digital Converter
  • LM35 Temparature Sensor
  • 10KΩ Resistor
  • 10KΩ Potentiometer
  • 150pF Ceramic Capacitor (Code 151)
  • Connecting Wires
  • Power Supply

Software Required

  • Keil µVision IDE Software
  • Willar Software

Additional Components

If you don’t have an 8051 Development Board then you need these additional components.

  • 11.0592 MHz Quartz Crystal
  • 33pF Ceramic Capacitor (x2)
  • 10KΩ Resistor (x2)
  • 10uF/25V Polarized Capacitor
  • Push Button

Celsius Scale Digital Thermometer Connection Section

Oscillator Section

The oscillator circuit consists of a crystal oscillator (11.0592 MHz) and two ceramic capacitors (33pF) for stability.

Reset Section

The reset section consists of a push-button, a 10KΩ resistor and a 10uF/25V capacitor for 100ms pulse width and a reset voltage of 1.2V.

EA Pin

We are not using any external memory for this project. So we use a 10KΩ resistor for high enabling.

Interfacing ADC0804 Analog Digital Converter with LM35

Let’s discuss how we can interface the LM35 temperature sensor with the ADC0804 converter for Analog to digital input.

Here LM35 temperature sensor consists of three pins that are VOUT, VS and GND. Analog pin 6 (+VIN) of the ADC0804 ic is connected to the VOUT pin of the LM35 sensor.

Pin 20 (VCC) of ADC0804 is connected to a +5V power supply. And pins 1 (CS),7 (-VIN), 8 (AGND) and 10 (GND) of the ADC converter are directly connected to the ground. A 10KΩ resistor is connected between the clock pins 4 (CLKIN) and pin 19 (CLKR) of the ADC converter. Also, a 150pF ceramic capacitor is attached between pin 4 (CLKIN) and the ground. Pin 3 and pin 5 both are connected.

Data pins 11 to 18 (DB0 – DB7) of the ADC converter are connected to the PORT2 pin of the 8051 microcontrollers.

Interfacing LCD Display with 8051 Microcontroller

The RS, RW and EN pins of the LCD display are directly connected to the port pins P3.6, GND and P3.7 respectively. The data pins are connected to PORT1 of the 8051 microcontrollers.

Working Principle of Celsius Scale Digital Thermometer

The LM35 temperature sensor can sense the ambient temperature of surroundings which produces a minimal output voltage that is proportional to the temperature at a rate of 10mV/°C. This Analog input voltage is given to the ADC converter (ADC0804), which can work on the principle of successive approximation conversion.

The ADC converter is configured to read the Analog signals continuously and produces digital output through its digital pins. To read the Analog input values continuously, we need to join both ADC0804’s pin 5 (INTR) and pin 3 (WR) together. Also, to transfer the digital data to the digital output pins of the ADC0804, pin 1 (CS) and pin 2 (RD) must pull ground for the low value.

Thus the Analog to digital converter continuously takes the Analog signals from the LM35 temperature sensor and converts them into digital signals. The digital output signal of the ADC0804 is the 8-bit binary data.

8051 microcontroller takes this digital signal and does a simple arithmetical calculation. This calculation will convert the received digital data from the ADC0804 converter and converts it to temperature in °C.

Now, the microcontroller will send this digital signal to the LCD and display the value. Since the ADC converter is continuously reading the Analog signal from the LM35 temperature sensor and sending it to the microcontroller through the digital pins, the temperature will be updated at all times on the display.

Applications of Celsius Scale Digital Thermometer

  • It can be used in cars to keep track of temperature at all times.
  • Thermoelectric devices can use this sensor for switching on/off the temperature like Air conditioners, geysers, etc.
  • It can also be used at homes, and offices to get the temperature reading of the surrounding.

8051 Code for Celsius Scale Digital Thermometer

3 thoughts on “Celsius Scale Digital Thermometer Using 8051 Microcontroller”

Leave a Comment