Design of Multi-point Temperature Detection System Based on AT89C51

Publisher:梅花居士Latest update time:2010-07-26 Source: 现代电子技术 Keywords:AT89C51 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction

In industrial production and daily life, multi-point temperature detection systems are widely used, such as non-destructive temperature detection of fire protection electrical equipment, overheating fault prediction detection of power equipment, temperature detection of air-conditioning systems, overheating detection of various transportation vehicle components, temperature testing of medical and diagnostic equipment, etc. In response to this situation, this paper designs a multi-point temperature detection system based on AT89C51 and digital temperature sensor DSl8820. The system uses the characteristics of DSl8820 single bus to easily build a sensor network, thereby realizing multi-point temperature measurement. The system is flexible in design and has good anti-interference performance, and can perform temperature measurement in harsh working environments.

1 Overall structure

The designed multi-point temperature detection system is shown in Figure 1. The system is mainly composed of AT89C51 single-chip microcomputer, keyboard display circuit, temperature display circuit, watchdog circuit, temperature test circuit, serial communication circuit, etc.

2 Hardware Circuit

2.1 Temperature test circuit

The temperature test circuit mainly uses the temperature chip DS18820, which is a one-line digital temperature sensor produced by DALLAS. The temperature measurement range is -55~+125℃, and the temperature measurement resolution can reach 0.0625℃. It has the characteristics of miniaturization, low power consumption, high performance, strong anti-interference ability, and easy matching with microprocessors. It is particularly suitable for forming a multi-point temperature measurement and control system. Its internal structure is shown in Figure 2.

DS18820 has 4 main data components:

(1) 64-bit laser ROM. The 64-bit laser ROM consists of 8-bit CRC, 48-bit serial number and 8-bit family code (28H) from high to low;

(2) Temperature sensitive components;

(3) Non-volatile temperature alarm triggers TH and TL, which can be programmed with user alarm upper and lower limits via software;

(4) Configuration register. The configuration register is the fifth byte in the high-speed temporary memory. When the DS18820 is working at 0, it converts the temperature into a numerical value of corresponding accuracy according to the resolution in this register. The definition of each bit is shown in Figure 3.

In Figure 3: TM is the test mode flag, which is written as 0 at the factory and cannot be changed; R0, R1 are the thermometer resolution setting bits, which correspond to 4 resolutions as listed in Table 1. At the factory, R0, R1 are set to the default value: R0=1, R1=1 (i.e. 12-bit resolution). Users can rewrite the configuration register to obtain the appropriate resolution as needed.

The high-speed temporary storage memory consists of 9 bytes, and its allocation is shown in Figure 4. When the temperature conversion command is issued, the temperature value obtained by conversion is stored in the 0th and 1st bytes of the high-speed temporary storage memory in the form of two-byte complement code. The microcontroller can read the data through the single-line interface. When reading, the low bit is in front and the high bit is in the back. The data format is shown in Figure 4. Corresponding temperature calculation: When the sign bit S=0, directly convert the binary bit to decimal; when S=1, first convert the complement code to the original code, and then calculate the decimal value.

Since DS18B20 is a single-wire digital temperature sensor, it basically does not require any peripheral circuits and can be directly connected to the microcontroller with one wire. Figure 5 is a schematic diagram of multiple DS18B20s connected to the microcontroller through a single bus. In the figure, DS18B20 is powered by an external power supply.

2.2 Keyboard and display circuit

The system uses a matrix keyboard, which consists of 20 keys, including 10 numeric keys and function keys such as "upper limit", "lower limit", and "confirm". When a key is pressed, 8279 generates an interrupt signal and sends it to the microcontroller, and then turns to the corresponding function program.
The display part uses a 75451 connected to 5 LED digital tubes to realize dynamic display. Under working conditions, it displays the channel number, the positive and negative sign of the temperature, the tens digit of the temperature value, the ones digit of the temperature value, and the decimal place of the temperature value from left to right.

2.3 Power supply circuit

Because the microcontroller's operating power supply is +5 V and the power consumption of the underlying circuit is very small, the 7805 three-terminal voltage regulator can meet the requirements. The specific circuit is shown in Figure 6.

2.4 Watchdog Circuit

Considering the relatively bad working environment of the bottom circuit board, the MCU will be disturbed by the surrounding environment, resulting in some unpredictable abnormal working phenomena such as program runaway and crash, and it is impossible for the staff to restart the MCU on site. This design adds an external watchdog circuit to the MCU circuit to regularly query the working status of the MCU. Once an abnormality is found, the MCU will be restarted with a delay to ensure the safe and reliable operation of the system. The circuit is shown in Figure 7.

3 Software Design

The system software is programmed in a modular way, and is mainly composed of the main program, digital tube display program, keyboard scanning and key processing program, temperature test program, interrupt control program, etc. The main program completes system initialization and calculates the collected temperature; the keyboard scanning circuit and key processing program realize the recognition of keyboard input keys and related processing; the temperature test program mainly completes the processing of data transmitted by the temperature chip, and makes judgments and displays; the digital tube display program completes the sending of numbers to the digital display and controls the display part of the system; the interrupt control program realizes the cyclic display function.

The system program flow chart is shown in Figure 8.


4 Conclusion

The AT89C51 single-chip computer and DS18B20 digital temperature sensor can be used to detect and control multi-point temperatures. The system has the characteristics of signal digitization, hardware simplification and strong anti-interference ability. If connected to the corresponding expandable interface chip, it can realize the measurement and control of more channels of temperature to meet the needs of industrial production.

Keywords:AT89C51 Reference address:Design of Multi-point Temperature Detection System Based on AT89C51

Previous article:Application of wireless sensor network in greenhouse environment monitoring system
Next article:The Logic Design of the Interface between MCS-51 Single Chip Microcomputer and FPGA

Recommended ReadingLatest update time:2024-11-16 20:50

51 single chip microcomputer DS18B20 temperature control alarm program (temperature control range can be set)
DS18B20 pin definition: 1. GND 2. DQ 3. VCC  DQ → P1.7    K1 → P3.2  K2 → P3.4  K3 → P3.6  K4 → P3.7 The temperature is displayed using a four-digit digital tube. When the temperature is = 100 degrees, the fourth digit is displayed. The fifth digit displays the status symbol. Power on and detect DS18B20
[Microcontroller]
ds18B20 temperature program based on 51 single chip microcomputer
It runs normally on the learning board. Currently, it can only detect the temperature simply. The temperature change speed is a bit slow and needs to be debugged. There is still a bit of ghosting on the digital tube display. I haven't figured out how to eliminate the ghosting yet. There is no temperature upper and lowe
[Microcontroller]
ds18B20 temperature program based on 51 single chip microcomputer
Audio signal amplitude equalization control amplifier designed using SG270/LM4884 and AT89C51
Introduction Many schools today have adopted computer plus network multimedia systems for on-site teaching. In addition, construction workers making intercom calls at the construction site, and drivers making calls on moving tanks and other self-propelled artillery vehicles, etc., cannot avoid noisy background noise
[Microcontroller]
Audio signal amplitude equalization control amplifier designed using SG270/LM4884 and AT89C51
A wireless remote control analysis solution using AT89C51 as the control core
0 Introduction With the continuous development of society and the emergence of smart devices, remote controls are becoming more and more widely used. Wireless remote controls have become more and more common in all aspects of life due to their long control distance and strong anti-interference performance. This
[Microcontroller]
A wireless remote control analysis solution using AT89C51 as the control core
Design of remote control alarm system based on single chip microcomputer
1 Introduction Due to the rapid development of the economy, people's living standards have been greatly improved, and the pace of life has become faster and faster. Therefore, home appliance remote control and family safety are also needed and valued by people. The remote control and alarm device of electrical a
[Microcontroller]
Design of remote control alarm system based on single chip microcomputer
Design of electronic therapeutic instrument based on embedded device AT89C51SND1C
        1 Introduction    Currently, electronic therapeutic devices that use two electrodes to symmetrically cover the treatment part of the human body are used. The pulsating voltage on the electrode acts on the resistance of the treatment part of the human body to generate a pulsating current that the human body c
[Microcontroller]
Design of electronic therapeutic instrument based on embedded device AT89C51SND1C
Design and simulation of multi-channel temperature monitoring system based on DS18B20
0 Introduction     In real-time temperature monitoring systems, such as greenhouse temperature monitoring, cold storage temperature measurement, intelligent building temperature control and other systems, it is often necessary to collect and detect multiple temperatures. Rapid and reliable acquisition of high-precisi
[Microcontroller]
Design and simulation of multi-channel temperature monitoring system based on DS18B20
Design of temperature measurement and control system based on AT89C51 single chip microcomputer
0 Introduction Temperature measurement and control are widely used in daily life and industrial fields. With the substantial improvement of people's living standards, there are higher requirements for the accuracy and range of temperature measurement and control. In industrial enterprises, how to improve the operatin
[Microcontroller]
Design of temperature measurement and control system based on AT89C51 single chip microcomputer
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号