登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 外文翻译 > 电子信息类 > 通信工程 > 正文

基于DS18B20的温度探测系统外文翻译资料

 2022-08-17 10:08  

A Design of the Temperature Test System Based on Grouping DS18B20

Abstract

All the DS18B20 sensors, used for the mult- point 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 time 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.

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 sensors are applied to the fields which need the multi-point 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 multi-point 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 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 decreases obviously, which influences the efficiency of the multi-point 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 the alternate test speed increases obviously, which wonrsquo;t influence the precision and the reliability of the conversion. A set of multi-point temperature test of artificial environment laboratory is achieved in this paper, which increases the test efficiency of the former system.

  1. 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 temperature 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 has the sole 64 figures serial number.

Fig 1 DS18B20 64bit ROM

The specific content is revealed as Fig 1: There are two 8 figures storage (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. 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 externally is adopted directly.

  1. APPLICATION THE GROUPING TEST METHOD

This 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/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 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 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 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 for 25 times.

Fig 2 DS18B20 grouping sketch map

Now 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. 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, 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

  1. Grouping mode 495us 2*(8*60 7)us 97.35ms 20(64*60 63 8*60 7 9*60 8)us=189.804ms

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 counted.

剩余内容已隐藏,支付完成后下载完整资料


基于DS18B20的温度探测系统

摘要

DS18B20传感器多用于多点温度测试,IO总线与MCU连接,温度数据的轮流收集。如果系统有大量的传感器,MCU用于处理温度数据的时间明显延长,因此测试周期变得更长。在本文中,提出一种新的方法,DS18B20的合理组合和一些在软件上采取的措施,试验进展速度明显加快。

关键词:DS18B20;温度;MCU

引言

由于结构简单,安装方便,低损失和广泛的用途的温度测试,DS18B20温度测量传感器应用领域广,一般需要多点温度测量,如化学工业、粮食、环境监督管理等。因为通过一个DS18B20的多点温度测试系统总线,所有DS18B20是挂在一条总线上,然后每个温度测试点的值转换着轮流读取温度值。作为转换后读值必须阅读8次引脚的状态、移动时间、位置和存储数据,所以时间大多花费在阅读每一个点的数据系统时间。如果温度测试系统是大型系统,则由它造成的损失是相当多的,交替测试系统的运行的速度明显降低,从而影响多点温度测试系统的工作效率。在本文中,DS18B20的一些I / O总线上都均匀分组挂着DS18B20,温度转换获取数据读取DS18B20的状态, 系统损耗减少和温度测量速度明显增加,这将不会影响精度和转换的可靠性。一套点对多点温度测量人工环境实验室温度,增加了测试效率。

DS18B20是单总线数字温度传感器来自美国达拉斯公司。 DS18B20是由64数字光盘刻激光,温度敏感性组成部分,非易失性温度报警触发器(设备TH和TL)。DS18B20的通信微处理器单总线端口和测试范围DS18B20是从-55摄氏度到 125摄氏度,增量值是0.5摄氏度。温度可在720ms的数字改为每个DS18B20具有唯一的64数字序号。图1揭示的具体内容:两个8的数字储量(0号和1号),用于存储在DS18B20的温度值。0号存储存储器温度值,补充和一号存储器温度值的符号。用户可以定义非挥发的温度报警台和区分报警搜索命令,并寻求组件温度预定限额以外的报警状态。有两个电源的替代方法:信号总线的高级别借采用电源或 5V外部电源直接采用。

表1 DS18B20的64位ROM

8-BIT CRC CODE

48-BIT SERTAL NUMBER

8-BIT FAMILY CODE

MSB LSB MSB LSB MSB LSB

应用程序的分组试验方法 本文阐述了DS18B20与89C52接口的分组方法。假设量P1口的总线是和温度测试系统需要100 DS18B20的传感器,可以平均分配4 I / O线。如果传感器的数量不能分割由总线数目甚至,传感器的数量差距总线上是不超过一个,它可以处理,而阅读数字。外部供电电源。拥有在每个DS18B20的同时性的转换,激烈当前是必要的,不能使用和信号总线电源,否则系统无法工作秩序。 “(DS18B20的信号同组的公共汽车上都挂着P1口的一些公共汽车)。当读写DS18B20的,严格的时间表被保留。首先回归脉冲被发送到所有DS18B20的。后回归,跳过ROM命令发送到每个电路同时的I / O端口,转换顺序发送的,那么所有的传感器开始转变。转换后,匹配ROM命令同时发送到每个电路,64位序列号发送。 DS18B20是每个选择组,便签数据读取。最后的数据是转化。串行读取数据转化为实际温度值。一名候补测试完成后DS18B20温度数据读取完全由周期性的读数为25倍。

现在,在单总线和分组分析法测试系统耗时分别说明。回归时间序列和时间序列的写作和阅读的一个位微处理器在数字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

作为数制转换和存储时间,在整个时期,未知的晶体振荡器的频率,数制转换和存储时间的一小部分是不计算在内。因此,备用的测试分组模式消耗的时间明显比单总线模式短得多。

设计示例

沥青运输车辆是主要材料领域和道路之间的交通运输设备表面。不可避免的温度,减少因沥青运输车辆的长期工作和运输距离影响的摊铺质量路面,必须采取具体措施,根据壳的热释放。本文设计了一套无线温度使用DS18B20分组模式测试沥青的温度测试系统运输车辆外壳,总积分为120。温度测试系统软件采用模块化设计。下位机收集数据,存储数据,建立的DS18B20,并发送无线模块等。上位机采用PC机,主要接收温度数据从下位机上位机显示,存储和管理数据。

  1. 系统硬件

考虑到多点温度数临时存储期间相当大的内部RAM值的转换,行政控制芯片采用 ATMEL公司的89C52单片机256字节RAM和8KB的E2PROM程序存储。作为DS18S20区分代码读取和编号,液晶显示模块(敖克拉中国集成模块OCMJ金鹏公司)和键盘模块补充说。无线数字传输采用无线在整个接收发送形式375模块,这5月有两个业余频段选择和调节波特率(最大为20Kbit/ S),单芯片微机串口的数据可以直接接收。

DS18B20与电源,分为8组挂在P1口(P1.0-P1.7口)。无线模块挂在串口直接与硬件看门狗采用MAX813芯片。当电源被添加到系统中,回归信号传输的MAX813回归针,价值回归脉冲为200ms。当过程中,必须被发送到一个脉冲信号MAX813世界发展指标“没有比间隔为1.6s到更多的引脚清除看门狗定时器。如果间隔超过为1.6s,针并没有收到脉冲信号,然后89C52必须扭转。作为120DS18B20的序列号必须在系统中存储,针对数据存储DS1225(8K)停电。

B. 系统软件功能和过程

温度测试系统的软件部分DS18B20的收集和转换数据,执行无线沟通,管理键盘等。对于方便程序的调试和可靠性,采用模块设计,主要包括键盘处理模块,无线通信模块,温度采集和处理,显示模块模块等。外接电源回归后,89C52首先自我检查,然后分配给每个分支的程序模块。主要的过程管理的键盘,系统初始化,传输各功能模块。长途线保持执行DS18B20的编辑任务。序号120点DS18B20是读通过键盘和显示器的协调到DS1225Y和编号。首先,无线模块设置为接收状态接收收集参数和启动顺序(传输内容包发送;相同的内容发送三次;两头在外的三个逻辑执行按位)。无线模块设置为睡眠状态,在在温度的转化率和转化状态数据传输。包装发送温度数据和DS18B20的数字上位机系统中。“收集和转换的部分开始的DS18B20转换,读取温度数据分组方法,数据存储等。

  1. 一种无线数据采集和传输系统的设计

在现代无线通信领域主要有一些技术为无线传输网络提供解决方法,例如:GSM,CDMA,3G,WI-FI。这些方法使得网络能够高效率和高质量的工作,但是成本很高。因此要低成本和在没有基础设备或者基础设施被破坏的情况下推广它们是很困难的。根据这种情况,数据采集和无线传输网络里的信息终端和无线收发模块的关键部件,是根据nRF905收发模块和51系列单片机的原理设计而成作为核心硬件,此外,结合目前自组无线网络的技术,可以构建一个短距离无线数据采集和传输网络,这个网络能够提供一个工作在ISM频段的低频率及高性能的数据通信系统。然后提出了一个对无线通信可行的解决方案,这个方案优势在于更强的实时响应,更高的可靠性要求和更小的数据量。

  1. 系统实现模型
  2. 系统模型

作为一个点对多点的多功能无线通信系统,它包含了一个中央监控系统和多个远程终端单元。实际上,远程终端单元是一些在移动过程中可以互相通信的移动电台。另外,中央监控系统与远程终端单元进行双向通信。

在下一部分,设计信息终端和控制中心的软件和硬件上的一些关键部件。

B.相关模型

本文中的系统是根据OSI 中的OSI/RM模型里的第一层物理层和第二层数据链路层设计的,如图二所示,物理层的功能是通过建立电路和专用芯片组完成的。然而通信协议里的数据链路层是由软件来实现的。

  1. 系统硬件设计

为了设计,管理和更新的方便,一些硬件单元和节点根据它们的功能和电学特性被划分成不同的模型。本设计以射频收发芯片nRF905为核心,以模块搭建设计为指导思想,搭建无线温度采集系统,系统主要由数据采集模块和无线传输模块组成。数据采集模块以数字式温度传感器DS18B20监测温度参数,并将监测的温度参数简单处理后通过nRF905无线模块发送到接收端口。无线数据传输模块通过nRF905芯片进行数据收发处理,nRF905芯片的集成度较高,所需的外围器件较少,因此整体的电路设计相对比较简单点。本设计给出其与MSP430F449的接口电路设计和接收端通过电平转换芯片MAX3232与PC机连接。并根据硬件特性及连接设计相应的软件流程,并编写软件。通过相适应的无线传输模块和数据采集模块控制软件的操控,保证整个硬件系统的流畅运作。系统基本结构中包含无线射频收发模块,控制处理模块,通用串行模块,数据缓冲存储模块以及多功能电源管理模块等。

控制处理模块

控制处理模块包含MCU和外部电路,有两个功能:一是使所有模块在其控制下协调工作,二是处理和传输从接口来的数据,例如路由处理,数据打包,验证和重传请求。

模块的关键部件MCU是51单片机,考虑到工业功能,WINBOND 78LE546因其在8位CMOS微处理器里较好的容量特性被应用,与2.4-2.5V的宽电压供电,256比特嵌入式RAM,16KB Flash EPROM 以及64KB地址空间,四个8位标准I/O接口,一个标准I/O双串行口相兼容。

SCM的晶体振荡器频率是22.1184兆赫兹,电功率为3.3V适合无线收发芯片里nRF905的逻辑水平。它的引脚通过与VCC相连受到保护并保持器稳定性。

  1. 系统软件设计

系统性能的真实取决于其有效性和合理的软件控制。软件设计是在硬件环境的基础上开发一个无限网络协议,为了达到设计目标,这个协议要有诸如数据传输,冲突避免,错误后重传以及超时重试的功能。整个网络由一个主机和许多分散的终端组成,每个终端必须有一个无线收发节点,整个无线网络的任何节点都有一个唯一认证地址对应一个唯一认证终端。为了方便起见,每个确定系统的终端无线收发器节点地址都是我们自己设定的4字节。

为了提高体统的稳定性,协议被设置成停止-等待模式。在数据链路层,发送过程大概如下:首先,数据源发送一个连接请求数据目标,得到数据源的响应后传输数据。接着,每一次传输都要等待接收方的回应。如果回应正确,另一次的传输才会开始。当所有数据传输完后,数据源将发送一个释放信道请求,当收到接收方的响应后传输结束。接收过程如下:在接收方给数据源响应后将收到的数据发送一个有效或无效的响应,直到收到拆除链路请求。接下来,保存数据且发送一个响应来技术整个过程。

  1. 系统测试

任何两个节点之间的通信大都可以通过点对点来测试,因此在系统测试过程中,A节点和B节点之间的通信模型对测试图解来说是一个很好的样本。

闭环测试电路是通过PC带双串口以及两个RS32口和通信节点A和B建立起来的。在一个终端,数据通过串口测试辅助工具“串口助手V2.2”发送,在另一端,监控着返回的数据。数据通过PC的串口A,RS32口发送,然后数据缓冲,最后成功到达终端无线收发器模块,然而,数据接收的过程是SPI串口,数据缓冲,然后RS32口,最后才是PC。在本文中,根据以收发器nRF905和51系列单片机作为核心硬件的原理设计一个低功耗高性能的无线数据通信系统,提出无线数据通信一个可行的解决方案,这个解决方案适合于强大的实时响应,高可靠性要求和小数据量,被广泛的应用于各种领域,例如:数据通信,环境监测和安全保卫系统。我们相信在软件设计进一步精炼和提高以后集成和智能通信协议将会实现。测试过程中,用数字示波器监测通信节点A、B,RS32口和SPI口的数据传输。在接下来的部分,通过分析来自MOSI/SCK和MISO/SCK的信息来验证系统的正确性。

  1. PTR2000

研究的目的是为了让人们了解单片机这方面的知识,及无线数据传输比传统的有线传输的优势和单片机的无线数据传输模块的基本组成,简单的工作原理。本文简单介绍了无线通信基础知识,如何选择适合的无线数据传输模块,并对无线数据传输模块PTR2000的结构和工作原理作了简要介绍,介绍了PTR2000与单片机连接的电路以及PTR2000与PC机端的连接电路。最终是为了实现单片机的无线数据传输,在传感器上实现数据的采集,然后传送到单片机上,PTR2000实现将待传数据信号制成射频信号。通过无线发送到计算机端的PTR2000,最后数据将在PC机上显示出来。无线数据传输的方便性、经济性是有线数据传输无法比拟的,但是无线数据传输的不稳定的缺点也有待改进,抗干扰不足也让其的推广、普及遇到了困难。

  1. AT89S52

AT89S52是一种低功耗、高性能CMOS8位微控制器,具有8K在线系统可编程Flash存储器。使用Atmel公司高密度非易失性存储器技术制造,与

剩余内容已隐藏,支付完成后下载完整资料


资料编号:[483760],资料为PDF文档或Word文档,PDF文档可免费转换为Word

您需要先支付 30元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图