Design and implementation of wireless meter reading system for gas meters

Publisher:AngelicHeartLatest update time:2016-10-25 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
0 Preface

  With the expansion of cities and towns and the development of economy, the use of natural gas has become more and more widespread. The scope of natural gas use is also getting wider and wider. If the traditional manual door-to-door meter reading method is adopted, a lot of manpower and time will be wasted. Therefore, most of them adopt remote meter reading. The commonly used communication methods of the current remote meter reading system are: RS232+PSTN communication, power carrier communication, GPRS wireless data transmission, etc.:

  (1) Using RS232+PSTN networking communication: The line connection time is long, the real-time performance is not enough, and when the number of concentrators is large, many telephone lines are rented, and the cost is also considerable. It is not suitable for large-capacity systems;

  (2) Communication via low-voltage carrier wave: This method is susceptible to interference from grid harmonics, electromagnetic signals, and pulse signals, resulting in code errors and code loss, and low data transmission reliability.

  (3) GPRS wireless data transmission: The wireless module is expensive and difficult to promote from an economic point of view.

  Since residential areas are relatively concentrated now, this paper designs a remote wireless meter reading system for gas meters, which has the advantages of low complexity, low cost, low power consumption, good real-time performance and reliability, and easy maintenance.

   1 Overall design of the system

  This system consists of three parts: smart gas meters installed in users' homes, hand-held meters for meter readers, and central management system. When reading the meter, the central management system downloads the information of each gas meter to the hand-held meter reader, and the meter reader holds the hand-held meter reader and transmits the information of the gas meter to be read to the corresponding gas meter wirelessly. When the gas meter completes the required function processing, it transmits the meter reading information back to the hand-held meter reader. The central management system obtains the meter reading information through the hand-held meter reader, and the management personnel use the management system to analyze and process the meter reading information.

  The main functions of the system[1]: remote checking of gas meter data, control of gas meter switch valves, metering, recharging, charging and management system report printing, automatic diagnosis of gas meter failures and notification to management personnel, power management, etc. The system is flexible to expand and easy to maintain.

  The main goals of system design are:

  (1) Data transmission distance is long: Since most of the current user residences are in residential areas, gas meters are installed in a relatively concentrated manner. Meter readers can read the gas meter information of the entire community at a certain point in the community.

  (2) Low overall system power consumption: The system is powered by batteries, so both the hand-copier and the gas meter are required to have low power consumption to extend the battery life.

  (3) High reliability 

  2 system hardware design

  2.1 Wireless Communication Module

  The hand-held device and the gas meter share the same wireless transceiver module, CC1100. CC1100 is a low-cost, truly monolithic UHF transceiver designed for low-power wireless applications. It is based on Chipcon's SmartRF technology [2,3] and is manufactured using a 0.18um CMOS process. It can programmably configure the data transmission rate up to 500kbps. It is small in size and requires relatively simple peripheral circuits. The typical application circuit includes three parts: RF input and output circuit, crystal oscillator circuit, clock circuit, and interface circuit with a microcontroller. Through the 6-wire (SLCK, SO, SI, CSn, GDO0, GDO2) SPI, the chip configuration, status reading, and buffer data reading and writing operations can be realized. It supports ASK\OOK, FSK, GFSK, MSK and other modulation modes and has high sensitivity. It provides extensive hardware support for data packet processing, data buffering, burst data transmission, electromagnetic wave excitation, connection quality indication, etc., and also has built-in hardware CRC check function and point-to-multipoint communication address control function.

  2.2 Gas meter hardware design

  The hardware structure of the gas meter is shown in Figure 1, where EM78P153S is the processing unit. EM78P153S has the characteristics of low power consumption, strong anti-interference ability, and fast processing speed. EM78P153S receives commands from the hand-copier through CC1100, transmits the commands to the gas meter for execution, reads the data returned by the gas meter, and then transmits the data back to the hand-copier through CC1100. TPS61020 is a voltage-stabilized power supply that provides a stable voltage for the system and has a low-voltage indication function. The processing unit can send an alarm message to the user based on this indication.

Design and implementation of wireless meter reading system for gas meter - The lonely shepherd - Embedded Network Life

 

  2.3 Hand copy machine hardware design

  The hardware structure of the hand-copier is shown in Figure 2, where M430F413[4] is the processing unit, AT24C is the storage unit, ST7920 is the LCD display unit, and CP2102 is used to connect the hand-copier to the management system. M430F413 is a powerful 16-bit microcontroller with ultra-low power consumption. A large number of peripheral devices are integrated into the chip. When running under 1MHz clock conditions, the operating current can be between 0.1?A and 300?A (3.3V) depending on the operating mode, and the operating voltage is 1.8V to 3.6V.

  The AT24C series is an EEPROM that complies with the I2C bus specification. The wiring and software design are relatively simple. Two such devices can be connected on the same bus. The rate can be passively adjusted, and the data will not be lost after power failure. This system uses AT24C1024 to store word libraries and AT24C4096 to store user meter reading information. CP2102 is a data conversion chip between USB and UART. Through CP2102, data can be transmitted between the USB interface of the management center and  the serial interface of M430F413 .

   3 System software design

  3.1 System software flow
  
  The administrator first downloads the user information to be read to the hand-held reader, and the meter reader holds the hand-held reader to read the meter. When the gas meter receives the wake-up code, it continues to receive command frames. When the gas meter does not receive any command within 2 seconds, it will sleep; if it receives a command frame, first check whether it is a meter reading address command. If so, directly package the address of this meter and send it back to the hand-held reader. If not, check whether the received address is the address of this meter. If not, it means that it is sent to other meters, and continue to receive until 2 seconds are up; if so, send this command to the gas meter for execution and read the execution result. Finally, package the read result and send it back to the meter reader. The processing flow is shown in Figure 3.

Design and implementation of wireless meter reading system for gas meter - The lonely shepherd - Embedded Network Life

 

  3.2 Wireless Communication Design

  CC1100 configures its functions through SPI programming. In this system, in addition to its common functions, such as channel listening, synchronization word detection, address matching, etc., its built-in hardware CRC check and WOR functions are fully utilized. When CC1100 sends data, the processing unit first sends the data to be sent to the sending buffer of CC1100, which is automatically sent; when receiving data, it automatically receives the data and stores it in the receiving buffer, and then sends a high-level pulse signal to notify the processing unit to read the data.

  When CC1100 is configured, the CRC check function is enabled. After the data is sent to the sending buffer, the CRC check is automatically performed on the data, and the check code is attached to the data and sent together. At the receiving end, it has a carrier sense function, and the received data is also automatically CRC checked, and the CRC code is compared with the received CRC code. If they are not the same, the data packet is wrong, the packet is discarded, and the channel continues to be monitored. If they are the same, a level signal is sent to the processing unit, and the processing unit reads the data in the receiving buffer. At the gas meter end, the WOR function is enabled. Through the setting of the register, CC1100 automatically wakes up and is in the receiving state for EVENT1 time after sleeping for EVENT0 time. If no valid data is received within EVENT1 time, it continues to sleep. If the data is correct, an interrupt is generated to the processing unit and waits for receiving data. In this system, EVENT0 is set to 1.2s and EVENT1 is set to 9ms. In order to ensure a reliable connection between the hand-copied meter and the gas meter, a 1.5s wake-up code is first sent when the hand-copied meter is reading the meter to wake up the processing unit from sleep mode.

  The system uses 433MHz/38.4kbps rate. For the same information, if the data packet is smaller, the EVENT1 can be set smaller, which is more effective for energy saving of the system. In communication, fixed packet length data is used, and its format is shown in Table 1, where the data is the command and parameter to be sent or the data read from the gas meter. In the process from the hand-held device to the gas meter, the status code and error code are random numbers.

Design and implementation of wireless meter reading system for gas meter - The lonely shepherd - Embedded Network Life

 

 

  3.3 Software design of the storage unit on the hand-copied device

  The hand-copying uses AT24C1024 to store the character library, which has a storage capacity of 128K bytes. Chinese characters are stored in dot matrix form, and each Chinese character requires 32 bytes. Initially, only 3,000 commonly used Chinese characters are stored, and a certain amount of space is reserved to store uncommon characters encountered during meter reading. AT24C4096 is used to store user record information. The user record is 64 bytes, and its format is shown in Table 2. When reading the meter, the gas meter address and command byte are extracted, and the frame header, length, check code and other information are added to form a communication frame with the gas meter.

Design and implementation of wireless meter reading system for gas meter - The lonely shepherd - Embedded Network Life

 

  4 Energy-saving design of the system Since the system is powered by batteries, low power consumption design is very important. The M430F413, EM78P153S and CC1100 selected by the system can meet the requirements of low power consumption design. They all have sleep mode and working mode.

  The current of M430F413 is less than 2?A in sleep mode and 300?A in working mode. The current of EM78P153S is 1?A in sleep mode and less than 1.5mA in working state. The current of CC1100 is 8.7?A in sleep mode. When the rate is 433MHz and 38.4kbps, the current is 14.3mA in receiving state, 15.3mA in sending state and 1.6mA in idle state. Therefore, as long as the time ratio of sleep state and working state is set, the power consumption can be very low. Here we set the sleep time of CC1100 to 1.2s and the working time to 9ms. The controller is in sleep state under normal state. When a valid frame is received, the controller and CC1100 work at the same time for 2s. Due to the long meter reading cycle, the hand-held reader is in shutdown state most of the time, and the gas meter end is in sleep state most of the time. After testing, the average current consumption of the gas meter end is less than 100?A, which can meet the requirements well. After testing, the effective data transmission distance can reach 600m. For this purpose, a group reading function is designed. After sending a wake-up code, the hand-reader can read the data of multiple gas meters in the same area at the same time, reducing the working time of the hand-reader.

  The innovative idea of ​​this paper is that the wireless transceiver CC1100 has the WOR function, which provides a good condition for the energy-saving design of the system; the second is the design of the memory of the hand-copied device, which selects different EEPORMs to store different information, saving development costs.

  Automatic meter reading is the inevitable result of the development of electronic technology and the improvement of management level. The wireless remote meter reading system designed in this paper has the advantages of low cost, low power consumption, good real-time performance and reliability, and easy maintenance. It is acceptable to users and gas companies and has good promotion value.

Reference address:Design and implementation of wireless meter reading system for gas meters

Previous article:Discussion on the Efficiency of Single Chip Microcomputer Programming
Next article:MSP430 simulated serial port source program - assembly language

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号