Design and Implementation of an Industrial Wireless Sensor Network for Temperature Monitoring

—Temperature signal is one of the key parameters in industrial processes. Accurate and effective temperature monitoring may provide necessary device information to the operator and prevent unexpected catastrophic equipment faults due to device overheat. Compared with wired monitoring system, wireless sensor networks (WSNs) monitoring system has many advantages, such as low cost and convenient installation. This paper proposes and implements a multichannel temperature monitoring system based on WSNs module, Jennic JN5139. The hardware circuit design of the sensor node and the software design for WSNs nodes and the centralized computer using C language and Lab-VIEW respectively are given in detailed. An optimization subsection algorithm based on least square for thermocouple nonlinear calibration is also explored to increase the measurement accuracy. The prototype system is evaluated with an electric furnace temperature monitoring system. The experimental results show the feasibility and effectiveness of the proposed system.


INTRODUCTION
Temperature signal is one of the key parameters in industrial processes. Accurate and effective temperature monitoring may provide necessary device information to the operator and prevent unexpected catastrophic equipment faults due to device overheat. Traditional wired temperature monitoring networks transfer the data via cables and wires. The installation and maintenance cost for wired monitoring system is expensive for the user. Sometimes, the cabling cost may be even higher than the cost of the sensor itself. Compared with wired monitoring system, wireless sensor networks (WSNs) monitoring system has many advantages, such as lower cost, and ease of employment and relocation.
In last decade, different researchers have put significant research interest in WSNs and have successfully employed it in many commercial areas such as environmental monitoring, cold-chain monitoring, and structural health monitoring [1][2][3]. Although WSNs provide a potential approach for industrial process monitoring, the application of industrial wireless sensor networks (IWSNs) for device monitoring is relatively unexplored because of the harsh industrial environment. Several typical IWSNs for device monitoring, that have been developed and reported recently, are given as following.
A wireless temperature monitoring system has been installed at finger clusters of MV Breakers at a power plant to continuously monitor temperature while the breakers are under load [4]. The location and temperature signal at the point where wireless sensors are installed, as well as the ambient temperature signal are transmitted to the reading device through RF [4].
The project in [5] proposes a wireless solution prototype, based on COTS hardware (XBee module from Maxstream). To verify the feasibility of this solution, an industrial application system with 4 temperature nodes at a cycle time of 128ms has been successfully fabricated and tested with plastic fabrication machines.
The monitoring system for industrial electric systems proposed in [6,7] has both wired and wireless communication approaches to a supervisory system (Supervisory Control and Data Acquisition -SCADA). Sets of experiments were conducted to analyze the system's performance, especially in terms of packet losses at different transmitting distances and the maximum achievable data acquisition and transmission rates considering a signal frequency of 60Hz [6,7].
A scheme of applying WSNs in online and remote energy monitoring and fault diagnostics for industrial motor systems is proposed in [8]. The motor terminal data, two line-to-line voltages, two phase currents, and a shaft torque, are collected by sensor nodes at motor control centres, then transmitted through WSNs, and are finally processed in the central supervisory station (CSS) [8].
This paper proposes and implements a multichannel temperature monitoring system based on a commercial WSNs module, Jennic JN5139, to explore the feasibility of using IWSNs in industry temperature measurement. An optimization subsection algorithm based on least square for thermocouple nonlinear calibration is also investigated to increase the measurement accuracy. The proposed prototype system is built up and evaluated with an electric furnace temperature monitoring system.

II. SYSTEM DESIGN AND IMPLEMENTATION
The architecture of the proposed temperature monitoring system based on IWSNs is illustrated in Fig.1. This star topology and ZigBee-based IWSN consists of one coordinator, several sensor nodes, and a central computer. K-type thermocouple is used in this application for temperature monitoring due to its low cost, wide operation range and fast response time. The signal conditioning, data sampling and data processing are carried up on the SHORT PAPER DESIGN AND IMPLEMENTATION OF AN INDUSTRIAL WIRELESS SENSOR NETWORK FOR TEMPERATURE MONITORING sensor node, while the data transmitting is fulfilled by the coordinator. The temperature data from different nodes is shown and recorded on the central computer.

A. Sensor Node Hardware Design
The sensor node used in this wireless temperature monitoring system is based on one commercial WSNs module, Jennic JN5139. The upper output of K-type thermocouple in this application is around 50 mV and the input range of the A/D converter on JN5139 is 0-2.4V, so a non-inverting amplifier, whose amplification is set as 40, is employed to amplify the thermocouple output signal. To save the constrained power of the battery powered sensor node, low voltage amplifier chip MC33202 from ON Semiconductor Company is selected in this design. The prototype of the sensor node is shown in Fig.2.

B. Sensor Node Software Design
The programs of IWSNs sensor node are completed by C language to fulfill temperature sampling and transmitting. The program flow diagram of the sensor node is given in Fig.3.
The initialization of networks and start of BOS is completed at the beginning of program. In here, the coordinator will start a network according to the parameters set by user and the sensor nodes will scan for existing networks. If the condition is suitable, the coordinator will build a specified network. If the sensor nodes find the specified PAN ID, they will attempt to join the network.
According to the procedures of programming, after joining the network built by the coordinator, the sensor node begins the process of data sampling. For the sensor node, sleep mode occupies most of time to reduce its power consumption. For the coordinator, it will be always in waking mode to provide services for the sensor nodes. So, at the beginning of sampling data, the program will query whether the sleep mode is over. If the sensor node wakes up, the process of data collecting and calculating will execute, otherwise it will continue sleep. When the program on the sensor node obtained the temperature value, then it will store the temperature value to the specified variables. Then, the ZigBee protocol stack will call the communication mechanism to send the temperature to the coordinator.

C. Thermocouple Nonlinear Calibration Algorithm
Thermocouple nonlinear calibration is one of the important points impacting the accuracy of the proposed system. Considering the ROM on JN5139 sensor node is constrained, curve fitting method is employed in this application, and an optimization subsection algorithm based on least square method is used to achieve less subsection with request precision. The program flow chart of this algorithm is shown in Fig.4. Firstly, according to the requested precision of system, error !ER as the basis of subsection and the first fitting interval [a,b] are set at the beginning of the algorithm. Then, the algorithm will fit the first curve. After achieved the deviation between theoretical values with fitting values, the algorithm will determine what to do next. If the calculated deviation is greater than the given value, the new fitting interval [b-10, b] will be set for the next fitting process, or fitting interval high limit will increase 10 °C on the original. When the new fitting interval is set, the next fitting process will start. The algo-  rithm will continue until fitting interval high limit reach temperature high limit. This curve fitting algorithm is fulfilled in MATLAB to obtain the fitting curve coefficients and voltagetemperature conversion formula. K-type thermocouple conversion formula for this application is calculated and given in Table I.
These formulae will then be embedded in the sensor node program to calculate the corresponding temperature value according to the input voltage value.
Another question for temperature monitoring using thermocouple is the cold junction compensation. In this system, the digital temperature sensor on the sensor board is used to measure ambient temperature for thermocouple cold junction compensation.

D. Centralized Computer Software Design
The software on centralized computer is responsible for receiving, displaying and recording the data from the coordinator. Considering its flexible conceptive style, favorable man-machine interface and powerful digital signal processing capability, LabVIEW is used to design the software of the centralized computer.
The front panel of this application is shown in Fig.5. On the left of panel, user can select the path of the file to be saved through a dialog. The serial port setting including serial number, baud rate, data bits etc. is on the left panel as well. On the lower left corner, the button named "One-Gragh" is used to choose the display mode. The waveform window is responsible for displaying the curves. On the top right corner, the real-time value of temperature curves is given.
The multithread programming technique of LabVIEW is used to meet the system requirement. The program structure consists of three threads: receiving and saving data thread, display thread and switch mode thread. Fig.6. shows the thread of data receiving and recording. The software receives a set of data each time, including node address, environmental temperature, and measured temperature etc. Each data received through serial port is stored in a local array. In here, a control named "scan from string" is used to ensure that every array have the same data sequence. So, it is convenient to call the array in other thread. Then the program will fetch thermocouple temperature data from the array and assign the data to a local variable to be called in display thread. Finally, the array will be stored in a txt file.

III. EXPERIMENTAL RESULT
To test the system performance, a test system is built up in the laboratory. The temperatures inside two electric heating furnaces are monitored by the proposed IWSNs temperature monitoring system. The experimental setup is shown as Fig.7.
After turning on the furnaces, theirs inside temperatures rise in a fixed rate, then the temperature values displayed in screen increase with the promotion of furnace temperature. The experimental curves are recorded as Fig.8. In the graph, the two curves represent temperature data from node one and node two respectively. The different slope of the two curves indicate the heating current of furnace two is greater than the current in furnace one. The experimental result shows that the proposed IWSN monitoring system can complete the requested task including temperature signals measuring, displaying and recording.   The test about measurement accuracy is also carried out in laboratory. A series of specified voltage values generated by a signal generator are input to the amplify circuit on the sensor node, and the corresponding system output is recorded. The experiment result is given in TABLE II. The comparison between experimental temperature and theoretical value shows that the largest error is 2.3°C in the measuring range from 100°C to 700°C. This error meets the accuracy requirement for general industrial application.

IV. CONCLUSION AND FUTURE WORK
The hardware and software of a multichannel temperature monitoring system based on IWSNs are designed and implemented in this paper. An optimization subsection algorithm based on least square for thermocouple nonlinear calibration is also employed to increase the measurement accuracy. The feasibility and accuracy of the proposed system is verified in the laboratory with an electric furnace temperature monitoring system. Future work will be to look at techniques for designing high accuracy and low power consumption amplifier circuit for the sensor node. In addition, system performance tests in industrial field are also needed to evaluate the impact of harsh industrial environment to the data transmission performance of IWSNs.