Remote Automatic Meter Reading System Based on Serial Port Communication

xiaoxiao2021-03-06  42

Remote automatic meter reading system based on serial port communication: Wang Peng abstract: the scheme of remote meter reading system, the composition, hardware configuration, software design, working principle, function, and technical performance are discussed. The system collects and organizes data by the lower machine (MCU) and the wireless transmission and receiving module (PTR2000), and the data is collected by the serial port by the MODEM module and the host computer, water, electricity, gas company collects data through the host computer (PC), and realizes remote wireless automatic automatic. The function of the meter reading. Introduction In people's daily life, water, electricity, gas is an essential life guarantee, but for water, electricity, gas supply companies, each month, the three table reading of each user is very heavy. Work, you need to put a lot of manpower and material resources. Many companies are now studying automatic meter reading systems, but they usually use a telephone line or a special line to perform communication with the host computer, and the cost is relatively high. See References for reference [3] [6] [7]. In this case, the author designed a remote wireless automatic meter reading system. Automatic meter reading system, referred to as ARMS (Automatic Reading Meter System), is supplied to water, electricity, and gas departments will be installed in the amount of water, electricity, and gauge recordings recorded by the user. Summary, transmission, and computer system The business sector replaces the artificial meter reading and a series of subsequent works. The system's wireless communication is a GSM short message service, and its implementation is the first step towards home automation and helps to improve the modernization of hydropower system management. The system has two main features: one of its system data collection points, thousands of tens of thousands of data; its second system is a widely covered communication network, and the collection point has dispersion. For the system requirements, on the one hand, low, economic affordable, and on the other hand, the collection of data should be accurate and timely, and there must be a certain environmental adaptability and anti-interference ability. With the development of modern electronic technology, communication technology and computer technology have rapidly develop, and the combination of both has further evolved many new communication methods and communication systems, providing possibilities for ARMS implementation. This avoids the disadvantages from the copy table meter reading, the province has the embarrassing problem of the on-site meter reading, and there is a great convenience of the company and users, with good market prospects. Especially in large and medium cities, the system has a wide range of promotional value. 1. Composition and working principle system of the system: data acquisition part; data transmission, wireless communication section; data reception, processing section. Working principle: The data acquisition device first collects three table readings through the sensor, and stores the acquired data into the single chip (AT89C2051); the single-chip PTR2000 (sending data), the PTR2000 (receiving end) of the user concentrator through the wireless communication module Receive the transmitted data, the lower computer mainly completes the function of collecting data, storing and hosting the same host, which is connected to the GSM / MODEM, with the public network (GSM), through telecommunications public network transmission data. With the construction and development of GSM mobile communication network, mobile communication network is increasingly complex, and the coverage area is also increasingly wide. Therefore, the transmission of data by the GSM mobile communication network has also become a new data transmission means. GSM / MODEM sends data via a short message service of GSM. PC (host machine) is generally located in the company's business office, which is responsible for the entire system management, it collects data, then organizes, stores, displays the received data, and calculates the cost of each user needs to pay. It is also advantageous to print the user's usage curve, which is advantageous to implement the seasonal electricity price, the time-time electricity price, and use economic lever to achieve peaks, which can save energy for the country.

The composition structure of the system is shown in Figure 1: The composition structure schematic of Figure 1 system (click on the map)

Economic Analysis: The maximum capacity design of this system is 1,000. It is specified that a piece of data is collected every 100ms, and 600 data can be collected a minute. Ordinary meter is 2400 rpm, and 20 pulses in 20 pulses per acquisition device are acquired. The data collected every ten minutes accounts up to 1 byte. Each purchase data is collected by increment. The increment of three tables accounts up to 3 bytes, so 600 data accounts up to 2k bytes, each The minute is collected, the collected data is stored in the RAM of the AT89C51, organizes, packaged, one time every ten minutes. Since the amount of electricity gas at night is relatively small, the packet sent at night is a space, which is wasting the time to occupy the communication channel. Therefore, in the software design, the percentage transmission is used, that is, the data acquired by each collected must be transmitted, and the peak period of up to 12 hours a day is sent once every ten minutes. Based on the GSM short message service is mainly determined by the processing capability of the short message service center and the carrying capacity of the wireless signaling channel, each short message is limited to 140 eight groups (7-bit encoding, 160 characters) No more than 140 bytes. 3K data is collected every ten minutes, and 22 short messages need to be sent, and approximately 50,000 pieces are sent each month. According to Xi'an SMS fees, 2-50,000 / month's cost is 2000 yuan / month. Average 2 yuan / month. So the system is very economical. Moreover, the host computer collects the data every ten minutes, so that the user can be acquired in time in the peak period of time, and print it out. 2. Hardware configuration 2.1 data acquisition, sending part of the water meter is to convert the raw water meter count gear pointer into a band magnetic pointer, and then use the sensor to perform data acquisition; the gauge must be used with signal output; the electric meter must use pulse electronics The power meter, the device for the electric meter pulse output is optocoupler, has a good isolation. The data acquisition device is mounted with the user's electric meter, in order to prevent the user's sudden power outage, the acquisition device must be mounted on the front end of the air switch. The meter can be measured by counting pulses, and the counting pulse of the electrical collection head collects the meter, the dial is transferred, and the photoelectric acquisition hair has a pulse, and the P1.0 of the input P1 port is stored by the AT89C2051. Then send data through the PTR2000 module. The PTR2000 module is ultra-small, ultra-low power consumption, high rate 19.2K wireless transceiver MODEM. Using the most advanced European "Bluetooth Technology" application of all digital technology, it is combined by a single IC, and the receiving emission is 1, the operating frequency band is 433-434MHz, the air transmission data rate is 19.2kbps, the operating voltage is 2.7V -5.25V, using FSK modulation, strong anti-interference ability, standard DIP pin spacing, more suitable for embedded devices. When the PTR2000's TXEN pin is high, it is in a launch state; when the TXEN pin is low, it is in the reception state. When designing the hardware, TXEN is connected to the P1.1 foot of the AT89C2051, and the PTR2000 is controlled by software. The schematic diagram of the circuit is shown in Figure 2. Figure 2 Data acquisition, transmission device circuit schematic (click on the map) 2.2 Data receiving and remote wireless communication PTR2000 receive data and stored in AT89C51, ROM and RAM are used to store programs and data, respectively, data at the time. In the storage area of ​​the corresponding period, the time interval is 10 minutes. The data of the same period of different dates is only accumulated in the corresponding storage area. The acquisition device has a maintenance-free power supply to ensure that the data and reception are possible after power failure, and execute the command of the host computer. The AT89C51 implements wireless communication with the host computer via the serial port with the wireless MODEM.

GSM (GLobal System for Mobile Communication) is the most mature, perfect, and widely used system based on time division multi-site mobile technology. my country has currently built a national GSM digital honeycomb mobile communication network, which is the main way of my country's public land mobile communication network. GSM's short message service SMS (Short Message Service) is the main telecom service provided by the GSM digital cellular mobile communication network as the voice transmission and fax, which is transmitted through the wireless control channel, which is unique to the GSM communication network. The business center completes the storage and forwarding function, it does not have to set up the connection, directly sends the information you want to send to the short message service center, and then send it to the final bandkeeration by the short message service center. This is adapted to send each collected data to the monitor center. The control channel for transmitting a short message service is a dedicated control channel (DCCH). See the reference [6] for details. The short message service allows the network to know if the called party has received a short message. If the transfer fails, the called party does not answer the exact message, and the network will retain the message transmitted. Once the network discovers the called party to be called At the time, the message can be researched to ensure that the called party can be received. Therefore, the short message service is a major telecom service in the GSM network, and its transmission is reliable. In summary, this system uses GSM's short message service to implement remote wireless data transfer is feasible. The emergence of GSM modem (GSM / MODEM) has changed the traditional communication means of voice-oriented communication, opening GSM network data communication and its application. It provides an RS232 data interface that uses AT Heith's instructions that meet ETSI standard GSM0707 and GSM0705. The GSM / MODEM of this system uses the GSM / MODEM module of French Wavecom. See the reference [5] circuit schematic diagram Figure 3 Figure 3 Data receiving, wireless communication circuit schematic Figure 2.3 Data processing section The host machine transmits data transmitted by the lower computer through the DDE interface to the Excel worksheet, defined in Excel Report format, metering format, and save files in template format, after the meter table is completed, the system can automatically fill in the corresponding specified cell, automatically calculated by Excel, converted into KWH values ​​and calculates the fees. Print on the upper computer, display the user's water, electricity, tampuring fees, and various reports and load curves. When the user load is over-limited, the alarm signal is issued, and the remote command is decided to make a power-off process for the user according to the company's provisions. It is also possible to calculate the cost of each period, providing a reliable guarantee for the implementation of a total charges for the power sector. Moreover, in order to ensure the security of data storage, the host machine (PC) uses a dual-hard disk to perform data backup, the system has a backup power supply, and it can maintain a normal working state after power outage. The reserve power supply ensures that the system works normally more than 36 hours in the full load working state. If the power failure is longer, the system will not perform data acquisition, but the original data will not be lost, and the power is required to re-verify the data, update the settings The data stored in the middle of the concentrator. 3. Software Design Since the system uses a point to multi-point two-way data transmission, each table has its own address code. The host computer can query the lower computer, and the lower computer can also send data to the host computer. The purpose of this system is to achieve a multi-machine (upper machine) communication control, and its communication software is mainly divided into two parts: the remote communication software of the host computer and the lower computer; the single-chip microcomputer and the string of GSM / MODEM Wire communication software. See Refigui [2] for details. The key to programming is the accuracy of remote communication between the next time. In the programming, the communication protocol is used, and the read watch instruction and address code are sent by the host computer, allowing each lower computer to pass the recorded data, and perform the verification to ensure the correctness of the data.

转载请注明原文地址:https://www.9cbs.com/read-51640.html

New Post(0)