Application of New Water Meter in Intelligent Meter Reading System

At present, the water meters are mechanical, and most of the water meters are installed indoors, which brings great trouble to the meter readers. When a meter reader reads a meter, he must read the water meter's reading from the house to the naked eye and register it on a small notebook that he carries with him. After going back, a dedicated computer input staff will also input the water meter reading into the database in the computer, calculate the water consumption for this month, and print out the water fees that each user should pay this month. This process is not only a heavy workload but it is also easy to make mistakes. Now Deli Shanghai Electronics Co., Ltd. has developed a smart meter that counts the number of turns of the pointer in the mechanical water meter and sends the water meter reading through the serial port RS422. This laid the foundation for a smart water meter reading system.

After the user's mechanical water meter is converted into a smart water meter, it is connected to an aggregator installed under the floor. The aggregator collects data once for a certain period of time (a specific time can be set) for the smart water meter and stores it in the memory. If the number of users of the staircase is greater than 16 or the connection exceeds 500m, a repeater must be added between the smart water meter and the aggregator to increase the drive capacity. The core part of the smart meter reading system is a portable meter reading mobile phone. Its main task is to use its own instructions to interpret and run the FoxPro program compiled by the upper computer; collect data from the aggregator or smart water meter and update the contents of the database; and compare it with the data of the previous month to calculate the amount of water used and on the spot Printing bills, the meter reader will be the user's bills placed in the user's mailbox at the stairs; through the USB interface on the phone can transfer the data to the computer, the computer for processing, archiving. In this way, the automatic collection, transmission, processing, and printing of data from the water meter to the computer are realized, which eliminates a lot of manual labor and greatly improves labor efficiency.

Meter reading mobile phone is the core part connecting the upper computer and the aggregator and intelligent water meter. It has a keyboard input, can manually query, update the data in the database; large-screen LCD dot matrix display, a good man-machine dialogue interface; 16MB FLASH RAM, used to store system configuration files, programs and database files; 2 RS232 interfaces, A USB interface. One of the RS232 interfaces is connected to the infrared transponder, which realizes the wired or infrared communication with the smart water meter and the aggregator, completes the data collection work for each water meter, and can set or modify the aggregator or the smart water meter through the interface. Another RS232 interface is used as the communication port of the micro serial printer. The USB interface completes the communication with the computer, and can transmit the data in the meter reading mobile phone to the computer, and can also receive the DBF and PRG files and other system configuration files downloaded from the computer.

The S3C44B0X CPU is a 32-bit high-speed processor based on the ARM7TDMI core reduced instruction system introduced by SAMSUNG. Its working voltage is 3.3V, and the operating voltage of the core ARM7TDMI is only 2.5V, which greatly reduces the power consumption of the chip. S3C44B0X with: 8 MEMORY BANKS for managing external memory, maximum storage capacity up to 256MB. Can expand EPROM SDRAM FLASH RAM USB LCD outside. Each Bank supports 8/18/32-bit data format, addressable 32MB (except BANK0, followed by 4MB reserved for internal registers). BANK0 is dedicated to system startup, so its memory must be linearly addressed and have memory function; BANK8, 7 is dedicated to SRAM, FP/EDO/SDRAM, etc.; 2LCD controller supports monochrome, 4 and 16 grayscale LCD Module; supports 4-bit single-dual-line scan, 8-bit single-line scan form of the display; support for the main display dot matrix: 640 × 480 × 320 × 240 160 × 160; 3 two UART port, the highest port The rate is 115200baud, support IrDA 1.0, can be used for infrared communication; 45 channels of PWM modulation output, can be used to control the buzzer to output different sounds, prompting various information of the system; 571 I/O ports, including 8 external interrupt sources, available For keyboard, LCD backlight, lighting control, etc.; 68-channel 10-bit A/D converter for system battery detection; 7 System real-time clock with calendar function for recording meter reading time; 8 built-in PLL PLL can be Set the system operating frequency up to 73MHz; 94 system operating modes: normal, slow, idle, and stop modes. According to the need to set different working methods, you can reduce system power consumption.

Running on a meter reading phone is a small, self-written operating system. It has its own file system and can interpret and run the FoxPro program written by the host computer. Because of the operations involved with the database, the system requires more memory. This system selected HYUNDAI SDRAM-HY57V161610D. Its data width is 16 bits and consists of two BANKs with a total of 2MB of storage capacity. Since the S3C44B0X's BANK6, 7 support SDRAM, so its connection with the HY57V161610D is quite simple, does not require software drivers, as long as the two registers can be set. Set the BANK6 data width to 16 bits in the BWSCON register, set MT=0X3 in the BANKCON6 register, Trcd=0X0, and SCAN=0X0 to save the meter reading database. When there are many users, the database will occupy a large amount of storage space. Especially when analyzing monthly water reports, the aggregator stores data once every hour (or less), and the meter reading mobile phone must read all the data of the month. The database at this time is quite large. Therefore, the company chose FLASH-KM29U128T from SAMSUNG, which has a storage capacity of 16MB and is sufficient for database storage. Its disadvantages are: it is not linearly addressed, and its storage speed is slow; it is cumbersome to read and write, it must be read and written in units of pages (512 bytes), and the BLOCK where the page is located must be written before each write. Erasing once; and it does not guarantee that every BLOCK (32 PAGE is a BLOCK) is good, the bad rate is 1%, but it guarantees that the first two BLOCKs are definitely good.

Use the first two BLOCKs to create a FAT table, with a logical BLOCK number corresponding to the physical BLOCK, each read and write operations on the logical BLOCK. A read operation is performed at each write operation and compared with what was written. If it is found to be different, write it again; if it is wrong, think that the BLOCK is broken. Make a good mark and look for a good BLOCK instead. This will ensure that the logical BLOCK is good.

The 3C44B0X comes with an LCD control module, but it does not support all dot-matrix LCDs. In order to make full use of the chip, you can choose the LCD it supports. However, if you must use other LCDs, this does not matter because the operation of the LCD is as simple as the operation of other memories.

Because the data obtained by the meter reading mobile phone meter reading is transmitted to the host computer in the form of a database, it is not possible to transmit the serial port when the database is large. In USB communication, the highest theoretical transfer rate can reach 12MB/s, so the database can be transferred via USB. Since the 3C44B0X does not have a USB interface, a USB interface must be externally expanded.

This system uses NATIONAL's USBN9603. It is an improved version of the 9602. It corrects some of the bugs that existed in the 9602, and reduces some registers, making programming of USB communications relatively simple. Because of the FLASH operation involved, the communication speed of USB is not as high as imagined. When downloading the database, the USB transfer rate is only 200KB/s due to the need to write to the FLASH. However, when the upload is performed only for the FLASH, the USB transfer rate is significantly faster and can reach 800KB/s. Therefore, which FLASH is selected, how to program the FLASH has a great influence on the transmission rate of the USB.

Meter reading mobile phone also includes keyboard input, serial communication, battery detection and other parts. These parts are relatively simple. For example, the keyboard input part: if you want to use the keyboard interrupt, just use the external interrupt EINT4, 5, 6, 7 because the interrupt entry address of the four interrupt sources is the same, plus several ordinary I / O port can be Make up a break keyboard. If you want to change to scan the keyboard, it is also very simple, as long as the EINT4, 5, 6, 7 is set to I / O port function on it, hardware does not need to make any changes. Serial communication is also very simple, as long as the S3C44B0X UART port external MAX232 level conversion chip can achieve standard RS232 communication. The battery detection section only needs to connect the voltage from the battery section to an A/D port. If the battery voltage used is higher than the operating voltage of the S3C44B0X (3.3V), it is connected to the A/D port after being divided by the resistor.

Because FLASH KM29U128T is not linearly addressed, it cannot be used as a system boot. Therefore, a linearly-addressed EEPROM such as 29EE010 is required for system initialization. Its main task is to initialize the system and transfer the operating system stored in FLASH to SDRAM. Therefore, the EEPROM capacity does not need to be large. Note that the EEPROM chip select signal should be connected to the BANK0NGCS0 of the S3C44B0X when the hardware is connected.

The water meter's smart meter reading system is a relatively large system. This article only refers to its core part, but also to the hardware part. The workload of the software part is also relatively large. To be able to interpret and run the FOXPRO program with the S3C44B0X instructions. The S3C44B0X with ARM7TDMI as the kernel can use standard C language for debugging and software simulation on the SDT2.5 debugging platform, which greatly shortens the software development cycle.

Posted on