Thermometer using 8051.

This article is about a simple 0-100°C digital thermometer with 1°C resolution using 8051. The circuit is based on LM35 analog temperature sensor, ADC0804 and AT89S51 microcontroller. LM35 is an analogue temperature sensor IC which can measure a temperature range of -55 to 150°C. Its output voltage varies 10mV per °C change in temperature.

For example, if the temperature is 32°C, the output voltage will be 32 x 10mV = 320mV. ADC 0804 is used to convert the analogue output voltage of the LM35 to a proportional 8 bit digital value suitable for the microcontroller. The microcontroller accepts the output of ADC, performs necessary manipulations on it and displays it numerically on a 2 digit seven segment LED display.

Out put of the LM35 is connected to the +Vin (pin 6) of the ADC0804. Resistor R13 and preset R14 is used to provide an external reference voltage of 1.28V to the Vref/2 pin ( pin 9) of the ADC0804 and with this reference voltage, the step size of the ADC will be 10mV and span will be 0-1 V. This means that for a 10mV input the digital out of ADC will be 1 (1 in decimal also), for 20mV it will be 10 (2 in decimal), for 30mV it will be 11 (3 in decimal) and so on. The microcontroller accepts this data and puts it on the seven segment display.

Circuit diagram.

Digital thermometer using 8051

Digital out of the ADC (D0 to D7) are connected to P1 (P1.0 to P1.7) of the microcontroller. This is the line through which the microcontroller accepts data from the ADC. The control pins CS, RD, WR and INTR are connected to P3.7, P3.6, P3.5 and P3.4 of the microcontroller. This is the data path through which the microcontroller sends chip select (CS), read (RD) write (WR) signals to the ADC and receives INTR signal from the ADC. Data lines (a to h) of the multiplexed seven segment display are interfaced to P0 (P0.0 to P0.7) of the microcontroller. Activation signals for the segment driver transistors Q1 and Q2 are available from P3.2 and P3.1 pins of the microcontroller.

I have built this circuit for my college project but i haven’t been able to program the PIC, can anyone program the 8051/8052 and post me a working one as I am running out of time to complete this project.

of course, I am very grateful for the knowledge that you give. This adds to my knowledge.

I have a bit question, I hope you do not mind to answer it..
bif you ever make this circuit? whether these circuits have been tested and work properly?
I would be happy if you guide with answering my questions,
thank you. 🙂

MOV R4,#250D initially loads R4 with 250D ,this instruction in conjunction with DJNZ R4,DLOOP repeats the display cycle 250 times (or for roughly 0.8mS). This means that the “MAIN” loop which fetches the data from the ADC is repeated only once in every 0.75mS.

thank u for helping students. Yes i would suggest that post ur work with proteus version of ur work, what i mean is design it with proteus and up-load it will actracts many users to vist tis site. This is want they are doing thus in this site,www.8051projects.net

yes that is a good work. Thanks but it will be more professional if u configure the cct using 3 7-segment display in showing the meter type and in the temperature form type as u up-loaded here inshort i personally will be glad likewise others…