The hottest DS1820 and its realization of high pre

  • Detail

DS1820 and its realization of high-precision temperature measurement

in the traditional analog signal long-distance temperature measurement system, it is necessary to well solve the technical problems such as lead error compensation, multi-point measurement switching error, amplified electric combustion performance reaching level A1 (GB8624), smoke toxicity reaching level AQ1 (gb/t20285), thermal conductivity ≤ 0.052w/(m2k) (gb/t10295) circuit zero drift error, etc., so as to achieve high measurement accuracy. In order to overcome the three problems mentioned above, we adopted a new type of digital temperature sensor DS1820 when developing a real-time monitoring system for the bearing temperature of hydro generator units for a hydropower station. Based on the detailed analysis of its temperature measurement principle, we proposed a method to improve the measurement accuracy of DS1820, which increased the measurement accuracy of DS1820 from 0.5 ℃ to more than 0.1 ℃, and achieved good temperature measurement results

1ds1820 introduction

ds1820 is a modular digital temperature sensor produced by Dallas Semiconductor Company in the United States. It uses on-b0ard patented technology inside. All sensing elements and conversion circuits are integrated in an integrated circuit shaped like a triode. Compared with other temperature sensors, DS1820 has the following characteristics except the high modulus of carbon fiber reinforced thermoplastic:

(1) unique single line interface mode. When DS1820 is connected with microprocessor, it only needs one port line to realize two-way communication between microprocessor and DS1820

(2) the DS1820 supports multi-point group function. Multiple DS1820 can be connected in parallel on the only three lines to realize multi-point temperature measurement

(3) DS1820 generally carries out cleaning, fastening and lubrication operations, and partially carries out dispensing operations to protect the intact technical state of the machinery. The maintenance starts with inspection and dispensing as the center, so as to maintain the good working performance of all assemblies, mechanisms and parts of the machinery Regularly check whether there is oil leakage at the main engine and oil source, regularly clean special parts, and regularly apply lubricating oil to all parts to avoid wear between parts No peripheral components are required in use

(4) temperature range - 55 ℃ ~ + 125 ℃, inherent temperature measurement resolution 0.5 ℃

(5) the measurement results are transmitted serially in the form of 9-bit digital quantity

ds1820 internal structure block diagram is shown in Figure 1

ds1820 temperature measurement principle is shown in Figure 2. In the figure, the oscillation frequency of the crystal oscillator with low and medium temperature coefficient is little affected by temperature. It is used to generate a pulse signal with a fixed frequency and send it to the counter 1. The oscillation rate of high temperature coefficient crystal oscillator changes obviously with the change of temperature, and the generated signal is used as the pulse input of counter 2. Counter 1 and temperature register are preset at a base value corresponding to -55 ℃. Counter 1 subtracts the pulse signals generated by the low temperature coefficient crystal oscillator. When the preset value of counter 1 decreases to 0, the value of temperature register will increase by 1, and the preset of counter 1 will be loaded again. Counter 1 starts counting the pulse signals generated by the low temperature coefficient crystal oscillator again. This cycle stops the accumulation of temperature register values until counter 2 counts to 0, At this time, the value in the temperature register is the measured temperature. The slope accumulator in Figure 2 is used to compensate and correct the nonlinearity in the temperature measurement process, and its output is used to correct the preset value of counter 1

under normal temperature measurement, the temperature measurement resolution of DS1820 is 0.5 ℃, which is expressed in 9-bit data format. The least significant bit (LSB) is compared by the comparator at 0.25 ℃. When the residual value in counter 1 is converted into temperature and is lower than 0.25 ℃, the lowest bit (LSB) of the temperature register is cleared. When the residual value in counter 1 is converted into temperature and is higher than 0.25 ℃, the lowest bit (LSB) of the temperature register is set, For example, the 9-bit data format corresponding to -25.5 ℃ is as follows:

2 ways to improve the temperature measurement accuracy of DS1820

2.1 theoretical basis for high-precision temperature measurement of DS1820

ds1820 has a temperature measurement resolution of 0.5 ℃ in normal use, which is slightly insufficient for the bearing bush temperature monitoring of hydraulic turbine generator unit. Based on the detailed analysis of the temperature measurement principle of DS1820, we adopt the method of directly reading the internal temporary registers of DS1820, Increase the temperature measurement resolution of DS1820 to 0.1 ℃ ~ 0.01 ℃.

the distribution of internal temporary registers of DS1820 is shown in Table 1. The 7th byte stores the remaining count value of counter 1 when the temperature register stops increasing in value, and the 8th byte stores the count value corresponding to each degree. In this way, we can obtain high-resolution temperature measurement results through the following methods. First, read the temperature measurement result with the resolution of 0.5 ℃ with the read temporary register instruction (beh) provided by DS1820, then cut off the least significant bit (LSB) in the measurement result to obtain the integer t of the measured actual temperature integer part, and then use the beh instruction to read the count residual value m of counter 1 and the count value m per degree. Considering the relationship between 0.25 ℃ and 0.75 ℃ as the carry limit of the integer part of DS1820, The actual temperature T can be calculated by the following formula:

t actual = (t integer - 0.25 ℃) + (m per degree - m residual)/m per degree

2.2 comparison of measured data

Table 2 shows the comparison between the temperature measurement data obtained by directly reading the temperature measurement results and by using the calculation method. Through the comparison, it can be seen that the calculation method is not only feasible in DS1820 temperature measurement, but also can greatly improve the temperature measurement resolution of DS1820

3ds1820 precautions in use

ds1820 although it has the advantages of simple temperature measurement system, high temperature measurement accuracy, convenient connection and less occupation of port lines, it should also pay attention to the following problems in practical application:

(1) relatively complex software is required to compensate for the small hardware overhead. Since serial data transmission is used between DS1820 and microprocessor, when reading and writing programming DS1820, The reading and writing sequence must be strictly guaranteed, otherwise the temperature measurement results cannot be read. When using pl/m, C and other high-level languages for system programming, it is better to use assembly language to realize the DS1820 operation part

(2) the number of DS1820 attached to a single bus is not mentioned in the relevant data of DS1820. It is easy to mistakenly believe that any number of DS1820 can be attached, which is not the case in practical applications. When there are more than 8 DS1820 attached to a single bus, it is necessary to solve the bus driving problem of the microprocessor, which should be paid attention to when designing the multi-point temperature measurement system

(3) the length of the bus cable connecting the DS1820 is limited. In the test, when the transmission length of ordinary signal cable exceeds 50m, the temperature measurement data read will be wrong. When the bus cable is changed into twisted pair shielded cable, the normal communication distance can reach 150m. When twisted twisted pair shielded cable with more times per meter is used, the normal communication distance is further extended. This situation is mainly caused by the bus distributed capacitance signal 2. All valves on the control cabinet of Jinan experimental machine factory should not be opened, and the waveform of the placement number is distorted. Therefore, the bus distributed capacitance and impedance matching should be fully considered in the design of long-distance temperature measurement system with DS1820

(4) in the design of DS1820 temperature measurement program, after sending the temperature conversion command to DS1820, the program always waits for the return signal of DS1820. Once a DS1820 is in poor contact or disconnected, when the program reads the DS1820, there will be no return signal, and the program enters the dead cycle. This point should also be paid attention to in the DS1820 hardware connection and software design. (end)

Copyright © 2011 JIN SHI