基於 FPGA 自動化即時 PCB 缺陷偵測嵌入式系統

Automated Real-time PCB Defect Detection Embedded System Implementation on FPGA

檔案

全文未公開。

日期

2026

類型

語言

中文

摘要

印刷電路板為電子產品中承載電子元件並提供線路連接之關鍵元件;若印刷電路板 (Printed circuit board, PCB) 於製造過程中產生缺陷,可能影響後續元件焊接、電子傳輸與產品運作穩定性,嚴重時甚至導致電路燒毀或系統失效。所以於元件焊接前,確保PCB載板的可用性,即時有效之 PCB 缺陷檢測具有重要性。
為了即時有效檢測印刷電路板缺陷,本研究提出一套基於現場可程式化邏輯閘陣列(Field-Programmable Gate Array, FPGA) 之自動化即時印刷電路板缺陷檢測系統。系統以 YOLOv5s 作為缺陷檢測模型,針對開路(open circuit)、短路(short)、毛邊(spur)、多餘銅(spurious copper)及銅箔邊緣缺口(mouse bite)五種常見 PCB 缺陷進行訓練與辨識。模型訓練結合公開資料集、自製 PCB 樣品影像與資料增強方法,並以 640 × 640 像素作為模型輸入尺寸。為達成嵌入式即時檢測,本研究將訓練完成之 YOLOv5s 模型由 32 位元浮點數量化為 8 位元整數,並部署至 ZCU102 FPGA 平台之深度學習處理單元 (Deep Learning Processing Unit, DPU) 上進行推論。
在系統實作方面,本研究於 ZCU102 之處理系統端導入多執行緒管線化架構,以整合影像擷取、影像前處理、DPU 推論與後處理流程,提升整體推論效率。系統可於輸入影像中即時標示 PCB 缺陷位置,並完成即時影像顯示與推論結果輸出。實驗結果顯示,本系統於 640 × 640 像素輸入條件下可達每秒 13–16 幀 (Frames Per Second, FPS) 的速度 ,精確率、召回率與 F1 分數分別為 86.34%、92.01% 與 87.75%。
為驗證本研究可實際運用於工業現場,因此建置類生產線測試平台,整合攝影機、電動滑軌與 ZCU102 FPGA 平台,以驗證系統於即時連續檢測情境下之可行性。檢測過程中,系統可同步完成缺陷數量統計、偵測效能計算等即時統計輸出並後續效能分析與模型校正之依據。
Printed circuit boards (PCBs) are key elements for electronics, soldering, and interconnection. Defects generated during PCB manufacturing may affect subsequent devices' soldering, electron transport, and product stability, potentially causing circuit burnout or system failure. Therefore, effective real-time PCB defect detection before component soldering is very important.
Here, an FPGA-based automated real-time PCB defect detection system is proposed. The YOLOv5s is used to identify five common PCB defects: open circuit, short, spur, spurious copper, and mouse bite. The training model uses a public dataset from Belgin University, self-made PCB samples, and data augmentation methods, with an image size of 640 × 640 pixels. For an embedded real-time detection system, the trained YOLOv5s model is quantized from 32-bit floating-point to 8-bit integer and deployed on the DPU (Deep Learning Processing Unit) of the ZCU102 FPGA platform for inference.
A multi-threaded pipeline architecture is introduced on the processing system side of the ZCU102 to integrate image acquisition, preprocessing, DPU inference, and post-processing, thereby improving overall inference efficiency. The system can simultaneously mark PCB defect locations, display real-time images, and output inference results. Experimental results show that the system achieves 13–16 FPS (Frames Per Second) with an input image size of 640 × 640, detection evaluation factors, precision, recall, and F1-score of 86.34%, 92.01%, and 87.75%, respectively.
To verify the practical applicability of the proposed system in industrial environments, a quasi-production-line testing platform was constructed by integrating a camera, an electric slide rail, and the ZCU102 FPGA platform. The experimental results demonstrate that the proposed system is feasible for real-time continuous inspection. During inspection, the system simultaneously performs defect counting and board-level result logging, and the recorded statistics are subsequently used for performance analysis and model calibration.
顯示完整詮釋資料 統計資料

引用此條目

陳邑瑋 (2026). 基於 FPGA 自動化即時 PCB 缺陷偵測嵌入式系統. https://thesis.lib.nycu.edu.tw/handle/20.500.14371/90577

BibTeX RIS

引用文字依 APA 第 7 版格式自動產生,使用前請再核對。

分享

永久網址:https://thesis.lib.nycu.edu.tw/handle/20.500.14371/90577