Flow measurement system for open channels in irrigation districts based on GSM SMS
2026-04-06 06:13:40··#1
1. Introduction With the deepening of irrigation district management, accurate measurement of channel flow and payment based on flow rate are inevitable. Due to the vast area, complex canal systems, numerous and scattered measuring points, and inconvenient communication in irrigation districts, most irrigation districts in China still rely on manual measurement methods. This method is labor-intensive, time-consuming, and has low measurement accuracy. In recent years, automated flow measurement in open channels has developed using telephone, fiber optic cable, VHF, wireless spread spectrum technology, and satellite communication. However, this method is expensive to invest in and has low equipment utilization, preventing its widespread adoption. Therefore, only a few large irrigation districts currently use this method. Automation of open channel flow measurement is affected by factors such as communication, power, and geographical environment, especially communication, which has become a bottleneck for achieving automated flow measurement across the entire irrigation district. This paper utilizes the GSM (Global System Mobile Communication) public network and SMS (Short Message Service) to achieve data acquisition and transmission at numerous flow measuring points in open channels. 2. System Composition This system consists of a data acquisition unit, a public GSM communication network, and a data control center, as shown in Figure 1. This paper only describes the data acquisition unit in detail. The data acquisition unit is installed on the flow measurement facilities in the canal system, enabling instantaneous acquisition of flow data. Since the real-time performance requirements for flow are not very strict, multiple data acquisitions can be packaged and transmitted at once. The data packet is transmitted to the control center via SMS through the GSM network. The control center then handles water fee settlement, report printing, communication services, etc., and can also perform macro-control of the irrigation area to maximize the economic benefits of irrigation area operation. [b]3. Hardware Circuit Design of the Flow Meter (RTU)[/b] The flow meter (RTU) consists of a CPU (ATC89C2051), a water level sensor, an A/D conversion chip (ADS7824), a GSM module (Siemens TC35), a real-time clock (DS1302), a memory chip (AT24C256), a watchdog monitoring chip (MAX8 13L), a 16-key keyboard, a 5-digit LED display, and a solar power supply system. Its structure is shown in Figure 2. 3.1 Siemens TC35 Module The TC35 [1] is a new generation wireless communication GSM module launched by Siemens, which can quickly, safely and reliably realize system data, voice transmission, short message service and fax. The TC35 module mainly consists of six parts: GSM baseband processor, GSM radio frequency module, power supply module (ASIC), flash memory, ZIF connector and antenna interface (see Figure 3). As the core of the TC35, the baseband processor primarily handles voice and data signals within the GSM terminal and encompasses all analog and digital functions of the cellular radio frequency equipment. It supports FR, HR, and EFR voice channel coding without requiring additional hardware circuitry. The microcontroller, SIM card slot, and antenna can be connected via ZIF connectors and a 50Ω antenna connector. 3.2 Data Memory EEPRAM Since traffic acquisition does not require strictly real-time transmission and the amount of data per unit time is small, it is necessary to combine and package multiple data acquisitions (including time) into a single transmission. Furthermore, occasional GSM network congestion may lead to data transmission failures. Therefore, it is essential to use a power-off memory (EEPRAM) to temporarily store the data, which not only saves operating costs but also improves system reliability. This system uses the ATMEL AT24C256 chip, with a capacity of 32K, stored in pages, and dynamically exchanges data with the CPU serially. 3.3 Real-time clock: Short-term timing can be accomplished using a microcontroller CPU, but for long-term recording, using a microcontroller CPU will reduce the overall system efficiency. Furthermore, once the microcontroller is reset, the time must be reset, making it difficult to meet unattended operation requirements. This system uses the DALLAS DS1302 dedicated timing chip, which can output seconds, minutes, hours, days, months, and years in real time, recording up to 100 years. It uses a normal power supply and battery power with hot standby to ensure uninterrupted timing, providing real-time time to the CPU serially. 3.4 A/D converter: The A/D chip plays a crucial role in the accuracy of the entire system. Since the rate of change in flow rate is generally not large, conversion speed does not need to be considered when selecting a chip. To improve flow measurement accuracy, a high-resolution chip is required. This system uses the ADS7824 chip, a 4-channel 12-bit chip with a single power supply and parallel-serial output interface, exchanging data with the CPU serially. [b]4. Software Design[/b] 4.1 Program Flow: This system is required to realize functions such as flow acquisition, analysis, storage, and communication transmission. Its flowchart is shown in Figure 4. The system uses timed data acquisition. Since the water depth in the channel generally doesn't change much, acquiring data once every minute is sufficient, and the average of 10 acquisitions is recorded every 10 minutes. If the water level changes significantly, the system automatically identifies and records the data. When the accumulated data volume (including time) exceeds 140 bytes, the GSM module is activated. To keep the data packet size below 140 bytes, all data except the last one is sent to the serial port and then transmitted to the control center by the GSM module. After successful data transmission, the system enters the next cycle. 4.2 Bus Interface Design The CPU in this system uses the ATMEL AT89C2051 chip, while the peripheral devices all use an I2C bus structure. Therefore, a common I/O interface is needed to simulate the I2C interface. The CLK signal is implemented by alternately setting '1' and clearing '0' using port P1.0. To ensure pulse width, an appropriate delay is added between level transitions. The following program implements the process shown in timing diagram 5. 4.3 Serial Port Initialization Program Design The microcontroller crystal oscillator frequency is 11.0592 MHz. According to the requirements of the GSM module, the baud rate is set to 9600 bps. The main settings program (taking C51 as an example) is as follows: 4.4 Short Message Format and its AT Commands The TC35 GSM module supports the GSM 07.05 standard proposed by ETSI (European Telecommunications Standards Institute). The information size limit for each short message is defined as 140 octets (7-bit encoding), 140 English bytes or 70 Chinese characters. If this length is exceeded, it must be sent in multiple transmissions. That is, the size of each short message data packet is 140 * 8 bits. In this system, the front-end data is not uploaded in real time. Therefore, it is necessary to record the time while recording the data flow. To save space as much as possible, the first data in the data packet includes detailed time (year, month, day, hour, minute). Other data uses the time difference method with the first data, in minutes, as shown in Figure 6. According to the GSM 07.05 definition, there are three ways to send and receive SMS messages: Block mode, Text Mode based on AT commands, and PDU (Protocol Description Unit) mode based on AT commands. Using Block mode requires driver support from the module manufacturer; PDU mode should be used for sending both Chinese and English SMS messages; and Text mode should be used for sending only English SMS messages (plain text format). This system adopts the [CM (21) Text mode, and sends AT commands directly to the GSM module through the serial interface (P3.0 (RXD), P3.1 (TXD)), which can conveniently and simply realize the sending, receiving, querying and management of SMS based on GSM. Some commonly used GSM AT commands related to SMS are listed below. The steps of sending and receiving SMS in Text mode are divided into initializing the GSM module, sending text SMS and receiving SMS. The following is a part of the program illustrating the usage of AT commands using the C51 language environment. For detailed syntax, please refer to SIEMENS AT Command Set [2]. [b]5. Conclusion[/b] This paper develops an automatic water flow measurement system for open channels, and uses the GSM public network as the data transmission platform. It integrates computer communication technology, network technology, GSM technology and automatic control technology to realize the automation and informatization of irrigation area flow measurement and management. This is of great significance for the development of traditional water conservancy to modern water conservancy, improving the operation and management and economic benefits of irrigation areas, and serving society. [b]References[/b] [1] Siemens mobile. TC35/TC37 Hardware Interface Description [Z]. 2001. [2] Siemens mobile. TC35/TC37 module AT Command Set [Z]. 2002. [3] Xu Aijun. Design of C51 Application Programs for Microcontrollers [M]. Beijing: Electronic Industry Press, 2001.7. [4] Yang Huohui, Huang Zhuxian. Computer Principles and Applications [M]. Changsha: National University of Defense Technology Press, 2003.3. Editor: He Shiping