基于嵌入式Web的温度测量与控制系统外文翻译资料

 2022-03-22 08:03

Temperature Measurement and Control System Based on Embedded WEB

Abstract

The Web-based Distributed Measurement and Control is becoming more and more prevalent in recent years. With programmable 1-wire Digital Temperature Sensor DS18B20, an embedded system is used as the field processing unit.With application mode of B/S, a remote temperature-measurement and control system is designed by embedded Web on embedded system. The experimental result shows that the system has high reliability and precision.

Keywords: Embedded WEB, DS18B20, Embedded system, HTTP, Internet

1. Introduction

Along with the rapid development of the technology of computer, network and communications, equipment test and control are gradually shifting from field test to the network, the original field operations are replaced by the distributional remote real-time control. As the Ethernet, the internet and the embedded system application technology starts to apply to the distributional long-distance real-time control field, embedded Web system has attracted increasing attention for its superior performance. The kernel of the embedded Web system is the embedded system, it operates not only for the field data acquisition, but also as the embedded Web server, tests the network by sending and receiving data to and from other equipments, realizing the distributional long-distance real-time control function. Compared to the traditional ways, it realizes wider usages, higher rates and more open to users, much easier to connect the system to the intranet and internet, therefore, the embedded Web system are recognized by more and more people worldwide.

A remote temperature measurement and control system directly to the Internet, we need a sort of gateway between temperature measurement and control system and the Internet. There can be many possible solutions to this problem, but these can be boiled down to the following three categories.

1) Field devices integrated with web server

One possible way of connecting field devices to the Internet is to fit an entire web server into the field device. But, most of the microcontrollers do not have enough computing power and memory for the web server.

2) PC as a gateway

Most of the field devices connected to the Internet are using PC or workstation as a gateway to the Internet. The devices send minimum required information such as the status of the sensor to the PC through it#39;s communication ports(usually RS-232) and the web server running on the PC collects the information from the device and makes HTML pages and sends the HTML page back to the web client requesting the page. But, the PC is too big and expensive to be used for this purpose.

3) Small network computer

Other way of connecting field devices to the Internet is using a small network computer, It is a small, inexpensive web server. But it is too expensive to be used for a remote temperature measurement and control system.The embedded system, which emphasizes on the applications, with the computer technology as its foundation, based on necessary software and hardware, realizes a special system with strict qualifications like high reliability, low cost, low power consumption. It is also the next generation of the computer technology, the communication,the semiconductor technology, the microelectronic technology, the sound/image data transmission technology and so on, so it can be widely used in many fields, like electrical appliances, industry, communication, national defense. In this paper the field temperature sensor is the programmable 1-wire Digital Temperature sensor DS18B20, the PHILIPS Corporation LPC2210 with ARM7TDMI-S core as its microprocessor, realizes the information interacts with the client by HTTP protocol, the user transmits the parameters and the request information by HTTP to the embedded Web server, and the server controls the sensor state according to the user parameters and the field temperature; at the same time, it returns the terminal data back to the browser, for the long-distance user monitoring, in this way it realizes embedded Web temperature control system with B/S structure. A sample has been carried out by this design, which meets all requirements and works perfectly.

2. Systems solutions and principle of work

The embedded Web server is located at the monitor field, the temperature sensor, heater stick and the LCD monitor and so on communicates with the embedded microprocessor I/O ports. The userrsquo;s browser goes on the Internet and to the embedded Web server. When itrsquo;s working, the user can login the embedded Web server, set the parameters on browser and can see the values of fieldrsquo;s temperature. In the field, the DS18B20 passes the data by I/O to the microprocessor, the microprocessor control the heating rod condition pursuant to the parameters and values of field temperature measured;all these data can be displayed on the LCD monitor, as well as the browser. In this way the long-distance temperature monitoring based on B/S structure is realized.

3. Hardware designs

For the hardware system structure, see Figure 2. On the hardware side, the embedded system uses the LPC2210 processor from PHILIPS Corporation with the ARM7TDMI-S core as its processor. The LPC2210 is a 16/32 ARM7TDMI-S CPU micro controller supporting real-time simulation and the embedded track. The application which was limited to strict code scale can still work by using 16 Thumb instructions to reduce the code scale by 30%, while the performance loss is actually very little. With low power consumption, several 32 bit timers, 8 Channel 10 bit ADC,PWM channels and up to 9 external interrupts, this microcontroller is particularly suitable for industrial control, medical system, network access control, etc. LPC2210/2220 can provide up to 76 GPIO by bus configuration. With a wide range of serial interfaces inside, it is also

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


基于嵌入式Web的温度测量与控制系统

引言

基于Web的分布式测量与控制近年来越来越普遍。同可编程1线数字温度传感器DS18B20,嵌入式系统被用作现场处理单元。通过B / S的应用模式,嵌入式Web on设计了一个远程温度测量和控制系统嵌入式系统。 实验结果表明,该系统具有较高的可靠性和精度。

1.介绍

随着计算机,网络通信,设备测试技术的飞速发展,设备的测试和控制正在从现场测试逐渐转向网络,原来的现场操作被替换分布式远程实时控制。作为以太网,互联网和嵌入式系统应用技术开始逐步应用于分布式远程实时控制领域,嵌入式Web系统也越来越注重其卓越的性能。嵌入式Web系统的内核是嵌入式系统,它不需要运行,仅仅用于现场数据采集,而且作为嵌入式Web服务器,通过发送和接收数据来测试网络实现远距离实时控制功能。相比于传统的方式,它给用户提供了更广泛的用途,更高的利率和更多的开放,而且它也更容易连接到系统内联网和因特网。因此嵌入式Web系统得到全球用户越来越多的认可。一个远程温度测量和控制系统直接连接网络,这其中我们需要解决网关之间联系温度测量和控制系统和互联网的问题。这个问题可以有许多可能的解决方案,但这些可以归结为以下三类。

1)与Web服务器集成的现场设备

将现场设备连接到互联网的一种可能方法是将整个Web服务器适配到现场设备中。但大多数微控制器对于网络服务器来说缺少足够的计算能力和内存。

2)PC作为网关

连接到互联网的大多数现场设备都使用PC或工作站作为Internet的网关。设备通过其通信端口(通常是RS-232)向PC发送需要的信息,例如传感器的状态。PC上运行的Web服务器收集来自设备的信息,并且将HTML页面发送回请求页面的Web客户端。但是,对于我们整个系统而言PC太过庞大,而且价格也很昂贵,不适用于我们的整个系统。

3)小型网络电脑

将现场设备连接到互联网的其他方法是使用小型网络计算机,这是一个小巧而又便宜的网络服务器。但是用于远程温度测量和控制系统太贵了。以计算机技术为基础的嵌入式系统强调应用必要的软件和硬件,实现具有高可靠性,低成本,低成本等严格资质的特殊系统能量消耗。它也是下一代计算机技术,通信,半导体技术,微电子技术,声/图像数据传输技术等,所以可以广泛应用于电器,工业,通信,国防等众多领域。在本文的领域温度传感器是可编程1线数字温度传感器DS18B20,具有ARM7TDMI-S内核的PHILIPS公司LPC2210作为其微处理器,通过HTTP实现与客户端的信息交互协议,用户通过HTTP向嵌入式Web服务器发送参数和请求信息,以及服务器根据用户参数和场温控制传感器状态;同时返回终端数据返回浏览器,用于远程用户监控,以这种方式实现嵌入式Web具有B / S结构的温度控制系统。样品已经通过这种设计进行了,满足所有要求和工作完美。

2.系统解决方案和工作原理

嵌入式Web服务器位于监控领域,温度传感器,加热棒和液晶显示器,所以它可以与嵌入式微处器的I / O端口通信。 用户可以通过浏览器在互联网上访问嵌入式Web服务器。 用户可以登录嵌入式Web服务器,在浏览器上设置参数并可以看到场温的值。 在现场,DS18B20将数据通过I / O传递给微处理器微处理器根据测量的场温参数和值控制加热棒状况;所有这些数据可以显示在液晶显示屏上,也可以显示在浏览器上。 以这种方式长距离的温度实现基于B / S结构的监控。

3.硬件设计

嵌入式系统采用PHILIPS公司生产的LPC2210处理器,该处理器以ARM7TDMI-S作为内核。 LPC2210是16/32ARM7TDMI-S CPU微控制器支持实时仿真和嵌入式跟踪。应用程序受限于严格的代码规模仍然可以通过使用16个Thumb指令来将代码量减少30%,而性能损失其实很少。具有低功耗,多个32位定时器,8通道10位ADC,PWM通道和多达9个外部中断,该微控制器特别适用于工业控制,医疗系统,网络访问控制等。LPC2210 / 2220可以通过总线配置提供高达76个GPIO。范围广泛的串行接口,也非常适用于网关,协议转换器和嵌入式软调制解调器与许多其他通用应用程序一样。网络芯片为RTL8019,液晶显示屏为SMG240128,可编程1线数字温度传感器DS18B20适用于温度数据采集,数据输入或输出的DS18B20只需要单行读/写,温度变换功率来自数据总线,主总线本身也可以在没有外部电源的情况下为DS18B20供电。很容易读取9-12的温度数字编程。嵌入式系统通过GPIO端口与传感器进行通信。

4.软件设计

实时操作系统为mu;C/ OS-II。 mu;C/ OS-II是一个完整的,便携式,可扩展,可ROMable,多任务,完全抢占的实时内核。大多数mu;C/ OS-II是高度写的便携式ANSI C,包含一小部分汇编代码,这使得OS可以移植到大量的程序中处理器通过修改其代码。 ZLG / IP是面向嵌入式系统开发的TCP / IP协议栈,由广州久力贡MCU开发有限公司开发,以及ZLG中层的重要成员琳琅满目。 ZLG / IP在互联网上提供IP交换功能,是嵌入式TCP / IP协议栈软件高性能。它通过mu;C/ OS-II实时操作系统实现并行重入多任务协议栈信号机制,完全由ANSI C编写,支持多种CPU作为mu;C/ OS-II。 ZLG / IP结构清晰,易于升级和修改。网络驱动向下连接网络,提供HTTP服务向上。温度数据由客户端浏览器的HTMLS之间的HTTP处理。

4.1mu;C/ OS-II端口

大多数mu;C/ OS-II都是用高度便携的ANSI C编写的,目标微处理器的特定代码编写在程序中语言。汇编语言保持最小化,使mu;C/ OS-II易于连接到其他处理器。例如,mu;C/ OS-II只能在读/写处理器或寄存器时以汇编语言工作。所以处理器必须满足以下要求:

1)处理器的C编译器可以生成重新输入代码。

2)它可以启用/禁用程序中断。

3)处理器支持中断,可以产生固定时间中断(通常在10Hz和1000Hz之间)。

4)处理器可以在硬件堆栈中保存一些数据。

5)处理器在还原/加载CPU寄存器/堆栈时具有堆栈指针和其他指令。

这一切都在LPC2210中实现。事实上,mu;C/ OS-II可能被认为是简单的多任务调度器。一些系统增加了与多任务操作系统相关的服务,其90%代码为C语言,可以直接使用C语言编译器移植到处理器。移植工作主要集中在多任务交换机上,因为这部分代码作品用于保存和恢复CPU场景,因此我们不能使用C语言汇编语言要完成。 mu;C/ OS-II被移植进程,需要与ARM架构相关的3个文件,与OS_CPU.H中的相关代码与处理器和编译器相关的汇编代码在OS_CPU_A中处理器,OS_CPU_C中的6个功能与mu;C/ OS-II有关。

4.2 HTTP服务器的实现

HTTP协议是TCP / IP协议之上的应用层面向对象协议。 HTTP协议是标准Web应用程序协议,由Web服务器用于与浏览器通信。 HTTP已经规定了标准传输和处理请求方式,传输消息格式和控制信息。 HTTP协议有两个功能,用于传输文件和交互。 HTTP协议是基于请求/回复机制的客户端请求服务器,服务器将文件对象返回给客户端响应。每个HTTP交互都是以这种方式从客户端到服务器,然后作为响应而退回。该形式的HTTP请求非常简单,请求和响应都用简单的ASCII码表示。服务器响应客户请求,服务器解析客户端请求,然后按照相应的行为进行操作并向客户端发送响应。响应窗体类似地非常简单,包括状态代码指示请求成功(例如,如果不成功,将显示原因)和对象集。之后,服务器然后将传送任何数据请求。数据传输后,服务器完成此连接。作为Web服务器应用程序,HTTP协议主要解决客户端请求;这里我们实现了简单的HTTP协议,主要分析GET方式,从而可以从客户端获取参数和请求,然后返回HTML表单中的信息到客户端浏览器上。 HTTP协议高于TCP / IP协议; TCP / IP协议是面向连接的。 TCP协议规定,在数据传输之前,TCP连接必须使用建立过程来建立两个节点之间的连接。连接成功后,继续进行数据传输。 TCP连接中断处理也必须用于连接终止。该SOCKET连接是TCP / IP API。我们在这里采用TCP通信。 TCP编程分为两个种类,服务器方式和客户端方式。服务器方式需要监听连接,只能处理数据建立与客户端的连接。客户端方式是主动连接服务器,并处理数据建立连接之后也是如此。 ZLG / IP提供标准BSD插座。套接字编程与客户端/服务器机制。

客户端与服务器之间的关系不是不对称的。服务器首先启动,然后自己启动客户端请求在一段时间内,服务器被动地回复。客户端程序首先调用socket(),这个函数生成套接字对于各种子系统连接,以及每个连接的一个ID号,然后初始化一个套接字连接,设置它ID号以及服务器端IP地址和端口号,并将其作为函数connect()的参数,调用connect()函数主动连接服务器端。客户端和服务端之间建立连接后,可以发送(写入)或接收(读取)数据。

4.3数据采集

现场温度传感器是可编程1线数字温度传感器DS18B20,它连接到一个GPIO引脚LPC2210。 LPC2210通过此引脚命令并接收温度值,处理数字滤波器和二进制数转型。 DS18B20将直接输出温度值为数字,它只有三个有效引脚:DQ(数据),VDD(电源)和GND。 DS18B20以5K上拉电阻读取和发送DQ线中的信息。它可以在没有电源的情况下运行,也可以连接到VDD线中的一个3v至5.5v电源。 DS18B20有ROM和内部RAM,在其ROM中恢复独立的序列号,因此许多DS18B20可以工作在同时在公共汽车上通过单总线访问DS18B20的过程如下:初始化DS18B20,然后写ROM操作代码和存储器操作代码,最后读取数据。根据DS18B20初始化时序,写时序和读时序,我们分别编写3个子程序:Init_DS18B20作为初始化子程序WriteOneChar()作为写(order或data)子程序,ReadOneChar()作为读子程序,所有数据读写从最低位开始。

4.4实验结果

关于基于嵌入式Web的温度测量和控制系统,实验互联网表明,其测量精度和控制速度符合要求,具有操作性温度范围为-55°C至 125°C在-10°C至 85°C范围内精确至plusmn;0.5°C。

5.基于CAN总线的温度测量系统

控制器局域网(CAN)是汽车行业的有效选择,由于其简单,成本低,布线密度降低,并且提供具有单个布线对的多个节点的连接。本文旨在描述具有控制器局域网(CAN)总线的基于ARM 7 LPC 2129的温度测量系统。本文的目的是构建CAN总线节点之间通信的硬件方案。已经建立了通过CAN总线连接的节点到节点通信链路,以观察和控制在CAN总线上传送的温度值,并将命令信号发送到另一个节点上。硬件板被设计为能够支持高达1Mbps的高速比特率。 CAN通信模块可以在CAN协议之后发送或接收数据。借助所使用的软件,系统中的ARM 7控制器的节点可以清楚CAN-BUS通信。该软件部分使用Embedded -C完成在KEIL microvision-4中。

控制器局域网(CAN)是一种多主机串行数据总线,使用载波侦听多路访问/冲突解决(CSMA / CR)来确定访问.AN被设计为一种简单而强大的广播总线,能够以最高1 Mbit / s。CAN上的消息传输由4种不同类型的帧控制:数据帧,远程发送请求(RTR)帧,过载帧和错误帧。每个CAN数据帧都需要具有唯一的标识符。标识符可以是11位(标准格式)或29位(扩展格式)。

除了简单地识别消息之外,标识符用于两个目的。首先,使用标识符作为优先级,以确定在下一次传送对于总线的那些消息中的消息。第二,接收机可以使用标识符来过滤掉他们不感兴趣的消息,从而减少接收机主机控制器上的负载。在本文中,我们更侧重于数据帧和远程帧,用于从另一个节点请求数据。

标识符的优先级在总线访问期间定义静态消息,而CAN协议中的仲裁告诉我们,当总线空闲时,任何节点都可以星号传输消息,如果多个节点同时开始发送,则总线访问冲突由使用标识符进行逐位仲裁。如果同时启动具有相同标识符的数据帧和远程帧,则数据帧优先于远程帧。CAN物理层支持称为主(“0”)和隐性(#39;1#39;)的两种状态。如果两个或多个CAN控制器同时发送,并且其中至少有一个发送“0”,则总线上的值将为“0”。该机制用于控制对总线的访问以及信号错误。 CAN协议要求节点等待,直到在尝试发送之前检测到总线空闲时段。如果两个或多个节点同时开始发送,则通过监视总线上的每个位,每个节点可以确定是否发送最高优先级消息(具有数字较低的标识符),并且应该继续,或者如果应该停止发送并等待下一个公共汽车空闲时间再次尝试。由于消息标识符是唯一的,所以发送标识符字段的最后一位的节点,

没有检测到它没有发送的“0”位必须发送具有最低数值的消息,因此在仲裁开始时准备好的优先级。然后,该节点继续传送其消息的其余部分,所有其他节点都已退出。节点要覆盖隐性位,发送节点检测到这种变化,限制了CAN总线的物理长度和速度的组合。每个位的持续时间必须足以使信号传播网络的长度。这将网络的最大数据速率限制为1Mbit / s,长达40m,对于500m长的网络,可将其限制在125Kbit / s。 CAN采用的仲裁机制意味着发送消息,就好像网络上的所有节点共享一个基于全局优先级的队列一样。上述高级描述是CAN的时序特性的一个简化的视图。 CAN不具有时间的全局概念,而是每个CAN控制器通常具有其自己的时钟,其在协议规定的容限内可能相对于其他节点的时钟而漂移。

因此,CAN协议要求节点在每个消息传输上重新同步。具体来说,每个节点必须与由第一个节点开始发送的帧位开始的前沿同步

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


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

原文和译文剩余内容已隐藏,您需要先支付 30元 才能查看原文和译文全部内容!立即支付

以上是毕业论文外文翻译,课题毕业论文、任务书、文献综述、开题报告、程序设计、图纸设计等资料可联系客服协助查找。