A high-precision, large-scale, fast, and real-time automatic optical detection system for PCB board defects is studied, and the hardware structure and software system are designed respectively. The system mainly comprises a two-dimensional motion platform, motor control module, image acquisition module, image processing module, and result analysis module. The improved stepper motor drive mode, subdivision drive, and enhanced image recognition algorithm ensure system accuracy, while the design of one-button automatic detection improves speed. Experimental results demonstrate the system’s ability to swiftly and accurately detect PCB board defects, showcasing significant practical and developmental value.
Printed circuit boards (PCBs) are integral information carriers that integrate various electronic components within electronic products. Widely utilized across diverse fields, PCBs are indispensable for ensuring the long-term, reliable operation of electronic products. The quality of PCB boards has thus emerged as a critical determinant for product functionality.
As technology advances, the development trend towards higher density, complexity, and performance of PCB products continually challenges quality inspection methods. Traditional PCB defect detection methods are increasingly inadequate due to limitations in accessibility, cost, and efficiency. Consequently, researching and implementing an automatic detection system for PCB defects holds substantial academic and economic value.
Among the various PCB defect detection technologies studied globally, Automatic Optical Inspection (AOI) technology, based on image processing, has garnered significant attention. This paper focuses on studying a large-field-of-view, high-precision, fast real-time automatic detection system for PCB defects using image processing technology. It details the hardware structure and software algorithm flow. By enhancing the motor drive mode and implementing one-button automatic detection software, the system achieves significantly improved detection speed. Further enhancements to the defect identification algorithm in the result analysis module boost detection accuracy.
1. System structure
The automatic PCB board defect detection system comprises a motion control module, an image acquisition module, an image processing module, and a result analysis module. The system operates as follows: the upper computer controls the stepper motor to move the two-dimensional platform, positioning the CCD camera over the PCB under inspection. The camera captures high-resolution images of the PCB, which are then transmitted to the image acquisition card on the host computer. Software on the host computer stitches these images, preprocesses them for accurate calibration, and performs tasks such as template matching and image segmentation for defect detection. The integration of hardware and software forms the foundation of the system design.
2. System hardware design
The hardware design includes components such as the two-dimensional motion platform, motor motion control board, motor drive board, CCD camera, image capture card, and PC.
2.1 CCD camera and frame grabber
Key parameters of the CCD camera include format, photosensitive area, pixel size, resolution, electronic shutter speed, synchronization method, illuminance, sensitivity, and signal-to-noise ratio. These parameters, along with the camera’s format and online detection requirements, dictate the image acquisition card’s sampling frequency. The frame grabber, or video capture card, converts analog video signals from the camera into digital format. In this system, the NV7004-N model image acquisition card digitizes CCD camera signals, enabling real-time display and image capture on the host computer.
2.2 Motor Motion Controller and Precision 2D Motion Platform
The motion controller, based on the AT89S52 MCU from ATMEL, interfaces with the host computer via RS-232 serial communication. It directs stepper motor operations, controlling speed, direction, and positioning via signals to the motor drive board. The precision 2D motion platform utilizes Japanese SUS Corp’s ball screw motion guides for accurate movement. A TAMAGAWA two-phase four-wire hybrid stepper motor ensures stable, low-noise operation.
2.3 Motor drive
Stepper motor operation involves controlling current to excitation windings, altering the motor’s magnetic field synthesis direction for rotation. The magnitude of these magnetic fields determines torque, while the step angle depends on the rotational displacement per pulse signal. Motor subdivision enhances resolution by reducing step angles, achieved through methods like constant amplitude uniform rotation of current vectors. This approach minimizes motor vibration and noise, ensuring stable operation crucial for PCB control.
These adjustments aim to optimize motor performance, meeting precise operational demands in PCB manufacturing and inspection processes.
Printed circuit boards (PCBs) are integral information carriers that integrate various electronic components within electronic products. Widely utilized across diverse fields, PCBs are indispensable for ensuring the long-term, reliable operation of electronic products. The quality of PCB boards has thus emerged as a critical determinant for product functionality.
As technology advances, the development trend towards higher density, complexity, and performance of PCB products continually challenges quality inspection methods. Traditional PCB defect detection methods are increasingly inadequate due to limitations in accessibility, cost, and efficiency. Consequently, researching and implementing an automatic detection system for PCB defects holds substantial academic and economic value.
Among the various PCB defect detection technologies studied globally, Automatic Optical Inspection (AOI) technology, based on image processing, has garnered significant attention. This paper focuses on studying a large-field-of-view, high-precision, fast real-time automatic detection system for PCB defects using image processing technology. It details the hardware structure and software algorithm flow. By enhancing the motor drive mode and implementing one-button automatic detection software, the system achieves significantly improved detection speed. Further enhancements to the defect identification algorithm in the result analysis module boost detection accuracy.
1. System structure
The automatic PCB board defect detection system comprises a motion control module, an image acquisition module, an image processing module, and a result analysis module. The system operates as follows: the upper computer controls the stepper motor to move the two-dimensional platform, positioning the CCD camera over the PCB under inspection. The camera captures high-resolution images of the PCB, which are then transmitted to the image acquisition card on the host computer. Software on the host computer stitches these images, preprocesses them for accurate calibration, and performs tasks such as template matching and image segmentation for defect detection. The integration of hardware and software forms the foundation of the system design.
2. System hardware design
The hardware design includes components such as the two-dimensional motion platform, motor motion control board, motor drive board, CCD camera, image capture card, and PC.
2.1 CCD camera and frame grabber
Key parameters of the CCD camera include format, photosensitive area, pixel size, resolution, electronic shutter speed, synchronization method, illuminance, sensitivity, and signal-to-noise ratio. These parameters, along with the camera’s format and online detection requirements, dictate the image acquisition card’s sampling frequency. The frame grabber, or video capture card, converts analog video signals from the camera into digital format. In this system, the NV7004-N model image acquisition card digitizes CCD camera signals, enabling real-time display and image capture on the host computer.
2.2 Motor Motion Controller and Precision 2D Motion Platform
The motion controller, based on the AT89S52 MCU from ATMEL, interfaces with the host computer via RS-232 serial communication. It directs stepper motor operations, controlling speed, direction, and positioning via signals to the motor drive board. The precision 2D motion platform utilizes Japanese SUS Corp’s ball screw motion guides for accurate movement. A TAMAGAWA two-phase four-wire hybrid stepper motor ensures stable, low-noise operation.
2.3 Motor drive
Stepper motor operation involves controlling current to excitation windings, altering the motor’s magnetic field synthesis direction for rotation. The magnitude of these magnetic fields determines torque, while the step angle depends on the rotational displacement per pulse signal. Motor subdivision enhances resolution by reducing step angles, achieved through methods like constant amplitude uniform rotation of current vectors. This approach minimizes motor vibration and noise, ensuring stable operation crucial for PCB control.
These adjustments aim to optimize motor performance, meeting precise operational demands in PCB manufacturing and inspection processes.