Software and hardware design of remote meter reading system based on AT89C51 and serial Internet interface equipment

Publisher:CuriousObserverLatest update time:2023-08-02 Source: elecfansKeywords:AT89C51 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

With the improvement of living standards, people's consumption of resources is increasing day by day, and the measurement, management and charging of resource consumption are becoming increasingly complicated. Products that improve the management level and automation level have emerged as the times require. However, in the past, the reading of energy consumption meters was manual, which could not guarantee the accuracy and real-time nature of the data. It would also cause a lot of waste of manpower, material resources and time, and also lead to the phenomenon of wrong reading, missing reading and estimated reading. Therefore, traditional over-standard methods are increasingly unable to adapt to future residential development needs and people's living needs. They will be replaced by outdoor remote meter reading systems, which use sensing, control, network and other technologies to measure the energy consumption of each user. The table data is automatically collected into the collector, and then the collector transmits the data to the outdoor centralized controller, and then transmits the data to the upper monitoring host through the network for analysis, measurement and storage. Finally, the energy supply company charges electronically based on the household consumption costs calculated by the host computer. This method not only saves manpower, material resources, and time, but also ensures accuracy and real-time performance.


System composition and working principle


The remote meter reading system is mainly composed of three parts: PC host computer, centralized controller and collector. The structural block diagram of the system is shown in Figure 1.

Figure 1 General framework diagram of the system

As can be seen from the above figure, the meter reading system is divided into three levels. The top layer is the community central processor, which is used for comprehensive monitoring; the middle layer is composed of the community's internal LAN (Ethernet), which is a large channel for data transmission; the bottom layer It is the four-meter data collection layer, which is composed of RS485 network and completes the function of collecting, concentrating and transmitting the data of the four meters to the host computer. The upper layer is a software system with a friendly interface and easy operation designed using VB language. Users only need simple key operations to realize remote sending and receiving of data through the network port. The command sent is sent to the remote network port to serial port device via the internal LAN. The middle-level central controller is mainly responsible for identifying commands and implementing related operations of the commands, such as full meter reading, single-user meter reading and scheduled meter reading commands. The issued commands are transmitted to the collectors in each user's home via the RS485 bus network, and then the pulse meters (such as gas meters, water meters, electricity meters, etc.) are read and stored, and finally uploaded via the RS485 bus.


System main hardware circuit design

The advantage of this system is that it can transmit the four-meter data through the local area network in the community. It uses the serial Internet interface device NportExpressDE-311 of Taiwan Momo Company. It is a single-chip network access device with two ports, one is an RS232 or RS485 level input interface, and the other is a network interface. It automatically communicates internally. The data is encapsulated by TCP/IP and is completely transparent to the user, as shown in Figure 2. This device has become very popular on the market.

Figure 2 Nport application diagram

The hardware circuit design of the controller mainly includes CPU, peripheral storage module and data upload/download module. Its structure is shown in Figure 3. In this design, the CPU is AT89C51; the peripheral memory module is the serial E2PROM 24C02 chip, which is a storage device based on I2C-BUS and follows the two-wire protocol. It has convenient interfaces, small size, and non-volatile data when power is lost. Features, widely used in instrumentation and industrial automation control. The system design adopts the principle of pulse meter reading. The four meters are all pulse-type digital meters, mainly composed of Hall sensors. The sensor in the digital meter emits a pulse every time it rotates once, making the consumption proportional to the number of pulses. The specific value of the dosage can be determined based on the number of pulses. The acquisition module is mainly composed of four chips, including ULN2003, 74LS378, 7411, and CD40174. It can collect up to 6 channels of data. Since only four tables of data are collected in this design, two channels are left unused.

Figure 3 Hardware circuit of the controller

Q0~Q3 of CD40174 chip are connected to P1.0~P1.3 of AT89C51 respectively. At the same time, the negative pulse signal generated by the 7411 chip is sent to INT0 of the microcontroller, so that when an intelligent terminal pulse is generated, the CPU can generate an interrupt for collection. By cyclically querying P1.0~P1.3, you can know which digital table the collected pulse numbers come from. The acquisition program flow is shown in Figure 4.

Figure 4 Collection program flow chart

System software system design

The software design of the system mainly includes two parts, one is the C language programming of the collector and central controller, and the other is the control program programming of the host computer. Here we mainly introduce the host computer program programming. The upper computer operating platform adopts VB programming, and the connection with the network is completed through a universal control Winsock. The Winsock control is invisible to users. It provides a convenient way to access TCP and UDP network services. You can easily connect to a remote machine by setting the properties of the control and calling it, and you can also exchange data in both directions. It provides two transmission modes, TCP and UDP. Since TCP mode is a connection-oriented transmission method, before transmitting data, both communicating parties must receive the response signal from the other party to start the data transmission. Therefore, it takes up a lot of time to complete the transmission of handshake signals, while UDP mode It is a communication method for fast access to data. There is no need to re-establish the connection between sending and receiving, saving connection time. UDP mode is used in this design. The software system design chose to use Vista transparent form style, which mainly includes software login module, user management module, system setting module, meter reading setting module, data management module, billing setting module, etc., most of which are involved in the module design. Come to the database operation.


Conclusion

This system overcomes the shortcomings of the traditional wired meter reading method and transmits large amounts of data, high accuracy, and low communication costs. Based on Proteus technology, it has flexible networking and easy expansion, which reduces the difficulty and cost of design and construction. It has good openness, reliability and scalability, and has important practical significance and broad development prospects.


Keywords:AT89C51 Reference address:Software and hardware design of remote meter reading system based on AT89C51 and serial Internet interface equipment

Previous article:Design of intelligent humidity monitoring system using AT89C51 microcontroller and SHT15 sensor
Next article:Design of diesel engine test system based on single chip AT89C51 and CAN controller

Recommended ReadingLatest update time:2024-11-23 03:32

Design of parallel current sharing system of high frequency switching power supply based on AT89C51 single chip microcomputer
  Modularization is the development trend of switching power supplies. Parallel operation is an effective solution for large-capacity power supply products. Capacity expansion can be achieved by designing an N+l redundant power supply system. This system is a parallel connection of multiple high-frequency switching po
[Power Management]
Design of parallel current sharing system of high frequency switching power supply based on AT89C51 single chip microcomputer
The Simulation Design of 51 Single Chip Microcomputer Real-time Clock Based on Proteus
Single-chip microcomputer technology is applied to all walks of life and is a practical intelligent control technology. The development of single-chip microcomputer technology has greatly promoted the rapid development of electronics, communications, computers, mechatronics and other industries, and has become a pop
[Microcontroller]
The Simulation Design of 51 Single Chip Microcomputer Real-time Clock Based on Proteus
Homemade AT89C51 programmer, at89c51 programmer
AT89C51 is the most widely used 8051 microcontroller. More importantly, it has the feature of repeated programming (FLASH). Under normal circumstances, it can be reprogrammed 1,000 times, which provides a cheap platform for beginners to experiment. In order to meet the hands-on needs of the majority of microcontroller
[Microcontroller]
Homemade AT89C51 programmer, at89c51 programmer
Design of digital controlled DC voltage regulated power supply based on single chip microcomputer
  With the continuous emergence of new power electronic devices and circuit topologies suitable for higher switching frequencies, traditional application technologies have minimized the impact of switching power supply performance due to the limitations of power device performance. New power supply circuit topologies a
[Microcontroller]
Design of digital controlled DC voltage regulated power supply based on single chip microcomputer
Metronome based on AT89C51 microcontroller
1 Hardware Circuit Principle The metronome uses the AT89C51 single-chip microcomputer as the control center, and is composed of an LED display module, an adjustment keyboard module, and a sound output module. Figure 1 is the circuit schematic diagram of the metronome. The AT89C51 single-chip microcomputer produced b
[Microcontroller]
Metronome based on AT89C51 microcontroller
AT89C51 microcontroller and 74LS164 dynamic display interface
AT89C51 introduction AT89C51 is a low-voltage, high-performance CMOS 8-bit microprocessor with 4K-byte FLASH memory (FPEROM—Flash Programmable and Erasable Read Only Memory), commonly known as single-chip microcomputer. AT89C2051 is a microcontroller with 2K bytes of flash programmable and erasable read-only memory.
[Microcontroller]
AT89C51 microcontroller and 74LS164 dynamic display interface
Design of Automatic Temperature Measurement and Alarm System Based on AT89C51
At present, whether in industrial production or scientific research experiments, the equipment for automatic control through temperature measurement is becoming more and more popular, and the application occasions are also increasing. The problem that follows is how to measure the accurate temperature to ensure that th
[Security Electronics]
Design of Automatic Temperature Measurement and Alarm System Based on AT89C51
Design of automatic horn tone player based on AT89C51 microcontroller
1 Introduction The daily routine of institutions and colleges requires timing and beep prompts. The author uses AT89C51 microcontroller and LM386 audio power amplifier to form an automatic timing and beep player. It is low cost, effective and worthy of promotion. 2 Main features and pin functions of AT89C51 AT89
[Microcontroller]
Latest Microcontroller Articles
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号