Development of an Automated PCB Inspection, Error Statistics, and Classification System
Keywords:
Image Processing, YOLOv5, PCB, Automated Inspection, PLC S7-1200, Defect StatisticsAbstract
In the electronics manufacturing industry, Printed Circuit Boards are critical to electronic devices, and their quality directly affects product performance and reliability. Common assembly defects, such as missing components, misalignment, or wrong parts, must be detected promptly to reduce waste and maintain reputation. In Vietnam, PCB inspection is largely manual, limiting speed, accuracy, and consistency. The system integrates a YOLOv5-based machine vision module for detecting missing and misaligned components, a Siemens S7-1200 PLC for controlling an XY gantry and conveyor system, and a web interface for real-time monitoring. The primary contributions include: a fully integrated cyber-physical prototype suitable for educational and small-scale industrial use; a novel method for component misalignment detection using fiducial-based relative positioning; and seamless communication between vision, control, and HMI modules. Experimental results on two common PCB types, L298N and ULN2003, demonstrate a classification and error detection accuracy of up to 93%. The system achieves a throughput suitable for laboratory and small-batch production, with a positioning accuracy of ±0.5 mm. The system aims to achieve high accuracy, fast processing, and practical applicability in production lines.
References
K. Patel, “AI-driven defect detection in PCB manufacturing: A computer vision approach using convolutional neural networks,” European Journal of Advances in Engineering and Technology, vol. 12, pp. 10–25, 2025, https://www.doi.org/10.5281/zenodo.15968580.
W. LI, “Detecting defects in PCB manufacturing: an exploration using Yolov8 deep learning,” International Journal on Interactive Design and Manufacturing (IJIDeM), vol. 19, no. 5, pp. 3505–3515, 2025, https://www.doi.org/10.1007/s12008-024-01986-w.
A. Roy et al., “Applications and Challenges of AI in PCB X-ray Inspection: A Comprehensive Study,” ACM Journal on Emerging Technologies in Computing Systems, vol. 21, no. 1, pp. 1–28, 2025, https://www.doi.org/10.1145/3703457.
Y. Zhai, L. Wang, Y. Liu, T. Jiang, and H. Jiang, “The design of automatic carton packing system of tobacco based on STM32,” Journal of Physics: Conference Series, vol. 1948, no. 1, p. 012099, 2021, https://www.doi.org/10.1088/1742-6596/1948/1/012099.
N. Hütten, M. Alves Gomes, F. Hölken, K. Andricevic, R. Meyes, and T. Meisen, “Deep Learning for Automated Visual Inspection in Manufacturing and Maintenance: A Survey of Open- Access Papers,” Applied System Innovation, vol. 7, no. 1, p. 11, 2024, https://www.doi.org/10.3390/asi7010011.
J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, “You Only Look Once: Unified, Real-Time Object Detection,” in 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), IEEE, pp. 779–788, 2016, https://www.doi.org/10.1109/CVPR.2016.91.
M. Maślanka, D. Jancarczyk, and J. Rysinski, “Integration of Machine Vision and PLC-Based Control for Scalable Quality Inspection in Industry 4.0,” Sensors, vol. 25, no. 20, p. 6383, 2025, https://www.doi.org/10.3390/s25206383.
S. Vasudevan et al., “Machine vision and robotics for primary food manipulation and packaging: A survey,” IEEE Access, vol. 12, pp. 152579–152613, 2024, https://www.doi.org/10.1109/ACCESS.2024.3479781.
S. S. Zakaria, A. Amir, N. Yaakob, and S. Nazemi, “Automated detection of printed circuit boards (PCB) defects by using machine learning in electronic manufacturing: Current approaches,” in IOP Conference Series: Materials Science and Engineering, p. 12064, 2020, https://www.doi.org/10.1088/1757-899X/767/1/012064.
A. S. Ozer and I. Cinar, “Real-Time and Fully Automated Robotic Stacking System with Deep Learning-Based Visual Perception,” Sensors, vol. 25, no. 22, p. 6960, 2025, https://www.doi.org/10.3390/s25226960.
Z. Shen, S. Wang, J. Dou, and Z. Tu, “Design and implementation of PCB detection and classification system based on machine vision,” in Lecture Notes in Electrical Engineering, pp. 253–261, 2019, https://www.doi.org/10.1007/978-981-13-2375-1_32.
M. B. Kiran, “Automated Inspection of PCB,” AIP Conference Proceedings, vol. 3108, no. 1, p. 30008, 2024, https://www.doi.org/10.1063/5.0208227.
A. Mukhopadhyay, L. R. D. Murthy, M. Arora, A. Chakrabarti, I. Mukherjee, and P. Biswas, “PCB inspection in the context of smart manufacturing,” in Smart Innovation, Systems and Technologies, pp. 655–663, 2019, https://www.doi.org/10.1007/978-981-13-5974-3_57.
Y. P. Wijaya, I. Swinarno, B. Prabowo, H. Subagiyo, A. Huda, and D. Syahbana, “Automated Printed Circuit Board Inspection System using NI Vision Builder and NI MyRio,” Journal of Electronics Technology Exploration, vol. 2, no. 2, pp. 58–64, 2025, https://www.doi.org/10.52465/joetex.v2i2.511.
S. U. Rehman, K. F. Thang, and N. S. Lai, “Automated PCB identification and defect-detection system (APIDS),” International Journal of Electrical and Computer Engineering, vol. 9, no. 1, pp. 297–306, 2019, https://www.doi.org/10.11591/ijece.v9i1.pp297-306.
B. Aranjo, P. K. Soori, and P. Talukder, “Stepper motor drives for robotic applications,” in 2012 IEEE International Power Engineering and Optimization Conference, IEEE, pp. 361–366, 2012, https://www.doi.org/10.1109/PEOCO.2012.6230890.
H. K. Jung and G. S. Choi, “Improved YOLOv5: Efficient Object Detection Using Drone Images under Various Conditions,” Applied Sciences (Switzerland), vol. 12, no. 14, p. 7255, 2022, https://www.doi.org/10.3390/app12147255.
Z. Liang, Z. Liang, Y. Zheng, B. Liang, and L. Zheng, “Data analysis and visualization platform design for batteries using flask-based python web service,” World Electric Vehicle Journal, vol. 12, no. 4, p. 187, 2021, https://www.doi.org/10.3390/wevj12040187.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Truong-Nguyen Phan, Thi-Ngoc-Tram Tran, Thanh-Viet Ho, Binh-Hau Nguyen, Minh-Tri Hoang, Hai-Nam Tran, Nhat-Nam Nguyen, Nguyen-Cong-Anh Tran, Le-Huu-Tri Do, Thi-Ngoc-Thao Nguyen, Nam-Long Tran, Duong-Thuan Nguyen, Van-Huy Le, Van-Tuan Nguyen, Huynh-Anh-Tuan Pham

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.