Design of 0.01℃ digital thermometer based on AT89C51 control

Publisher:csydtcLatest update time:2012-01-31 Source: 微计算机信息 Keywords:AT89C51 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Temperature measurement is particularly important in the fields of physics experiments, medical care, food production, etc., especially in thermal experiments (such as teaching experiments on specific heat capacity, heat of vaporization, heat-work equivalent, pressure-temperature coefficient, etc.). Thermometers currently used are usually mercury, kerosene or alcohol thermometers with an accuracy of 1°C and 0.1°C. The scale intervals of these thermometers are usually very close, which is not easy to distinguish accurately and difficult to read. In addition, their heat capacity is relatively large, and it takes a long time to reach thermal equilibrium, so it is difficult to read accurately and it is very inconvenient to use. The digital display thermometer designed by using the linear relationship between the forward voltage drop Ubc between the base and collector of the crystal transistor 3DG6C and the temperature T as the temperature sensor, using OP07 as the amplifier, and using the -bit A/D converter ICL7135 as the A/D converter can solve these problems [1]. According to the actual needs, the author designed a 0.01℃ digital thermometer with AT89C51 as the control core, with adjustable measurement intervals, automatic recording and query of measurement results, and the ability to give an alarm and exchange data with a PC after simple expansion. It has been successfully used in thermal experiments.

1 Hardware circuit and working principle

1.1 Circuit diagram

The whole circuit consists of three parts: temperature signal acquisition and amplification circuit, A/D conversion circuit, CPU control and display circuit, and its block diagram is shown in Figure 1. The temperature signal is converted into an electrical signal by the temperature sensor in the data acquisition circuit, and then sent to the A/D converter after passing through the amplification circuit. After conversion, it is sent to the CPU in the form of BCD code, and then its output display is controlled by the program, and the keyboard completes various settings.

1.2 Data acquisition and amplification circuit

As shown in Figure 2, the BE poles of the transistor Q1 (3DG6C) are connected, and the relationship between the forward voltage drop Ubc between the base and the collector changes linearly with the temperature is used as a temperature sensor [1]. The output (2.5V) of MC1403 (IC1) is used as the power supply to meet the requirements of voltage stability and high measurement accuracy. The differential amplifier composed of the high-precision integrated operational amplifier OP07 (IC2) [2] with low offset, low noise and low drift and R2 and R3 is used to appropriately amplify the temperature-related electrical signal detected by the temperature sensor and then output it to the 10th pin of IC5 (ICL7315) sent by R6 for A/D conversion.

The signal connected to the inverting input of the operational amplifier OP07 is the PN junction voltage drop U1 that changes with temperature, and a fixed voltage U2 is added to the non-inverting input. U2 represents the voltage drop on the PN junction at 0°C, which can be adjusted by the precision adjustable resistor RP2. In this amplifier, if R2=R4 and R3=R5, the output voltage Uo is expressed as:

Uo = (R3/R2)*(U2 – U1)

The amplifier is designed to have a magnification of 5 times, which amplifies the voltage change between the BE poles of Q1 from 2mv/℃ to 10mv/℃. MC1403 also provides a reference voltage source for ICL7135.

Figure 2 Data acquisition and amplification circuit

Figure 3 A/D conversion circuit

1.3 A/D conversion circuit

The core of the A/D conversion circuit is ICL7135 (IC4). ICL7135 is a high-accuracy, general-purpose CMOS single-chip dual-integral A/D converter with a range of 2.0000V, BCD code output, and the output signal is compatible with TTL level. Its working reference voltage is 1V, which is provided by MC1403 after voltage division. As shown in Figure 3, C2 is the self-zeroing capacitor, C4 is the reference capacitor, and R9 and C3 are the self-integral input resistor and capacitor. The clock frequency of ICL7135 is 125KHZ, which is provided by the multivibrator composed of 74HC00 (IC2). The output signal of OP07 is input at pin 10, and its voltage indicates the temperature. After A/D conversion, it outputs BCD code and connects to AT89C51. D1~D5 are the bit selection signals of LED. They are not directly connected to LED, but connected to AT89C51, and the bit selection signals of LED are uniformly provided by AT89C51.

1.4 CPU control and display circuit

As shown in Figure 4, the core of the CPU control and display circuit is AT89C51 (IC5). To ensure reliable reset, MAX814 (IC6) hardware reset is used. P0.0~P0.3 are connected to the BCD code sent from ICL7135, and P0.4~P0.7 and P3.4 are connected to D1~D5 of ICL7135. P1 port is connected to the LED display code position to provide corresponding display information. LED position selection signal

Figure 4 CPU control and display circuit

It is provided by P3.5~P3.7 after being decoded by 74H138 (IC7). When displaying temperature, only 5 bits are needed, but considering that other information (such as clock) may be displayed in some cases, the LED uses 6 bits. P2 port is connected to 16 buttons to complete the setting and control functions of this thermometer. When displaying the tested temperature, the entire system is a DC voltmeter with a range of 2V. The temperature signal detected by the temperature sensor is converted into a corresponding voltage signal, amplified, and input into this voltmeter. The voltage can represent the temperature. Because the minimum reading of the voltmeter is 0.1mV, the minimum temperature that can be read when the temperature is represented by voltage is 0.01℃.

2 Software Design[3]

Software design is one of the keys to this design. Compared with the thermometer made directly using ICL7315, it is precisely because AT89C51 can be flexibly programmed to realize various control functions and meet different practical needs. The program written in this design can realize the functions of setting the measurement interval, automatically recording the measurement results, and querying them.

The program mainly consists of five parts: main function, timer interrupt function (scheduler kernel), keyboard scanning and keyboard processing function, display refresh function, data reading function from ICL7135, and time refresh function. The main function initializes the system, then adds four tasks: scanning and processing keyboard, refreshing display, reading data, and refreshing time; finally, the control is handed over to the scheduler kernel. When there is no need to run tasks, the microcontroller enters sleep mode to reduce power consumption, as shown in Figure 5.

Because the thermometer has high requirements for accuracy and low requirements for speed, the timer interrupt is used as the scheduler kernel. Its main task is to calculate what task to run at what time, and then call the corresponding task function, as shown in Figure 6.

The scan keyboard function is executed every 20ms under the scheduler. This 20ms time interval is used to eliminate the keyboard jitter by delaying the jitter elimination. The keyboard is designed as a row-column matrix. The functions include: setting time, setting measurement time interval, switching clock state and thermometer state, starting and ending temperature measurement, and querying previously measured temperature data. The flow is shown in Figure 7. The display refresh function is executed every 4ms under the scheduler. The display refresh function is used to dynamically display the seven-segment LED display tube. The read data function is executed every 1S under the scheduler. When running this function, the microcontroller reads data from ICL7135 once. The program flow is shown in Figure 8.

The time refresh function is executed every 1 second under the scheduler for timing.

3 Thermometer calibration and data testing

When calibrating the thermometer, use a digital voltmeter to measure the voltage value (reference voltage) between the 2nd and 3rd pins of ICL7135, and adjust R5 to make it around 2V; put the sensor Q1 into the ice-water mixture, stir it thoroughly to reach thermal equilibrium, and then adjust R6 to make the display reading 0.00 (calibrated to 0℃); use a barometer to read the local atmospheric pressure at that time, and calculate the actual pressure at that time based on the atmospheric pressure and the local gravity acceleration; find out the boiling point temperature based on the relationship between boiling point and pressure. Put the sensor into boiling water, and carefully adjust R5 after the display reading stabilizes, so that the display reading is equal to the local boiling point temperature at that time, and then the calibration work is completed [1]. The range of this thermometer is -50~150℃, and the reading accuracy is 0.01℃. Considering that the actual use is generally between 0℃ and 100℃, we use 0℃~50℃ and 50℃~100℃ precision mercury thermometers as the inspection standards, and the measurement results are shown in Table 1. Where T mercury is the measured value of the mercury thermometer, and the last digit is the estimated value, and T digital is the measured value of the digital thermometer, and the last digit is the displayed value. From the test results, it can be seen that the designed thermometer can meet the requirements

4 Conclusion

This digital thermometer has the characteristics of easy reading and high precision. After the introduction of the single-chip microcomputer AT89C51 control, different software designs can be used to meet different usage requirements. Pin P3.2 is reserved during system design. If a speaker is connected to this pin, the temperature over-limit alarm can be realized through software programming, and it can be used as a temperature alarm. Through the reserved serial port, communication with the PC can be realized. By adding a serial port communication program module, it can be used as a lower computer of the multi-point temperature detection system.

References

[1] Pan Xuejun. 0.01℃ digital thermometer[J]. Physical Experiment. 2003(5):22~25

[2] Tan Wenxin, Qian Cong, Song Yungou. Principles and Applications of Analog Integrated Circuits[M]. Xi'an: Xi'an Jiaotong University Press, 1995. 16-39.

[3] He Limin. MCS-51 Single Chip Microcomputer Application System Design[M]. Beijing: Beijing University of Aeronautics and Astronautics Press, 1995.9

Keywords:AT89C51 Reference address:Design of 0.01℃ digital thermometer based on AT89C51 control

Previous article:Liquid Level Control System Based on AT89S51
Next article:Development of heat pump water heater controller based on ADμC834 chip

Recommended ReadingLatest update time:2024-11-17 01:48

Research on the application of wireless network technology in access control system
    1 Introduction   In recent years, due to the rapid development of wireless networks, the increase in speed and the decrease in prices, many users have begun to use wireless networks. Wireless networks have the characteristics of being able to move freely, access the Internet at any time and being easy to set up.
[Microcontroller]
Research on the application of wireless network technology in access control system
Design of digital ultrasonic distance meter based on AT89C51 single chip microcomputer
Ultrasonic waves are often used to measure distances due to their strong directivity, slow energy consumption, and long propagation distance. For example, distance meters and level meters can be realized through ultrasonic waves. Ultrasonic distance measurement is mainly used in reversing radars, construction sites, a
[Microcontroller]
Design of digital ultrasonic distance meter based on AT89C51 single chip microcomputer
Single chip microcomputer (AT89C51) peripheral I/O input and output experiment
Question Analysis The main purpose is to connect 8 switches to the extended input port and 8 LEDs to the extended output port. How to control the display of 8 LEDs corresponding to 8 switches? Other external chips are needed in the experiment method one Use 74LS373 and 74LS245 as external chips to complete the exp
[Microcontroller]
Single chip microcomputer (AT89C51) peripheral I/O input and output experiment
nRF401 wireless module debugging work notes
The interface design with 51 series microcontroller is as follows: Nrf401 end 51 microcontroller end TXEN ----- P3.5 POUP ----- P3.6 GND ----- GND D in ------ TXD(P3.1) D out ----- RXD(P3.0) VCC ----- VCC The wiring of the transmitting and receiving ends is the same. The program written in assembly la
[Microcontroller]
Design of automatic trumpet sound player based on AT89C51 single chip microcomputer
1 Introduction The daily routines of government agencies and schools require timing and signal reminders. The author uses AT89C51 single-chip microcomputer and LM386 audio power amplifier to form an automatic timing and signal player, which has low cost, good effect and is worthy of promotion. 2 Main
[Microcontroller]
Design of automatic trumpet sound player based on AT89C51 single chip microcomputer
51 single chip microcomputer realizes multi-level LCD display Chinese menu
  1. Introduction   At present, small displays mainly include LCD and LED. LED displays can only display numbers and a limited number of English characters, but not Chinese characters. The display content is not intuitive, and operators can only understand the display content according to the agreed format. LCD can
[Microcontroller]
51 single chip microcomputer realizes multi-level LCD display Chinese menu
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号