Defect Detection System on Stamping Machine Using the Image Processing Method

—Quality products are very influential in creating profits for the company and are also closely related to the level of customer satisfaction. The higher the quality of the products produced by a company, the higher the satisfaction felt by consumers. The biggest challenge in the production process is achieving good quality with a product defect rate close to zero defect. Defects in the product are usually small. This is of course very difficult for workers to inspect each product for a long time. Thus, manual inspection is certainly ineffective and inefficient because humans have a saturation point and get tired if they work for a long time. Previous research on detecting defective objects using image processing has been carried out but has not been able to detect up to the shape and size, while in this study it can detect up to the shape and size. Therefore, to implement an automatic product defect detection system we will use image processing and RFID technology. Image processing is processing on the image using a computer so that the image quality becomes better and produces value information for each color. Image processing techniques consist of image conversion from RGB to grayscale, thresholding (binarization), and morphological operations (segmentation). While RFID is an identification method by using a means called an RFID label or transponder to store and retrieve data remotely This study aims to implement a control system on HMI and also a detection system on defect products using a visual inspection system with the aim of getting the machine effectiveness value. One method to get this value is the Overall Equipment Effectiveness (OEE) method. It is proven by implementing a visual inspection system that gets an accuracy rate of 95.97% to detect rejected products and optimize the OEE presentation value obtained. In this study, the implementation of the production monitoring system was successfully implemented with an average OEE value of 52.49%.


I. Introduction
Manufacturing workshops are engaged in multivarietal and small-scale production. Complicated production processes, tight and difficult production schedules, as well as monitoring and management of all production activities are always the subject of discussion that often disrupts company activities [1], [3]. At this time, in the era of an open and competitive market, a company cannot manage time for small things that can have a big impact on a company. Because a small mistake can lead to a big disaster, especially in the manufacturing sector. If the error continues to occur, it will trigger an unscheduled production stop condition, which can reduce the effectiveness of a machine's performance [4]- [5]. This happens because of decreased feedback related to information on changes in production status after carrying out production instructions [6], [7]. Information that is collected manually can definitely experience data errors caused by human error, so that it will be detrimental to the company because a lot of time will be wasted checking data [8], [10]. One solution is to use a real-time Production Monitoring System (PMS) [11], [13]. PMS will reduce unscheduled production stops, improve spending effectiveness, and the effectiveness of production plans. By implementing a PMS system, a company can maximize the small things that have a big impact on the company in a way that is faster and also more sophisticated. Previous research on detecting defective objects using image processing has been carried out but has not been able to detect up to the shape and size, while in this study it can detect up to the shape and size also previous research has implemented a monitoring system on stamping machines that allows data acquisition from stamping machines with pneumatic power, which has tested the effectiveness of a stamping machine prototype using the Overall Equipment Effectiveness (OEE) method [14]- [16]. However, the process of adding data quality is still done manually by the operator. Where this can still be added to the prototype so that the addition of data becomes automatic so that it can optimize the function of the OEE method itself. Therefore, the application of image processing and RFID technology to stamping machine prototypes can optimize the production system monitoring system in order to maximize marketable production results, without any inspection errors [17] - [19]. Then, with this optimization, it can increase the effectiveness and efficiency of the process of monitoring a production process. Abstract-Quality products are very influential in creating profits for the company and are also closely related to the level of customer satisfaction. The higher the quality of the products produced by a company, the higher the satisfaction felt by consumers. The biggest challenge in the production process is achieving good quality with a product defect rate close to zero defect. Defects in the product are usually small. This is of course very difficult for workers to inspect each product for a long time. Thus, manual inspection is certainly ineffective and inefficient because humans have a saturation point and get tired if they work for a long time. Previous research on detecting defective objects using image processing has been carried out but has not been able to detect up to the shape and size, while in this study it can detect up to the shape and size. Therefore, to implement an automatic product defect detection system we will use image processing and RFID technology. Image processing is processing on the image using a computer so that the image quality becomes better and produces value information for each color. Image processing techniques consist of image conversion from RGB to grayscale, thresholding (binarization), and morphological operations (segmentation). While RFID is an identification method by using a means called an RFID label or transponder to store and retrieve data remotely This study aims to implement a control system on HMI and also a detection system on defect products using a visual inspection system with the aim of getting the machine effectiveness value. One method to get this value is the Overall Equipment Effectiveness (OEE) method. It is proven by implementing a visual inspection system that gets an accuracy rate of 95.97% to detect rejected products and optimize the OEE presentation value obtained. In this study, the implementation of the production monitoring system was successfully implemented with an average OEE value of 52.49%.

A. Research Methods
In this study, the VDI 2206 V-model was used for the design methodology. Based on the V-model VDI 2206, there are several stages of making a system design. Broadly speaking, the stages are system design, domain specific design, and system integration [18], [19].

B. Overview of the System
Implementation of image processing and RFID on stamping machine prototypes as self-identification for production products, is a production tool that will function as a quality control system (Quality Control) automatically, and also collects and distributes the data needed to monitor several production processes from the stamping machine. will be monitored through the HMI. In this system there are several indicators that will be displayed on the user interface, including the amount of production, machine life time, machine actual life, and the actual value of wind pressure at the source, as well as the number of production goods that are fit for sale and not worth selling (in the sense failed quality control processes). Previously collected data will be processed to produce Availability, Performance, Quality, and OEE values of the stamping machine prototype. In addition to displaying data obtained from the production process, the user interface can also control the stamping machine actuators, namely two pneumatic cylinders. The data to be obtained from the production process is detected by sensors and transmitters, namely, infrared sensors, cameras, and pressure transmitters. The following is in Figure 1 which is the architecture of the stamping machine monitoring system.

C. How the System Works
The following is a block diagram of a stamping machine monitoring system that has been designed previously. There are 4 input sections consisting of slave 1 which gets data from the IR sensor for the steady state condition of the stamping machine, and also input from calculating the amount of production with the relay, and also the virtual button from Node-Red, slave 2 gets data from the pressure transmitter sensor, save 3 gets input data from the RFID sensor as data collection on the identity of production goods.
Tool Work System explains that slave one will control the pneumatic cylinder and infrared sensor. The infrared sensor functions as an indicator of the presence of a raw product that must be processed immediately, then the cylinder will function as a ram to carry out product pressing activities, which are controlled by a relay, and the relay will also function as a counter for products that have already been pressed. Slave two will manage the RFID reading sensor whose job is to enter the identity of the production object. Slave three will be in charge of regulating the movement of the servo motor and reading the required wind pressure, the air pressure will be monitored with a pressure transmitter sensor, while the servo motor functions as an actuator to push objects or separate production objects.
The slaves will be connected to the master unit, the Raspberry Pi. The master unit will act as a data collector from the three slaves and display it on Node-Red as the User Interface and also store all data in the MySQL database. The Master Unit will also do all the OEE, Lifetime calculations. The first slave gets input from the virtual button, as well as the IR sensor which will justify whether or not production goods are to be processed. IR sensor data will be sent serially from the slave to the master unit, the Boolean data will be converted into string data using node Js. Then the last data obtained by the first slave is data from the calculations carried out by the relay of each machine which serves as a counter to the amount of production that has been achieved by the stamping machine. The second slave obtains wind pressure data needed for calculating Value Operating Time, wind pressure data will also be sent serially to the master unit and stored in the database, wind pressure data is also displayed on the Node-Red user interface as a reminder of wind pressure status. The third slave will obtain identity data for production objects that must be carried out before the production process takes place. Identity data for production goods is sent to the master unit serially from an integer which will be stored in the database. The master unit also detects production results, calculates Overall Equipment Effectiveness (OEE), and machine lifetime. Then the calculation data is displayed in the user interface and stored in the MySQL database.

III. Results and Discussion
The following is the result of the implementation carried out to solve the problems discussed earlier, this implementation is related to the implementation of the mechanical domain, the electrical domain, and the informatics domain. The integration of the three domains produces a stamping machine prototype that can be controlled and its performance monitored through the HMI on the machine. Figure 2. Shows the implementation of the front-facing mechanical design, this prototype includes aluminum profiles, and wood as the body of the entire prototype, servo motors, pneumatic cylinders, and conveyors as actuators, webcams, pressure transmitters, and infrared as sensors that provide input to the program, and finally the LCD as the HMI of the press machine prototype.

B. User Interface Implementation
Based on the design of the informatic domain that has been made, the making of HMI consists of 7 (seven) main pages namely, Login, Dashboard for operators, dashboard for managers, dashboard for quality department and dashboard for guests, then two monitoring pages for users who are registered as operators and manager. The Login page is the first page that must be accessed by users, to be able to identify which page to go to next. By entering the specified email and password, the HMI will display a popup message indicating whether the user has successfully entered the next page or not. The following is an example of a pop-up message if the user is not registered or incorrect as shown in Figure 3.
Next is the dashboard page for each user, the operator has the right to control the stamping machine and also see production results, all OEE data obtained will be displayed, but cannot change the contents of the data, for users who are registered as managers, cannot control the machine, but can change the contents of the required data, such as data lifetime, planned downtime, loading time, and data trouble, for users who are registered as part of the quality department can only view production results and also change production data, finally for users who are registered as guests, only can view production data, without being able to make any data changes. light indicator, which indicates that the machine is in running or stopped condition, there is also a time indicator, which shows the remaining loading time, downtime and operational time. There is also an indicator to see how much wind pressure is being received by the tool, then a parameter indicator for OEE calculations. This page can only be accessed by users who are registered as operators. Figure 4 shows special page for users who are registered as managers, can only change the data needed by the machine, such as lifetime data, planned downtime, and also loading time for both machines, can also monitor and change production output, and change machine data

C. Visual Inspection System Testing
This test is done by placing objects work of different shapes and positions to find out the angular deviation and size obtained. Table 1 shows the results of the detection with a On objects 5 sizes cannot be detected because they do not find a corner point that can be used as a reference to start measuring surface area. Retrieval of angle magnitude data aims to minimize objects other than "object 1" entering the "good" category in the implementation of the QC process later. In this experiment, an average measurement error of 4.07% was obtained based on the calculation formula: In this test, it can be concluded that the amount of deviation that can occur in the measurement process with this camera is 0.5 cm units for each measurement, if it is more than the measurement process is declared ineffective.

D. OEE Testing
This test was carried out by running a stamping machine prototype and then looking at each OEE parameter obtained on the dashboard monitoring. Then for proof, mathematical and manual calculations are also carried out.
Basically, determining OEE is by the formula: To determine availability, a formula is used: Loading Time To determine Performance, the formula is used: Lastly, to determine the value of Quality: Processed Amount So, with this formula, an experiment was carried out on a stamping machine prototype to simulate whether the system that had been implemented could increase the accuracy value of the OEE percentage itself. After conducting the experiment, the following data was obtained.
In Table 2, it can be seen that the average availability ratio is 58.59%, this depends on the actual time the machine is operating, the less downtime compared to operation time, the greater the availability ratio. Next is the calculation for the performance ratio.
In Table 3, the average performance value is 124.2%,  this is calculated based on a comparison of the number of products produced with the running time of the machine, the theoretical cycle time serves to determine the ideal amount of time for one product to finish the production process, and determine by the operator based on trial and error.
In Table 4, it is shown that the average presentation obtained is 76.6%. This is obtained by calculating how many objects are represented as Good Condition through the visual inspection system previously described. So, after all the components for calculating OEE have been obtained, the next step is the calculation of the OEE itself.
In Table 5, the average OEE value obtained is 52.49%. By using the formula listed from various sources, it can be said that the OEE value obtained using this mathematical method proves that the implemented system can add a level of accuracy to the quality checking section.
While The OEE value of the equipment is in ideal condition which is the standard of the class enterprise world is 85% (Dal, 2000). This value with the composition of the three ratios as follows: − Availability ratio of 90% or more − Performance ratio of 95% or more, and − Quality ratio of 99% or more.

IV. Conclusion
The prototype of the defect detection system was successfully implemented with the machine sub-sections running and the measurement results showing the level of effectiveness of the stamping machine, with production data in accordance with manual calculation values as evidenced by validation of production data. Measuring the effectiveness level of the stamping machine prototype using the OEE method shows an average value of 52.49% where the OEE value is obtained based on the calculation of each parameter which has been calculated mathematically using a program or manual calculation.