Design and implementation of a correlation temperature detection system based on DS18B20

Publisher:qq8174350Latest update time:2016-08-05 Source: 21icKeywords:DS18B20 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Communication base stations are densely populated with equipment and require high security. However, base stations cannot be manually guarded 24 hours a day. Generally, only air conditioning and ventilation fans are used to ensure normal temperature in the station. Temperature detection is rarely located in each equipment module. Once a fire occurs due to temperature changes in an equipment module due to a fault or other reason, it will have a huge impact and threat on the lives and safety of nearby residents. Therefore, how to accurately grasp and control the temperature status of equipment in communication base stations in real time is of great practical significance to the safe operation of base stations. Traditional temperature detection uses thermistors as temperature sensitive modules. Thermistors are low in cost, but require subsequent signal processing circuits, and their reliability is relatively poor. The accuracy of measuring temperature is poor, and the main module with temperature changes cannot be accurately located. The reason is that the correlation between temperature sensors arranged at different positions is poor, and temperature changes cannot be fully detected and analyzed, which has a serious impact on the safe operation and timely troubleshooting of communication base stations. To this end, based on the analysis of the existing temperature detection system, this paper proposes a correlation model temperature signal detection system based on the DS18B20 temperature sensor. When detecting the temperature of the communication base station, the temperature data collected by temperature sensors at different locations are brought together, and the collected temperature data are comprehensively analyzed using the correlation model. The module with temperature abnormality can be accurately located, and the heat dissipation system can be automatically controlled to eliminate safety hazards.

1 Overall system design

1.1 System Architecture Design

This temperature detection system includes the detection, display, information association, comprehensive analysis, sound and light alarm, and heat dissipation control of the temperature at different locations of the communication base station. Temperature detection is mainly realized by the DS18B20 temperature sensor, which converts the temperature into an analog signal, and then uses the A/D conversion circuit to convert it into a digital signal and transmit it to the AT89C51 microcontroller. The microcontroller processes the detection data and displays the temperature values ​​of various parts in the base station through the display screen. Once the temperature value of a certain location exceeds the set value, the sound and light alarm circuit sends an alarm signal. The microcontroller improves the heat dissipation efficiency by controlling the heat dissipation system. At the same time, according to the correlation model, on the basis of ensuring the safe operation of the base station, the power of the temperature abnormality module is reduced, thereby achieving the purpose of intelligent detection of the temperature of the communication base station. The overall design of the system is shown in Figure 1.

 

a.jpg

 

1.2 System Hardware Design

The hardware part includes: DS18B20 temperature sensor temperature detection circuit, data association circuit, sound and light alarm circuit, relay control heat dissipation circuit, etc.

In the data association circuit, the main control circuit uses the STC89C52 chip, and the crystal oscillator is set to 12 MHz, which has the characteristics of low power and small size. ADC0809 is an 8-bit successive approximation A/D analog-to-digital converter. It is powered by a single +5 V power supply, the analog input voltage range is 0 to +5 V, and the operating temperature range is -40 to 85°C. The CLK clock pulse signal is provided by STC89C52. The hardware design of the data association circuit is shown in Figure 2. In the figure, the main circuit uses a +5 V DC input, the main control circuit crystal oscillator is at 12 MHz, the system performance is 12 MIPS, the internal program memory can store 128K bytes, the data memory can store 4K bytes, and the E2PEOM memory can store 4K bytes; the SPI interface of the control circuit is connected to the nRF24L01 to realize the transmission and processing of the temperature abnormality signal detected by the temperature sensor DS18B20, and the PWM port is used to control the alarm module.

 

b.jpg

 

In the sound and light alarm circuit, if the temperature of each location in the base station is below the set value, the indicator light of the sound and light alarm circuit will be green and flashing. The single chip microcomputer controls the on and off of the transistor VT1 through the square wave output of the Q1 interface to control the sound and light alarm circuit. When the detected temperature value exceeds the set value, the output value of the single chip microcomputer Q3 interface is increased, and the transistor VT 3 is turned on, and the sound and light alarm sends out an alarm message. The circuit diagram of the sound and light alarm is shown in Figure 3.

 

c.jpg

 

2 Software Design

2.1 Main program flow

The control program of the temperature detection system is written in C language. When the temperature detection system is running, the temperature alarm value can be set manually. The control program uses the correlation coefficient of the temperature sensors arranged at different positions to determine the speed of high temperature transmission, thereby locating the position of the temperature abnormality module, and through the high temperature transmission speed and local temperature, the temperature is lowered by turning on the cooling fans and refrigeration devices at different positions. The workflow of the control program is shown in Figure 4.

2.2 Temperature sensor DS18B20 correlation program implementation

In the communication base station, the temperature detected by the temperature sensor DS18B20 has different measurement values ​​at different locations, and there is a correlation between different locations. The correlation coefficient between the data measured by the temperature sensor is set to λ, and the following formula can be used to describe the correlation coefficient of each module:

 

d.jpg

 

In the above formula, A and B represent the values ​​measured by two groups of temperature sensors, P(A) represents the mathematical expectation of variable A, and P(B) represents the mathematical expectation of variable B. When |λ|<0.2, it means that the distance between the two modules is far, and the high temperature has not been transmitted to the location of the module. Only an alarm signal is issued, and no measures to enhance heat dissipation are required; when 0.2≤|λ|≤0.6, it means that the high temperature is being transmitted to the location of different modules. At this time, the system issues an alarm and increases the heat dissipation efficiency; when 0.6≤|λ|≤0.9, it means that the temperature at each location in the base station is already very high. The highest level of alarm measures should be activated, and the staff should be notified to immediately strengthen the cooling and ventilation treatment, and the modules with abnormal temperature changes should be checked to completely eliminate the hidden dangers.

The signal detected by the temperature sensor is converted by ADC, and the converted 12-bit data is input as:

 

e.jpg

 

 

f.jpg

 

3 Conclusion

Aiming at the defect that the temperature detection values ​​at various positions of the traditional temperature detection system have poor correlation and cannot perform comprehensive positioning detection and early warning of communication base stations, this paper designs a correlation temperature detection system based on DS18B20, which realizes the detection, display, information correlation, comprehensive analysis, sound and light alarm and heat dissipation control of the temperatures of different modules of the communication base station. It can analyze and process the temperature change signals of the communication base station modules in real time and accurately, and complete the intelligent temperature detection, thereby reducing the safety hazards of the communication base station and improving the coefficient of safe operation.

Keywords:DS18B20 Reference address:Design and implementation of a correlation temperature detection system based on DS18B20

Previous article:Design of electronic weighing system based on L-PSIII
Next article:Design of Ultrasonic Distance Meter with Temperature Compensation Based on 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号