1、附件 1:外文资料翻译译文一种基于 DS18B20的温度探测系统摘要所有的 DS18B20传感器,用于多点温度测试,IO 总线与 MCU连接,温度数据的轮流收集。如果系统有大量的传感器,MCU 的时间用在处理温度数据明显延长,因此周期替代测试变得更长。在本文中,一种新的方法,DS18B20 的合理组合和一些在软件上采取的措施,替代试验进展速度明显。关键词:DS18B20 的集团,温度测试,轮流测试所花费的时间。引言由于结构简单,安装方便,低损失和广泛的用途的温度测试,DS18B20 温度测试传感器应用领域,需要多点温度测试,如化学工业,粮食,环境监督管理等。因为通过一个 DS18B20的多点温
2、度测试系统总线,所有 DS18B20是挂在一条总线上,然后每个温度测试点的值转换轮流读。作为转换后读值必须阅读 8次引脚的状态,移动时间,位置和存储数据,所以时间多花费在阅读每一个点的数据系统时间。如果温度测试系统是大型系统由它造成的损失是相当多的,然后交替测试系统的运行速度明显降低,从而影响多点温度测试系统的效率。在本文中,DS18B20 的一些 I / O总线上都挂着分组 DS18B20的均匀,温度转换获取数据读取 DS18B20的状态, 系统损耗减少和替代测试速度增加显然,这将不会影响精度和转换的可靠性。一套点对多点温度,在此实现人工环境实验室测试,这增加了测试效率。作者对 DS18B2
3、0的认识DS18B20是单总线数字温度传感器来自美国达拉斯公司。 DS18B20 是由 64数字光盘刻激光,温度敏感性组成部分,非易失性温度报警触发器(设备 TH和 TL) 。DS18B20 的通信微处理器单总线端口和测试范围 DS18B20是从-55 摄氏度到+125 摄氏度,增量值是0.5摄氏度。温度可在 720ms的数字改为每个 DS18B20具有唯一的 64数字序号。图 1揭示的具体内容:两个 8的数字储量(0 号和 1号) ,用于存储在 DS18B20的温度值。0 号存储存储器温度值,补充和一号存储器温度值的符号。用户可以定义非挥发的温度报警台和区分报警搜索命令,并寻求组件温度预定限
4、额以外的报警状态。有两个电源的替代方法:信号总线的高级别借采用电源或+5V 外部电源直接采用。图 1 DS18B20的 64位 ROM应用程序的分组试验方法本文阐述了 DS18B20与 89C52接口的分组方法。假设量 P1口的总线是和温度测试系统需要 100 DS18B20的传感器,可以平均分配 4 I / O线。如果传感器的数量不能分割由总线数目甚至,传感器的数量差距总线上是不超过一个,它可以处理,而阅读数字。外部供电电源。拥有在每个 DS18B20的同时性的转换,激烈当前是必要的,不能使用和信号总线电源,否则系统无法工作秩序。 “电路原理图 2所示(DS18B20 的信号同组的公共汽车上
5、都挂着 P1口的一些公共汽车) 。当读写 DS18B20的,严格的时间表被保留。首先回归脉冲被发送到所有 DS18B20的。后回归,跳过 ROM命令发送到每个电路同时的I / O端口,转换顺序发送的,那么所有的传感器开始转变。转换后,匹配 ROM命令同时发送到每个电路,64 位序列号发送。 DS18B20是每个选择组,便签数据读取。最后的数据是转化。串行读取数据转化为实际温度值。一名候补测试完成后 DS18B20温度数据读取完全由周期性的读数为 25倍。 图 2 DS18B20的分组示意图现在,在单总线和分组分析法测试系统耗时分别说明。回归时间序列和时间序列的写作和阅读的一个位微处理器在数字
6、4-6中显示。DS18B20 的回归周期为 495us,1020us;一位写作时间是 60us-120us;一位读期间以上 60us;写入或读取下位跨度是微秒。由于 A / D转换时间为 97.35ms(9 精密度),如果它是由最短的方法计算,替代测试总耗时分别计算如下:单总线:495us+2*(8*60+7)us+97.35ms+495us+100*(64*60+63+8*60+7+9*60+8)us=552.534ms分组模式:495us+2*(8*60+7)us+97.35ms+20(64*60+63+8*60+7+9*60+8)us=189.804ms作为数制转换和存储时间,在整个时期
7、,未知的晶体振荡器的频率,数制转换和存储时间的一小部分是不计算在内。因此,备用的测试分组模式消耗的时间明显比单总线模式短得多。设计示例沥青运输车辆是主要材料领域和道路之间的交通运输设备表面。不可避免的温度,减少因沥青运输车辆的长期工作和运输距离影响的摊铺质量路面,必须采取具体措施,根据壳的热释放。本文设计了一套无线温度使用 DS18B20分组模式测试沥青的温度测试系统运输车辆外壳,总积分为 120。温度测试系统软件采用模块化设计。下位机收集数据,存储数据,建立的 DS18B20,并发送无线模块等。上位机采用 PC机,主要接收温度数据从下位机上位机显示,存储和管理数据。 A. 系统硬件考虑到多点
8、温度数临时存储期间相当大的内部 RAM值的转换,行政控制芯片采用ATMEL公司的 89C52单片机 256字节 RAM和 8KB的 E2PROM程序存储。作为 DS18S20区分代码读取和编号,液晶显示模块(敖克拉中国集成模块 OCMJ金鹏公司)和键盘模块补充说。无线数字传输采用无线在整个接收发送形式 375模块,这 5月有两个业余频段选择和调节波特率(最大为 20Kbit/ S) ,单芯片微机串口的数据可以直接接收。DS18B20与电源,分为 8组挂在 P1口(P1.0-P1.7 口)。无线模块挂在串口直接与硬件看门狗采用 MAX813芯片。当电源被添加到系统中,回归信号传输的 MAX813
9、回归针,价值回归脉冲为 200ms。当过程中,必须被发送到一个脉冲信号 MAX813世界发展指标“没有比间隔为 1.6s到更多的引脚清除看门狗定时器。如果间隔超过为 1.6s,针并没有收到脉冲信号,然后 89C52必须扭转。作为 120DS18B20的序列号必须在系统中存储,针对数据存储 DS1225(8K)停电。B. 系统软件功能和过程温度测试系统的软件部分 DS18B20的收集和转换数据,执行无线沟通,管理键盘等。对于方便程序的调试和可靠性,采用模块设计,主要包括键盘处理模块,无线通信模块,温度采集和处理,显示模块模块等。外接电源回归后,89C52 首先自我检查,然后分配给每个分支的程序模
10、块。主要的过程管理的键盘,系统初始化,传输各功能模块。长途线保持执行 DS18B20的编辑任务。序号 120点 DS18B20是读通过键盘和显示器的协调到DS1225Y和编号。首先,无线模块设置为接收状态接收收集参数和启动顺序(传输内容包发送;相同的内容发送三次;两头在外的三个逻辑执行按位)。无线模块设置为睡眠状态,在在温度的转化率和转化状态数据传输。包装发送温度数据和 DS18B20的数字上位机系统中。“收集和转换的部分开始的 DS18B20转换,读取温度数据分组方法,数据存储等。结论创建以下新思路1替代试验多点的时间差温度测试系统的分组方法和单总线的方法进行了分析,然后交替的测试速度可大大
11、提高了分组方法。2一套无线多点温度测试系统设计 DS18B20分组方法。这个系统是适用于沥青运输的技术改革一些国内大型工程机械车辆实现公司和应用程序的好成绩。参考文献1ShenJin, SongJingLing. An All-digital Temperature Measuring System Used in Grain Barns. Transaction of the chese society for Agricultural Machinery,2001,(2):8991. 2 LiMinHui, Jung Deqiong. A Device of Temperature Mea
12、suremen Made up of DS1820 and AT89C205. Journal of Sichan NormalUniversity1997,(5):93-96 3 Qi ZhiCaiGai Shuang. Embedded Control System of the Central Air conditioner Room,InstrumentTechnique and Sensor 2002,(5):25-26. 4 ZhangPeiren ZhouYanping. A Large-Scale Temperature Alarm System Based on 1Wire
13、Bus and CAN bus, Control as a result, the speed of alternate test advances distinctly. Key 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 s
14、ensors are applied to the fields which need the multipoint temperature test, such as the 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 temperatur
15、e conversion value of each test point is read by turns. As the conversion value must be 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 s
16、ystem loss caused by it is rather much, and then the alternate test speed of the system 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 temperatu
17、re data is obtained by reading the state of DS18B20, then the system loss decreases and 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 thi
18、s paper, which increases the test efficiency of the former system.2. CHARACTERISTICS OF 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 tempera
19、ture alarms trigger (Device TH and TL).DS18B20 communicates with the microprocessor by the single bus port and the test range of DS18B20 is from -55 centigrade to +125 centigrade, and the incremental value is 0.5 centigrade. The temperature can be changed into figures within 720ms and each DS18B20 h
20、as the sole 64 figures serial number.Fig 1 DS18B20 64bit ROMThe specific content is revealed as Fig 1: There are two 8 figures storages (No.0 and No.1) for storing temperature value in DS18B20. No.0 storage stores complement of the temperature value, and No.1 stores symbols of the temperature value.
21、 The user can define non-volatile temperature alarms sets and distinguish the alarms search order and seek the component 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 extern
22、ally is adopted directly.3. APPLICATION THE GROUPING TEST METHODThis paper illustrates the grouping method with the 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/
23、O lines. If the number of sensors cannot be divided by the number of buses even, the number disparity of sensors on 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
24、needed, and the signal bus cannot be used for the power supply, otherwise the system cannot work in order. The schematic 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
25、a reversion pulse is sent to all DS18B20. After the reversion, Skip ROM order is sent to each circuit simultaneously 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
26、 number is sent. DS18B20 is selected for each group, and Scratch Pad data is read. Finally the data is transformed. 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 f
27、or 25 times.Fig 2 DS18B20 grouping sketch mapNow the time-consuming in the test system of the single bus and the grouping 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.
28、The figure show: The reversion period of DS18B20 is 495us-1020us; the writing period of one bit is 60us-120us; the 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 97.35ms (9 precisions), if it is counted by the shortest way,
29、the total time-consuming of alternate test is calculated respectively as follows: (1) Single bus 495us+2*(8*60+7)us+97.35ms+495us+100*(64*60+ 63+8*60+7+9*60+8)us=552.534ms (2) Grouping mode 495us+2*(8*60+7)us+97.35ms+20(64*60+63+8*60+7+9*60+8)us=189.804msAs the small proportion of the numeration sys
30、tem conversion and the storage time in the whole period, the unknown crystal-oscillator frequency, the numeration system conversion and storage time is not counted. Accordingly, the alternate test time which grouping mode consumes is much shorter than single bus mode obviously.4. EXAMPLE OF THE DESI
31、GNThe asphalt transportation vehicle is the main transportation equipment between the material field and road surface. The unavoidable temperature decreasing because of the asphalt transportation vehicles long working and transportation distance influences the paving quality of the road surface; the
32、 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 test system for testing the temperature of the asphalt transportation vehicle shell, and the total points is 120. Temperature test system softwar
33、e adopts the modular design. The hypogenous machine collects data, stores data, sets up DS18B20, and sends the wireless module and so on. The epigenous machine adopts PC machines, mainly receives the temperature data from the hypogenous machine. The epigenous machine displays, stores and manages dat
34、a. The simple communication between people and machines is performed by the epigenous machine. This paper will not illustrate the simple procedure of the epigenous machine in detail. The following is the illustration of parts of hypogenous machine.A.System hardwareConsidering the multipoint temperat
35、ure number of the temporary storage and the considerable internal RAM during the value conversion, the chief controlling chip adopts ATMEL 89C52 Single-Chip Microcomputer with 256 bytes RAM and 8KB E2PROM procedure storage. As the distinguishable code of DS18S20 is read and numbered, the liquid crys
36、tal module (Ao Kela Chinese integrated module of OCMJ Jin Peng Company) and the keyboard module are added. The wireless digital transmission adopts the wireless module375 in the whole reception-sending form, which may has two amateur bands to choose and the regulative Baud Rate ( the max is 20Kbit/s
37、), 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 (P1.0-P1.7). The wireless module is hung on serial port directly and the hardware watchdog adopts the MAX813 chip. When the power is added to the syst
38、em, 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 to MAX813 WDI pin in no more than the interval of 1.6s to clear away the watch-dog timer. If the interval is more than 1.6
39、s, 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 power failure is developed.B.System software function and process The software part of the temperature test system n
40、umbers 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 design is adopted, mainly including the keyboard processing module, the wireless communication module, the mod
41、ule 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 kept to perform DS18B20 edit mission. 120 points serial number of DS18B20 is read by the keyboard and di
42、splay 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 by pack ; the same content is sent for three times ; two out of three logic is performed according to th
43、e 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 DS18B20 numbers in the system to epigenous machine. The parts of collection and conversion start the DS18B20 c
44、onversion, 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:1. Alternate test time difference of the multipoint temperature test system in the gro
45、uping method and the single bus method is analyzed, then the alternate test speed can be increased greatly by grouping method. 2.A set of wireless multipoint temperature test system is designed by DS18B20 grouping method. This system is applied to the technology reform of the asphalt transportation
46、vehicle in some domestic large-scale engineering mechanical company and the good result of the application is achieved.REFERENCES1ShenJin, SongJingLing. An All-digital Temperature Measuring System Used in Grain Barns. Transaction of the chese society for Agricultural Machinery,2001,(2):8991. 2 LiMin
47、Hui, Jung Deqiong. A Device of Temperature Measuremen Made up of DS1820 and AT89C205. Journal of Sichan Normal University1997,(5):93-96.3 Qi ZhiCaiGai Shuang. Embedded Control System of the Central Air conditioner Room,InstrumentTechnique and Sensor 2002,(5):25-26. 4 ZhangPeiren ZhouYanping. A Large-Scale Temperature Alarm System Based on 1Wire Bus and CAN bus, Control&Automation 2003,(2):25-26.