Temperature is a common physical quantity in life. It is related to our real-time life. Human research on temperature has been continuing. After many years of development, many mature temperature sensors have been well applied in various fields.
The following introduces the classification of temperature sensors and the method of selecting temperature sensors in design. The analog signal output by analog temperature sensor has the advantage of fast response. Digital temperature sensor output digital quantity, it output response speed is slow, but the interface is simple.
Thermal resistance temperature sensor, thermistor temperature sensor, analog integrated temperature sensor, thermocouple temperature sensor and intelligent temperature sensor are often used in engineering to realize temperature detection.
There are four kinds of temperature sensors in industry: thermocouple, thermoresistor, thermistor and integrated circuit temperature sensor. Different temperature sensors have different measuring ranges and different application environments. Scheme: Digital temperature sensor DS18B20, whose temperature measurement range is – 55 ~125 ~C, accuracy can reach 12 bits, temperature resolution is 0.0625 ~C, thermostatic element working voltage is between 3V and 5.5V, it directly outputs digital signal, which is convenient for MCU to process. The digital chip is used for temperature measurement of water temperature controller, and the hardware circuit can be simplified. It is suitable for temperature sensor in single chip temperature measurement system. In the process of temperature environment monitoring, temperature sensitive elements are used. Although the cost of temperature sensitive resistors is low, the subsequent circuit is troublesome, and temperature calibration is also needed. AD590 belongs to current-mode integrated temperature sensor, and its output is analog signal, and this output signal is not strong, so it needs to amplify and design A/D conversion circuit. If the design uses ordinary amplifier circuit, the effect of operational amplifier is difficult to guarantee, and the price of measurement amplifier is not low, which makes the whole system design into. Ben was raised.
The system design adopts DS18B20 to collect temperature changes, which is the reason why any number of DS18B20 can be connected on a bus, so as to facilitate multi-point temperature measurement, and with the form of serial digital signal output, the measured temperature results can be provided to the PC 33.7 port of AT89C51, which is used as data input. DS18B20 has great advantages in multi-point temperature detection and acquisition system. The working voltage of DS18B2 0 is 5V, and the detection temperature range of DS18B20 is – 55 C to 125 C. The measurement accuracy can reach 0.5 C.
The digits of the temperature conversion result of DS18B20 can be determined by software programming. The output precision digits are 9 to 12, but its default value is 12 digits. The microcontroller temperature measurement system involved in this paper needs to display the maximum real-time temperature values/comparisons.
There are two suitable display schemes. LCD liquid crystal display and seven-segment digital tube display. LCD can display men, English and numbers; digital tube is suitable for use in systems with small amount of information, and digital tube is suitable for displaying numbers.
From the above, the digital tube display circuit is the simplest/cheapest. Considering the display temperature from – 55 C to 125 C, if we use seven-segment digital display, we need three sets of digital tubes for each display path, and the maximum temperature needs to be displayed separately. This will not only increase the number of digital tubes, but also increase the difficulty of writing MCU driver.
Therefore, LCD liquid crystal display is the best display module, which can fully meet the requirements of use. Programming can be done in assembly language and C language, which is one of the reasons why it is widely used and quick to use. Assembly programming instructions are efficient and suitable for occasions with high timing requirements. For example, DS18B20 reading and writing operations involved in this paper can use assembly language to write driver module program blocks by comparing the sequence diagram of chip manuals and explanations one by one.
C language programming instructions have high portability, code can be reused for 1602 LCD driver and main program writing. The design uses AT89C51 as the control chip, collects the data of temperature sensor, calculates the collected data, and realizes the design of temperature acquisition and control. The system structure is shown in Figure 1. The goal of the design is to collect the water temperature, turn off the heating equipment according to the set maximum, and turn on the heating equipment if the temperature is less than the minimum, so as to achieve the goal of constant temperature control. The temperature control system is composed of the main and minimum system of single chip computer, temperature acquisition module, digital tube display module, key setting module, buzzing alarm module, storage module and so on. Data information of LCD real-time display temperature. The threshold of triggering alarm can be set by keys, and it can also be set and modified by keys. It can realize the alarm of the upper and lower threshold of temperature.
Realize constant temperature control function. The function of temperature sensor acquisition module is to collect the current water temperature. The function of display module is to display real-time water temperature. The function of the sound alarm module is to give an alarm when the water temperature exceeds the set threshold. The function of keyboard module is to set up the upper and lower threshold of water temperature and manual alarm. The function of the main control module is to collect sensor data, input keyboard information, process and output alarm information and control heating equipment for real-time display of heating system. Considering that the system has fewer functions, it can be realized by ordinary single-chip computer. The AT89C51 single-chip microcomputer has the advantages of light weight, small size, low requirements for the environment, strong anti-interference ability, high reliability, low price, good flexibility, etc.
, so the system uses the AT89C51 single-chip microcomputer as the main controller of the system. In the aspect of temperature acquisition, single-line digital temperature sensor DS18B20 is selected for temperature data acquisition; the man-machine dialogue interface sets the alarm value of temperature on and off the line and the water temperature value in real time when the digital tube display circuit acts on it through the keypad; at the same time, it can display the current temperature value when setting parameters; and the storage circuit. The function is to store the upper and lower thresholds of the set temperature. This design can ensure that the system does not need to reset the temperature parameters when it is re-working, so it is convenient to use. The alarm circuit is used to alarm the temperature of the upper and lower thresholds. When the upper and lower thresholds are exceeded, the digital tube will light up, and the alarm sound will be emitted, and the lower limit will also have the same effect. Electrical circuits are used to control the operation of equipment for heating water. This paper mainly introduces the selection of sensors and the overall design of the system, draws the system structure diagram, and gives a detailed description of each part of the circuit. The overall design idea has been determined, and hardware and software can be developed according to the design.