Design of Data Acquisition and Diagnosis System Based on SX52BD and 24LC256 Chips

Remote diagnosis technology is a new technology that combines equipment diagnosis technology with computer network technology, establishes status monitoring points on equipment, collects equipment status data, and analyzes and diagnoses equipment operation in the diagnostic center. The systems used for diagnosis can be roughly divided into three categories: large-scale online status monitoring and diagnosis systems; computer-aided diagnosis systems with portable data collectors and inspection devices; and remote diagnosis systems implemented by the Internet.

Authors: Mao Yong, Jin Weizheng

Remote diagnosis technology is a new technology that combines equipment diagnosis technology with computer network technology, establishes status monitoring points on equipment, collects equipment status data, and analyzes and diagnoses equipment operation in the diagnostic center. The systems used for diagnosis can be roughly divided into three categories: large-scale online status monitoring and diagnosis systems; computer-aided diagnosis systems with portable data collectors and inspection devices; and remote diagnosis systems implemented by the Internet. The online system is suitable for continuous condition monitoring and diagnosis. The system is complicated, expensive and specific. The portable monitoring and analysis system can be inspected regularly or irregularly, which has a wide range of applications and a wide range of uses. The realization of remote diagnosis can not only make the fault diagnosis of the equipment more flexible and convenient, more widely used, but also realize resource sharing and avoid repeated development. Therefore, this technology has developed rapidly in recent years. The general remote diagnosis system needs to be equipped with a dedicated computer system on site, and the cost is relatively high. This paper proposes a data acquisition and diagnosis system based on an embedded Web server, which does not require a dedicated computer system on site.

1 System principle and composition

Figure 1 is a structural diagram of a data acquisition and fault diagnosis system based on an embedded Web server. It can be seen from Figure 1 that the entire remote fault diagnosis system can be divided into three parts: data collection of the embedded Web server, client-side local area network, remote diagnosis server and online diagnosis resources.

Design of Data Acquisition and Diagnosis System Based on SX52BD and 24LC256 Chips

1.1 Embedded Web Server

An important trend in the development of interconnection technology in recent years is that it is increasingly used in low-cost applications, such as handheld devices and smart home appliances. 8-bit processors have replaced expensive 32-bit processors to achieve interconnection in many occasions; and this policy system also has its own advantages, such as: low price, easy to interface with various sensors and collectors, small size, and can It is convenient to expand the conversion of various protocols such as UART, I2C, SPI protocol and Ethernet protocol, so as to realize remote data collection and remote control. The embedded Web server in this system provides a network interface for the client’s local area network, and at the same time has the function of on-site data collection, which realizes the data transmission of on-site collected data to the client’s local area network. It overcomes the shortcomings of the traditional method that the PC needs to be configured on site, and it can overcome the constraints of environmental conditions.

(1) Hardware structure

The hardware structure of the embedded Web server is shown in Figure 2.

Design of Data Acquisition and Diagnosis System Based on SX52BD and 24LC256 Chips

This system chooses 24LC256 serial EEPROM as the data storage unit (webpage storage unit). 24LC256 is a 32K byte serial EEPROM, which communicates with SX52BD via I2C bus. You can store collected data or web pages. If you need to store web pages, you should reserve a network download interface (the serial port can be expanded through the I/O port line, and the web content can be downloaded through the PC serial port). The NIC chip can be RTL8019AS or DM9008 from DAVICON, USA. RTL8019AS is a 10BaseT full-duplex Ethernet transceiver controller produced by Taiwan REALTEK semiconductor Device Company.

These two controllers are fully compatible with NE2000, but the pin distribution is somewhat different. The data collection part can be selected according to needs, which has considerable flexibility.

(2) Software implementation

The software of the embedded Web server in this system is mainly composed of modules such as chip initialization setting, TCP/IP protocol stack realization, data acquisition and processing. Add user-defined data communication protocol based on TCP/IP protocol in the program. In this way, the PC in the customer’s local area network can carry out custom communication with the embedded Web server, such as sending data collection commands, collecting parameter initialization commands and so on. In the network protocol stack implemented by SX52BD, the physical layer function is completed by the network interface card (NIC chip).

The initialization part of the program contains its driver. The address resolution protocol (ARP) is added to the network layer to realize the mapping of IP addresses to physical addresses. The whole structure is shown in Figure 3.

Design of Data Acquisition and Diagnosis System Based on SX52BD and 24LC256 Chips

The realization of the protocol stack is mainly divided into the interpretation of receiving data packets and the packaging of sending data packets. Ethernet data is transmitted in frame format. The frame format is as follows: (The field is not drawn to scale, and the data unit is Octet) If the value of the frame type field is 0x0806, it is an ARP packet; if it is 0x0800, it is an IP packet . When receiving a frame, different software modules process it according to different frame types. When sending data frames, different programs are also packaged according to different frame types. The basic method is the same as that of processing received frames, except that the read operation is changed to a write operation. The reception and transmission of frames are based on the physical layer’s operations on the NIC, including reading the receiving buffer and writing to the sending buffer. NIC adopts 8-bit working mode, and the operation of its buffer needs to read and write each 8-bit group one by one. Different fields are judged and recorded when reading the receiving buffer. Please refer to the chip data for the specific content of NIC operation. Due to space limitations, no detailed introduction will be given.

Since the conventional TCP/IP protocol is used in the Internet, the TCP and UDP protocols based on IP play a very important role. Because SX52BD is an embedded microcontroller, the memory is small, and traditional methods cannot be used to implement TCP and UCP. Therefore, they need a large buffer to construct sockets (SOCKET), while processing the application layer. The same is true when sending data, filling the sending data while processing the useful data. This method greatly saves memory resources and effectively improves the processing speed of the application. Since the main function of the program is to receive data acquisition commands, the amount of data that is actually transmitted is very small and does not require huge buffer space.

1.2 Client LAN

The customer’s local area network performs online monitoring of equipment and general fault diagnosis, mainly responsible for the storage of important information, providing simple diagnosis services for data collection stations or on-site workstations, and communicating with the outside world for help. Database technology is a key technology of this monitoring and diagnosis system. The system must use the database to analyze and process the real-time data collected by the sampling subsystem to generate a historical database. The data in the database can be queried and further analyzed by users to understand the operating status and development trend of the equipment. It can also recall the relevant measuring points after the fault occurs, providing a basis for diagnosis and maintenance. In this system, the customer local area network can communicate with the embedded Web server to control the embedded Web server. The collected field data can be retrieved for processing through command response. If the embedded Web server is configured with web page storage resources, it can also interact with it by accessing the web page content of the embedded Web server.

1.3 Remote diagnosis server and online diagnosis resources

The remote diagnosis server is a service site established by the diagnosis service provider on the Internet. It usually includes: WWW server, ASP program, CGI program, JAVA Applet. According to actual needs, an FTP server, email server, etc. may also need to be established. The WWW server monitors the network, accepts the user’s request from the browser, diagnostic information and related interrupts, and returns the relevant diagnostic result file and JAVA applet to the user. The main undertakers of diagnostic services are the main diagnostic service programs and online diagnostic resources, including diagnostic expert systems, diagnostic signal analysis systems, etc.

2 System implementation and application

This system is used for the detection and diagnosis of transformer faults in generators and low-voltage distribution networks, such as vibration, phase loss, undervoltage, overvoltage, overload, and power out-of-bounds. Data collection is connected to the corresponding sensor on the I/O port of the embedded Web server, using the laboratory’s local area network resources, using a microcomputer as a client to communicate with the embedded Web server, and accessing the remote diagnosis server at the same time. The remote diagnosis server uses Windows NT4.0 and IIS4.0 as the operating system and WWW server, and on this basis, uses Microsoft Interdev and Visual C++++ to develop and establish a remote diagnosis system.

During the diagnosis, the client computer uses the WWW browser to log in to the diagnosis server, and in the interactive web page, uses the form to provide fault symptom information and data files, and request the diagnosis service. The diagnosis server calls the diagnosis resource to perform the diagnosis and returns the diagnosis result to the client by using interactive web pages and Java applets.

The Links:   MIG200J6CMB1W https://www.slw-ele.com/ls037v7dw01.html“> LS037V7DW01