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.
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
- Popular Resources
- Popular amplifiers
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Siemens Motion Control Technology and Engineering Applications (Tongxue, edited by Wu Xiaojun)
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- RSL10 family unboxing photos
- Disassembly of Delixi infrared thermometer -38~520℃
- Is there any room for optimization of simpliciti's power consumption?
- Design of an extremely low power digital thermometer using MSP430
- Eight practical ways to solve Spark data skew
- Will it damage the phone or battery if I play games while charging my phone after it is fully charged?
- [NXP Rapid IoT Review] + Experience of using Rapid IOT Studio
- My goodness, what kind of electronic component is this?
- Record errors encountered in CCS
- How to choose TVS tube for MSP430FR2633 touch chip