Font Size: a A A

R&D Of Embedded Web-based Bridge And Monitoring Unit

Posted on:2010-08-02Degree:MasterType:Thesis
Country:ChinaCandidate:J YangFull Text:PDF
GTID:2178360272996836Subject:Circuits and Systems
Abstract/Summary:PDF Full Text Request
With the rapid development of the embedded system and network technology, sharing of information increases quickly. There are a lot of embedded devices in people's daily work and living environment .How to make use of Internet-related technology in the embedded devices, so that people can quickly and easily query and publish all kinds of information, and achieve the remote monitoring of embedded devices, has become to be the focus of the industry's concern. It is possible that Web server runs on embedded systems because of the development of embedded technology. Through Web browser, users can config the remote equipment, or report working conditions of equipment by the Web content.In most applications, the equipment to be monitored was not single, but a lot of equipment in the large scale. If using a separate embedded Web server for remote monitoring, the scope of the scene controled is limited. It can be considered that connecting the devices needed to be monitored to a network by bus at scene, and then connect the network to the embedded Web server. RS485 bus becomes the first choice for control, because of the advantages of its good anti-noise interference, long transmission distance and capacity of multi-station on the industrial site. The equipment which needs to be monitored is formed into a RS485 communication network by RS485 bus, at the same time embedded Web server works as the RS485 host station. The embedded Web server will complete data's transmission between the Internet and RS485 network, to assume the functions of the bridge.The research and development of Web-based embedded bridge and monitoring unit, completed research of key technologies in a remote monitoring embedded system. The goal is to design embedded Web server and the master-slave RS485 communications networks. Embedded Web server should be able to make real-time response to client requests; Master-slave RS485 communications network should be able to achieve that the master machine can access the slaves at any times, and send control commands to the slaves, as well as obtain status report from the slaves. In this paper, the unit is to be researched and developed both as a Web server, and as the master of RS485 communication network. Data from the Internet will be sent to the RS485 network nodes here, at the same time data from RS485 network nodes will be made to a summary here and sent up to the Internet.According to the structural framework of the design unit, the options of each part of the framework of structure are listed. After comparing their advantages and disadvantages, the ultimate hardware is combination of LPC2136 + ENC28J60 + MAX485. The design of the software modules used to achieve embedded real-time operating systemμC/OS-Ⅱwith the TCP / IP protocol designed for embedded systems -- OpenTCP protocol stack. After determining the program, the embedded bridges and Monitoring Unit will be completed in three steps: hardware design, software design and debugging and testing machine.Hardware design includes the minimum system design of ARM7 processor LPC2136, interface design of Ethernet controller ENC28J60, RS485 interface design and the design of input and output modules. In minimum system, the power module, the clock module, reset and downloading and debugging module are designed. ENC28J60 is an independent Ethernet controller with 28 pins and SPI interface, which built a 10 Mbps Ethernet physical layer device (PHY) and media access controller (MAC), and a programmable 8KB buffer. The hardware design of ENC28J60 needs to consider several aspects, like reset circuit, clock oscillator, oscillator startup timer, clock output pin, pulse transformers, terminals and other external devices, input / output. RS485 network is designed as a multi-master-slave, half-duplex communications network, RS485 interface uses the LPC2136 Serial 1 and Driver IC MAX485 chip is used.In the design of the software, embedded real-time operating systemμC/OS-Ⅱwas successfully transplanted into the design unit. Transplantation is completed in four main steps, respectively, OS_CPU.H, OS_CPU_C.C, OS_CPU_A.S three transplant-related documents's rewriting, and deal of the clock and interruption of the system. Specific job is to modify the compiler data types, stack initialization function OSTaskStkInit (), soft interrupt response function, task switching procedures and handling of the clock. In order to achieve embedded Web server, we must first achieve Ethernet network communications. The Ethernet controller of the design is ENC28J60, driver programme ofEthernet controller ENC28J60 includes basic register reading and writing functions, initialization function, as well as functions receiving and sending network data packets.Used in the design ,TCP / IP protocol stack OpenTCP needs to make interface of OpenTCP protocol stack with the drive function of ENC28J60 together to achieve OpenTCP protocol stack's transplant in this design.Embedded Web server works: the client browser sends HTTP page requests; after receiving requests, embedded Web server will decode the contents of the requests to analyze and respond to the corresponding procedure call response to the request, through the TCP connection embedded Web server send the requested Web page to the client. Commonly used in HTTP request message is divided into GET and POST type, GET request to the server type is only one page, and POST-type request will be sent to the server parameters. By the network packet capture tools Sniffer, corresponding message are captured , and we explain the meaning of the content of request message and response message.Using Hyper Text Transfer Language (HTML) to make embedded Web server pages, we tell how to make simple web pages. Enhance and improve the function of web pages,to realize dynamic web pages of displaying real-time data and the data submitted in response to the user for the interactive function.Now function of embedded Web server is realized.RS485 communication using the serial port on the LPC2136 processor, thus we need to prepare for the serial port driver, and design communication protocol of master-slave RS485 network. The protocol is to achieve that orders from the client can be sent to the corresponding RS485 nodes, and that data from RS485 nodes in the summary can be sent to the client up.One side of the bridge network, linked to the Internet, is the embedded Web server providing Web services; the other side attached RS485 communication networks, it is the master of RS485 communication network to communicate with other nodes.It implements data transmission between the two networks, as well as Web-based monitoring capabilities.
Keywords/Search Tags:Web Server, Embedded Bridge, ENC28J60, OpenTCP, RS485 Network
PDF Full Text Request
Related items