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.
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.
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.
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.
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.
Previous article:Discussion on the Efficiency of Single Chip Microcomputer Programming
Next article:MSP430 simulated serial port source program - assembly language
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- 【NXP Rapid IoT Review】+First Online Project
- Configuration and use of TI C2000 TMS320F28379D SCID SCIB
- Low-power multi-protocol chip ZigBee/6LoWPAN/BLE/Thread chip CC2652
- Share a STLINK V2_1 PCB project, which can be directly sampled and produced
- 3. [Learning LPC1768 library functions] External interrupt experiment
- Please advise on the design of driving circuit for inductive load
- DAC8552 of MSP430F5529 microcontroller
- FPGA network port communicates with PC
- Package placement issues
- Radio Books