Real-Time Implementation of a Fully Automated Industrial System Based on IR 4.0 Concept

: With the advent of modern communication and control strategies, existing industrial enterprises are now being transformed as per Industrial Revolution (IR) 4.0 standards to maximize production rates and monetary gains. To cope with the pace of the modern technological revolution, the Government of Saudi Arabia has launched “Vision 2030”. This research article presents the full automation process of an existing production line at the College of Engineering, King Saud University, as per “Vision 2030” guidelines. Initially, a production line was designed to produce ﬂavored yogurt bottles from a user-deﬁned ﬂavor and plain yogurt mixture. The research project was completed in two phases. During phase I, smart sensing, control, and automation equipment were used to minimize human intervention, the so-called semi-automated mode of operation. A bottle-feeding mechanism and robotic arms were later integrated to eliminate human intervention during the second phase. Moreover, during phase II, Node-RED, Telegram Bots, and a Raspberry Pi 4 controller were used to achieve IoT-based monitoring and control as per Industry 4.0 requirements. A comparative performance analysis was conducted between semi-automated and fully automated modes of operation to demonstrate the beneﬁts of the fully automated operational mode. The performance of the fully automated system was found to be superior in comparison with the semi-automated system.


Introduction
The industrial yields and the associated financial gains can be successfully augmented by implementing automation and supervisory control strategies. The proposed smart industrial systems depend on networked machines with growing levels of intelligence and self-sufficiency, moving far beyond conventional low-power sensors. Developing a self-governing and self-regulating production system based on modern sensing and monitoring equipment may be recognized as Industry 4.0 if it follows the standards and guidelines specified in the 4th Industrial Revolution (IR 4.0) [1][2][3]. Conventional resources are transformed into intelligent entities so that they can sense, act, and behave within a smart environment. Increased manufacturing flexibility, mass customization, superior quality, and improved productivity are the expected outcomes of IR 4.0 implementation in the industrial sector. Zhong et al. [4] presented a comprehensive review of technologies associated with IR 4.0, such as intelligent manufacturing, Internet of Things (IoT)-enabled manufacturing, and cloud computing. The authors depicted global movements in intelligent manufacturing, involving governmental strategic plans from various countries and strategic plans from major multinational companies in the European Union, the United States, Japan, and China. Current challenges and future research directions related to intelligent manufacturing were explained in detail. Giallanza et al. [5] developed an advanced digital solution for a closed power loop test bench designed to test high-power transmissions for a naval unit. The authors reported improved system performance in transmissions for a naval unit. The authors reported improved system performance in terms of reduced noise and vibrations, increased efficiency of lubrication, reduced consumption, installation, and maintenance cost of the entire system [6,7]. In another study, Giallanza et al. [8] used IR 4.0-based technologies to develop a smart shipyard for testing elevated power thrusters before installing them on high-speed crafts.

The Emergence of IR 4.0
The IR 4.0 is a concept initially conceived by the German nation to illustrate its new strategy of developing adaptable production systems based on internet technology [9,10]. The industrial sector is crucial to every country's economy and drives progress and development. Industries in any country focus on manufacturing and delivering added value to the products by converting the raw materials into final products [11,12]. The term IR 4.0 became well known in 2011 when a group of representatives from different sectors like politics, business, and academia in Germany promoted this idea to consolidate the competitiveness of German industries [13]. The Federal Government of Germany showcased IR 4.0 as a novel, emerging strategy which facilitates industrial and logistics networks to thoroughly utilize the internationally accessible information and communications systems for an automated interchange of valuable data [14,15]. Aiello et al. [16] presented a decision support structure including automated data collection and analysis methods to evaluate the accurate functioning of the propulsion monitoring system of a ship and for early discovery of nascent breakdowns. In another study, Aiello et al. [17] conducted a gap analysis between existing business patterns and the next-generation digitalized shipping industry. The authors examined the maturity level and the technological obstacles related to smart shipping industry. Frank et al. [18] highlighted the implementation patterns of IR 4.0 enabling technologies used by different manufacturing firms. The authors proposed a conceptual framework for such technologies by dividing them into front end and base technologies. Different stages of the Industrial Revolution are shown in Figure  1.

Enabling Technologies for IR 4.0
The list of technologies related to IR 4.0 is expansive. The leading technologies associated with IR 4.0 include augmented reality, cloud computing, cyber-physical systems, big data, additive manufacturing, cybersecurity, smart robotics, modeling and simulation, and system integration [19,20]. Cyber-physical systems comprise transformative technologies for handling interconnected systems by linking physical resources and computational technologies. Lee et al. [21] proposed a five-level architecture of cyber-physical systems (CPS), the so-called 5C architecture, which offers step-by-step guidelines for building and deploying a CPS for manufacturing industries. Uhlemann et al. [22] presented the Digital Twin concept for a production process by combining the fabrication system with

Enabling Technologies for IR 4.0
The list of technologies related to IR 4.0 is expansive. The leading technologies associated with IR 4.0 include augmented reality, cloud computing, cyber-physical systems, big data, additive manufacturing, cybersecurity, smart robotics, modeling and simulation, and system integration [19,20]. Cyber-physical systems comprise transformative technologies for handling interconnected systems by linking physical resources and computational technologies. Lee et al. [21] proposed a five-level architecture of cyber-physical systems (CPS), the so-called 5C architecture, which offers step-by-step guidelines for building and deploying a CPS for manufacturing industries. Uhlemann et al. [22] presented the Digital Twin concept for a production process by combining the fabrication system with its digital counterpart as a base for optimization with a reduced delay between the time of data acquisition and the formation of the Digital Twin.
The objective of the IR 4.0-based strategy is the digitalization of the production industry, concentrating on establishing intelligent factories with manufactured goods and services interlinked through the internet of things and services [23,24]. IR 4.0 promotes the design of devices capable of developing experience over time, having intercommunication with each other, and making decisions, ultimately leading to self-optimization of the whole manufacturing process [25]. The famous IR 4.0 related technologies are listed in Figure 2.
Actuators 2021, 10, x FOR PEER REVIEW 3 of 16 its digital counterpart as a base for optimization with a reduced delay between the time of data acquisition and the formation of the Digital Twin. The objective of the IR 4.0-based strategy is the digitalization of the production industry, concentrating on establishing intelligent factories with manufactured goods and services interlinked through the internet of things and services [23,24]. IR 4.0 promotes the design of devices capable of developing experience over time, having intercommunication with each other, and making decisions, ultimately leading to self-optimization of the whole manufacturing process [25]. The famous IR 4.0 related technologies are listed in Figure 2. Jamwal et al. [26] presented a systematic review on the key enabling technologies for IR 4.0 based manufacturing sustainability. The authors discussed in detail the role and impact of different IR 4.0 technologies for manufacturing sustainability. Cyber-physical systems, Internet of Things, artificial intelligence, big data analytics, and digital twins have been identified as the major IR 4.0-related technologies.

Mass Customization Idea
Fulfilling individual customers' requirements is becoming a prominent factor in controlling the competitiveness of an organization. Industry 4.0 has revolutionized the concept of mass customization by integrating sensors and communication and control equipment in the production lines [27][28][29]. Mass customization is the ability to produce what the customer desires profitably and with no loss of productivity. The objective is to make the manufacturing process more customer-oriented. Zawadzki and Żywicki [30] proposed different techniques that facilitate the design process of individualized goods and the organization of their production for implementing the mass customization strategy in a smart factory. The authors concluded that smart design and production control were vital elements of a smart industrial unit with mass customization capability. Simon et al. [31] developed a novel IR 4.0 based modeling approach using a fuzzy-based multi-criteria decision-making process to manage customized mass production in the food industry. The goal was to build a procedure for managing the production line to manufacture a full spectrum of goods without reconfiguring the production line. The authors developed an expert system for evaluating the status of the production line based on the collected data. However, less profit was reported by the authors due to customized production in comparison with mass production. Jayal et al. [32] highlighted recent trends in developing Jamwal et al. [26] presented a systematic review on the key enabling technologies for IR 4.0 based manufacturing sustainability. The authors discussed in detail the role and impact of different IR 4.0 technologies for manufacturing sustainability. Cyber-physical systems, Internet of Things, artificial intelligence, big data analytics, and digital twins have been identified as the major IR 4.0-related technologies.

Mass Customization Idea
Fulfilling individual customers' requirements is becoming a prominent factor in controlling the competitiveness of an organization. Industry 4.0 has revolutionized the concept of mass customization by integrating sensors and communication and control equipment in the production lines [27][28][29]. Mass customization is the ability to produce what the customer desires profitably and with no loss of productivity. The objective is to make the manufacturing process more customer-oriented. Zawadzki andŻywicki [30] proposed different techniques that facilitate the design process of individualized goods and the organization of their production for implementing the mass customization strategy in a smart factory. The authors concluded that smart design and production control were vital elements of a smart industrial unit with mass customization capability. Simon et al. [31] developed a novel IR 4.0 based modeling approach using a fuzzy-based multi-criteria decision-making process to manage customized mass production in the food industry. The goal was to build a procedure for managing the production line to manufacture a full spectrum of goods without reconfiguring the production line. The authors developed an expert system for evaluating the status of the production line based on the collected data. However, less profit was reported by the authors due to customized production in comparison with mass production. Jayal et al. [32] highlighted recent trends in developing enhanced sustainability grading methods for products and processes. The authors developed predictive models and optimization techniques for sustainable manufacturing processes.

Smart Technologies for Industrial Automation
Modern industries seek to adapt to rapid technological expansion through cyberphysical fabrication systems, sovereign, self-organized manufacturing resources, and tangible communication equipment. The goals are usually accomplished with cloudbased data archives, big data analysis, cybersecurity, 3D printing, industrial IoT, artificial intelligence, and automation [33,34]. However, integrating modern technologies into prevailing industrial enterprises requires extensive research, investigation, and prototype development. All the above-mentioned technologies are considered the main pillars of IR 4.0, without which one cannot even think about the fourth Industrial Revolution. Nevertheless, the pivotal role in the digitization process is played by "data". Effective analytical tools for big data analysis are critical for industrial enterprises to enjoy the full benefits of IR 4.0 technologies [35]. The usage of Node-RED as a data flow-based programming tool is rapidly getting popular in the industrial sector, as IoT devices from smart factories generate substantial datasets that need to be stored, handled, and analyzed.
Many researchers are working in the area of industrial automation and digitization using smart sensors and modern communication technologies. Node-RED is a flowbased development tool for visual programming established initially by International Business Machines Corporation (IBM) for wiring together hardware devices, application programming interfaces (APIs), and online services as part of the Internet of Things (IoT) [36]. Lekić and Gardašević [37] presented an IoT-based application for transmitting data gathered by temperature and humidity sensors, connected to a Raspberry Pi controller via a Node-RED interface, to an IBM Bluemix Cloud. The user can retrieve the collected data through a smart cell phone. The authors demonstrated the ease with which the IoT-based sensors can be integrated with the Node-RED platform. Kodali and Anjum [38] presented the idea of a smart home using an IoT-based automation system, which employs a Node-RED interface and a message queuing telemetry transport (MQTT) broker to carry out an easy interconnection between different home appliances. A remote monitoring and control scheme was established by the authors for the appliances in the automated home. Some researchers evaluated the possibility of integrating data flow-based software components with the legacy industrial automation systems. In this regard, Tabaa et al. [36] presented a Node-RED-based industrial wireless communication system using Modbus and MQTT protocols for machine-to-machine communication in smart factories. The authors concluded that wireless sensor networks are a prerequisite for effective industrial control and automation. Toc and Korodi [39] proposed a serial Modbus to Open Platform Communications Unified Architecture (OPC UA) wrapper using IoT2040 and RUT240 as hardware components while Node-RED as a software component. The authors tested the proposed wrapper in laboratory as well as in an existing wastewater pumping station. An increased efficiency and availability were experimentally demonstrated by the authors due to the implantation of proposed Modbus-OPC UA wrapper in the water industry.

Significance of Current Research
The challenges for adopting IR 4.0 technologies in developing countries are separate from those of established countries [40,41]. The Saudi government has launched "Vision 2030" to digitally transform existing industrial manufacturing enterprises to cope with the fast-paced modern industrial era [42]. This paper focuses on developing a fully automated production line based on IR 4.0 concepts using state-of-the-art modern technologies to highlight the challenges and opportunities associated with IR 4.0 implementation in KSA. The prime objective of the present research was to implement a fully automated industrial production system. A mass customized production system was fabricated in a single chain to produce flavored yogurt to demonstrate the IR 4.0 concept. The system comprises an automated three-flavor yogurt filling machine built from scratch and incorporated digitalization and networked fabrication techniques, including packing, storing in a refrigerated storage area, and a retrieval system. Smart monitoring and control procedures have been implemented using sensors and IoT technology. The programmable controller, robotic arms, and communication protocols have been used to make the process fully automated, smart, and free from human intervention. The performance of the developed system has been analyzed, and the benefits achieved through smart monitoring and control have been listed.
The present research article is organized as follows: Section 1 introduces the presented research topic in detail with historical background and related modern research activities. The significance of current research has been highlighted. Section 2 explains a complete physical description of the existing system with proposed modifications. Moreover, the stepwise operation of the system has been described covering all processes. The results have been presented and discussed in Section 3, followed by conclusions drawn from the research.

Materials and Methods
An automatic yogurt filling system has been implemented in two phases as per IR 4.0 protocols during the present research project. The preliminary details of the system and modifications made during the first automation can be found in the published literature [43,44]. Therefore, this paper first introduces the system components in detail, followed by the detailed functioning of the system.

System Description
The system initially consisted of a conveyor belt, containers for base material and flavors, pneumatic pistons, solenoid valves, diaphragm pumps, tables for storing empty and filled bottles, and electric motors. During the automation phases, different sensing and monitoring equipment were added. The top and side views of the given system during the first stage of the second automation phase are shown in Figure 3. automated three-flavor yogurt filling machine built from scratch and incorporated digitalization and networked fabrication techniques, including packing, storing in a refrigerated storage area, and a retrieval system. Smart monitoring and control procedures have been implemented using sensors and IoT technology. The programmable controller, robotic arms, and communication protocols have been used to make the process fully automated, smart, and free from human intervention. The performance of the developed system has been analyzed, and the benefits achieved through smart monitoring and control have been listed.
The present research article is organized as follows: Section 1 introduces the presented research topic in detail with historical background and related modern research activities. The significance of current research has been highlighted. Section 2 explains a complete physical description of the existing system with proposed modifications. Moreover, the stepwise operation of the system has been described covering all processes. The results have been presented and discussed in Section 3, followed by conclusions drawn from the research.

Materials and Methods
An automatic yogurt filling system has been implemented in two phases as per IR 4.0 protocols during the present research project. The preliminary details of the system and modifications made during the first automation can be found in the published literature [43,44]. Therefore, this paper first introduces the system components in detail, followed by the detailed functioning of the system.

System Description
The system initially consisted of a conveyor belt, containers for base material and flavors, pneumatic pistons, solenoid valves, diaphragm pumps, tables for storing empty and filled bottles, and electric motors. During the automation phases, different sensing and monitoring equipment were added. The top and side views of the given system during the first stage of the second automation phase are shown in Figure 3. The proposed system has been implemented in accordance with IR 4.0 standards for rendering human intervention to a minimum level. The process flow diagram of the proposed system during the first stage of phase II is shown in Figure 4. The empty bottles during this stage are placed on the table and are placed on the conveyor belt by the robotic arm. At the later stages of the second automation phase, a bottle-feeding system with a pneumatic piston to push the empty bottles upward will be added to the existing system. The proposed system has been implemented in accordance with IR 4.0 standards for rendering human intervention to a minimum level. The process flow diagram of the proposed system during the first stage of phase II is shown in Figure 4. The empty bottles during this stage are placed on the table and are placed on the conveyor belt by the robotic arm. At the later stages of the second automation phase, a bottle-feeding system with a pneumatic piston to push the empty bottles upward will be added to the existing system. Actuators 2021, 10, x FOR PEER REVIEW 6 of 16 The Laboratory of Computer Integrated Manufacturing, Industrial Engineering Department, King Saud University, Saudi Arabia, is equipped with a mass customization yogurt filling machine, which is mainly designed to handle the orders received from customers for supplying a bulk quantity of simple and flavored yogurt [4]. In addition, the developed system is designed to manage orders of different volumes of plain yogurt and flavors mixtures, and typically, it consists of the following main components.

•
Node-RED provides a dashboard interface that displays different sensor information. Thus, it allows for creating a spectacular interface without the need for special programming language knowledge, for integrating software and hardware components [45,46]. This paper describes an innovative smart system based on open-source resources such as Node-RED IoT server with the web interface developed using Raspberry Pi. By applying these open-source platforms, this solution provides real-time data transmission and technical and economic efficiency. • Wago 750-8202 programmable field-bus controller (PFC 100) is a compact programmable logic controller (PLC) which has been used to automate all customized sequential orders of YFM. The PFC's modular concept makes it highly flexible, alongside its rich selection of input/output modules and robustness. Furthermore, since it is possible to connect all the input/output modules of the PFC to a controller, it can process analog and digital signals internally from the automation environment.

•
Fanuc LR Mate 200ic Robot is used to place the empty bottles on the conveyor belt and the filled bottles from the conveyor belt to the storage system. • Field sensors (photoelectric proximity sensor and proximity sensor) receive information from the physical environment and use built-in computing resources to perform predefined functions when specific input is detected and process data before onward transmission. In addition, they are used for triggering the initiation of the filling process and completion process. • NFC module sends a detected digital control signal to the system controller allowing the plate that holds empty bottles to move toward the filling station. • Solenoid valves are the most frequently used control elements in fluidics. Their tasks are to shut off, release, dose, distribute, or mix fluids [47]. They are used here to release the liquid for a defined time interval to fill up the required quantities and volumes of plain yogurt and flavored. The Laboratory of Computer Integrated Manufacturing, Industrial Engineering Department, King Saud University, Saudi Arabia, is equipped with a mass customization yogurt filling machine, which is mainly designed to handle the orders received from customers for supplying a bulk quantity of simple and flavored yogurt [4]. In addition, the developed system is designed to manage orders of different volumes of plain yogurt and flavors mixtures, and typically, it consists of the following main components.

•
Node-RED provides a dashboard interface that displays different sensor information. Thus, it allows for creating a spectacular interface without the need for special programming language knowledge, for integrating software and hardware components [45,46]. This paper describes an innovative smart system based on open-source resources such as Node-RED IoT server with the web interface developed using Raspberry Pi. By applying these open-source platforms, this solution provides real-time data transmission and technical and economic efficiency. • Wago 750-8202 programmable field-bus controller (PFC 100) is a compact programmable logic controller (PLC) which has been used to automate all customized sequential orders of YFM. The PFC's modular concept makes it highly flexible, alongside its rich selection of input/output modules and robustness. Furthermore, since it is possible to connect all the input/output modules of the PFC to a controller, it can process analog and digital signals internally from the automation environment. • Fanuc LR Mate 200ic Robot is used to place the empty bottles on the conveyor belt and the filled bottles from the conveyor belt to the storage system. • Field sensors (photoelectric proximity sensor and proximity sensor) receive information from the physical environment and use built-in computing resources to perform predefined functions when specific input is detected and process data before onward transmission. In addition, they are used for triggering the initiation of the filling process and completion process. • NFC module sends a detected digital control signal to the system controller allowing the plate that holds empty bottles to move toward the filling station. • Solenoid valves are the most frequently used control elements in fluidics. Their tasks are to shut off, release, dose, distribute, or mix fluids [47]. They are used here to release the liquid for a defined time interval to fill up the required quantities and volumes of plain yogurt and flavored. • Pneumatic pistons are logic actuators that produce force in a linear displacement using compressed air. A pneumatic cylinder with an air-port holds the piston in place. The piston has a disc shape that fits into the pneumatic cylinder. The force developed by compressed gas is transferred by the piston rod to the object that requires the motion. They are used here to push the empty bottles in the conveyor track one by one. • Raspberry Pi 4 is a cheap version of the Raspberry Pi controller. Raspberry generalpurpose input/output (GPIO) is a feature inside the Pi 4 model located at the board's top edge. The pins are designated as input or output and may be used for various purposes [48]. Raspberry Pi 4 model B was used here with Node-RED.
Raspberry Pi is a small, powerful, cheap, hackable, and education-oriented computer board introduced in 2012. A Raspberry Pi operates like any other computer by using an operating system. Among its advantages are a faster processor, small size, open-source, support for multiple sensors, and low cost. In contrast, its disadvantage is that it cannot multitask and has a slow processor.

Automated Yogurt Filling Process
The operation of the proposed system requires no human intervention due to the implementation of full automation and control strategy in accordance with IR 4.0 principles. The system works on the idea of customized production as it can fulfill the individual customers' demands. The customers can freely make their own choices regarding the quantity of plain yogurts and available flavors. The details of customers' orders are pasted on the front sides of empty bottles. In the beginning, the robotic arm transfers the empty bottle from a bottle-feeding system on the left side to place it on the plate (the start station). As the sensor detects the bottle, a signal is sent to the controller to move the plate. In the next station, the Near Field Communication (NFC) module reads the tag that exists on the front side of the bottle to get the information of the customer order (amount and flavor). Next, the data from the NFC module is sent to the controller allowing the plate to move to the filling station. When the filling station's sensor detects the bottle, the plate stops. The manipulator in this station adjusts itself to the filling position and fills the empty bottles depending upon the information received from the NFC module, according to the customer's demands. After the filling process is done, the plate moves to the end of the production line, enabling a rest sensor and stopping at the end station, where the robotic arm picks the final product and puts it in a temporary storage area on the right side. The process flow chart of the yogurt filling process is shown in Figure 5. The filling process is initiated by pressing the "Start" button. The robot picks the empty bottles and places them on the conveyor belt. When a bottle is detected at "Start Station", the pneumatic piston goes down, and the bottle moves to "Scan Station". At the "Scan Station", if the bottle is detected as empty, the pneumatic piston goes down, and the empty bottle moves to the filling station. The plain yogurt is filled in the empty bottle by opening the solenoid valve. The pneumatic piston goes down, and the bottle moves to the next step, where the customer's defined flavor is filled in the bottle by opening the solenoid valve. After the filling process is finished, the relevant pneumatic piston goes down, and the filled bottle is conveyed to the endpoint. The proximity sensor fitted at the end of the conveyor originates the next event, which is transferring the filled yogurt bottles to the relevant location in the cold storage by a robotic arm. The Node-RED interface has been integrated with communication and control equipment to show the status of sensors installed in the system and facilitate the customers in making their own choices in terms of quantity and flavors of yogurts. front of the bottle ready station. Node-RED controls the filling process and receives feedback from the end station.
MQTT is a universal transfer protocol that offers an easy and lightweight method of transmitting messages [49]. It uses a bandwidth that allows remote connections to quickly exchange data between clients, thus making it an efficient transfer protocol commonly used in IoT applications [50]. An MQTT node is available in Node-RED, permitting Mosquito-based data communications.

Node-RED Implementation
During the second phase of automation, Node-RED was integrated to allow the system to operate as an IoT-based system. Moreover, a bottle-feeding system was also installed to replace the empty bottles' storage table. The best way to synchronize Node-RED with the production line is to control the bottle-feeding system that has been added in front of the bottle ready station. Node-RED controls the filling process and receives feedback from the end station.
MQTT is a universal transfer protocol that offers an easy and lightweight method of transmitting messages [49]. It uses a bandwidth that allows remote connections to quickly exchange data between clients, thus making it an efficient transfer protocol commonly used in IoT applications [50]. An MQTT node is available in Node-RED, permitting Mosquito-based data communications.
The Node-RED Dashboard module contains a collection of Node-RED nodes that can quickly generate a live data dashboard. The whole flow process for the filling system automation is further separated into four flow subsets. The first subset is for putting the system to the start mode. The second and third subsets select the flavor and quantity of yogurt and flavor, respectively, while the fourth subset starts and stops the filling process.

Working of the Node-RED
The whole flow process of Node-RED has been divided into two parts, i.e., the software part and the hardware part.

The Software Part
Two options are given to enable the user to control the production. The smart sensors provided by EWelink Company were used in this project. The basic idea about the first flow set, as shown in Figure 6, is that it is triggered by either sending a command message from the Telegram Bot or by pressing the dashboard start button. The Node-RED Dashboard module contains a collection of Node-RED nodes that can quickly generate a live data dashboard. The whole flow process for the filling system automation is further separated into four flow subsets. The first subset is for putting the system to the start mode. The second and third subsets select the flavor and quantity of yogurt and flavor, respectively, while the fourth subset starts and stops the filling process.

Working of the Node-RED
The whole flow process of Node-RED has been divided into two parts, i.e., the software part and the hardware part.

The Software Part
Two options are given to enable the user to control the production. The smart sensors provided by EWelink Company were used in this project. The basic idea about the first flow set, as shown in Figure 6, is that it is triggered by either sending a command message from the Telegram Bot or by pressing the dashboard start button. If the system's starting is done from Telegram Bot, the two nodes attached to it will be triggered, which are "Set Telegram Mode" and "Read All Sensors State". The "Set Telegram Mode" node will set the whole flow tab to telegram mode. It will also save the senders' information and set its context as a flow. Later it will send a message to the sender saying, "Flavor Selection?" and various options will appear on the screen. On the other wire, the "Read All Sensors State" node will be triggered, which will read all sensors' states every second, then set its context as a flow, so all nodes in other flows know the latest state of the sensors.
While if the starting of the system is done through the dashboard start button, the same process will happen with slight changes. First, the "Set Dashboard Mode" node will be triggered to enable the dashboard mode; then, the "Read All Sensors State" node will be triggered as previously mentioned. Afterward, the dashboard texts will appear informing the sensors' states, as shown in Figure 7. The dashboard interface displays useful information like start and emergency stop buttons, quantity selection, and production execution, system state, flavor selection, and demand for specific flavors. Two flavors, namely mango and blueberry, are available for selection apart from plain yogurt. Once the quantity and demand are selected as per customers' requirements, the production execution button is pressed to initiate the yogurt filling process. If any dangerous situation arises either due to unexpected events or equipment malfunctioning, the emergency stop button can be pressed to halt the production execution process. This step is necessary to ensure the safety of humans and machines involved in the production process.
The second flow set starts from the point where the flavor selection takes place. For the Telegram users, after the flavor options popped up as mentioned in the first flow, selecting a specific flavor will trigger the above flow, as shown in Figure 8. If the system's starting is done from Telegram Bot, the two nodes attached to it will be triggered, which are "Set Telegram Mode" and "Read All Sensors State". The "Set Telegram Mode" node will set the whole flow tab to telegram mode. It will also save the senders' information and set its context as a flow. Later it will send a message to the sender saying, "Flavor Selection?" and various options will appear on the screen. On the other wire, the "Read All Sensors State" node will be triggered, which will read all sensors' states every second, then set its context as a flow, so all nodes in other flows know the latest state of the sensors.
While if the starting of the system is done through the dashboard start button, the same process will happen with slight changes. First, the "Set Dashboard Mode" node will be triggered to enable the dashboard mode; then, the "Read All Sensors State" node will be triggered as previously mentioned. Afterward, the dashboard texts will appear informing the sensors' states, as shown in Figure 7. The dashboard interface displays useful information like start and emergency stop buttons, quantity selection, and production execution, system state, flavor selection, and demand for specific flavors. Two flavors, namely mango and blueberry, are available for selection apart from plain yogurt. Once the quantity and demand are selected as per customers' requirements, the production execution button is pressed to initiate the yogurt filling process. If any dangerous situation arises either due to unexpected events or equipment malfunctioning, the emergency stop button can be pressed to halt the production execution process. This step is necessary to ensure the safety of humans and machines involved in the production process. Actuators 2021, 10, x FOR PEER REVIEW 10 of 16  The message will go through the language processing node, which removes spaces from the message. Next, the node fixes any errors if someone tries to write instead of selecting. Next, it goes through the "Flavor Selection" node, which sets its context as a flow; then, the message goes to the function node containing the text "How Many?" and another option sent to the Telegram chat for the demand desired.
The other way is similar but for the dashboard where there will be buttons for the flavor selection and a text will appear showing the selected flavor.
As shown in Figure 9, this third flow set allows the dashboard users to adjust the amount of yogurt in the bottles as per customers' demand. However, the demand selection is slightly different for the Telegram user since it triggers the next flow set.

Results and Discussion
The net outcome of the current research project is the fully automated yogurt filling system, capable of delivering filled bottles containing a mixture of plain yogurt and particular flavors as desired by the relevant customers. The system is equipped with smart sensors, controllers, robotic arms, and modern communication protocols to minimize human intervention in the production process.  The message will go through the language processing node, which removes spaces from the message. Next, the node fixes any errors if someone tries to write instead of selecting. Next, it goes through the "Flavor Selection" node, which sets its context as a flow; then, the message goes to the function node containing the text "How Many?" and another option sent to the Telegram chat for the demand desired.
The other way is similar but for the dashboard where there will be buttons for the flavor selection and a text will appear showing the selected flavor.
As shown in Figure 9, this third flow set allows the dashboard users to adjust the amount of yogurt in the bottles as per customers' demand. However, the demand selection is slightly different for the Telegram user since it triggers the next flow set.

Results and Discussion
The net outcome of the current research project is the fully automated yogurt filling system, capable of delivering filled bottles containing a mixture of plain yogurt and particular flavors as desired by the relevant customers. The system is equipped with smart sensors, controllers, robotic arms, and modern communication protocols to minimize human intervention in the production process. The message will go through the language processing node, which removes spaces from the message. Next, the node fixes any errors if someone tries to write instead of selecting. Next, it goes through the "Flavor Selection" node, which sets its context as a flow; then, the message goes to the function node containing the text "How Many?" and another option sent to the Telegram chat for the demand desired.
The other way is similar but for the dashboard where there will be buttons for the flavor selection and a text will appear showing the selected flavor.
As shown in Figure 9, this third flow set allows the dashboard users to adjust the amount of yogurt in the bottles as per customers' demand. However, the demand selection is slightly different for the Telegram user since it triggers the next flow set.  The message will go through the language processing node, which removes spaces from the message. Next, the node fixes any errors if someone tries to write instead of selecting. Next, it goes through the "Flavor Selection" node, which sets its context as a flow; then, the message goes to the function node containing the text "How Many?" and another option sent to the Telegram chat for the demand desired.
The other way is similar but for the dashboard where there will be buttons for the flavor selection and a text will appear showing the selected flavor.
As shown in Figure 9, this third flow set allows the dashboard users to adjust the amount of yogurt in the bottles as per customers' demand. However, the demand selection is slightly different for the Telegram user since it triggers the next flow set.

Results and Discussion
The net outcome of the current research project is the fully automated yogurt filling system, capable of delivering filled bottles containing a mixture of plain yogurt and particular flavors as desired by the relevant customers. The system is equipped with smart sensors, controllers, robotic arms, and modern communication protocols to minimize human intervention in the production process.

Results and Discussion
The net outcome of the current research project is the fully automated yogurt filling system, capable of delivering filled bottles containing a mixture of plain yogurt and particular flavors as desired by the relevant customers. The system is equipped with smart sensors, controllers, robotic arms, and modern communication protocols to minimize human intervention in the production process.

Fully Automated Operation
The fully automated operation of the flavored yogurt filling production line has been achieved by successfully implementing smart technologies. A bottle-feeding system was designed, fabricated, and implanted with the existing semi-automated system during the project's second phase, as shown in Figure 10a. Moreover, an industrial robotic arm, manufactured by FANUC, was installed to achieve fully automated operation. During the first phase of automation, the empty bottles were to be manually placed on the production line. Similarly, after completing the filling process, the filled bottles were to be manually picked and stored in the storage area. However, due to the integration of the FANUC robotic arm and bottle-feeding system, all the process has become fully automated with no human intervention. The robotic arm now picks the empty bottles from the bottle-feeding system and places them on the assigned place over the production line. When the filling process is complete, the robotic arm picks the filled bottle and stores them in the storage area. Hence the whole process is now fully automated, causing increased productivity with fewer human resources requirements. In addition, the system is now running through Node-RED, providing an IoT tool, and it is a flexible platform that can connect multiple devices allowing machine-to-machine (M2M) communication. The complete design layout of the fully automated system is shown in Figure 10b. However, Figure 11 shows the block diagram of interconnected components of the hardware and software.

Fully Automated Operation
The fully automated operation of the flavored yogurt filling production line has been achieved by successfully implementing smart technologies. A bottle-feeding system was designed, fabricated, and implanted with the existing semi-automated system during the project's second phase, as shown in Figure 10a. Moreover, an industrial robotic arm, manufactured by FANUC, was installed to achieve fully automated operation. During the first phase of automation, the empty bottles were to be manually placed on the production line. Similarly, after completing the filling process, the filled bottles were to be manually picked and stored in the storage area. However, due to the integration of the FANUC robotic arm and bottle-feeding system, all the process has become fully automated with no human intervention. The robotic arm now picks the empty bottles from the bottle-feeding system and places them on the assigned place over the production line. When the filling process is complete, the robotic arm picks the filled bottle and stores them in the storage area. Hence the whole process is now fully automated, causing increased productivity with fewer human resources requirements. In addition, the system is now running through Node-RED, providing an IoT tool, and it is a flexible platform that can connect multiple devices allowing machine-to-machine (M2M) communication. The complete design layout of the fully automated system is shown in Figure 10b. However, Figure 11 shows the block diagram of interconnected components of the hardware and software.
As part of achieving the interoperability requirement of Industry 4.0, we are focusing on how to integrate Node-RED is an open-source IoT platform. Since the WAGO PFC 100 used in the current YFM and cannot be controlled by Node-RED, we looked for an alternative controller, and at the top of our list was the WAGO PFC 200, which meets our needs. Still, its high cost made us discard this option since our job is to achieve a highquality performance with a minimal cost. We then decided to use the Raspberry Pi 4, which works with Node-RED and provides high performance at a low cost. Next, we installed Raspberry Pi Imager on a laptop, then chose Raspberry Pi OS as the operating system and downloaded it onto an SD card.  As part of achieving the interoperability requirement of Industry 4.0, we are focusing on how to integrate Node-RED is an open-source IoT platform. Since the WAGO PFC 100 used in the current YFM and cannot be controlled by Node-RED, we looked for an alternative controller, and at the top of our list was the WAGO PFC 200, which meets our needs. Still, its high cost made us discard this option since our job is to achieve a high-quality performance with a minimal cost. We then decided to use the Raspberry Pi 4, which works with Node-RED and provides high performance at a low cost. Next, we installed Raspberry Pi Imager on a laptop, then chose Raspberry Pi OS as the operating system and downloaded it onto an SD card. Actuators 2021, 10, x FOR PEER REVIEW 12 of 16 Figure 11. The block diagram of interconnected components of the hardware and software.

Relay Ladder Logic of Production Line Controller
The complete relay ladder logic of the yogurt filling production with different control strategies has been successfully written using the WAGO PFC 100 package. All the sensors, pneumatic pistons, and pumps were included in the relay ladder logic. This is helpful in case of any potential future modifications proposed for the yogurt filling system. Different automation and control strategies can now be implemented to evaluate their impact on the system's performance indicators. A part of ladder logic written using WAGO PFC 100 is shown in Figure 12.

Relay Ladder Logic of Production Line Controller
The complete relay ladder logic of the yogurt filling production with different control strategies has been successfully written using the WAGO PFC 100 package. All the sensors, pneumatic pistons, and pumps were included in the relay ladder logic. This is helpful in case of any potential future modifications proposed for the yogurt filling system. Different automation and control strategies can now be implemented to evaluate their impact on the system's performance indicators. A part of ladder logic written using WAGO PFC 100 is shown in Figure 12.

Relay Ladder Logic of Production Line Controller
The complete relay ladder logic of the yogurt filling production with different control strategies has been successfully written using the WAGO PFC 100 package. All the sensors, pneumatic pistons, and pumps were included in the relay ladder logic. This is helpful in case of any potential future modifications proposed for the yogurt filling system. Different automation and control strategies can now be implemented to evaluate their impact on the system's performance indicators. A part of ladder logic written using WAGO PFC 100 is shown in Figure 12.

Increased Productivity
The first and foremost goal of automating the industrial production line was to increase the production rate of the system. A comparative performance analysis was conducted to evaluate the performance of the yogurt filling system by operating it in the fully automated and semi-automated modes of operation. The amount of time taken for the scanning and filing processes was noted and compared. Based on these times, the total time of operation and production rates were calculated. The results are shown in Figure 13. The time required for scanning and filling processes for the fully automated system is less than required for the semi-automated system. Zero time is required for the scanning process in case of fully automated operation. Consequently, the total time required for scanning and filling operations is comparatively lower for the fully automated operation, which is highly commendable. The production rate, measured in terms of bottles/h, is higher in the case of the fully automated system. The higher production rate justifies the implementation of the fully automated mode of operation.

Increased Productivity
The first and foremost goal of automating the industrial production line was to increase the production rate of the system. A comparative performance analysis was conducted to evaluate the performance of the yogurt filling system by operating it in the fully automated and semi-automated modes of operation. The amount of time taken for the scanning and filing processes was noted and compared. Based on these times, the total time of operation and production rates were calculated. The results are shown in Figure  13. The time required for scanning and filling processes for the fully automated system is less than required for the semi-automated system. Zero time is required for the scanning process in case of fully automated operation. Consequently, the total time required for scanning and filling operations is comparatively lower for the fully automated operation, which is highly commendable. The production rate, measured in terms of bottles/h, is higher in the case of the fully automated system. The higher production rate justifies the implementation of the fully automated mode of operation.

Addition of Cost-Effective Controller
A key milestone achieved during the second phase was the addition of a cost-effective controller for synchronized operation with Node-RED. The Wago PFC 100 controller used during the first phase was found to be incompatible with Node-RED, which necessitated the addition of a new controller. The first choice was the Wago PFC 100 controller, which was later dropped due to its high cost, as the goal was to achieve full automation with the lowest possible cost. After a complete literature survey, the Raspberry Pi 4 controller was selected, which offered the same functions as those of the Wago PFC 100 controller at a comparatively lower cost. The operating system of the Raspberry Pi 4 controller was installed through an SD card. The Raspberry Pi 4 allowed easy access to Node-RED. On the other hand, the Raspberry Pi 4 with 2 GB of RAM costs almost USD 45 had a dimension of 85.6 × 53.98 × 17 mm and weighs 45 g. Finally, Raspberry and Node-RED are synchronized with Wago PFC-100, so they can run production together, and the data of the automated process is stored on the SD card.

Conclusions
A fully automated yogurt filling system was successfully implemented during this research project. The yogurt filling system is capable of producing flavored yogurt bottles

Addition of Cost-Effective Controller
A key milestone achieved during the second phase was the addition of a cost-effective controller for synchronized operation with Node-RED. The Wago PFC 100 controller used during the first phase was found to be incompatible with Node-RED, which necessitated the addition of a new controller. The first choice was the Wago PFC 100 controller, which was later dropped due to its high cost, as the goal was to achieve full automation with the lowest possible cost. After a complete literature survey, the Raspberry Pi 4 controller was selected, which offered the same functions as those of the Wago PFC 100 controller at a comparatively lower cost. The operating system of the Raspberry Pi 4 controller was installed through an SD card. The Raspberry Pi 4 allowed easy access to Node-RED. On the other hand, the Raspberry Pi 4 with 2 GB of RAM costs almost USD 45 had a dimension of 85.6 × 53.98 × 17 mm and weighs 45 g. Finally, Raspberry and Node-RED are synchronized with Wago PFC-100, so they can run production together, and the data of the automated process is stored on the SD card.

Conclusions
A fully automated yogurt filling system was successfully implemented during this research project. The yogurt filling system is capable of producing flavored yogurt bottles as a mixture of plain yogurt and customer-specified flavors. Total four containers were used, three containing different flavors and the fourth one containing plain yogurt. Two phases were required to automate the yogurt filling system. IR 4.0-compliant smart sensors, IoT open-source platform, and control strategies have been implemented. The system automatically picked the empty yogurt bottles stored in a bottle-feeding system specifically designed for this purpose. The empty bottles were then placed on the specific location over the conveyor belt. The bottles were automatically filled through solenoid valves, and diaphragm pumps were installed in the production line. A robotic arm assisted in storing the bottles in the storage area after the filling was completed. The Raspberry Pi 4 controller was used to link sensors, pneumatic pistons, solenoid valves, and diaphragm pumps for complete monitoring and control of the system. Moreover, IoT-based monitoring and control were achieved with the help of Node-RED. The system is now working in the fully automated mode without any human intervention with a higher production rate.
There are several limitations while developing the proposal. The cost constrain was the main limitation that fully focused on reducing the overall cost of the model. Besides, programming expertise was the foremost limitation that is commonly required when managing the Raspberry Pi. In addition, internet speed was a big constraint while developing the project as the current research is working on an academic level where most have a slow internet connection. Our initial design of the system intended to divide it into two phases; pre-production and post-production. Therefore, the author intends to include and integrate a refrigerator storage system to store the filled bottles after the needed processes have been completed in future work.