Font Size: a A A

Design And Implementation Of Base Station's Software In The Remote Gas Meter Reading System

Posted on:2011-05-28Degree:MasterType:Thesis
Country:ChinaCandidate:L CongFull Text:PDF
GTID:2178360305954631Subject:Bioinformatics
Abstract/Summary:PDF Full Text Request
With the development of commercial housing, the number of gas users is also increasingly rapidly. The traditional manual meter reading means is a waste of human resources and inefficiency, besides there are security risks in the acts of coming in meter reading. So the traditional manual meter-reading method has apparently not to meet the gas management. However, there are serious defects in the existing methods of remote meter reading, such as IC card pre-charging mode, power line carrier methods and remote infra-red mode, so there is an urgent need for a low-cost, low-power, high-efficiency intelligent remote meter reading system.In recent years, wireless sensor network (WSN) technology has developed quite rapidly, more and more research institutions and companies involved in WSN for research and product development. Wireless sensor network is composed of a large number of sensor nodes, these sensor nodes communicate via radio frequency to form a multi-hop's self-organizing network system. Each sensor node has the ability to perceive the surrounding environment. Although data processing capability of a single sensor node is not strong and the transmission distance is very short, all the sensor nodes collaborating with each other could form a huge communications network. Some of the advantages of wireless sensor networks, such as low-cost, low power consumption, network self-organization, very good real-time, which precisely meet the needs of the gas meter networks. So it is an inevitable trend that WSN technology will be applied to gas meter reading system.In this paper, WSN technology is applied to the gas meter meter-reading system and the gas meter WSN based remote meter reading system is designed, which consists of three components: gas meter terminals, base station and data management platform. Each gas meter terminal is the equivalent of an ordinary sensor node, which is responsible for gas users real-time collection of data, and cooperate with each other to form networks, then transmit real-time data to the base station. Base station is equivalent to the Sink node in wireless sensor networks, which is responsible for receiving the data uploaded by gas meter terminal and forwarding the data to the data management platform; In the same time, base station is also responsible for receiving command from data management platform, and forwarding the command to the corresponding gas meter terminal. Data management platform is a piece of software used in a gas management, which is responsible for storing and handling all the data of gas users, sending delinquent or a gas leak or other notice and sending a command to gas meter terminal.This paper is mainly responsible for the design and implementation of base station. Base station plays a very important role in throughout the gas meter reading system, which is a bridge connecting gas meter terminals and data management platform. Base station requires not only wireless WSN communications to gas meter terminals, but also wired Ethernet communications to data management platform. From this perspective, base station is the equivalent of gateway, which is responsible for network switches between wireless sensor networks and Ethernet.Taking into account the capability of base station's data processing and communications, combined with cost control, Samsung's powerful ARM9 family processor S3C2410 have been selected as the core processors of base station. On this basis, the following main functional devices are configured: 64M NAND Flash, 64M NOR Flash, Ethernet interface, RS232 serial port, 2.4GHz wireless communication module, LCD liquid crystal display and USB interfaces. We use Texas Instruments Inc. CC2420 as the wireless communication module of base station, which is a 2.4GHz RF transceiver chip in line with IEEE802.15.4 standard. In the communication process its data transfer rate is up to 250kbps and straight transmission distance is about 150 meters.In order to shorten the development cycle, in this paper Windows CE is selected as base station's operating system. Windows CE is an excellent real-time embedded operating system, which is characterized by a high degree of modular, customizable, scalable, multi-threaded, multi-task and fully preemptive. These features are just essential for doing embedded development in the strict resource constraints hardware. In addition, Microsoft Corporation provides the Platform Builder development, a powerful tool for system customization, and Embedded Visual C + +, an easy-to-use software development tools. Microsoft Corporation also provides developers with a wealth of technical documentation. All of these will bring great convenience to project development and development cycle will be shortened.In this paper, design and implementation of base station's software is the most important. Classified by function, the base station's software can be divided into four modules, namely, the Internet communication module, WSN communication module, the buffer pool modules and WSN network management module.Internet communication module is responsible for the network communication between base station and data management platform, including forwarding data to data management platform and receiving all kinds of commands from data management platform. In this paper, socket, client / server model and multi-thread technology are adopted to implement network communications. Two classes are encapsulated for socket communications, respectively, class Server and class Client. Multi-threading technology can improve the response speed to a certain extent, which can also make full use of CPU resources to achieve concurrent results in the case of multi-core.WSN communication module is responsible for information exchange to gas meter terminal, including reading and parsing various kinds of information from gas meter terminals, responding gas meter and send command and time synchronization messages to gas meter terminal. CC2420 driver program of base station is first to obtain all kinds of data uploaded by gas meter terminal. In Windows CE interaction between application and driver is implemented through the file system. Windows CE applications can communicate with the gas meter terminals through the two file system API, ReadFile () and WriteFile ().WSN communication module can be divided into WSNService and MessageHandler by function. WSNService is similar to class Server of Internet communication module which is also implemented with multi-thread technology. Its service thread is always listening to WSN networks, whenever a data arrives, the service thread will be derived from a worker thread to handle data. Service thread itself is only responsible for listening the WSN network, does not deal with the data. MessageHandler, a parser working in the working thread, is responsible for parsing and distributing a variety of WSN network messages.Buffer pool module is responsible for caching/buffering the data, which is temporarily unavailable to send due to network fault or too late to send the data and information. The buffer pool is implemented by list. When the buffer pool is full, its older data will be deleted and its younger data will be saved according to the timestamp.WSN network management module is mainly responsible for organizing meter terminal network management, network behavior management, gas meter network topology management, time synchronization for all gas meter, and gas meter network communication cycle control. WSN Network Management module focuses on two protocols, namely the routing protocol, time synchronization and sleep scheduling protocol. Routing protocol for wireless sensor networks are strong application related. In this paper, taking into account characteristics of gas meter network communications, a simple and efficient routing protocol is implemented, which is an improvement of active routing protocol. In accordance with the routing protocol, all the gas meters will be organized a tree topology, and base station is the root of the tree. Each node in the tree can only have one parent node. Sleep scheduling protocol is to enable the gas meter terminal be dormant not at work and wake up at work, which can greatly reduce the energy consumption of gas meter terminals to extend the service life of dry batteries. Time Synchronization Protocol is to enable all the gas meter terminals have the same clock as base station, so that the base station will lost their control of gas meter terminals because of their sleep. This is why sleep scheduling protocol must be used in conjunction with the time synchronization protocol.After several months of trial operation, both in the Internet communications and WSN communications base station had a good and stable performance, which achieved the desired design goals.
Keywords/Search Tags:Remote Meter Reading System, Wireless Sensor Network, Base Station
PDF Full Text Request
Related items