## 3 Results
### Azure IoT Hub Infrastructure Example  
In Figure 14, the prototype is described, featuring a conveyor belt that simulates the process of inspecting the quality of casts. This setup represents a simplified version of a manufacturing line where casts move along the belt for quality assessment. This system's core is the ESP32-CAM, which was programmed using the Arduino IDE and manufactured by Ai-Thinker, a company based in Shenzhen, China. As the casts pass beneath it on the conveyor belt, the ESP32-CAM captures images of each cast in real-time. These images are then sent to the Azure Custom Vision service via HTTP requests. Figure 13: Azure Custom Vision model evaluation for a defective cast. The Azure Custom Vision service processes the received images to detect defects in the casts. It returns the corresponding labels, and an NIA value is calculated, quantifying the likelihood of a cast being defective. The prototype depicted in Figure 14 is a conceptual demonstrator designed to visualize the proposed system's functionality. This setup focused on showcasing the real-time defect detection pipeline, including image capture, IoT communication, and processing. The NIA leverages a multi-frame approach, acquiring five frames of each cast. This eliminates the concern regarding precise image-capture timing. However, the proposed prototype is a demonstrator of the proposed Azure IoT Hub infrastructure in an Industry 5.0 context. This prototype focuses on demonstrating the seamless interaction of heterogeneous devices through Azure IoT Hub for real-time defect detection rather than perfecting the image-capture mechanism itself. The proposed prototype needs to be extended for industrial use. To address the challenge of determining the precise moment for image capture, the system could employ optical sensors. These sensors detect the position of the cast as it moves along the conveyor belt. When the cast reaches the ideal position for image capture, a trigger signal activates the ESP32-CAM to capture the image. Upon detecting a defect, the ESP32-CAM sends a notification through the Azure IoT Hub. Next, the Azure IoT Hub interacts with other components of the system to address the defect as follows:  
* Sending notifications to devices such as the MSStack;
* Initiating processes like halting the conveyor belt, activating sorting mechanisms to remove the defective cast, or logging the incident for quality control records;
* Storing information about the defect for further analysis to improve the manufacturing process and reduce future defects. This integrated system demonstrates how IoT devices and cloud services work together to automate quality control in manufacturing. By leveraging the ESP32-CAM for image capture and the Azure Custom Vision service for defect detection, the system provides a real-time solution for ensuring product quality. Figure 15 depicts the synergy between hardware components and Azure cloud-based services in automating quality assurance processes. The prototype is a practical example of modern manufacturing, incorporating IoT and AI technologies to enhance product quality. Figure 14: Prototype of automated cast quality inspection using Azure IoT infrastructure. In the context of the reports being sent by ESP32-CAM for detecting cast defects, Figure 15 presents the following information:  
* Only three messages were transmitted on 9 November 2024, out of a daily quota of 8000. This low volume suggests limited detection of defects so far;
* The four connected devices are likely monitoring different sections of the inspection process. The transmission of only three messages indicates that most inspected casts are identified as defect-free. The graph shows a stepped increase, indicating messages were sent at specific moments (likely when the ESP32-CAM devices detected defects in the casts). The low activity suggests that most inspections yielded no defects;
* The three telemetry messages likely represent data and associated images of the detected defects.