1、外文翻译一种基于DS18B20的温度探测系统附录A Design of the Temperature Test System Basedon Grouping DS18B20AbstractAll the DS18B20 sensors, used for the multipoint test temperature, are connected with MCU on one of IO bus, and temperature data are collected by turns. If the system has a large amount of sensors, the ti
2、me of MCU used in processing the temperature data is obviously prolonged, so the cycle of alternate test gets longer. In this paper, a new method that DS18B20 are rationally grouped is presented, and some measures are taken in software; as a result, the speed of alternate test advances distinctly. K
3、ey words- DS18B20 Group, temperature test, time spent on the alternate test.1. INTRODUCTION As the simple structure, convenient installment, low loss and wide range of temperature test, DS18B20 temperature test sensors are applied to the fields which need the multipoint temperature test, such as the
4、 chemical industry, the grain, the environment supervision and so on. Because of the adoption of one bus in the DS18B20 multipoint temperature test system, all DS18B20 are hung on one bus, and then the temperature conversion value of each test point is read by turns. As the conversion value must be
5、read after reading-pin state for 8 times, and position and store data must be moved, so time spend much in reading one point of the data system by every time. If the temperature test system is large-scaled, the system loss caused by it is rather much, and then the alternate test speed of the system
6、decreases obviously, which influences the efficiency of the multipoint temperature test system seriously. In this paper, DS18B20 are hung on some I/O buses by grouping DS18B20 evenly, and the conversion temperature data is obtained by reading the state of DS18B20, then the system loss decreases and
7、the alternate test speed increases obviously, which wont influence the precision and the reliability of the conversion. A set of multipoint temperature test of artificial environment laboratory is achieved in this paper, which increases the test efficiency of the former system.2. CHARACTERISTICS OF
8、DS18B20 DS18B20 is the single bus digital temperature sensor from American Dallas Company. DS18B20 is consisted of the 64 figures ROM engraved by laser, the temperature sensitivity component, non-volatile temperature alarms trigger (Device TH and TL).DS18B20 communicates with the microprocessor by t
9、he single bus port and the test range of DS18B20 is from -55 centigrade to +125 centigrade, and the incremental value is centigrade. The temperature can be changed into figures within 720ms and each DS18B20 has the sole 64 figures serial number.Fig 1 DS18B20 64bit ROMThe specific content is revealed
10、 as Fig 1: There are two 8 figures storages and for storing temperature value in DS18B20. storage stores complement of the temperature value, and stores symbols of the temperature value. The user can define non-volatile temperature alarms sets and distinguish the alarms search order and seek the com
11、ponent temperature alarms state outside the scheduled limit. There are two alternative ways of power supply: Signal bus high-level borrow power is adopted, or the +5v power supply externally is adopted directly.3. APPLICATION THE GROUPING TEST METHODThis paper illustrates the grouping method with th
12、e interface of DS18B20 and 89C52. Assuming the amount of the buses on P1 port is 4 and the temperature test system needs 100 DS18B20 sensors, which can be distributed equally to the 4 I/O lines. If the number of sensors cannot be divided by the number of buses even, the number disparity of sensors o
13、n buses is no more than one, which can be handled while reading numbers. The power is supplied externally. Owning to the synchronistic conversion in each DS18B20, the intense current is needed, and the signal bus cannot be used for the power supply, otherwise the system cannot work in order. The sch
14、ematic circuit is shown as Fig 2 (the DS18B20 signal buses of the same group are hung on some buses of P1 port). When read and write the DS18B20, the strict schedule must be kept. First a reversion pulse is sent to all DS18B20. After the reversion, Skip ROM order is sent to each circuit simultaneous
15、ly from the I/O port, and the conversion order is sent, then all sensors begin transform. After the conversion, Match Rom order is sent to each circuit simultaneously, and 64 bits serial number is sent. DS18B20 is selected for each group, and Scratch Pad data is read. Finally the data is transformed
16、. The data of serial-read is transformed into the actual temperature value. One alternate test is finished after the DS18B20 temperature data is read completely by the cyclical reading for 25 times.Fig 2 DS18B20 grouping sketch mapNow the time-consuming in the test system of the single bus and the g
17、rouping analyses method is illustrated respectively. The reversion time sequence and the time sequence of writing and reading one bit for the microprocessor are revealed in figures 4-6. The figure show: The reversion period of DS18B20 is 495us-1020us; the writing period of one bit is 60us-120us; the
18、 reading period of one bit is above 60us; the span of writing or reading the next bit is 1us. As the A/D conversion time is (9 precisions), if it is counted by the shortest way, the total time-consuming of alternate test is calculated respectively as follows: (1) Single bus 495us+2*(8*60+7)us+495us+
19、100*(64*60+ 63+8*60+7+9*60+8)us= (2) Grouping mode 495us+2*(8*60+7)us+20(64*60+63+8*60+7+9*60+8)us=As the small proportion of the numeration system conversion and the storage time in the whole period, the unknown crystal-oscillator frequency, the numeration system conversion and storage time is not
20、counted. Accordingly, the alternate test time which grouping mode consumes is much shorter than single bus mode obviously.4.EXAMPLE OF THE DESIGNThe asphalt transportation vehicle is the main transportation equipment between the material field and road surface. The unavoidable temperature decreasing
21、 because of the asphalt transportation vehicles long working and transportation distance influences the paving quality of the road surface; the specific measures must be taken according to the heat release of the shell. This paper designed a set of wireless temperature using DS18B20 grouping mode te
22、st system for testing the temperature of the asphalt transportation vehicle shell, and the total points is 120. Temperature test system software adopts the modular design. The hypogenous machine collects data, stores data, sets up DS18B20, and sends the wireless module and so on. The epigenous machi
23、ne adopts PC machines, mainly receives the temperature data from the hypogenous machine. The epigenous machine displays, stores and manages data. The simple communication between people and machines is performed by the epigenous machine. This paper will not illustrate the simple procedure of the epi
24、genous machine in detail. The following is the illustration of parts of hypogenous machine. hardwareConsidering the multipoint temperature number of the temporary storage and the considerable internal RAM during the value conversion, the chief controlling chip adopts ATMEL 89C52 Single-Chip Microcom
25、puter with 256 bytes RAM and 8KB E2PROM procedure storage. As the distinguishable code of DS18S20 is read and numbered, the liquid crystal module (Ao Kela Chinese integrated module of OCMJ Jin Peng Company) and the keyboard module are added. The wireless digital transmission adopts the wireless modu
26、le375 in the whole reception-sending form, which may has two amateur bands to choose and the regulative Baud Rate ( the max is 20Kbit/s), and the Single-Chip Microcomputer serial port data can be received directly. DS18B20, with the power supply, divided into 8 groups hung on P1 port The wireless mo
27、dule is hung on serial port directly and the hardware watchdog adopts the MAX813 chip. When the power is added to the system, the reversion signal is transmitted from the MAX813 reversion pin, and the value of the reversion pulse is 200ms. When the procedure is in order, a pulse signal must be sent
28、to MAX813 WDI pin in no more than the interval of to clear away the watch-dog timer. If the interval is more than , the pin does not receive the pulse signal, and then the 89C52 must be reversed. As 120 DS18B20 serial numbers must be stored in the system, the data storage DS1225 (8K) against the pow
29、er failure is developed. software function and process The software part of the temperature test system numbers DS18B20, collects and transforms data, performs the wireless communication, manages keyboard and so on. For the convenience of the procedure debugging and the reliability, the module desig
30、n is adopted, mainly including the keyboard processing module, the wireless communication module, the module of temperature collection and processing, the display module and so on. The chief procedure manages the keyboard, initializes the system and transfers each functional module. The haul line is
31、 kept to perform DS18B20 edit mission. 120 points serial number of DS18B20 is read by the keyboard and display coordination and numbered into DS1225Y. First the wireless module is set up as the reception state to receive the collection parameters and start the order (The transmission content is sent
32、 by pack ; the same content is sent for three times ; two out of three logic is performed according to the bit).The wireless module is set up as the sleep state during the conversion and the transforming state during the temperature data transmission. Packing sends the temperature data and the DS18B
33、20 numbers in the system to epigenous machine. The parts of collection and conversion start the DS18B20 conversion, read the temperature data by grouping methods, store data and so on. The following procedure is the main content of collecting and conversion modules.5.CONCLUCTIONAuthors create the following new ideas:
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1