Condition monitoring based on IoT for predictive maintenance of CNC machines

Machining operation must be maintained for a long time in every period to achieve high productivity and prevent sudden failure or breakdown. This study aims to monitor conditions of four CNC machines from different places simultaneously using Internet of things (IoT) for predictive maintenance. Vibration signals of four CNC machines are measured using an accelerometer to collect and send signals directly to the database in real time. Results showed that acceleration signal in both time and frequency domains can identify conditions of each machine in real time and simultaneously monitor the condition of four CNC machines at different places through IoT for predictive maintenance


Introduction
Many remarkable things have been invented from all over the world through the years. A machine created during the industrial revolution has remarkably affected the daily lives of humans. Machine tools play an important role in the global economy. Wang et al. [1] explored 27 major countries involved in metal cutting processes that form the machinetool industry and cover 95% of the total production. The worldwide machine-tool production was estimated at USD 81.2 billion in 2014, thereby indicating that the production increment for machine tools in the past few decades is primarily due to global industrialisation.
The machining process is widely used in any manufacturing industry. Therefore, machine-tool maintenance systems play a key role in ensuring the sustainability of both machine tools and manufacturing processes [2]. Machine-tool maintenance has evolved from failure maintenance to preventive and predictive maintenance through the years. Early detection of the machine condition can help in predictive maintenance. Vibration analysis is generally used in the predictive maintenance procedure and as a support for decisions in machinery maintenance. This type of analysis can be performed to avoid the occurrence of failure. The increased level of vibration in machines typically indicates the imminent occurrence of breakdown or failure. The nature and severity of machine defect can be determined and machine failure can be predicted via monitoring and analysis of vibration [3].
Monitoring the condition of the machine via vibration analysis provides many benefits, including increased revenue, improved efficiency of production, reduced downtime, reduced maintenance costs, increased availability of machinery and reduced stocks of spare parts [4]. Patil et al. [3] ran electrical rotating machines under normal operating conditions as the reference test and then applied vibration analysis to monitor their different operating conditions. Nolden et al. [4] applied predictive maintenance using Internet of things (IoT) for condition monitoring of complex machinery, such as generators. Signals obtained from vibration sensors in the time domain are converted to the frequency domain using FFT algorithm in the gateway, and waveform patterns are analysed for fault detection. Li [5] performed a similar study but used an advanced processing technique for predictive maintenance. Tavana et al. [6] recently reported challenges, open issues and future research planning using the IoT approach with enterprise (ERP) and manufacturing (MRP) resource planning systems. Many companies use MRP and ERP for high-level decision making because both systems provide centralised data management according to material planning requirements and integrate production and purchase processes between companies and suppliers [7]. However, only large industries can apply these systems because the total cost of small-to-medium industries will increase although the integration process can assist big data management, which is the foundation of data-driven manufacturing.
A cost-effective predictive maintenance approach is necessary to ensure that machines can work properly over many hours of efficient operation with the required accuracy [1,2,5]. A maintenance management system that uses advanced technologies and techniques for predictive maintenance, such as IoT sensor communication, is essential [1,4,8]. Condition monitoring is important for predicting possible failures in machining facilities. Therefore, this study aims to monitor the condition of IoT-based CNC machines for predictive maintenance. Figure 1 shows the process flow for monitoring the condition of four CNC machines in real time through IoT and machine maintenance. MMA8451, the sensor used for monitoring the machine condition in accelerometers, demonstrates the advantages of low cost, high precision with 14-bit ADC, wide usage range of ±2 to ±8 g and compatibility with Arduino and other microcontrollers [5]. The spindle of the machine, which is the source of vibration, is the optimal location for the sensor. Raspberry Pi 3 Model B+, a low-cost and a small card-sized device, is the processing unit of the proposed system and platform for interfacing with many devices [6]. Virtual network computing (VNC) is a graphical desktop sharing system that uses remote frame buffer (RFB) protocol to control another computer remotely. Each IP address of Raspberry Pi is configured from the VNC viewer with the router. The raspberry pi will then collect raw data from the sensor and send them to the database in real time. Figure 2 presents the VNC viewer that can control four Raspberry Pi devices with one window. A database is an organised collection of data generally stored in and electronically accessed from a computer network. Firebase is a service provider of real-time and backend databases. Figure  3 shows how the Firebase database receives raw data from all Raspberry Pi devices in real time. Python is a powerful and modern computer programming language supported by Raspberry Pi [9]. Python software imports raw data from the database in real time to analyse the vibration signal.

Methodology
must be integrated with acceleration to obtain the velocity as follows: RMS velocity ( ) is obtained from the velocity to identify the machine condition as follows: The sensor reads the spindle vibration after mounting it on all CNC machines. The sensor is then connected to Raspberry Pi devices, which must be configured with the IP address of the workstation router. The Raspberry Pi will send data to the database in real time. Python is then used to import data from the database, analyse the signal in terms of acceleration in the time domain and apply the FFT technique to obtain the acceleration in the frequency domain. From acceleration integrated the signal respect of time to find the velocity. Lastly, the RMS velocity value based on ISO 10816 is obtained from the velocity. The guideline for machinery vibration severity shown in Figure 3 can be used to identify whether the machine condition is good, satisfactory, unsatisfactory or unacceptable.
A GUI is developed to show the acceleration signal in the time domain and determine whether the condition of the machine is good, satisfactory, unsatisfactory or unacceptable. Four vibration signals (CNC1, CNC2, CNC3 and CNC4) were plotted to demonstrate the amplitude of the acceleration signal and indicate the status of the machine as good with a green light, satisfactory with a green light, unsatisfactory with an orange light or unacceptable with a red light.

Fig. 3. Vibration severity according to ISO 10816
Machine condition monitoring was simultaneously performed on four different CNC machines. The experiment was repeated thrice to compare the value of velocity RMS and condition of every machine in each experiment. Figure 4a illustrates the signal of the spindle's vibration for CNC 1 in the time and frequency domains. The FFT graph shows that the peak of acceleration is at 32 Hz. The velocity RMS value of 1.39 mm/s indicated that the condition of CNC 1 is satisfactory. Figures 4b and 4c illustrate the signal of spindle's vibration for CNC 2 and CNC 3, respectively, in the time and frequency domains. The FFT graph shows that the peak of acceleration for CNC 2 and CNC 3 is at 10 and 8 Hz, respectively. Velocity RMS values of 0.55 and 0.33 mm/s for CNC 2 and CNC 3, respectively, indicated that both are in good condition. Figure 4d illustrates the signal of the spindle's vibration for CNC 4 in the time and frequency domains. The FFT graph shows that the peak of acceleration for CNC 4 is at 57 Hz. The value of velocity RMS at 2.08 mm/s indicated that the condition of CNC 4 is unsatisfactory.  Figure 6 shows the GUI for different CNC machine conditions based on the vibration signal on the rms velocity according to ISO 10816. The results showed that the condition of CNC 1 is satisfactory whilst that of CNC 2 and CNC 3 is good and CNC 4 is unsatisfactory. Lastly, the acceleration of vibration signals was plotted to monitor four CNC machines in real time using IoT.

Fig. 5 RMS velocity of four CNC machines in three experiments
Obtaining an unacceptable condition, which requires a considerable amount of machine vibration, was very difficult because all machines in the laboratory are in good condition. Notably, obtaining an unacceptable condition by breaking tools for the sake of the experiment is very difficult and dangerous. CNC 4 only demonstrated an unsatisfactory condition after three end mill tools were broken.

Conclusion
The relationship between the vibration of the machine and failure is obtained by measuring the vibration of the machine and analysing the signal of vibration to evaluate the machine condition. Early deduction of the machine state will help schedule activities and conveniently reduce downtime and losses for predictive maintenance. The acceleration of vibration signals was plotted to monitor four CNC machines in real time using IoT.