Blog

Blockchain-integrated IoT device for advanced inspection of casting defects | Scientific Reports

Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Scientific Reports volume  15, Article number: 5300 (2025 ) Cite this article steel welding parts

The quality control of investment casting remains a critical challenge due to defect detection, real-time processing, and data traceability inefficiencies. This study presents an innovative Blockchain-integrated IoT system for advanced inspection of casting defects, combining a ResNet-based deep learning model for defect detection and dimensional measurement with Blockchain technology to ensure data integrity and traceability. The system demonstrated a significant improvement in defect detection accuracy, achieving an F1-score of 0.94, alongside high data integrity (0.99) and traceability (0.98) metrics. Additionally, it processes each casting in an average of 2.3 s, supporting a throughput of 26 castings per minute. By addressing critical challenges in smart manufacturing, this approach enhances operational efficiency, regulatory compliance, and user confidence. While scalability and energy efficiency remain areas for improvement, the proposed method provides a transformative solution for Industry 4.0, fostering transparency and reliability in manufacturing processes.

The current methods for defect detection in investment casting are plagued by significant challenges, particularly in terms of accuracy, processing speed, and the lack of effective traceability throughout the production lifecycle1. Traditional approaches, such as manual inspections and isolated machine learning models, are often inefficient and fail to provide a holistic solution that integrates real-time data collection, defect detection, and secure data management2,3. These conventional methods also do not ensure reliable storage or traceability of inspection results, which are critical for maintaining data integrity and transparency in manufacturing operations. As the manufacturing industry evolves, there is an increasing demand for advanced solutions that can overcome the limitations of these outdated techniques, especially in the context of Industry 4.0, where interconnected systems and data-driven decision-making play a pivotal role4,5. The integration of Internet of Things (IoT) technologies, Blockchain, and advanced deep learning models represents a promising approach to addressing these challenges6. While previous research has explored individual components such as deep learning-based defect detection or the use of IoT for real-time data collection, these methods often lack integration with secure and decentralized data management systems, leaving significant gaps in traceability, scalability, and data security7,8.

The motivation for this research arises from the need to provide a more comprehensive and reliable solution for defect detection, dimensional measurement, and data traceability in modern manufacturing processes. The current limitations in data integrity, the inability to track defects in real-time, and the lack of effective data management across the entire production lifecycle necessitate the development of an integrated system that combines these technologies into a single, cohesive platform. By incorporating IoT-based inspection systems with deep learning models for accurate defect detection, this work aims to enhance both the precision and efficiency of the defect detection process. Furthermore, integrating Blockchain technology ensures that the inspection results are securely stored, immutable, and traceable, thus overcoming the challenges of data tampering and providing a transparent record of the entire production process. The proposed system improves the accuracy and reliability of defect detection and introduces a novel approach to managing and securing manufacturing data, which is essential for ensuring regulatory compliance and operational transparency.

In recent years, significant research has been conducted into integrating sophisticated technologies into manufacturing inspection. This section gives an overview of relevant work in defect detection. It also delves into IoT-enabled inspection and Blockchain applications in manufacturing. For example9, employs a modified YOLO-v3 algorithm. This was for real-time detection of defects on steel strip surfaces. Their endeavour was successful. They managed to achieve high precision and recall rates. Many manufacturing domains have widely applied machine learning techniques. Machine learning techniques primarily detect material defects10. A CNN study looked at hot-rolled steel strips. It was able to automatically locate surface defects11 came up with a model. It combines CNN and SVM. This helped classify printed circuit board defects. This kind of research is beneficial. It aids in detecting and eliminating defects in manufactured products. The use of IoT in manufacturing inspection is gaining popularity. This is because of the potential for real-time monitoring and data collection12. They proposed an IoT-enabled system for quality management. This system improved defect detection rates. It also reduced quality control costs. Similarly13, designed an IoT-based framework. It was used for intelligent manufacturing and product inspection. They integrated sensors, edge computing, and cloud services in the framework14 they implemented an IoT platform for automatic visual inspection in e building blocks15 proposed a Blockchain-based system. The system’s design aims to track the quality of products in cloud manufacturing. This Blockchain-based system ensures data integrity. It also improves supply chain transparency15 developed a Blockchain framework. It enhances security and traceability in a cyber-physical production system16. Researchers investigated the use of Blockchain for quality control and the purpose of the Blockchain was to store and share inspection data. The research took place in a smart manufacturing environment. Their approach led to improved data reliability. It also reduced the risk of theft17. They proposed a Blockchain-based quality assurance system and this system was adaptable to other manufacturing sectors. Recent research is starting to explore synergies between IoT and Blockchain technologies in manufacturing like18 presented a Blockchain-based architecture and the design specifically targeted industrial IoT applications19. A system was introduced. This system integrates IoT and Blockchain for supply chain traceability. It has the potential to include quality control and inspection data. Defect detection in manufacturing has seen significant progress. But there are still some gaps in the integration of technologies for intelligent inspection. Elements like IoT-enabled inspection and Blockchain applications are still missing.

Recent advancements in security and efficiency for distributed systems have seen significant contributions across various domains. For instance, a novel model for video streaming compression in the Internet of Multimedia Things (IoMT) integrates Generative Adversarial Networks (GAN) with fuzzy logic, improving bandwidth efficiency and reducing latency in real-time applications20. In the realm of decentralized computing, blockchain technology has been proposed as a solution for enhancing security in serverless consortium fog and edge computing, ensuring the integrity and confidentiality of data in these distributed environments21. Addressing the growing concern of deepfake content, a new framework utilizing machine learning and computer vision techniques has been developed to detect and investigate multimedia manipulation on social media platforms22. Additionally, blockchain’s potential for securing Internet of Things (IoT) networks has been extensively reviewed, highlighting its role in providing decentralized security for data exchange, authentication, and access control in IoT systems23. In the context of industrial applications, a next-generation Open Radio Access Network (O-RAN) architecture combined with machine learning has been proposed to optimize resource management and improve network efficiency for Beyond 5G environments in Industrial 5.024. Furthermore, blockchain-based distributed ledger technology has been suggested as a solution for securing remote sensing data in smart cities, ensuring data integrity and transparency25. To enhance the performance of consortium blockchain networks, a lightweight consensus protocol based on Hyperledger Indy has been introduced, optimizing scalability and throughput for applications requiring high efficiency26. Lastly, a middleware solution leveraging the Proof-of-Elapsed Time (PoET) protocol with multithreading technology has been proposed to improve transaction execution and security in blockchain networks, particularly in resource-constrained environments27. These innovations contribute to the ongoing evolution of secure and efficient systems in distributed networks, highlighting the transformative potential of blockchain and machine learning technologies.

Several studies have highlighted the integration of the Grey Wolf Optimization algorithm with the MapReduce framework to optimize service composition in cloud-based IoT environments, enhancing scalability and reducing resource consumption28. Deep learning methods have also been extensively explored for deepfake detection, demonstrating the effectiveness of CNNs and RNNs in identifying manipulated media29. Furthermore, blockchain-based deepfake detection methods that combine federated learning have emerged, offering privacy-preserving, decentralized solutions for more accurate detection30. In the healthcare domain, deep learning models applied to IoT bioinformatics have revolutionized real-time health monitoring and disease diagnosis31. Meanwhile, cloud-based non-destructive testing (NDT) systems have improved material characterization, making it more accessible and scalable across industries32. Data aggregation in Industrial IoT has also been optimized using hybrid algorithms, ensuring efficient data collection and communication in real-time33. Security in drone networks is enhanced with blockchain and Radial Basis Function neural networks, offering a robust intrusion detection system34. Moreover, the reliability of wireless sensor networks (WSNs) in industrial settings has been improved by considering permanent faults and employing redundancy techniques35. Nature-inspired algorithms have found significant applications in optimizing IoT-based healthcare services, improving system efficiency and data processing36. Lastly, blockchain-based Industrial IoT systems benefit from GSO-based multi-objective optimization, improving performance metrics such as throughput, latency, and energy consumption37. These developments collectively highlight the transformative role of IoT, deep learning, and blockchain in enhancing efficiency, security, and scalability across various industrial and healthcare sectors.

This study presents a groundbreaking approach that integrates IoT, deep learning, and Blockchain technologies to create a comprehensive system for defect detection in investment casting. By utilizing a ResNet-based deep learning model for precise defect detection and dimensional measurement, alongside Blockchain for secure and immutable data storage, the proposed system offers a solution that addresses the critical gaps in traditional manufacturing systems. The novel integration of these technologies enables real-time processing and enhances traceability, making it applicable not only in investment casting but also in other manufacturing sectors such as automotive and construction, where stringent quality control and traceability are essential. This work contributes to the advancement of smart manufacturing by offering a scalable, secure, and efficient solution that meets the evolving demands of modern production environments, while also ensuring high-quality outcomes and regulatory compliance.

The Internet of Things (IoT) device is equipped with a high-resolution camera capable of capturing detailed images when appropriately positioned. Investment castings are captured by the camera, and these images serve as the foundation for defect discovery research. Image clarity is enhanced to facilitate accurate analysis. Images undergo multiple stages of processing to ensure improved clarity. Methods to reduce noise are included, effectively removing any noise or artifacts introduced during the image capture process. Contrast is enhanced to highlight flaws or anomalies, aiding the AI model in their identification.

The size of the image is standardized through resizing, ensuring compatibility with the AI model’s input requirements and simplifying processing. Geometric adjustments are applied to correct any distortions, addressing potential perspective issues arising during image capture. These adjustments preserve an accurate representation of the casting’s shape. The example files can be seen in Fig. 1.

Some samples of the dataset.

By subjecting the captured images to these preprocessing steps, the system prepares the data for effective analysis by the AI model, ultimately improving the accuracy and reliability of the defect detection process.

The ResNet AI model performs feature extraction on pre-processed images. Prominent characteristics in the images are detected by the model, indicating flaws or irregularities in investment castings. These features may include textural patterns, contour shapes, and color variations. Texture patterns are analyzed to identify abnormalities or faults, demonstrating the surface attributes of the casting. Deviations from expected patterns may reveal surface imperfections, such as cracks, porosity, and inclusions.

Shape and contour analysis is applied to evaluate the structure of the casting. The outlines are examined and compared to the specified dimensions and ideal geometry. Deviations from expected forms or contours may indicate dimensional errors or flaws in the casting process. Color analysis investigates variations within the images, which may signify problems arising from material composition or surface finish. Discoloration may indicate the presence of porosity or oxidation, while irregular pigmentation may point to abnormalities.

As a result, the AI model differentiates between defective and non-defective castings by extracting pertinent information from the images. This process provides valuable insights for maintaining quality control standards.

The extracted features are meticulously analyzed and utilized to train the AI model, enabling it to effectively differentiate between defective and non-defective castings. The model leverages the identified features to classify each casting, assigning a label that indicates whether it is defective or not.

Defect classification using the inspection device.

This classification process is based on the model’s ability to recognize patterns and correlations within the extracted features, distinguishing between normal and abnormal characteristics. By accurately classifying the castings, the AI model provides valuable insights for quality control purposes, allowing for timely identification and mitigation of defects as shown in Fig. 2.

The project focuses on defect detection and AI model efficiency in dimensional measurements. It uses in-depth inspection, edge detection, and real-time results. The model is constantly evolving and applicable to manufacturing, automotive, and construction sectors, offering higher accuracy and long-term cost savings.

This research employs the pixel-per-inch (PPI) method, which involves converting the pixel dimensions of the image into real-world measurements. Specifically, PPI quantifies the number of pixels contained within a one-inch line in the image, as shown in Fig. 3. By knowing the PPI value and the pixel dimensions of the features of interest, the model can compute the actual size of the casting by applying the following formula:

This approach enables precise measurement and facilitates the identification of dimensional discrepancies, thereby enhancing the overall quality control process in casting production.

The data preparation process involves organizing processed data. It includes defect classifications and dimensional measurements. The Blockchain also stores timestamps. This step involves creating structured data formats. It allows for efficient storage and retrieval. The Blockchain network then makes a transaction. The Blockchain network uses the processed data as a payload. This transaction includes crucial details. The transaction comprises the classification of ID defects, dimensional measurements, and a timestamp. A network consensus mechanism is critical. It may require proof of work. It might also use proof of stake. The transaction is validated to ensure integrity and security. This mechanism plays a crucial role by verifying the authenticity of the transaction and preventing tampering. The validated transaction is permanently stored in the blockchain by being added to a block. Each block is linked to its predecessors, forming an immutable chain. These records are designed to be tamper-proof, thereby enhancing the reliability of the data.

A gadget for inspection has been developed to monitor the quality of investment casting.

The architecture of the inspection device38.

The apparatus comprises an aluminum framework, a high-resolution camera, a lighting system, and a linear actuator for accurate placement. It accommodates a 1 cubic foot investment casting and uses sophisticated image processing techniques to precisely locate and pinpoint flaws as shown in Fig. 4. A thorough casting dataset was assembled and analyzed, which was utilized to train and evaluate the image processing model. The software incorporates the learned model, enabling the device to analyze pictures precisely for fault identification and dimensional measurement. The intuitive interface enables effective operation and offers straightforward data interpretation. The technology analyses photos instantaneously, seeking to identify faults and ascertain dimensional precision promptly. The gadget may link to a cloud platform for efficient data administration and remote access, facilitating smooth data analysis.

The proposed defect detection system utilizes a ResNet-based deep learning model, which is designed to overcome the challenges posed by very deep neural networks, particularly the issue of vanishing gradients. The ResNet architecture leverages residual learning, where residual blocks are introduced to skip over layers during the forward pass, thus facilitating better gradient flow and enabling the training of very deep networks as shown in Fig. 5. The residual blocks in the network allow the model to learn residual mappings instead of direct mappings, making it easier to train deep networks.

The architecture consists of several key components:

Input Layer: The input to the network consists of images resized to a uniform size, typically 224 × 224 pixels (or as per your dataset’s specifications), with three color channels (RGB).

Convolutional Layers: The first few layers consist of convolutional operations that extract basic features from the images, such as edges, textures, and shapes.

Residual Blocks: The core of the ResNet architecture consists of multiple residual blocks, each containing two or three convolutional layers. These blocks are designed with skip connections, allowing the network to learn residual functions, thereby preventing the degradation of accuracy as the network depth increases.

Batch Normalization and Activation: Each convolutional layer is followed by batch normalization, which helps speed up training and stabilize learning. ReLU activation functions are used to introduce non-linearity after each convolutional operation.

Fully Connected Layers: After the convolutional layers, the feature maps are flattened and passed through one or more fully connected layers to make the final predictions.

Output Layer: The final layer outputs the predicted class, such as whether a defect exists and its category. For classification, softmax activation is used to output class probabilities.

The ResNet model was trained using the Adam optimizer, which combines the benefits of both momentum and adaptive learning rates. The learning rate was initially set to 0.001, with a learning rate decay applied after every 10 epochs to improve convergence as training progressed. The model was trained for 50 epochs, with a batch size of 64 images per iteration.

The categorical cross-entropy loss function was used, as it is the standard choice for multi-class classification problems. This loss function measures the difference between the predicted class probabilities and the true labels of the dataset.

To prevent overfitting and improve the model’s generalization ability, batch normalization was applied after each convolutional layer, and dropout was used in fully connected layers with a rate of 0.5. This helps reduce the risk of the model memorizing the training data rather than learning to generalize to unseen data.

The architecture of the inspection device39.

The dataset used for training, validation, and testing consisted of 10,000 investment casting images, which included a diverse set of defect types such as porosity, inclusions, cracks, and dimensional errors. The images were sourced from various casting production lines, ensuring that the model could generalize to different types of industrial conditions.

Training Set: 80% of the dataset (8000 images) was used for training the model. This large portion helped the model learn various features and nuances of the casting defects.

Validation Set: 10% of the dataset (1000 images) was used for validation to evaluate the model’s performance during training and tune hyperparameters.

Test Set: The remaining 10% (1000 images) was used to assess the model’s final performance after training.

The following hyperparameters were used during the training process:

Learning Rate: The learning rate was initially set to 0.001, which was suitable for fine-tuning the model and ensuring steady convergence. A learning rate decay was applied after every 10 epochs to reduce the learning rate progressively, allowing the model to converge more effectively as training advanced.

Batch Size: A batch size of 64 was used, allowing for efficient training while ensuring the model could generalize well without overfitting. A larger batch size could have sped up training, but 64 was found to strike a good balance between training speed and generalization.

Number of Epochs: The model was trained for 50 epochs, which provided sufficient iterations for convergence without excessive overfitting. During training, the model’s performance was monitored on a validation set to prevent early stopping due to overfitting.

Optimizer: The Adam optimizer was used for training, which combines the advantages of Momentum and Adaptive Learning Rate methods. This optimizer dynamically adjusts the learning rate for each parameter, making it more robust for training complex models.

Dropout Rate: A dropout rate of 0.5 was used in the fully connected layers to prevent overfitting, especially given the relatively small dataset compared to the complexity of the ResNet model.

Weight Initialization: The weights were initialized using the He initialization method, which is well-suited for deep networks with ReLU activations, helping to maintain variance across layers during training.

To prepare the dataset for training, several preprocessing techniques were applied to ensure high-quality input for the ResNet model:

Resizing: All images were resized to 224 × 224 pixels to fit the input size expected by the ResNet architecture, ensuring consistency in the data fed into the model.

Normalization: Pixel values were normalized to a range of 0 to 1 by dividing by 255. This step helped improve the convergence speed of the training process and ensured the model could learn efficiently from the input data.

Data Augmentation: To further enhance the dataset and prevent overfitting, data augmentation techniques were applied, including:

Zooming (to simulate different object scales).

Brightness and contrast adjustments (to account for varying lighting conditions).

These transformations generated additional training samples, improving the model’s ability to generalize to unseen data and making it more robust to variations in image quality.

The model’s performance was evaluated using a variety of metrics to assess both its accuracy and its effectiveness in detecting defects:

F1-Score: The F1-score is the harmonic mean of precision and recall, providing a balanced measure of the model’s ability to correctly identify defective castings while minimizing false positives. This metric is crucial in defect detection tasks where both false positives (incorrectly classifying a non-defective casting as defective) and false negatives (missing defects) are problematic.

Accuracy: Overall accuracy was measured, representing the percentage of correctly classified images (both defective and non-defective). However, accuracy alone is not sufficient in imbalanced datasets, so the F1-score was given higher importance.

Precision and Recall: These metrics were computed for each class of defect. Precision measures how many of the predicted defective castings were truly defective, while recall measures how many of the actual defective castings were correctly identified. A higher recall ensures that fewer defects are missed, which is crucial for maintaining production quality.

Data Integrity: For the Blockchain integration, data integrity was assessed based on the ability of the system to maintain an immutable record of the inspection data, ensuring that no changes could be made post-inspection.

Traceability: The traceability score was used to evaluate how well the system could track the entire inspection process, including casting identity, defect location, and dimensional measurements, from the initial casting to the final product.

The integration of a Blockchain system into an IoT device for advanced inspection operations including casting faults requires efficient, dependable, and secure data handling. The capacity of a Blockchain platform to enable smart contracts, distributed architecture, and scalability all impact the decision to use it. Ethereum was chosen because of its scalability, which allows for automated operations and secure data gathering without the use of third-party services. Smart contracts are used to ease data capture and administration, including fault categories, measurements, and time taken. A consensus mechanism, such as Proof of Stake or Proof of Work, verifies transactions and ensures that inspection visuals are not distorted. Data is maintained on a Blockchain, with each item assigned a unique value, rendering the records impervious to external tampering. Every purchase is checked. In this way, accuracy is guaranteed. Tampering is not allowed. Blockchain technology improves security and traceability by preserving and making records unalterable with each transaction. Real-time interaction with AI models enables continuous data collecting and analysis.

In the proposed IoT-Blockchain system, smart contracts play a crucial role in automating processes between IoT devices and the Blockchain network. The primary function of these smart contracts is to validate, record, and secure the data generated by IoT devices in real time. For instance, when a defect is detected by an IoT sensor, the smart contract automatically triggers a transaction to record the data on the Blockchain. These contracts ensure data integrity, preventing tampering or unauthorized changes, and guarantee that only valid data is recorded on the Blockchain.

The smart contract is also responsible for checking the validation rules, such as verifying that the data sent by IoT devices matches predefined criteria (e.g., defect classification, measurement accuracy). If the data passes the validation checks, the contract executes the transaction to store the data on the Blockchain, thus ensuring that the data is immutable and traceable.

IoT Device Sends Data: When an IoT device (camera) detects a defect or records measurements, it sends the data to the Blockchain network.

Smart Contract Validation: The smart contract is invoked to validate the data. It checks for integrity (ensuring the data is within expected ranges) and verifies authenticity.

Blockchain Transaction: Once the data passes the validation, the smart contract executes a transaction to System Usability Scale score.

record the data on the Blockchain, ensuring its immutability and traceability.

Event Triggering: If certain conditions are met (defect type detected), the smart contract can trigger additional actions, such as notifying stakeholders or initiating further processes in the manufacturing system as shown in Fig. 6.

The pseudo code of smart contract flow.

State-of-the-art hardware and software components were meticulously selected for the experimental setup to ensure optimal performance and reliability. Tables 1 and 2 detail the hardware and software configurations.

The performance improvements of the proposed IoT-Blockchain method were evaluated by comparing the results in terms of F1-score, data integrity, and traceability with those of a baseline method, which uses traditional computer vision-based defect detection without Blockchain integration. The results of these comparisons were subjected to statistical testing to assess whether the observed improvements were statistically significant.

A t-test was performed to compare the F1-scores, data integrity scores, and traceability metrics between the proposed method and the baseline method. The null hypothesis assumed no difference between the two systems, while the alternative hypothesis posited that the improvements were statistically significant. The p-values for the F1-score, data integrity, and traceability improvements were found to be 0.003, 0.001, and 0.004, respectively, all of which are less than the significance level of 0.05. This indicates that the observed improvements in the proposed system are statistically significant.

For example, the F1-score of the proposed system increased to 0.94, compared to 0.84 in the baseline system, with a p-value of 0.003, confirming a statistically significant improvement. Similarly, the data integrity score increased to 0.99 and traceability to 0.98, both showing statistically significant improvements with p-values of 0.001 and 0.004, respectively, as illustrated in Table 3.

Tests were conducted to evaluate the system’s ability to process and analyze castings in real-time. The following Table 4 summarizes the results.

The performance metrics indicate the efficiency and speed of our IoT-Blockchain integrated system in real-world manufacturing scenarios. On average, the system takes only 2.3 s to fully process and analyze a casting. This rapid processing includes image capture, defect detection, and recording results on the Blockchain. The system has a throughput of 26 castings per minute. The system can handle a significant volume of production. Assuming continuous operation, that equates to 1560 casts per hour. In 24 h, the system can handle 37,440 casts. For practical industry implementation, a combination of time and throughput is important. This allows seamless integration into existing lines. The impact on manufacturing speed is minimal. The performance guarantees quality. Control keeps pace. This prevents bottlenecks and maintains efficient operations.

The dimensional measuring system was rigorously scrutinized. The dataset tested contained 500 castings, all with pre-established dimensions. The evaluation showed that a mean absolute error (MAE) of only 0.05 mm was achieved. Additionally, a root mean square error (RMSE) of 0.07 mm was demonstrated. These results exhibited a remarkable level of precision and confirmed that the system is suitable for quality control in investment casting production.

The necessity for enhanced data management and security lends itself to the efficient utilization of IoT devices for advanced casting fault assessment via Blockchain integration. In this system, every inspection conclusion, such as defect categories and even size measurements, would be captured in Blockchain technology, resulting in detailed and transparent records. To control the quality of inspection data supplied via the network, transactions are confirmed using consensus techniques such as proof of work or proof of stake. While Blockchain adds a considerable computational strain to the system (15% greater CPU use and 22% more RAM usage), the benefits outweigh the drawbacks. Bimodal access allows aspect data to be kept in a location that prevents change, gives a way of tracking processed data, and validates the data in question throughout the inspection process using the Blockchain. Registering a transaction takes about 1.2 s since transaction blocks are produced every 12 s, and each block may handle 10 transactions. The use of Blockchain technology in IOT does not jeopardize the efficiency or secrecy of inspection processes.

The integration of Blockchain technology leads to a 15% increase in CPU utilization and a 22% increase in memory usage. However, the benefits of immutability and traceability outweigh the computational costs. These features are essential for security and transparency, which non-Blockchain solutions cannot achieve. Despite the increased resource consumption, the cognitive benefits of Blockchain technology, such as innovation, efficiency, traceability, and a single source of truth, justify the computational costs.

To effectively address scalability challenges associated with high production volumes and large datasets, the proposed system integrates edge computing to process data locally at the IoT devices. This approach significantly reduces the amount of data that needs to be transmitted to central servers or the Blockchain, thereby alleviating network congestion and minimizing latency. By shifting data processing to the edge of the network, closer to where the data is generated, the system can provide real-time insights without overwhelming the central processing unit. This not only improves the processing speed but also enhances the system’s ability to scale in environments with high data throughput. Additionally, edge computing optimizes resource utilization by reducing the need for continuous data transfers, making the system more energy-efficient and capable of handling the increasing demands of large-scale manufacturing operations. In combination with Blockchain’s immutability and data integrity features, edge computing ensures that the system remains efficient, secure, and responsive as production loads increase, allowing it to scale seamlessly and meet the growing demands of modern manufacturing environments. The system’s scalability was tested by simulating increased production rates as shown in Table  5:

Under higher loads, the system showed excellent scalability, with only a moderate increase in transaction and block creation times.

The comparison of the proposed IoT-Blockchain method with three existing state-of-the-art systems highlights significant advantages in both quantitative and qualitative metrics. In terms of F1-score, the proposed method achieves a 0.94, surpassing all other methods, with traditional approaches yielding scores between 0.80 and 0.85. This improvement is further supported by a higher accuracy of 96%, demonstrating the method’s superior performance in defect detection. Additionally, the proposed system excels in data integrity and traceability, with scores of 0.99 and 0.98, respectively, thanks to its Blockchain integration, providing a level of security and transparency that other systems lack. The processing time and throughput are also superior, with the proposed system processing 26 castings per minute in 2.3 s per casting, significantly outperforming alternative methods that take 3–5 s per casting and process fewer castings per minute.

From a qualitative perspective, the proposed method offers high scalability, allowing it to handle large datasets and increase production volumes efficiently. It also boasts superior security, with Blockchain-based data integrity and protection against tampering, unlike traditional methods that may be vulnerable to data manipulation. However, the ease of integration with existing manufacturing processes is moderately complex compared to simpler, non-blockchain-based solutions. The system usability scale (SUS) score of 0.82 indicates high user satisfaction, highlighting the method’s usability in practical applications. Overall, the proposed IoT-Blockchain system stands out for its robust combination of accuracy, security, efficiency, and scalability, positioning it as a transformative solution for smart manufacturing environments as shown in Table  6.

In addition to the system usability scale (SUS) score of 0.82, which indicates high user satisfaction, qualitative feedback from users highlighted both strengths and areas for improvement in the system. Many users found the process of data validation and the integration of IoT devices intuitive, as it required minimal manual input and provided real-time feedback. The ability to seamlessly validate and store defect data on the Blockchain was highly praised for ensuring data integrity and traceability, which users found particularly useful in quality control tasks.

However, some users faced challenges when navigating the user interface (UI), particularly when interpreting error messages during data entry. These messages were sometimes unclear, making it difficult for users to resolve issues quickly. Additionally, the integration of Blockchain and IoT devices required users to learn new concepts, which some found complex. While the system was generally easy to use once familiarized, some users suggested that onboarding guides or tooltips could help improve the initial learning curve.

Feedback also pointed to the need for more customization options in terms of user preferences and notifications. Some users suggested that adding more visual feedback—such as progress bars during data processing or alerts when data is successfully recorded on the Blockchain—could make the system more user-friendly.

Overall, the qualitative feedback aligns with the SUS score, reflecting that the system is generally well-received but could benefit from some user interface improvements and more intuitive error handling. These insights will inform future updates, helping to refine the system’s usability and overall user experience approach.

The integration of IoT inspection tools with Blockchain technology offers a transformative approach to quality control in investment casting. This combination significantly improves defect detection by allowing real-time processing of information, enhancing the accuracy of defect identification and dimensional measurement. The use of Blockchain ensures that the data generated throughout the inspection process is secure and immutable, addressing concerns regarding data tampering and enabling traceability. These features not only optimize the production process but also promote accountability and transparency within manufacturing environments, making it easier to resolve disputes and maintain compliance with regulations.

By combining these technologies, the system introduces a level of security and reliability that is critical for industries requiring rigorous quality control and regulatory adherence. The ability to process data in real-time and store it securely in Blockchain ensures the integrity of the inspection records, which improves operational efficiency and builds trust across supply chains. High-performance metrics, such as the F1-score and traceability measures, confirm the effectiveness of the system in real-world applications.

However, the implementation of this advanced system is not without its challenges. One significant concern is scalability: as production rates increase, the system may face issues in maintaining high throughput and processing speed, especially in environments with high production volumes. Additionally, the integration of this system with legacy manufacturing processes presents hurdles, particularly in adapting the workforce and aligning the new technology with existing infrastructure. The need for more computational power, particularly with the inclusion of Blockchain and real-time data processing, raises concerns about the system’s energy consumption. While the use of edge computing and more energy-efficient IoT devices can mitigate some of these issues, it remains a critical area for future research.

Another important consideration is sustainability. As industries strive to meet increasingly stringent environmental standards, reducing the energy footprint of such systems will be essential. Furthermore, ensuring robust data security is paramount, especially for sensitive manufacturing data. Addressing these challenges will require innovative approaches in AI and Blockchain technologies, as well as improvements in IoT device compatibility and data privacy measures. These are areas that will benefit from ongoing research and technological advancements.

Despite these challenges, the potential benefits of this IoT-Blockchain integration are profound. It represents a significant step forward in the transition to Industry 4.0, providing a foundation for smarter manufacturing processes that are not only more efficient but also more secure and transparent. As this technology matures, it has the potential to transform industries beyond investment casting, facilitating a broader digital transformation across global manufacturing sectors. By enhancing quality control systems and enabling smarter business models, this integration can contribute to more sustainable, efficient, and trustworthy manufacturing practices.

Energy efficiency remains a key challenge in the deployment of IoT-based systems for defect detection, particularly in large-scale manufacturing environments where continuous data collection and real-time processing are necessary. The IoT devices used in this system, including high-resolution cameras and sensors, require constant power to operate effectively. Furthermore, the Blockchain network used for storing and securing inspection data adds another layer of energy consumption, especially with energy-intensive consensus mechanisms such as Proof of Work (PoW). While PoW ensures data integrity, it is known for its high computational cost and energy usage, which can become a significant limitation in industrial applications.

The deployment and operational costs of the proposed IoT-Blockchain system involve several components, including Blockchain gas fees, hardware requirements, and ongoing operational costs. Gas fees for Blockchain transactions range from $0.50 to $5 per transaction, depending on network congestion, which can accumulate quickly in large-scale operations. Hardware costs include IoT devices (cameras), edge computing units, and Blockchain nodes, with initial investments ranging from $100 to $1,000 per device. Operational costs, including energy consumption, maintenance, and technical support, can add significant overhead. However, the system’s long-term benefits, such as reduced defect rates and improved production efficiency, can offset these costs, making the system economically feasible for large manufacturing operations.

Table 7 provides a clear breakdown of all estimated costs involved in the deployment and operation of the IoT-Blockchain system, highlighting both initial and ongoing expenses. Let me know if you need further details or adjustments.

While the IoT-Blockchain system offers significant advantages in terms of real-time data collection, traceability, and data integrity, its adoption across different industrial sectors may encounter several challenges.

Regulatory challenges are particularly prominent in highly regulated industries like pharmaceuticals and food manufacturing. These industries have strict requirements for data privacy and traceability, and the immutability of Blockchain could conflict with regulations that require data to be modified or corrected. For example, in the pharmaceutical sector, data integrity is crucial, but systems must also allow for updates and corrections as required by regulatory bodies like the FDA. The automotive industry also faces challenges with compliance, as ISO standards and safety certifications require stringent documentation and verification processes, where Blockchain’s unalterable nature might be at odds with the need for post-production modifications.

Technical challenges include the need to ensure data security and privacy in industries dealing with sensitive information, such as healthcare and finance. IoT devices are vulnerable to cyberattacks, and ensuring that data transmitted from these devices is secure can be difficult. Additionally, the energy consumption associated with both IoT devices and Blockchain transactions, particularly in high-volume industries, is a concern. For large-scale manufacturing environments like automotive or electronics production, the system’s scalability to handle large datasets without compromising processing speed is a key challenge.

Integration challenges arise when attempting to integrate the IoT-Blockchain system with legacy systems. Many industries, such as construction or textile manufacturing, still rely on outdated equipment or software that may not be compatible with newer, digital technologies. Additionally, the cost of transition to an IoT-Blockchain-based system can be a significant hurdle, especially for small and medium enterprises (SMEs) that may not have the financial resources for such an investment. Workforce training is another challenge, particularly in industries with a lower level of technological literacy. Resistance to new technology and the need for substantial upskilling could slow down adoption rates.

As the IoT-Blockchain system is deployed across different industrial sectors, addressing key challenges in energy efficiency, scalability, and security will be essential for ensuring its long-term success and adoption. In the future, several areas of improvement will be prioritized:

One of the primary concerns is the energy consumption associated with both IoT devices and the Blockchain network. As production scales up and more data is collected, energy consumption becomes a critical factor. Future work will focus on developing more energy-efficient IoT sensors and low-power devices that can reduce the overall energy footprint. Additionally, improvements in edge computing will help by processing data locally, minimizing the need for continuous cloud communication, and reducing energy consumption.

Another significant aspect will be the transition to more energy-efficient Blockchain consensus mechanisms. While Proof of Work (PoW) is widely used, it is known for its high energy consumption. Future work will explore the feasibility of switching to Proof of Stake (PoS) or Delegated Proof of Stake (DPoS), which are more energy-efficient alternatives that reduce the computational burden and environmental impact.

As the system is deployed in large-scale manufacturing environments, scalability becomes a crucial concern. With higher production rates and larger datasets, ensuring that the system can handle real-time processing without degradation in performance is essential. Future research will focus on distributed Blockchain solutions, such as Layer 2 solutions (e.g., state channels or sidechains), which allow for the processing of a large number of transactions off the main Blockchain, reducing congestion and improving scalability.

Additionally, parallel computing techniques will be investigated to distribute the computational load across multiple units. This will enhance the system’s ability to process large datasets more efficiently and at scale. Furthermore, dynamic scaling methods will be developed to enable the system to adjust to fluctuating production volumes, ensuring that high throughput can be maintained without compromising the quality of data processing.

While Blockchain provides a strong layer of security through immutability and decentralization, additional techniques are needed to ensure data privacy—especially in industries like healthcare, finance, or government. Future work will explore the integration of homomorphic encryption, which allows for the processing of encrypted data without the need to decrypt it, ensuring that sensitive information remains protected during computation.

In addition, differential privacy will be incorporated to protect individual data points while still enabling the system to analyze and share aggregate data. This approach will allow the system to maintain high levels of privacy and confidentiality, particularly when dealing with sensitive user or operational data. To future-proof the system against emerging cybersecurity threats, research into quantum-resistant encryption will also be explored, ensuring that the system remains secure in the face of rapidly evolving technology.

This study demonstrates the potential of integrating Blockchain technology with IoT-enabled inspection systems to enhance quality control in investment casting. By leveraging advanced deep learning models for defect detection and dimensional measurement, the system achieves a significant improvement in defect detection accuracy, with an F1-score of 0.94, and ensures high data integrity (0.99) and traceability (0.98). The system’s ability to process and analyze castings in real-time, with an average processing time of 2.3 s per casting, further underscores its suitability for smart manufacturing applications.

The innovative combination of Blockchain and IoT provides a robust framework for secure, tamper-proof data management, addressing critical challenges in supply chain transparency and regulatory compliance. While the methodology is optimized for investment casting, its adaptability to other manufacturing sectors highlights its broader relevance.

Despite its scalability and energy efficiency challenges, the proposed system lays the groundwork for advancing Industry 4.0 practices. Future research should focus on enhancing the energy efficiency of Blockchain operations, improving system scalability, and exploring cross-sector applications. This study provides a transformative approach to manufacturing quality control, paving the way for smarter, more transparent, and reliable production processes.

The data that support the findings of this study are available on request from the corresponding author. The data are not publicly available due to containing information that could compromise the privacy of research participants.

Antoniadou, A., Kyprianidis, K., Aslanidou, I., Kalfas, A. & Siafakas, D. Design of machine learning method for decision-making support and reliability improvement in the investment casting process. Scand. Simul. Soc., 46–53. (2023).

Lal, R., Bolla, B. K. & Sabeesh, E. Efficient neural net approaches in metal casting defect detection. Procedia Comput. Sci. 218, 1958–1967 (2023).

Zhang, L. et al. An improved defect recognition framework for casting based on DETR algorithm. J. Iron. Steel Res. Int. 30 (5), 949–959 (2023).

Behrendt, A. et al. Leveraging Industrial IoT and advanced technologies for digital transformation. McKinsey Co. 1–75. (2021).

Culot, G., Orzes, G., Sartor, M. & Nassimbeni, G. The future of manufacturing: a Delphi-based scenario analysis on industry 4.0. Technol. Forecast. Soc. Change. 157, 120092 (2020).

Article  PubMed  PubMed Central  Google Scholar 

Aljuhani, A. et al. A deep learning integrated blockchain framework for securing industrial IoT. IEEE Internet Things J. (2023).

Hang, L. & Kim, D. H. Design and implementation of an integrated iot blockchain platform for sensing data integrity, Sensors 19 (10), 2228. (2019).

Shahbazi, Z. & Byun, Y. C. Integration of blockchain, IoT and machine learning for multistage quality control and enhancing security in smart manufacturing. Sensors 21 (4), 1467 (2021).

Article  ADS  PubMed  PubMed Central  MATH  Google Scholar 

Kou, X., Liu, S., Cheng, K. & Qian, Y. Development of a YOLO-V3-based model for detecting defects on steel strip surface. Measurement 182, 109454 (2021).

Huang, Z., Wu, J. & Xie, F. Automatic recognition of surface defects for hot-rolled steel strip based on deep attention residual convolutional neural network. Mater. Lett. 293, 129707 (2021).

Yadav, V., Banerjee, D., Upadhyay, D. & Singh, V. Improving Printed Circuit Board Defect Detection with CNNs and SVMs, in Asia Pacific Conference on Innovation in Technology (APCIT) IEEE, 1–6. (2024).

Bin Abd Rahman, M. S., Mohamad, E. & Bin Abdul Rahman, A. A. Development of IoT—enabled data analytics enhance decision support system for lean manufacturing process improvement. Concur. Eng. 29 (3), 208–220 (2021).

Wang, Y., Lin, Y., Zhong, R. Y. & Xu, X. IoT-enabled cloud-based additive manufacturing platform to support rapid product development. Int. J. Prod. Res. 57 (12), 3975–3991 (2019).

Babu, J. C. et al. IoT-Based Intelligent System for Internal Crack Detection in Building Blocks, J. Nanomater 1, 3947760, 2022. (2022).

Faridi, M. S., Ali, S., Duan, G. & Wang, G. Blockchain and IoT based textile manufacturing traceability system in industry 4.0. In International Conference on Security, Privacy and Anonymity in Computation, Communication and Storage Springer, 331–344. (2020).

Shahbazi, Z. & Byun, Y. C. Smart manufacturing real-time analysis based on blockchain and machine learning approaches. Appl. Sci. 11 (8), 3535 (2021).

Article  CAS  MATH  Google Scholar 

Leontaris, L. et al. A blockchain-enabled deep residual architecture for accountable, in-situ quality control in industry 4.0 with minimal latency. Comput. Ind. 149, 103919 (2023).

Latif, S., Idrees, Z., Ahmad, J., Zheng, L. & Zou, Z. A blockchain-based architecture for secure and trustworthy operations in the industrial internet of things. J. Ind. Inf. Integr. 21, 100190 (2021).

Tsang, Y. P., Choy, K. L., Wu, C. H., Ho, G. T. S. & Lam, H. Y. Blockchain-driven IoT for food traceability with an integrated consensus mechanism. IEEE Access. 7, 129000–129017 (2019).

Khan, A. A. et al. GAN-IoTVS: a Novel internet of Multimedia things-enabled Video streaming Compression Model using GAN and fuzzy logic. IEEE Sens. J. (2023).

Khan, A. A. et al. Blockchain-enabled infrastructural security solution for serverless consortium fog and edge computing. PeerJ Comput. Sci. 10 (2024).

Khan, A. A. et al. Digital forensics for the socio-cyber world (DF-SCW): a novel framework for deepfake multimedia investigation on social media platforms. Egypt. Inf. J. 27, 100502 (2024).

Khan, A. A., Laghari, A. A., Shaikh, Z. A., Dacko-Pikiewicz, Z. & Kot, S. Internet of things (IoT) security with blockchain technology: a state-of-the-art review. IEEE Access. 10, 122679–122695 (2022).

Khan, A. A. et al. ORAN-B5G: a next generation open radio access network architecture with machine learning for beyond 5G in industrial 5.0. IEEE Trans. Green. Commun. Netw. (2024).

Khan, A. A. et al. Secure remote Sensing Data with Blockchain distributed Ledger Technology: a solution for Smart cities. IEEE Access., (2024).

Mehmood, F. et al. BLPCA-ledger: a lightweight plenum consensus protocols for consortium blockchain based on the hyperledger indy. Comput. Stand. Interfaces. 91, 103876 (2025).

Khan, A. A. et al. B-LPoET: a middleware lightweight proof-of-elapsed time (PoET) for efficient distributed transaction execution and security on Blockchain using multithreading technology. Comput. Electr. Eng. 118, 109343 (2024).

Vakili, A. et al. A new service composition method in the cloud‐based internet of things environment using a grey wolf optimization algorithm and MapReduce framework. Concurr. Comput. 36 (16), e8091 (2024).

Heidari, A., Jafari Navimipour, N., Dag, H. & Unal, M. Deepfake detection using deep learning methods: a systematic and comprehensive review. Wiley Interdiscip. Rev. Data Min. Knowl. Discov. 14 (2), e1520 (2024).

Heidari, A., Navimipour, N. J., Dag, H., Talebi, S. & Unal, M. A novel blockchain-based deepfake detection method using federated and deep learning models. Cognit. Comput., 1–19. (2024).

Amiri, Z., Heidari, A., Navimipour, N. J., Esmaeilpour, M. & Yazdani, Y. The deep learning applications in IoT-based bio-and medical informatics: a systematic literature review. Neural Comput. Appl. 36 (11), 5757–5797 (2024).

Heidari, A., Navimipour, N. J. & Otsuki, A. Cloud-based non-destructive characterization, Non-Destr. Mater. Charact. Methods, 727–765. (2024).

Heidari, A., Shishehlou, H., Darbandi, M., Navimipour, N. J. & Yalcin, S. A reliable method for data aggregation on the industrial internet of things using a hybrid optimization algorithm and density correlation degree. Cluster Comput., 1–19.(2024).

Heidari, A., Navimipour, N. J. & Unal, M. A secure intrusion detection platform using blockchain and radial basis function neural networks for internet of drones. IEEE Internet Things J. 10 (10), 8445–8454 (2023).

Heidari, A., Amiri, Z., Jamali, M. A. J. & Jafari, N. Assessment of reliability and availability of wireless sensor networks in industrial applications by considering permanent faults. Concurr. Comput., e8252. (2024).

Amiri, Z., Heidari, A., Zavvar, M., Navimipour, N. J. & Esmaeilpour, M. The applications of nature-inspired algorithms in internet of things‐based healthcare service: a systematic literature review. Trans. Emerg. Telecommun. Technol. 35 (6), e4969 (2024).

Zanbouri, K. et al. A GSO-based multi‐objective technique for performance optimization of blockchain‐based industrial internet of things. Int. J. Commun. Syst. 37 (15), e5886 (2024).

Yousef, N., Parmar, C. & Sata, A. Intelligent inspection of surface defects in metal castings using machine learning. Mater. Today Proc. 67, 517–522 (2022).

Article  CAS  MATH  Google Scholar 

Yousef, N. & Sata, A. Implementing Deep Learning-based Intelligent Inspection for Investment Castings. Arab. J. Sci. Eng. 49 (2), 2519–2530 (2024).

Shafi, I. et al. Deep learning-based real time defect detection for optimization of aircraft manufacturing and control performance, Drones 7 (1) 31, (2023).

Mitta, N. R. Integrating AI and IoT for real-time monitoring and control in smart factories. Distrib. Learn. Broad Appl. Sci. Res. 10, 471–511 (2024).

Westphal, E., Leiding, B. & Seitz, H. Blockchain-based quality management for a digital additive manufacturing part record. J. Ind. Inf. Integr. 35, 100517 (2023).

Authors extend their appreciation to the deanship of scientific Research at King Khalid University for funding this work through the large group Research Project under grant number RGP2/508/45.

Department of Mechanical Engineering, Marwadi University, Rajkot, India

Blockchain Project Manager, MGL Group, Rajkot, India

Amit SATA & MINAL SHUKLA

Communication theory and networking, College of Computer Science, King Khalid University, Abha, Saudi Arabia

Research Scholar, Department of Mathematics, Marwadi University, Rajkot, India

You can also search for this author in PubMed  Google Scholar

You can also search for this author in PubMed  Google Scholar

You can also search for this author in PubMed  Google Scholar

You can also search for this author in PubMed  Google Scholar

You can also search for this author in PubMed  Google Scholar

Nabhan Yousef - Programming, Software Development, IIoT integrationAmit Sata - Final Drafting, Ideation, SupervisionMinal Shukla - Blockchain Integration, Drafting, Software DevelopmentS Jarboui - Final Drafting, Mentoring, SupervisionDivya Mobarsa - Project Management, Drafting, Blockchain development.

The authors declare no competing interests.

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.

Yousef, N., Sata, A., Shukla, M. et al. Blockchain-integrated IoT device for advanced inspection of casting defects. Sci Rep 15, 5300 (2025). https://doi.org/10.1038/s41598-025-86777-3

DOI: https://doi.org/10.1038/s41598-025-86777-3

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

Scientific Reports (Sci Rep) ISSN 2045-2322 (online)

precision casting foundry Sign up for the Nature Briefing: AI and Robotics newsletter — what matters in AI and robotics research, free to your inbox weekly.