Disclosure of Invention
The application provides a detection system and a detection method for a PCB, which automatically complete the detection of the PCB, shorten the judging time and enable the scoring standard to be more objective and unified.
In order to solve the technical problems, in a first aspect, the application provides a detection system for a PCB board, including a PCB board detection device, a data storage module, and an analysis test device;
The PCB detection equipment is used for acquiring current detection data of the PCB to be detected according to preset detection indexes of the PCB and uploading the current detection data to the data storage module, wherein the preset detection indexes of the PCB comprise types and numbers of components, positions of preset components, resistance directions, direct-insertion component inserting directions, component welding spots and the surface of the PCB;
The data storage module is used for storing the current test data, historical test data of the PCB, scoring standards and scores;
The analytical test device includes:
The abnormality diagnosis module is used for determining current abnormal data of the PCB to be tested according to the current test data;
And the scoring module is used for obtaining the scoring score of the test PCB according to the current abnormal data and the scoring standard.
In some of these embodiments, the PCB board detection apparatus includes:
The visual platform is used for placing the PCB to be tested;
the industrial camera is provided with a lens and is used for acquiring current detection data of the PCB to be detected and uploading the current detection data to the data storage module;
And the light source is used for providing illumination for the PCB to be tested.
In some of these embodiments, the anomaly diagnostic module includes:
The component detection unit is used for identifying whether the types and the numbers of the components of the PCB are abnormal;
The component position detection unit is used for detecting whether the position of a preset component on the PCB is correct or not;
the resistance direction detection unit is used for identifying whether the resistance direction on the PCB is reversed;
the direct-insert component plugging direction detection unit is used for identifying whether the direct-insert component on the PCB is inclined or not and whether the surface of the direct-insert component is damaged or not;
The component welding spot detection unit is used for identifying whether the component welding spots on the PCB meet welding requirements or not;
the board detection unit of the PCB is used for detecting whether scratches exist on the surface of the PCB.
In a second aspect, the present application further includes a method for detecting a PCB, which is applied to a detection system of the PCB, the method including:
placing the PCB to be tested on a vision platform;
acquiring imaging graphic information of the PCB to be tested through a lens on the industrial camera and sending the imaging graphic information to the abnormality diagnosis module;
The method comprises the steps that the types and the number of abnormal components of a PCB are identified through a component detection unit, and information of the formed abnormal components is sent to a scoring module;
Detecting preset components with the welding position offset on the PCB by a component position detection unit, and sending the preset component information with the position offset to a scoring module;
Identifying the reverse resistor on the PCB by a resistor direction detection unit, and sending the reverse resistor information to a scoring module;
The direct-insert component inserting direction detection unit is used for identifying the direct-insert component with the inserting inclination and the surface damage on the PCB, and sending the direct-insert component inserting inclination and the surface damage information to the scoring module;
Identifying abnormal welding spots of components on the PCB by a component welding spot detection unit, and sending information of the abnormal welding spots to a scoring module;
Identifying surface scratches of the PCB by a board surface detection unit of the PCB, and sending the surface scratch information of the PCB to a scoring module;
The scoring module compares the obtained abnormal component information, the reversed resistance information, the direct-insert component plugging inclination and surface damage information, the abnormal welding spot information and the PCB surface scratch information with preset scoring standards to obtain the comprehensive score of the tested PCB.
In some embodiments, the method for identifying the components with abnormal types and numbers of the PCB by the component detection unit includes:
positioning the PCB to be tested through the positioning holes;
defining fixed ROIs of various different types of components;
Creating a template library of different components through a multi-template matching algorithm;
obtaining the comparison between the number of components of different template libraries and the preset number;
Judging whether the types and the quantity of the components welded on the PCB are missing.
In some embodiments, the method for detecting the preset component with the offset of the soldering position on the PCB board includes:
positioning the PCB to be tested through the positioning holes;
setting a preset component template through a template matching algorithm;
After locating the preset component, finding the coordinates of intersection points of two sides of the preset component;
comparing whether the difference value between the intersection point coordinate and the central point coordinate of the PCB is the same as a preset difference value;
If yes, the welding position of the preset component is not offset.
In some embodiments, the method for identifying the reverse resistor on the PCB board includes:
positioning the PCB to be tested through the positioning holes;
Positioning all resistor positions through a deep learning detection algorithm;
extracting the resistance color ring characteristics by adopting a deep learning classification algorithm;
And judging whether the resistance direction is correct or not through the image classification network.
In some embodiments, the method for identifying the direct-insert component with the inclination and the surface damage on the PCB board comprises the following steps:
positioning the PCB to be tested through the positioning holes;
defining a fixed ROI of the direct-insert component;
An unsupervised algorithm is adopted to detect whether the direct-insert component has a skew state;
and detecting whether the surface of the direct-insert component is damaged by adopting a segmentation algorithm.
In some embodiments, the method for identifying abnormal solder joints of components on a PCB board includes:
positioning the PCB to be tested through the positioning holes;
The feature of the welding spot can be highlighted through color space conversion;
the welding spot position can be positioned through coarse positioning;
whether welding spots are missing or not and whether the welding spots are misplaced or not can be judged through position judgment;
cutting pin welding spots of the components and sending the cut pin welding spots into a deep learning classification network;
judging whether the welding spot is full, less tin and tin tip or not through the confidence degree.
In a third aspect, the present application further provides a method for inspecting a PCB board, including a processor and a memory, where the memory is configured to store a computer program, and the computer program when executed by the processor implements the method for inspecting a PCB board.
Compared with the prior art, the application has at least the following beneficial effects:
According to the application, the PCB to be tested is placed on a visual platform through a detection system of the PCB, imaging graphic information of the PCB to be tested is obtained through a lens on an industrial camera and is sent to an abnormality diagnosis module, the type and the number of abnormal components of the PCB are identified through a component detection unit, formed abnormal component information is sent to a scoring module, a component position detection unit is used for detecting preset components with deviated welding positions on the PCB, preset component information with deviated positions is sent to the scoring module, the reverse resistance on the PCB is identified through a resistance direction detection unit, the reverse resistance information is sent to the scoring module, the direct-insert components with inclined plug-in and surface breakage on the PCB are identified through a direct-insert component plug-in direction detection unit, abnormal welding spots of the components on the PCB are identified through a component welding spot detection unit, abnormal welding spot information is sent to the scoring module, the surface scratches of the PCB are identified through a board surface detection unit of the PCB, the scoring module is sent to the scoring module, the obtained abnormal component information, the direct-insert component plug-in inclination and the surface breakage information are compared with the scoring module, the whole scoring process is further shortened by the scoring system, and the scoring process is more finished than the scoring system is finished.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, the application provides a detection system of a PCB board, which includes a PCB board detection apparatus 1, a data storage module 2 and an analysis test apparatus 3;
The PCB board detection equipment 1 is used for acquiring current detection data of a PCB board to be detected according to preset detection indexes of the PCB board and uploading the current detection data to the data storage module 2, wherein the preset detection indexes of the PCB board comprise types and numbers of components, positions of preset components, resistance directions, direct-insert component inserting directions and appearances, component welding spots and board surfaces of the PCB board;
the data storage module 2 is used for storing the current test data, historical test data of the PCB, scoring standards and scores;
The analytical test device 3 includes:
the abnormality diagnosis module 31 is configured to determine current abnormality data of the PCB to be tested according to the current test data;
and the scoring module 32 is configured to obtain a scoring score of the test PCB board according to the current abnormal data and the scoring criteria.
The PCB board check out test set includes:
The visual platform is used for placing the PCB to be tested;
the industrial camera is provided with a lens and is used for acquiring current detection data of the PCB to be detected and uploading the current detection data to the data storage module;
And the light source is used for providing illumination for the PCB to be tested.
In some of these embodiments, the anomaly diagnostic module includes:
The component detection unit is used for identifying whether the types and the numbers of the components of the PCB are abnormal;
The component position detection unit is used for detecting whether the position of a preset component on the PCB is correct or not;
the resistance direction detection unit is used for identifying whether the resistance direction on the PCB is reversed;
the direct-insert component plugging direction detection unit is used for identifying whether the direct-insert component on the PCB is inclined or not and whether the surface of the direct-insert component is damaged or not;
The component welding spot detection unit is used for identifying whether the component welding spots on the PCB meet welding requirements or not;
the board detection unit of the PCB is used for detecting whether scratches exist on the surface of the PCB.
When the detection of the PCB board is carried out, the PCB board to be detected is firstly placed on the vision platform, the industrial camera slides and is matched with the support column of the vision platform, the industrial camera can slide on the support column of the vision platform along the vertical direction, then the industrial camera is close to or far away from the PCB board to be detected, a light source is started to illuminate the PCB board to be detected, the industrial camera drives a lens to move to a preset position to photograph the PCB board to be detected, the image information of the front side and the back side of the PCB board to be detected is obtained, and the image information is respectively sent to the data storage module 2 and the abnormality diagnosis module 31 in the analysis and test equipment 3.
The method comprises the steps of identifying abnormal components of the type and the number of the PCB through a component detection unit, sending formed abnormal component information to a scoring module, detecting preset components with welding position offset on the PCB through a component position detection unit, sending preset component information with the welding position offset to the scoring module, identifying the mounting inverse resistor on the PCB through a resistor direction detection unit, sending mounting inverse resistor information to the scoring module, identifying the direct-insert components with the plugging inclination and the surface breakage on the PCB through a direct-insert component plugging direction detection unit, sending the direct-insert component plugging inclination and the surface breakage information to the scoring module, identifying abnormal welding spots of the components on the PCB through a component welding spot detection unit, sending the abnormal welding spot information to the scoring module, identifying surface scratches of the PCB through a board surface detection unit of the PCB, sending the surface scratch information of the PCB to the scoring module, and comparing the obtained abnormal component information, the mounting inverse resistor information, the direct-insert component plugging inclination and the surface breakage information, the abnormal welding spot information and the surface scratch information of the PCB with preset scoring standards, for example, if the total resistance is 100, and the total resistance is 0.3, and the final score is obtained after the total resistance is tested to be 0.3 minutes, and the score is finally scored.
In this way, the application puts the PCB board to be measured on the visual platform through the detecting system of the PCB board, obtain the imaging figure information of the PCB board to be measured through the lens on the industrial camera and send to the abnormal diagnosis module, discern the type of the PCB board, the abnormal components of quantity through the component detecting unit, send the abnormal components information formed to the scoring module, the component position detecting unit, the preset components used for detecting the welding position deviation on the PCB board, and send the preset components information of the position deviation to the scoring module, discern the loading resistance on the PCB board through the resistance direction detecting unit, and send the loading resistance information to the scoring module, discern the direct-insert components with the surface damage on the PCB board through the direct-insert component inserting direction detecting unit, and send the direct-insert component inserting inclination and surface damage information to the scoring module, discern the abnormal welding point of components on the PCB board through the component welding point detecting unit, and send the abnormal welding point information to the scoring module, discern the surface scratch of the board through the board face detecting unit of the PCB board, and send the board surface scratch information to the scoring module, and compare the obtained component information, the direct-insert resistance information and the whole surface damage score system with the scoring system, the scoring system is more finished than the scoring system is finished.
Referring to fig. 2, in a second aspect, the present application further includes a method for detecting a PCB, which is applied to the detecting system of the PCB, and the method includes:
s1, placing a PCB to be tested on a vision platform;
s2, imaging graphic information of the PCB to be tested is obtained through a lens on the industrial camera and is sent to an abnormality diagnosis module;
s3, identifying abnormal components of the type and the number of the PCB through a component detection unit, and sending the formed abnormal component information to a scoring module;
S4, detecting a preset component with the welding position offset on the PCB through a component position detection unit, and sending preset component information with the position offset to a scoring module;
S5, identifying the reverse resistor on the PCB through the resistor direction detection unit, and sending the reverse resistor information to the scoring module;
S6, identifying the direct-insert components with the insertion inclination and the surface damage on the PCB through the direct-insert component insertion direction detection unit, and sending the direct-insert component insertion inclination and the surface damage information to the scoring module;
s7, identifying abnormal welding spots of components on the PCB through a component welding spot detection unit, and sending information of the abnormal welding spots to a scoring module;
S8, identifying scratches on the surface of the PCB through a board surface detection unit of the PCB, and sending information of the scratches on the surface of the PCB to a scoring module;
S9, the scoring module compares the obtained abnormal component information, the loading reversed resistance information, the direct-insert component plugging inclination and surface damage information, the abnormal welding spot information and the PCB surface scratch information with preset scoring standards to obtain scoring scores of the tested PCB.
In some embodiments, the method for identifying the components with abnormal types and numbers of the PCB by the component detection unit includes:
s31, positioning the PCB to be tested through the positioning holes;
S32, demarcating fixed ROIs of various different types of components, for example, resistance demarcating fixed ROIs, capacitance demarcating fixed ROIs, wherein the ROIs are an image area selected from a PCB;
S33, creating a template library of different components through a multi-template matching algorithm, wherein the multi-template matching algorithm is a pattern recognition technology and is used for searching a template which is matched with input data best in a group of templates. This technique is widely used in the fields of image processing, computer vision, pattern recognition, and the like. The basic idea of multi-template matching is to compare the input data with a set of predefined templates to find the template most similar to the input data. Each template represents a category by which multi-template matching can be used to solve multi-category pattern recognition problems. Templates of different components can be created, and the components identified according to the images are compared with the templates;
S34, obtaining the number of components of different template libraries to be compared with the preset number;
S35, judging whether the types and the quantity of the components welded on the PCB are missing.
In some embodiments, the method for detecting the preset component with the offset of the soldering position on the PCB board includes:
S41, positioning the PCB to be tested through the positioning holes;
S42, setting a preset component template through a template matching algorithm;
S43, locating the preset component and finding the intersection point coordinates of the two sides of the preset component;
S44, comparing whether the difference value between the intersection point coordinate and the central point coordinate of the PCB is the same as a preset difference value;
s45, if yes, no offset exists in the welding position of the preset component. The key elements of the preset components are core elements in the whole circuit, such as a CPU (Central processing Unit) with a control function, a power supply circuit for providing power and a driving circuit for driving a load. Often also the most costly and expensive component, is the focus of quality inspection. If the difference between the intersection point coordinates and the central point coordinates of the PCB is different, the welding positions of the preset components are considered to be offset, and corresponding scores are required to be deducted.
In some embodiments, the method for identifying the reverse resistor on the PCB board includes:
S51, positioning the PCB to be tested through the positioning holes;
s52, positioning all resistance positions through a deep learning detection algorithm;
S53, extracting the resistance color ring characteristics by adopting a deep learning classification algorithm;
s54, judging whether the resistance direction is correct or not through the image classification network.
The color of the last color ring of the resistor is generally used for judging whether the resistor is reversely arranged, and the last color ring of the resistor is generally three colors of gold, silver and brown, but the three colors of gold, silver and brown are basically not used in the first color ring of the resistor, so that the characteristic of the color ring of the resistor is extracted by adopting a deep learning classification algorithm, and if the first color ring of the resistor is found to be out of three colors of cash, silver and brown, the direction of the resistor can be judged to be reversely arranged, and the corresponding fraction needs to be deducted.
In some embodiments, the method for identifying the direct-insert component with the inclination and the surface damage on the PCB board comprises the following steps:
s61, positioning the PCB to be tested through the positioning holes;
S62, defining a fixed ROI of the direct-insert component;
S63, detecting whether the direct-insert component has a skew state or not by adopting an unsupervised algorithm;
S64, detecting whether the surface of the direct-insert component is damaged by adopting a segmentation algorithm.
The unsupervised algorithm can determine whether the direct-insert component is clear or not through the distance from the point outside the direct-insert component to the point on the direct-insert component on the same straight line, and if the distance from the point outside the direct-insert component to the point on the corresponding direct-insert component changes, the direct-insert component is considered to incline, and the corresponding score needs to be deducted.
The application of segmentation algorithms in surface breakage detection relies primarily on image processing techniques by segmenting the image into a plurality of small regions (segmentations), each called a "segment", and then analyzing the features of these segmentations to detect breakage. The key to this approach is to identify the breakage by comparing each segment with the surrounding environment, typically involving the following steps:
pre-processing includes image enhancement (e.g., denoising, contrast enhancement, etc.) and color space conversion to improve image quality and highlight corrupted portions.
Feature extraction using edge detection algorithms (e.g., canny operator) and texture analysis, identify unique patterns of damaged areas, such as cracks or depressions.
Lesion field localization the most similar field to a typical lesion field is determined by template matching or machine learning classification.
Segmentation and refinement . The damaged area is gradually enlarged by using an area growth or clustering method, similar pixels are combined, and the pixels are segmented into the background or the damaged area through threshold segmentation.
Post-processing to remove false positive regions, i.e., small false positive regions that are irrelevant, and make the necessary repairs or fills.
The effectiveness of this method depends on the fineness of the image preprocessing, the accuracy of feature extraction, and the efficiency of the segmentation algorithm. Through the steps, the segmentation algorithm can effectively identify the damaged area from the complex background, and provides basis for subsequent repair or quality control.
In some embodiments, the method for identifying abnormal solder joints of components on a PCB board includes:
S71, positioning the PCB to be tested through the positioning holes;
S72, highlighting welding spot characteristics through color space conversion;
s73, positioning the welding spot position through rough positioning;
s74, judging whether welding spots are missing or not and whether the welding spots are misplaced or not through position judgment;
S75, cutting pin welding points of the components and the devices, and then sending the cut pin welding points into a deep learning classification network;
S76, judging whether the welding spots are full, less tin and tin tips according to the confidence level.
The welding spot characteristics can be highlighted through color space conversion, then the welding spot position can be positioned through coarse positioning, whether the welding ball is missing or not can be judged through the position, whether dislocation is caused or not, deep learning classification training is carried out through cutting of a positioned welding spot area, whether the welding spot meets the state or not can be obtained through the color and luster form of the welding spot, and the welding spot meeting the requirement is screened out through confidence.
Referring to fig. 3, in a third aspect, the present application further provides a computer device 4, including a processor 40 and a memory 41, where the memory 41 is configured to store a computer program 42, and the computer program 42 implements the method for testing a PCB board when executed by the processor 40.
The computer device 4 may be a tablet computer, a desktop computer, a cloud server, or the like. The computer device may include, but is not limited to, a processor 40, a memory 41. It will be appreciated by those skilled in the art that fig. 3 is merely an example of the computer device 4 and is not meant to be limiting as the computer device 4 may include more or fewer components than shown, or may combine certain components, or different components, such as may also include input-output devices, network access devices, etc.
The Processor 40 may be a central processing unit (Central Processing Unit, CPU), the Processor 40 may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processors, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), off-the-shelf Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may in some embodiments be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. The memory 41 may in other embodiments also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the computer device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the computer device 4. The memory 41 is used for storing an operating system, application programs, boot loader (BootLoader), data, other programs, etc., such as program codes of the computer program. The memory 41 may also be used for temporarily storing data that has been output or is to be output.
The foregoing embodiments have been provided for the purpose of illustrating the general principles of the present application, and are not to be construed as limiting the scope of the application. It should be noted that any modifications, equivalent substitutions, improvements, etc. made by those skilled in the art without departing from the spirit and principles of the present application are intended to be included in the scope of the present application.