Design of a State Monitoring System for Equipment based on the Zigbee Wireless Sensor Network

AAbbssttrraacctt—— In order to overcome the shortcomings of some equipment, such as complex wiring and a high number of measurement parameters, a wireless state monitoring sys-tem based on Zigbee is developed, which is composed of an upper monitor control PC, a wireless gateway CC2530, a sensor node CC2530 and a sensor module. Based on the characteristics of the equipment, a wireless sensor network was created that was composed of a center controller and six wireless sensor nodes. Then, the nod hardware circuit was designed, the wireless module software was programmed by C language, and the user interface software was developed based on LabVIEW. Finally, a test was undertaken to ensure that the system meets state equipment monitoring requirements.


INTRODUCTION
In some types of equipment, the nature of the measuring parameters and wiring can cause difficult problems for monitoring systems. Thus, Zigbee wireless sensor network technology is used to design a new type of state monitoring system to realize forming, monitoring and managing of a wireless sensor network, reduce the wiring, and increase flexibility and maintainability of the system. This system makes real-time monitoring of the state of the wireless transmission possible so that it is easy to determine whether repair is needed. This means that excess maintenance is avoided, the service life of the equipment is extended, the maintenance time is reduced, and maintenance costs are reduced. Finally, a reliable theoretical basis of science is provided for fault diagnosis and equipment maintenance.

II. OVERALL SCHEME DESIGN OF SYSTEM
In this paper, based on the characteristics of some equipment, a gathering node has been designed and installed on the key components of six of the nodes of a wireless measurement and control system, as shown in figure 1. Through each node controller to various key parts of the equipment control relay device and the switch signal acquisition, and through the ZigBee wireless sensor network node controller connection for using wireless communication way for communication sent to gathering node controller, gathering node controller and PC by RS 232 serial communication cable, the collected data realtime display and storage of each electric switch for query and to assess the running status of equipment. The gather-ing node controller is at the center of the wireless network, responsible for the establishment and management of the network.

A. Hardware Design for Each Pool Node Controller
Each node of the wireless sensor net usually consists of a sensor block, a processor block, a wireless correspond block and a power supply block. The CC2530 chip integrates the MPU and the wireless correspond block, while the ZigBee block connects to the pool node controller by an asynchronous tandem port of a logical electric, predigesting the design of radio circuitry. The sensor block design integrates current and pressure sensors; the power supply block adopts a 3V fastener battery. The hardware theory of the node is explained in figure 2. The key component of each is a ZigBee network coordinator node, which collects the voltage and current parameters of the key components in the electrical components through current and voltage sensors, performs subsystem performance in contact switch contacts, relays work performance, such as cable-off the performance of the collection, and then enters the node controller. After the data is preprocessed, it can be transferred via the ZigBee wireless network to the sink node controller.

B. The hardware design of each sink node controller
Each receiving and processing hardware unit consists of a Zigbee wireless network receiver unit, a sink node controller, and a PC, among other components. In the PCbased software, each receiving and processing hardware consists of a Zigbee wireless network receiver unit, a sink node controller, and a PC, among other components. For the PC-based software, the receiving and processing hardware consists of a Zigbee wireless network receiver unit, a sink node controller, a PC and other components. The PC software is comprised of data received from the wireless nodes for processing, real-time display through the display unit in the display, determining system performance. This setup is shown in Figure 3.
An aggregation node controller was developed based on the chip CC2530. CC2530, which is based on IEEE802.15.4 protocol, combines a Zigbee RF4CE protocol stack with application of real system-on-chip (SoC) solutions. This results in a strong network node that has both low cost of materials and low energy consumption. CC2530 combines the excellent performance of a leading RF transceiver, industry-standard enhanced 8051 CPU, with system programmable flash memory, 8KB of RAM and other powerful features. In this study, CC2530OF256 had 256KB of flash memory.
With CC2530, only a small amount of external components can be achieved with the transceiver functions of the signal. It is comprised of three peripheral circuit portions: crystal clock circuits, RF input/output matching circuits and microcontroller interface circuits. It also has an I/O port control, a scan button, serial communication, interruption, and AD conversion. Figure 4 shows the convergence node controller circuit.

IV. SOFTWARE SYSTEM DESIGN
The software system design is the entire soul of the testing equipment, software programming, control data acquisition, data processing, storage, performance testing, and other functions.
C. Node controller and gathering the program design of the controller The node controller and gathering node controller are based on CC2530 chip development, so their program design is similar. In an IAR Embedded Workbench for MCS -51 Evaluation environment, C language was used to develop the software of the controller node. C was also used to edit and compile the program and for the connection and debugging process. In the program, to set up the operation mode of the controller for a fully functional model, set up the external 32 MHZ crystal oscillator as the system clock, set external devices work priority by instruction P2 DIR, instruct P0SEL P0DIR and set the I/O port state to a serial port for external work, and then set the baud rate to 57600, 1 stop bit, prefabricated for receiv-   Figure 5 displays the main program rf_test1 block diagram. The rf_test1 program is divided into two parts, sending module TX and receiving module RX. Instruct the program delivery module TX to download to the node controller, and receiver module RX to download to converge on the node controller. After power on, the program will judge to its function in advance. If for sending board, its communication channel and the device ID are preset, and the address is set as ADDRESS0; Vice is set to AD-DRES1. The sending board send function performs in continuous Mode, and the receiving plate is executed to receive Mode, or, namely, to receive function.

D. PC software design
PC software and convergence are the main functions of the node controller through the RS -232 serial port communication, which receives information from the sensor nodes. The PC software is also designed to facilitate human-computer interaction, network managaement, reception of sensor information, data processing analysis, and database management, among other functions. The PC software contains the modules shown in Figure 6.
The display interface for the PC software is designed using the LabVIEW software. It is disned for the purpose of visualization to acquire the results of the experiment. LabVIEW is a powerful graphic interface and data acquisition function, which makes use of the resource packs used in VISA applications. VISA, or virtual instrument software architecture, is the standard I/O API instrument programming. It can control GPIB, serial, USB, Ethernet, PXI or VXI instruments, and according to the type of instrumentation to invoke the corresponding driver, users need to learn several different instruments of communication protocols [3], programming environment friendly, so LabVIEW is a programming environment of PC software design choice. It allows user-friendly data reception, display and storage. With this software, it is also easy to send control commands and data to the specified node, and other functions. Because it is a high-quality man-machine interface, it can satisfy the basic needs of a wireless sensor network (WSN).
The PC software interface written by LabVIEW is shown in figure 7, which is divided into three parts: a serial port parameter Settings area, a data reception area, and a switch state display area. The serial port state parameters are shown in fig. 6. When the data reception set up 15 ms, read was the main reason for delay, and hardware communication stays consistent. When the receiving area receives two hexadecimal data, buttons to press the corresponding will light up on the front panel, then loosen after they go out. The program flow chart is shown in figure 8.
The program flow chart clearly shows the upper machine software programming ideas. First, place an infinite loop as the "while (1)", then cals the VISA function definition to set the serial and latency of the reading process. Then, put an attribute node for setting a serial port to read the data and transform them into the form of the array, then send the array into "if ()" structure to perform the data judgment. When button 1 is pressed, it corresponds to switch one; when this switch is flipped, LED 1 is illuminated. Similarly, when button 2 is pressed, the corresponding switch 2 on the front panel flips, and LED 2 is illuminated. To stop the PC software, simply click the stop button on the front panel.

V. THE EXPERIMENT AND ANALYSIS
Mount the constructed condition monitoring system, which is based on ZigBee wireless sensor network (WSN), to certain equipment. The test experiment is designed by changing the state of the relay and button to test the feasibility of the wireless data transmission system. It is assumed that when button S1 is pressed the button state ix 0x01, and button S2's state is 0x02, whereas its state is 0x03. The node controller of ZigBee RF module is used to transmit the data of the button state changes signal, and another board, which is based on CC2530 as the gathering node controller, will receive it. Then, input the status sig- Figure 5. rf_test1 block diagram  nal through the serial port into the computer. Each state signal is transformed into the hexadecimal twodimensional array and displayed on the PC interface, where a switch is used to show the button state and analyze the data, by the software based on LabVIEW.
The test results showed that the system is accurate and reliable, and the rate of data miss was 0. Data was collected 12 different times from each sensor to analyze and calibrate. While the measured data at each node had error of less than 3%, these values were close enough to the actual values. Moreover, the system has the advantages of simple wiring, stablility and reliablility, and a high precision performance in monitoring the characteristics. It implemented the function of data acquisition and real-time display and storage well for certain equipment, which means that it reached the design requirements and goals of the system.

VI. CONCLUSION
A new type state monitoring system is proposed that uses ZigBee sensor wireless network technology to implement the function of formation of a wireless sensor network, condition monitoring, and sireless sensor network (WSN) management. This resulted in reduced wiring as well as increased flexibility and maintainability of the monitoring system. An operation test showed that the measurement and control system based on Zigbee wireless sensor network has high reliability, good anti-interference ability, low power consumption and low cost. Therefore, it can satisfy the needs of some equipment condition monitoring.