A PCBA circuit board fault detection method and device

By collecting component images from the side during the PCBA circuit board patch stage and screening the failure risk according to the solder paste area, and directly using a probe for detection, the problem of low detection efficiency in the prior art is solved and efficient fault detection is achieved.

CN117169246BActive Publication Date: 2024-11-15SHENZHEN SUOYI ELECTRONICS CO LTD
View PDF 18 Cites 0 Cited by

Patent Information

Application Number
CN202311138461.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-01
Publication Date
2024-11-15
Estimated Expiration
2043-09-01

AI Technical Summary

Technical Problem

The existing PCBA circuit board detection methods are inefficient and require detection and layout of probes one by one, resulting in a long time and low efficiency.

Method used

During the patch stage, the component images arranged longitudinally are collected from the sides of the component, and the components with risk of failure are screened according to the solder paste area, and fault detection is used to reduce the need for probe typesetting and detection one by one.

Benefits of technology

It greatly reduces the detection workload and time, improves detection efficiency, and realizes fault detection without the need for probe layout and detection one by one.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117169246B_ABST
    Figure CN117169246B_ABST
Patent Text Reader

Abstract

The present invention discloses a fault detection method and device for a PCBA circuit board, the method comprising: in the process of patching the PCBA circuit board, collecting a component image from the side of the component pasted on the PCBA circuit, the component image is a side image of the component arranged vertically; intercepting a solder paste image of the solder paste pasted on the component pin from the component image, determining the risk detection component containing a fault risk in the vertically arranged components according to the solder paste area used for the solder paste image; after determining the component position information of the vertical column where the risk detection component is located on the PCBA circuit board, calling a detection probe according to the component position information to perform fault detection on the risk detection component. The present invention can collect component images of the PCBA circuit, detect components with fault risks from the size of the solder paste area of ​​the image and the detection probe, so as to reduce the workload of detection and shorten the detection time, and improve the detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] PCB (Printed Circuit Board) is called a printed circuit board, also known as a printed circuit board, which is used to support the carrier of electronic components and provide circuits to form a complete circuit between electronic components. PCBA (Printed Circuit Board Assembly) refers to the one-stop service processing process of SMT patch, DIP plug-in, testing, finished product assembly, etc. after purchasing raw materials.

[0003] The production process of PCBA circuits can be roughly divided into board loading, laser marking, solder paste printing, solder paste detection, patching, visual inspection, reflow soldering and component detection. During the patching process, if there is component offset, solder paste adhesion or detachment, it is easy to cause a short circuit in the circuit. Therefore, during the component detection process, it is necessary to detect whether each component and the entire circuit are short-circuited. Since PCBA circuit boards involve many circuits and components, one of the commonly used circuit board short-circuit testing methods is probe detection. During operation, the circuit board is conveyed by a belt and the probe is fixed in advance. By contacting the probe with the components on the circuit board, it is possible to check whether the component is short-circuited, open-circuited and the value of the component, and then determine whether the circuit where the component is located has faults such as short-circuit or open-circuit.

[0004] However, the commonly used methods currently have the following technical problems: PCBA circuit boards involve many circuits and components. If detection probes are used to detect them one by one, it will be time-consuming and inefficient. Moreover, before each detection, the probes need to be arranged according to the structure of the PCBA circuit board and the position of each component, which further increases the detection time and reduces the detection efficiency. Summary of the invention

[0005] The present invention provides a PCBA circuit board fault detection method and device. The method can collect images of components arranged vertically from the side of the components during the PCBA circuit board patch stage, screen components with fault risks according to the size of the solder paste area of ​​the component pins, and then control the detection probe to detect the components with fault risks. The whole process not only does not require the layout of the probes, but also does not require the components to be detected one by one, which can greatly reduce the detection workload and shorten the detection time, and effectively improve the detection efficiency.

[0006] A first aspect of an embodiment of the present invention provides a PCBA circuit board fault detection method, the method comprising:

[0007] During the process of mounting the PCBA circuit board, the component image is collected from the side of the component mounted on the PCBA circuit. The component image is a side image of the component arranged vertically.

[0008] Extracting a solder paste image of the solder paste attached to the pins of the component from the component image, and determining a risk detection component containing a failure risk among the components arranged vertically according to the solder paste area used in the solder paste image;

[0009] After determining the component position information of the column where the risk detection component is located on the PCBA circuit board, a detection probe is called according to the component position information to perform fault detection on the risk detection component.

[0010] In a possible implementation manner of the first aspect, determining a risk detection element containing a failure risk in a vertically arranged component according to a solder paste area used for the solder paste image includes:

[0011] Acquire, from the solder paste image, a first image area of ​​the solder paste at two pin positions of the component and a second image area of ​​the solder paste at a bottom surface position of the component;

[0012] If the area of ​​any one of the first images is smaller than the first preset area, it is determined that the vertically arranged elements include a risk detection element suspected of an open circuit;

[0013] If the second image area is larger than the second preset area, respectively acquiring the solder paste image contour corresponding to the first image area and the solder paste image contour corresponding to the second image area to obtain the first image contour and the second image contour respectively;

[0014] Determine whether the solder paste on the pin of the component is connected with the solder paste at the bottom of the component based on the first image profile and the second image profile;

[0015] If it is determined that the solder paste on the component pins is connected to the solder paste on the bottom of the component, it is determined that the components arranged vertically include risk detection components suspected of short circuit.

[0016] In a possible implementation manner of the first aspect, determining whether solder paste on a component pin is connected to solder paste on a component bottom based on the first image profile and the second image profile includes:

[0017] Respectively acquiring contour edges of the first image contour and the second image contour to obtain a first edge line and a second edge line;

[0018] Calculating the similarity between the first edge line and the second edge line to obtain edge line similarity;

[0019] If the edge line similarity is greater than a preset similarity, it is determined that the solder paste of the component pin is connected to the solder paste at the bottom of the component;

[0020] If the edge line similarity is less than the preset similarity, it is determined that the solder paste on the component pin is not connected to the solder paste on the bottom of the component.

[0021] In a possible implementation manner of the first aspect, calling a detection probe to perform fault detection on the risk detection component according to the component position information includes:

[0022] Acquire characteristic information of the risk detection component, wherein the characteristic information includes solder joint size of component pins on a circuit board and component pin size;

[0023] Searching for a detection probe of a corresponding size from a preset probe list according to the characteristic information;

[0024] After generating a detection moving path based on the component position information, the detection probe is controlled according to the detection moving path to perform fault detection on the risk detection component.

[0025] In a possible implementation manner of the first aspect, generating a detection movement path based on the component position information includes:

[0026] If the height of the risk detection component corresponding to the component position information is greater than the height of the surrounding circuit components, obtaining the pin position coordinates of each component arranged vertically on the same side from the component position information;

[0027] A plurality of the pin position coordinates are sequentially connected according to the longitudinal arrangement order of the components to form a detection moving path.

[0028] In a possible implementation manner of the first aspect, generating a detection movement path based on the component position information includes:

[0029] If the height of the risk detection component corresponding to the component position information is smaller than the height of the surrounding circuit components, obtaining the positions of the circuit components around the risk detection component to obtain the surrounding position information;

[0030] Dividing the risk detection element into a plurality of first grids for movement according to the element position information and dividing the surrounding circuit elements into a plurality of second grids for obstacle movement according to the surrounding position information;

[0031] The first grid and the second grid are spliced ​​to generate a grid map, and an adaptive genetic algorithm is used to generate a detection movement path according to the grid map.

[0032] In a possible implementation manner of the first aspect, after the step of calling a detection probe to perform fault detection on the risk detection component according to the component position information, the method further includes:

[0033] Acquire a circuit image of the PCBA circuit board, and acquire image coordinates of the faulty component in the circuit image;

[0034] The faulty components are marked in the circuit image based on the image coordinates to generate a marked image for review.

[0035] A second aspect of an embodiment of the present invention provides a PCBA circuit board fault detection device, the device comprising:

[0036] The image acquisition module is used to acquire component images from the side of the components attached to the PCBA circuit during the process of mounting the PCBA circuit board. The component images are side images of the components arranged vertically.

[0037] A suspect detection module, used to intercept a solder paste image of the solder paste attached to the pin of the component from the component image, and determine a risk detection component containing a failure risk in the components arranged vertically according to the solder paste area used in the solder paste image;

[0038] The fault detection module is used to call a detection probe to perform fault detection on the risk detection component according to the component position information after determining the component position information of the column where the risk detection component is located on the PCBA circuit board.

[0039] In a possible implementation manner of the second aspect, determining a risk detection element containing a failure risk in a vertically arranged component according to the solder paste area used for the solder paste image includes:

[0040] Acquire, from the solder paste image, a first image area of ​​the solder paste at two pin positions of the component and a second image area of ​​the solder paste at a bottom surface position of the component;

[0041] If the area of ​​any one of the first images is smaller than the first preset area, it is determined that the vertically arranged elements include a risk detection element suspected of an open circuit;

[0042] If the second image area is larger than the second preset area, respectively acquiring the solder paste image contour corresponding to the first image area and the solder paste image contour corresponding to the second image area to obtain the first image contour and the second image contour respectively;

[0043] Determine whether the solder paste on the pin of the component is connected with the solder paste at the bottom of the component based on the first image profile and the second image profile;

[0044] If it is determined that the solder paste on the component pins is connected to the solder paste on the bottom of the component, it is determined that the components arranged vertically include risk detection components suspected of short circuit.

[0045] In a possible implementation manner of the second aspect, determining whether solder paste on a component pin is connected to solder paste on a component bottom based on the first image contour and the second image contour includes:

[0046] Respectively acquiring contour edges of the first image contour and the second image contour to obtain a first edge line and a second edge line;

[0047] Calculating the similarity between the first edge line and the second edge line to obtain edge line similarity;

[0048] If the edge line similarity is greater than a preset similarity, it is determined that the solder paste of the component pin is connected to the solder paste at the bottom of the component;

[0049] If the edge line similarity is less than the preset similarity, it is determined that the solder paste on the component pin is not connected to the solder paste on the bottom of the component.

[0050] In a possible implementation manner of the second aspect, calling a detection probe to perform fault detection on the risk detection component according to the component position information includes:

[0051] Acquire characteristic information of the risk detection component, wherein the characteristic information includes solder joint size of component pins on a circuit board and component pin size;

[0052] Searching for a detection probe of a corresponding size from a preset probe list according to the characteristic information;

[0053] After generating a detection moving path based on the component position information, the detection probe is controlled according to the detection moving path to perform fault detection on the risk detection component.

[0054] In a possible implementation manner of the second aspect, generating a detection movement path based on the component position information includes:

[0055] If the height of the risk detection component corresponding to the component position information is greater than the height of the surrounding circuit components, obtaining the pin position coordinates of each component arranged vertically on the same side from the component position information;

[0056] A plurality of the pin position coordinates are sequentially connected according to the longitudinal arrangement order of the components to form a detection moving path.

[0057] In a possible implementation manner of the second aspect, generating a detection movement path based on the component position information includes:

[0058] If the height of the risk detection component corresponding to the component position information is smaller than the height of the surrounding circuit components, obtaining the positions of the circuit components around the risk detection component to obtain the surrounding position information;

[0059] Dividing the risk detection element into a plurality of first grids for movement according to the element position information and dividing the surrounding circuit elements into a plurality of second grids for obstacle movement according to the surrounding position information;

[0060] The first grid and the second grid are spliced ​​to generate a grid map, and an adaptive genetic algorithm is used to generate a detection movement path according to the grid map.

[0061] In a possible implementation manner of the second aspect, after the step of calling a detection probe to perform fault detection on the risk detection component according to the component position information, the method further includes:

[0062] Acquire a circuit image of the PCBA circuit board, and acquire image coordinates of the faulty component in the circuit image;

[0063] The faulty components are marked in the circuit image based on the image coordinates to generate a marked image for review.

[0064] Compared with the prior art, the PCBA circuit board fault detection method and device provided by the embodiment of the present invention have the beneficial effect that: the present invention can collect images of longitudinally arranged components from the side of the components during the PCBA circuit board patch stage, screen components with fault risks according to the size of the solder paste area of ​​the component pins, and then control the detection probe to detect the components with fault risks. The entire process not only does not require probe layout, reducing the workload of probe layout, but also does not require components to be detected one by one, which can greatly reduce the workload of detection and shorten the detection time, and effectively improve the detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 It is a flow chart of a PCBA circuit board fault detection method provided by one embodiment of the present invention;

[0066] Figure 2 This is a position structure diagram of a PCBA circuit board and a camera provided by an embodiment of the present invention;

[0067] Figure 3 It is a structural schematic diagram of the arrangement positions of components of a PCBA circuit board provided by an embodiment of the present invention;

[0068] Figure 4 is a schematic diagram of solder paste position of a component image provided by an embodiment of the present invention;

[0069] Figure 5 is a schematic diagram of solder paste contour connectivity provided by an embodiment of the present invention;

[0070] Figure 6 The present invention is a schematic diagram of a PCBA circuit board fault detection device provided in accordance with an embodiment of the present invention. DETAILED DESCRIPTION

[0071] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0072] PCB (Printed Circuit Board) is called a printed circuit board, also known as a printed circuit board, which is used to support the carrier of electronic components and provide circuits to form a complete circuit between electronic components. PCBA (Printed Circuit Board Assembly) refers to the one-stop service processing process of SMT patch, DIP plug-in, testing, finished product assembly, etc. after purchasing raw materials.

[0073] The production process of PCBA circuits can be roughly divided into board loading, laser marking, solder paste printing, solder paste detection, patching, visual inspection, reflow soldering and component detection. During the patching process, if there is component offset, solder paste adhesion or detachment, it is easy to cause a short circuit in the circuit. Therefore, during the component detection process, it is necessary to detect whether each component and the entire circuit are short-circuited. Since PCBA circuit boards involve many circuits and components, one of the commonly used circuit board short-circuit testing methods is probe detection. During operation, the circuit board is conveyed by a belt and the probe is fixed in advance. By contacting the probe with the components on the circuit board, it is possible to check whether the component is short-circuited, open-circuited and the value of the component, and then determine whether the circuit where the component is located has faults such as short-circuit or open-circuit.

[0074] However, the commonly used methods currently have the following technical problems: PCBA circuit boards involve many circuits and components. If detection probes are used to detect them one by one, it will be time-consuming and inefficient. Moreover, before each detection, the probes need to be arranged according to the structure of the PCBA circuit board and the position of each component, which further increases the detection time and reduces the detection efficiency.

[0075] In order to solve the above problems, a PCBA circuit board fault detection method provided by an embodiment of the present application will be introduced and explained in detail through the following specific embodiments.

[0076] Reference Figure 1 , shows a flow chart of a PCBA circuit board fault detection method provided by an embodiment of the present invention.

[0077] The PCBA circuit board fault detection method is applicable to automatic testing equipment or general automatic testing equipment for PCBA circuit boards. In a preferred embodiment, the PCBA circuit board fault detection method is applicable to patch equipment for PCBA circuit boards, and fault detection can be performed immediately after patching together, avoiding determining that the product has a fault after the patching is completed and shipped.

[0078] Reference Figure 2 , shows a position structure diagram of a PCBA circuit board and a camera provided in an embodiment of the present invention.

[0079] In one implementation, the automatic placement equipment has a built-in camera that can be used to capture images, analyze the images to identify components with failure risks, and then conduct targeted and accurate inspections on components that are suspected of failure or have failure risks, thereby reducing the number of components to be inspected and effectively improving inspection efficiency.

[0080] Specifically, refer to Figure 2 The automatic placement equipment contains a PCBA circuit board 1, a camera 2 and a detection probe 3. The PCBA circuit board 1 moves in one direction (the arrow indicates the moving direction), and the camera 2 can face any row of components arranged vertically and take images. When there is a risk of failure or a suspected failure, the detection probe 3 is called to detect it.

[0081] Wherein, as an example, the PCBA circuit board fault detection method may include:

[0082] S11. In the process of mounting the PCBA circuit board, a component image is collected from the side of the component mounted on the PCBA circuit, where the component image is a side image of the component arranged vertically.

[0083] In one embodiment, the production process of the PCBA circuit board mainly includes the steps of: board loading by a board loading machine, laser marking, solder paste printing, solder paste detection, patch process, visual inspection, reflow soldering, and component detection.

[0084] In one of the practical operation modes of the present invention, the patch process is to mount components to the corresponding device position number positions of the PCB board. In order to improve efficiency, components of the same type are generally mounted in sequence according to their arrangement order.

[0085] Reference Figure 3 , showing a schematic structural diagram of component arrangement positions of a PCBA circuit board provided in one embodiment of the present invention.

[0086] For example, refer to Figure 3, starting from the left, the first row is 10k resistors, the second row is 100k resistors, and the third row is 500μ capacitors. After pasting the first row of 10k resistors, you can take a picture of the vertically arranged resistors from the side to get the component image.

[0087] In reference Figure 2-3 The shooting angle can be the side of the component, and the component and its two pins, as well as the fitting place between the component pins and the circuit board can be photographed. Combining the above points, comprehensive fault detection can be performed on this row of components.

[0088] In an optional embodiment, since the component is very small, the pattern of the component image is also very small, and the requirements for the camera are also high.

[0089] Therefore, in order to improve the clarity of the component image, the clarity of the component image may be adjusted after the component image is acquired.

[0090] Specifically, the clarity adjustment may include the following steps:

[0091] S21, acquiring pixel points of the component image, and preprocessing the pixel points to obtain processed pixel points, wherein the preprocessing includes blur processing, high contrast retention processing and Gaussian filtering processing.

[0092] In the above embodiment, it should be noted that the component image includes a plurality of pixels. Each pixel is processed according to the above steps, that is, blur processing, high contrast retention processing, Gaussian filtering processing, sharpening processing, blending processing and contrast enhancement processing are performed on each pixel, so as to improve the clarity of the component image.

[0093] In the embodiment of the present invention, the blur processing algorithm used for the pixel points of the component image is the same as the blur processing of the skin smoothing algorithm in the beauty face, which can be a Gaussian filter algorithm or a bilateral filter algorithm. By blurring the pixel points of the component image, the obvious noise points in the component image are eliminated, and the clarity of the component, its pins, and the solder paste under the pins is improved.

[0094] In the embodiment of the present invention, the specific algorithm of high contrast retention processing is:

[0095] r2=r1-r+128;

[0096] g2 = g1 - g + 128;

[0097] b2=b1-b+128;

[0098] Among them, r represents the R value of the three primary colors of the pixel point in the component image, g represents the G value of the three primary colors of the pixel point in the component image, b represents the B value of the three primary colors of the pixel point in the component image, r1 represents the R value of the three primary colors of the pixel point in the image after blurring, g1 represents the G value of the three primary colors of the pixel point in the image after blurring, b1 represents the B value of the three primary colors of the pixel point in the image after blurring, r2 represents the R value of the three primary colors of the pixel point in the image after high contrast retention, g2 represents the G value of the three primary colors of the pixel point in the image after high contrast retention, and b2 represents the B value of the three primary colors of the pixel point in the image after high contrast retention. The three primary colors of the pixel point include R (red), G (green) and B (blue). In the embodiment of the present invention, the R value of the three primary colors of the pixel point in the component image ranges from [0, 255], the G value of the three primary colors of the pixel point in the component image ranges from [0, 255], and the B value of the three primary colors of the pixel point in the component image ranges from [0, 255].

[0099] In the embodiment of the present invention, during the Gaussian filtering process, the larger the filtering radius, the stronger the image texture of the component, but when the filtering radius is too large, the effect of improving the clarity will become less obvious, so the filtering radius needs to be kept within an appropriate range during the Gaussian filtering process. The function of the Gaussian blurring process is to slightly blur the image after the high-contrast retention process, leaving only clear outlines of components, pins, and solder paste, and blurring the non-obvious outline area.

[0100] S22: sharpening the processed pixel points using a preset sharpening algorithm to generate a sharpened image.

[0101] In the embodiment of the present invention, the sharpening process may be performed according to the following steps:

[0102] Calculate the sharpening parameters of the processed pixels using a preset sharpening parameter calculation algorithm;

[0103] The sharpening process is performed according to the preset sharpening process algorithm and the above-mentioned sharpening parameters to obtain a sharpened image.

[0104] In the embodiment of the present invention, the calculation formula for calculating the sharpening parameter is as follows:

[0105] v1=(1-ɑ)*r3+r*ɑ;

[0106] v2=(1-ɑ)*g3+g*ɑ;

[0107] v3=(1-ɑ)*b3+b*ɑ;

[0108] Among them, r represents the R value of the three primary colors of the pixel point in the component image, g represents the G value of the three primary colors of the pixel point in the component image, b represents the B value of the three primary colors of the pixel point in the component image, ɑ represents the sharpening control factor, the range is [0.1,5], and the preferred value in the present invention is 3, v1 represents the sharpening parameter of the R value of the three primary colors of the pixel point, v2 represents the sharpening parameter of the G value of the three primary colors of the pixel point, v3 represents the sharpening parameter of the B value of the three primary colors of the pixel point, r3 represents the R value of the three primary colors of the pixel point in the image after Gaussian filtering, g3 represents the G value of the three primary colors of the pixel point in the image after Gaussian filtering, and b3 represents the B value of the three primary colors of the pixel point in the image after Gaussian filtering.

[0109] For R in the three primary colors of the pixel point, in the calculation of sharpening parameters, it is necessary to increase the value of r3 and decrease the value of r. ɑ can be used as the sharpening control factor. As ɑ decreases, (1-ɑ) increases, then (1-ɑ)*r3 increases, and r*ɑ decreases, so that the pixels that need to be sharpened in the image can be sharpened. The principle of calculating the sharpening parameters of G and B in the three primary colors of the pixel point.

[0110] In the embodiment of the present invention, the specific algorithm for obtaining the sharpened image is:

[0111] r4 represents the R value of the three primary colors of the pixel in the sharpened image, g4 represents the G value of the three primary colors of the pixel in the sharpened image, and b4 represents the B value of the three primary colors of the pixel in the sharpened image.

[0112] The principle of the above formula is explained below.

[0113] The principle of sharpening is: if the three primary color values ​​of a certain pixel are greater than 128, a color filter operation is performed on it. Color filter is to take the complementary numbers of the pixel values ​​of the two layers of images, then multiply them, and finally find the complementary numbers to get a brighter image; if the three primary color values ​​of a certain pixel are less than 128, a multiply operation is performed on it. The multiply operation is to multiply the pixels of the two layers of images, and finally a darker image will be obtained. Sharpening generally combines the two mixing modes of multiply and color filter to achieve the purpose of making the bright parts brighter and the dark parts darker.

[0114] For R in the three primary colors of the pixel point, in the calculation of sharpening processing, when r>128, the pixel values ​​of the two layers of images are taken as complementary numbers, and then they are multiplied, and finally the complementary numbers are calculated to obtain a brighter image. Among them, (255-r) and (1.0-v1) are the complementary numbers of the pixel values ​​of the two layers of images, (255-r)*(1.0-v1) is the complementary numbers of the pixel values ​​of the two layers of images and multiplied, 255-((255-r)*(1.0- v1)) / 255 is to find the complementary number again, so that when r>128, a brighter image can be obtained; when r≤128, the pixels of the two layers of images are multiplied, and finally a darker image is obtained. r represents the r value of the pixel of the component image, v1 / 255 represents the r value of the pixel of the image after adjustment by the sharpening control factor, and g*v2 / 255 represents the multiplication of the pixels of the two layers of images, so that when r≤128, a darker image can be obtained. The principle of the sharpening calculation of G and B in the three primary colors of the pixel.

[0115] S23: Mix the sharpened image and the component image using a preset image mixing algorithm to obtain a mixed image.

[0116] In one embodiment, the specific algorithm for mixing two images is:

[0117] r5=r*(1-β)+r4*β;

[0118] g5=g*(1-β)+g4*β;

[0119] b5=b*(1-β)+b4*β;

[0120] Among them, r5 represents the R value of the three primary colors of the pixel point in the mixed image, g5 represents the G value of the three primary colors of the pixel point in the mixed image, b5 represents the B value of the three primary colors of the pixel point in the mixed image, and β represents the control factor.

[0121] The sharpened image is mixed with the component image to control the strength of sharpening. If the sharpening strength of the image is too large, the obtained image may be very clear, but the outlines of the components, pins and solder paste will be unnatural. If the sharpening strength is too small, the clarity of the obtained image may not be obvious enough. It is necessary to adjust a suitable parameter for adjustment, that is, adjust the sharpening strength by controlling the factor β, reduce the three primary color values ​​of the pixel points of the component image, and increase the three primary color values ​​of the pixel points in the sharpened image. The value range of the control factor is [0.0, 1.0]. The smaller the value of β, the smaller the sharpening strength, and the larger the value of β, the greater the sharpening strength. In the present invention, β is preferably 0.6.

[0122] For R in the three primary colors of the pixel point, during the mixing process, as β increases, (1-β) decreases, r*(1-β) decreases, and r4*β increases, so that the three primary color values ​​of the pixel point in the sharpened image increase and the three primary color values ​​of the pixel point in the component image decrease. The principle of the mixed processing calculation of G and B in the three primary colors of the pixel point.

[0123] S24, using a preset contrast enhancement processing algorithm to perform contrast enhancement processing on the mixed image to obtain a clear component image.

[0124] In the embodiment of the present invention, the specific algorithm of contrast enhancement processing is:

[0125] r6=128*(1-θ)+r5*θ;

[0126] g6=128*(1-θ)+g5*θ;

[0127] b6=128*(1-θ)+b5*θ;

[0128] Among them, r6 represents the R value of the three primary colors of the pixel point in the image obtained by contrast enhancement processing, g6 represents the G value of the three primary colors of the pixel point in the image obtained by contrast enhancement processing, and b6 represents the B value of the three primary colors of the pixel point in the image obtained by contrast enhancement processing.

[0129] The principle of the above formula is explained below.

[0130] The sharpened image is subjected to contrast enhancement. From a visual perspective, a slight contrast enhancement can improve clarity. If the contrast enhancement is too large, the color of the component image will be changed, resulting in unnatural effects such as distortion. The contrast enhancement intensity is adjusted through the contrast control factor θ.

[0131] Optionally, the value range of the contrast control factor θ is [1.0, 1.2]. The smaller the value of θ, the smaller the contrast enhancement is, and the larger the value of θ, the greater the contrast enhancement is. In the present invention, the value of θ is preferably 1.1.

[0132] For R in the three primary colors of the pixel point, during the contrast enhancement process, as θ increases, 1-θ decreases, 128*(1-θ) decreases, and r5*θ increases, thereby increasing the R value of the three primary colors of the pixel point in the mixed image, that is, achieving contrast enhancement of R in the three primary colors of the pixel point in the mixed image. The principle of contrast enhancement calculation for G and B in the three primary colors of the pixel point.

[0133] S12, intercepting a solder paste image of the solder paste attached to the component pins from the component image, and determining risk detection components containing failure risks among the components arranged vertically according to the solder paste area used in the solder paste image.

[0134] By analyzing the solder paste image of the component image, we can determine the capacity of each solder paste at the component pin, the fit between the component and the solder paste, and the fit of the solder paste on the circuit board. Combined with these points, a comprehensive judgment is made to determine whether there is one or more components in a row that are suspected of failure or have a risk of failure.

[0135] Since the component images are taken from one angle, the first component photographed is the main focus. If the solder paste of the components arranged after the component is not well attached, it can also be seen from the image. For example, if the solder paste is connected, the connected solder paste can also be seen in the image, and components with suspected or risk of failure can be detected.

[0136] In one embodiment, since the solder paste is mainly concentrated at the positions of components and component pins, in actual operation, a commonly used image recognition method can be used to identify the component positions in the component image, including the positions of the component body and the component pins, and then based on the identified position, the image of the position and the surrounding positions at a certain distance is captured to obtain a solder paste image.

[0137] The peripheral distance may be a preset length distance. For example, after the coordinates of the component pins are identified, the coordinates may be used as a starting point, and a preset distance may be added to form a position area, and then the image area may be intercepted to obtain a solder paste image.

[0138] In an optional embodiment, whether a component is suspected of failure or has a risk of failure can be determined based on the area size and position of the solder paste.

[0139] Reference Figure 4 , showing a schematic diagram of solder paste position of a component image provided by an embodiment of the present invention.

[0140] As an example, step S12 may include the following sub-steps:

[0141] S121. Obtain, from the solder paste image, a first image area of ​​the solder paste at two pin positions of a component and a second image area of ​​the solder paste at a bottom surface position of the component.

[0142] S122: If the area of ​​any one of the first images is smaller than the first preset area, determine that the components arranged in the vertical direction include a risk detection component suspected of being open circuit.

[0143] S123: If the second image area is larger than a second preset area, respectively obtain a solder paste image contour corresponding to the first image area and a solder paste image contour corresponding to the second image area to obtain a first image contour and a second image contour respectively.

[0144] S124: Determine whether the solder paste on the pin of the component is connected with the solder paste on the bottom of the component based on the first image contour and the second image contour.

[0145] In one embodiment, the volume of solder paste attached to each component may be different, and the component will squeeze the solder paste after patching, resulting in different shapes of the solder paste. However, since the captured image may be a color image, and the colors of the component, component pins, circuit board and solder paste are all different, the chromaticity value of each area of ​​the solder paste image can be identified, and then the specific position of the solder paste in the image can be identified based on the preset chromaticity value.

[0146] The chromaticity value in the solder paste image can be identified according to a conventional image chromaticity value recognition method or a conventional image chromaticity value recognition algorithm to obtain a plurality of chromaticity values. Each chromaticity value is then compared with a preset chromaticity value, which is the chromaticity value corresponding to the solder paste. The chromaticity value of the solder paste can be identified from the plurality of chromaticity values ​​by comparison. The position of the solder paste is determined in the solder paste image according to the chromaticity value.

[0147] Next, the area of ​​the solder paste position in the image can be determined, and the solder paste area about the two pins of the component can be obtained to obtain two first image areas; similarly, the area of ​​the solder paste at the bottom of the component can be obtained to obtain the second image area.

[0148] Then, the area value of the first image area and the area value of the second image area can be obtained respectively. It is determined whether the area values ​​of the two first image areas are less than the area value of the first preset area. If the area value of any one of the first image areas is less than the area value of the first preset area, it means that the amount of solder paste at the component pin is small, and the solder paste may not be bonded to the component pin. The component here may not be connected to the circuit board, and the component may have an open circuit fault. It can be determined that the risk detection component suspected of open circuit may be included in this row of vertically arranged components.

[0149] Similarly, it can be determined whether the area value of the second image area is greater than the area value of the second preset area. If the area value of the second image area is greater than the area value of the second preset area, it means that a certain volume of solder paste has accumulated on the bottom surface of the component, and the solder paste may connect two pins together, thereby forming an empty wire, causing the component to short-circuit, and then it can be determined that the risk detection component suspected of short-circuiting may be included in this row of components arranged vertically.

[0150] In an actual operation, the solder paste at the bottom of the component may only be used to assess the bottom of the component, and the pins of the two components are not connected. In order to accurately determine whether there is a short circuit, the solder paste image contours corresponding to the two first image areas and the solder paste image contours corresponding to the second image area can be obtained respectively, and the first image contour and the second image contour are obtained respectively.

[0151] Then, it is determined whether the solder paste on the pin of the component is connected with the solder paste on the bottom of the component according to the shapes of the first image contour and the second image contour.

[0152] It should be noted that both the first preset area and the second preset area can be adjusted according to actual needs.

[0153] In one embodiment, reference may be made to Figure 4 , the solder paste is set on the two pins of the component. Among them, the solder paste of the pins of the two components in the middle and on the right are connected together. At this time, the components in the middle and on the right have the risk of short circuit failure. Similarly, the solder paste of the left pin of the left component is separated from the component pin, which may have the risk of open circuit.

[0154] Reference Figure 5 , showing a schematic diagram of solder paste contour connectivity provided by an embodiment of the present invention.

[0155] In an optional embodiment, step S124 may include the following sub-steps:

[0156] S1241. Obtain contour edges of the first image contour and the second image contour respectively to obtain a first edge line and a second edge line.

[0157] S1242: Calculate the similarity between the first edge line and the second edge line to obtain edge line similarity.

[0158] S1243: If the edge line similarity is greater than a preset similarity, it is determined that the solder paste of the component pin is connected to the solder paste at the bottom of the component.

[0159] S1244: If the edge line similarity is less than a preset similarity, it is determined that the solder paste on the component pin is not connected to the solder paste on the bottom of the component.

[0160] Specifically, since the first image area and the second image area are the solder paste area at the component pin and the solder paste area at the bottom of the component, respectively, the first image contour of the first image area corresponds to the shape contour of the solder paste at the component pin position, and the second image contour of the second image area corresponds to the shape contour of the solder paste at the bottom position of the component.

[0161] When acquiring the image area, the shape contours of the solder paste at each position will be cut out. It can be determined whether the edges between the two contours match. If they match, it means that the two contours can overlap with each other. Therefore, it can be determined that the solder paste at the component pin is connected to the solder paste at the bottom of the component.

[0162] Specifically, one edge line of each first image contour can be obtained, which is the edge line of the first image contour close to the inside of the component, to obtain the first edge line. Then two contour edges of the second image contour are obtained, which are the edges of the second image contour close to the component pins, to obtain the second edge line.

[0163] Next, the similarity between the first edge line and the second edge line on its adjacent side may be calculated to obtain two edge line similarities.

[0164] Reference Figure 5 , the first sideline of the first image contour is S1, the first sideline of the second image contour is S2, and the two second sidelines of the second image contour are C1 and C2 respectively. The similarity of S1 and C1 can be calculated, and the similarity of S2 and C2 can be calculated, thereby obtaining the similarities of the two sidelines.

[0165] Next, it can be determined whether the similarities of the two edges are both greater than the preset similarity. If the similarities of the two edges are both greater than the preset similarity, it can be determined that the solder paste of the component pin is connected to the solder paste at the bottom of the component. Conversely, if the similarities of the two edges are both less than the preset similarity, it can be determined that the solder paste of the component pin is not connected to the solder paste at the bottom of the component.

[0166] It should be noted that the above-mentioned component for short circuit detection has two or more pins that need to be soldered on the circuit board through solder paste. If the component has only one pin that needs to be soldered on the circuit board through solder paste, short circuit fault risk assessment does not need to be performed.

[0167] In addition, if the short circuit detection component has three or more pins that need to be soldered on the circuit board through solder paste, the first edges corresponding to the three or more pins can be detected respectively, and the similarities of the three or more edges are subsequently calculated.

[0168] If two or more edge lines have similarities greater than the preset similarity, it can be determined that the solder paste of the component pin is connected to the solder paste at the bottom of the component. This is because once two pins are connected through solder paste, the two pins will be empty, causing the component to short-circuit.

[0169] S125. If it is determined that the solder paste of the component pin is connected to the solder paste at the bottom of the component, it is determined that the components arranged vertically include a risk detection component suspected of short circuit.

[0170] If it is determined that the solder paste on the component pins is connected to the solder paste at the bottom of the component, it means that the two pins are short-circuited through the solder paste. It can be determined that this row of vertically arranged components may contain risk detection components suspected of short circuit.

[0171] S13, after determining the component position information of the column where the risk detection component is located on the PCBA circuit board, calling a detection probe to perform fault detection on the risk detection component according to the component position information.

[0172] Once it is determined that there is a risk detection component with a risk of failure among the components arranged vertically, component position information of the risk detection component on the PCBA circuit board can be determined. The component position information can be the position coordinates of the risk detection component on the PCBA circuit board.

[0173] Because in the production process of PCBA circuit boards, the device position number corresponding to each component will be determined before the patch is performed, therefore, its device position number can be obtained to determine its component position information.

[0174] Next, the corresponding detection probe is called according to the component position information, and fault detection is performed by touching the pin position of the component with the detection probe to determine whether there is indeed a fault.

[0175] These probes can detect the specific value of the component by touching the pins of the component, for example, the ohmic value of a resistor. If the resistor is open, its ohmic value may be infinite; if the resistor is short, its ohmic value may be zero.

[0176] In an optional embodiment, since the types of components suspected of failure or at risk of failure may be different, in order to adapt to different types of components, it is necessary to find corresponding detection probes to perform fault detection.

[0177] As an example, step S13 may include the following sub-steps:

[0178] S131. Acquire characteristic information of the risk detection component, wherein the characteristic information includes solder joint size of the component pin on the circuit board and component pin size.

[0179] S132: searching for a detection probe of a corresponding size from a preset probe list according to the characteristic information.

[0180] S133 . After generating a detection moving path based on the component position information, control the detection probe to perform fault detection on the risk detection component according to the detection moving path.

[0181] Specifically, the detection probe may need to contact the pins of the component, or may need to contact the pads of the component and its circuit, so that characteristic information of the risk detection component can be obtained, which may include the solder joint size of the component pin on the circuit board and the component pin size.

[0182] Next, according to the size corresponding to the characteristic information, a detection probe having the corresponding size can be searched from a preset probe list.

[0183] In one embodiment, the preset probe list may be an information list constructed in advance based on the information of the probes stored in the automatic detection instrument.

[0184] Optionally, the type of the component may be obtained, and the detection probe of the corresponding size may be searched in a preset probe list according to the type of the component. For example, a resistor component may search for a detection probe of the corresponding resistor; a capacitor component may search for a detection probe of the corresponding resistor; and a diode component may search for a detection probe of the corresponding resistor.

[0185] Finally, the detection moving path of the detection probe is generated according to the component position information of the risk detection component, and the detection moving path is the path of the detection probe movement. Then, the detection probe found according to the detection moving path is controlled to perform fault detection on the risk detection component to determine whether there is really a patch fault.

[0186] In an optional embodiment, the risk detection element may be a larger element or a smaller element, and the element may be located at an edge of the circuit board or in a certain area in the middle of the circuit board.

[0187] If it is at the edge, there may be no other components or devices around the risk detection component to block the movement of the detection probe. If it is in a certain area in the middle of the circuit board, there may be various larger components around the risk detection component to block the movement of the detection probe. If a collision occurs, the probe may be damaged and even affect the detection accuracy. In order to avoid the above situation.

[0188] As an example, when there are no other elements or devices around the risk detection element to block the movement of the detection probe, step S133 may include the following sub-steps:

[0189] S31. If the height of the risk detection component corresponding to the component position information is greater than the height of the surrounding circuit components, the pin position coordinates of each component arranged vertically on the same side are obtained from the component position information.

[0190] S32, sequentially connecting a plurality of the pin position coordinates according to the longitudinal arrangement order of the components to form a detection moving path.

[0191] In an optional embodiment, the component type of the adjacent component position information can be obtained with the component position information as the center, and then the height of the component is determined according to the component type, and then it is determined whether the height of the risk detection component is greater than the height of the adjacent circuit component.

[0192] In another optional embodiment, the component position information may be used as the center, and a camera may be called to capture an image from the side to determine from the image whether the height of the risk detection component is greater than the height of the adjacent circuit components.

[0193] The specific judgment method can be adjusted according to actual needs.

[0194] If the height of the risk detection component is greater than the height of the adjacent circuit component, the pin position coordinates of each component arranged vertically on the same side may be acquired from the component position information.

[0195] For example, the risk detection element is 10 resistors arranged vertically, namely R1, R2...R10. Then, the pin position coordinates of the left pin of R1, the left pin of R2,...the left pin of R10 in this row of resistors can be obtained; then, the pin position coordinates of the right pin of R1, the right pin of R2,...the right pin of R10 can be obtained.

[0196] Finally, several pin position coordinates are connected in sequence according to the longitudinal arrangement order of the components to form a detection moving path.

[0197] For example, the pin position coordinates of the left pin of R1, the pin position coordinates of the left pin of R2, ..., and the pin position coordinates of the left pin of R10 can be connected in sequence according to the arrangement order of R1, R2 to R10 to form a straight line moving path. Similarly, the pin position coordinates of the right pin of R1, the pin position coordinates of the right pin of R2, ..., and the pin position coordinates of the right pin of R10 can be connected in sequence according to the arrangement order of R1, R2 to R10 to form another straight line moving path.

[0198] As an example, when there are other elements or devices around the risk detection element that block the movement of the detection probe, step S133 may include the following sub-steps:

[0199] S41. If the height of the risk detection component corresponding to the component position information is smaller than the height of the surrounding circuit components, the positions of the circuit components around the risk detection component are acquired to obtain the surrounding position information.

[0200] S42, dividing the risk detection element into a plurality of first grids that can be moved according to the element position information, and dividing the surrounding circuit elements into a plurality of second grids that hinder movement according to the surrounding position information.

[0201] S43: Generate a grid map by splicing the first grid and the second grid, and generate a detection moving path according to the grid map by using an adaptive genetic algorithm.

[0202] Specifically, if the height of the risk detection element corresponding to the component position information is smaller than the height of the surrounding circuit elements, it means that the elements surrounding the risk detection element may block the movement of the detection probe. Therefore, it is necessary to determine the position of the surrounding elements. The position of the circuit elements surrounding the risk detection element can be obtained to obtain the surrounding position information.

[0203] Specifically, the component position information of one row or two rows of components on the left and right of the risk detection component can be obtained to obtain the surrounding position information.

[0204] Then, using the grid method, each component can be divided into a grid of equal size according to the component position information to obtain a first grid; similarly, each surrounding component can be divided into a grid of equal size according to the surrounding position information to obtain a second grid.

[0205] Each grid is then numbered, the first grid can be marked as a white feasible area, and the second grid can be marked as a black infeasible area. After the first grid and the second grid are spliced ​​according to their positions, a grid map is formed, which contains black and white colors.

[0206] It should be noted that the grid method is used to divide an actual map into grids of size n*n. In the grid map, the grid numbers from left to right and from bottom to top are 0, 1, 2, 3, 4...n*n. The grid coordinates are represented by the center point of the grid. The corresponding relationship between the grid number and the grid coordinates is as follows:

[0207] p = (x-1) + (y-1) * N;

[0208] Among them, p represents the grid number, (x, y) represents the coordinate point corresponding to the grid, N represents the number of grids in each row, mod represents the remainder operation, and fix represents the integer operation.

[0209] Then, an adaptive genetic algorithm can be used to obtain a high-quality feasible path and obtain the detection moving path.

[0210] It should be noted that the detection moving path can be generated by calling the adaptive genetic algorithm in a conventional technical manner. During the generation process, an optimization operator can be designed to delete redundant path points in the path, thereby simplifying the path; and then the detection moving path is optimized for the second time through the optimization operator to obtain an improved path.

[0211] After the detection moving path is obtained, the detection probe can be controlled to move according to the detection moving path, and the detection probe can be controlled to touch the component to further determine whether the component has a fault.

[0212] In a practical application, when a faulty component is detected, an operator or technician of the automatic detection equipment needs to be notified.

[0213] In order to facilitate technicians to quickly check the faulty components. As an example, the method may also include:

[0214] S14, obtaining a circuit image of the PCBA circuit board, and obtaining image coordinates of the faulty component in the circuit image.

[0215] S15. Mark the faulty components in the circuit image based on the image coordinates to generate a marked image for review.

[0216] Specifically, after determining that there is a faulty detection component, a camera can be called to capture an image of the circuit board from a top-down angle to obtain a circuit image, and at the same time, the image coordinates of the faulty component in the circuit image can be obtained.

[0217] The circuit image is then marked according to the image coordinates to mark the faulty component, thereby generating a marked image, and finally the marked image is displayed on the display screen of the device for technical personnel to review and approve before making further determination.

[0218] In this embodiment, an embodiment of the present invention provides a fault detection method for a PCBA circuit board, and its beneficial effect is that: the present invention can collect images of components arranged vertically from the side of the components during the patch stage of the PCBA circuit board, screen components with fault risks according to the size of the solder paste area of ​​the component pins, and then control the detection probe to detect the components with fault risks. The entire process not only does not require probe layout, reducing the workload of probe layout, but also does not require components to be detected one by one, which can greatly reduce the workload of detection and shorten the detection time, and effectively improve the detection efficiency.

[0219] The embodiment of the present invention also provides a PCBA circuit board fault detection device, see Figure 6 , shows a schematic structural diagram of a PCBA circuit board fault detection device provided by an embodiment of the present invention.

[0220] Wherein, as an example, the PCBA circuit board fault detection device may include:

[0221] The image acquisition module 601 is used to acquire component images from the side of the components attached to the PCBA circuit during the process of mounting the components on the PCBA circuit board. The component images are side images of the components arranged vertically.

[0222] A risk detection module 602 is used to intercept a solder paste image of the solder paste attached to the pin of the component from the component image, and determine a risk detection component containing a failure risk among the components arranged vertically according to the solder paste area used in the solder paste image;

[0223] The fault detection module 603 is used to call a detection probe to perform fault detection on the risk detection component according to the component position information after determining the component position information of the column where the risk detection component is located on the PCBA circuit board.

[0224] Optionally, the step of determining the risk detection element containing a failure risk in the vertically arranged components according to the solder paste area used for the solder paste image includes:

[0225] Acquire, from the solder paste image, a first image area of ​​the solder paste at two pin positions of the component and a second image area of ​​the solder paste at a bottom surface position of the component;

[0226] If the area of ​​any one of the first images is smaller than the first preset area, it is determined that the vertically arranged elements include a risk detection element suspected of an open circuit;

[0227] If the second image area is larger than the second preset area, respectively acquiring the solder paste image contour corresponding to the first image area and the solder paste image contour corresponding to the second image area to obtain the first image contour and the second image contour respectively;

[0228] Determine whether the solder paste on the pin of the component is connected with the solder paste at the bottom of the component based on the first image profile and the second image profile;

[0229] If it is determined that the solder paste on the component pins is connected to the solder paste on the bottom of the component, it is determined that the components arranged vertically include risk detection components suspected of short circuit.

[0230] Optionally, determining whether the solder paste on the pin of the component is connected with the solder paste on the bottom of the component based on the first image profile and the second image profile includes:

[0231] Respectively acquiring contour edges of the first image contour and the second image contour to obtain a first edge line and a second edge line;

[0232] Calculating the similarity between the first edge line and the second edge line to obtain edge line similarity;

[0233] If the edge line similarity is greater than a preset similarity, it is determined that the solder paste of the component pin is connected to the solder paste at the bottom of the component;

[0234] If the edge line similarity is less than the preset similarity, it is determined that the solder paste on the component pin is not connected to the solder paste on the bottom of the component.

[0235] Optionally, calling a detection probe to perform fault detection on the risk detection component according to the component position information includes:

[0236] Acquire characteristic information of the risk detection component, wherein the characteristic information includes solder joint size of component pins on a circuit board and component pin size;

[0237] Searching for a detection probe of a corresponding size from a preset probe list according to the characteristic information;

[0238] After generating a detection moving path based on the component position information, the detection probe is controlled according to the detection moving path to perform fault detection on the risk detection component.

[0239] Optionally, generating a detection movement path based on the component position information includes:

[0240] If the height of the risk detection component corresponding to the component position information is greater than the height of the surrounding circuit components, obtaining the pin position coordinates of each component arranged vertically on the same side from the component position information;

[0241] A plurality of the pin position coordinates are sequentially connected according to the longitudinal arrangement order of the components to form a detection moving path.

[0242] Optionally, generating a detection movement path based on the component position information includes:

[0243] If the height of the risk detection component corresponding to the component position information is smaller than the height of the surrounding circuit components, obtaining the positions of the circuit components around the risk detection component to obtain the surrounding position information;

[0244] Dividing the risk detection element into a plurality of first grids for movement according to the element position information and dividing the surrounding circuit elements into a plurality of second grids for obstacle movement according to the surrounding position information;

[0245] The first grid and the second grid are spliced ​​to generate a grid map, and an adaptive genetic algorithm is used to generate a detection movement path according to the grid map.

[0246] Optionally, the author also includes:

[0247] A coordinate acquisition module is used to acquire a circuit image of the PCBA circuit board and acquire image coordinates of the faulty component in the circuit image;

[0248] The image marking module is used to mark the faulty components in the circuit image based on the image coordinates to generate a marked image for review and examination.

[0249] Those skilled in the art can clearly understand that, for the sake of convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0250] Furthermore, an embodiment of the present application also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the PCBA circuit board fault detection method as described in the above embodiment is implemented.

[0251] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the PCBA circuit board fault detection method as described in the above embodiment.

[0252] Those skilled in the art will appreciate that the embodiments of the present application may also provide computer program products. Therefore, the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program codes.

[0253] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), apparatuses, and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0254] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0255] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0256] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A PCBA circuit board fault detection method, characterized in that: The method comprises: During the process of mounting the PCBA circuit board, the component image is collected from the side of the component mounted on the PCBA circuit. The component image is a side image of the component arranged vertically. Intercepting a solder paste image of the solder paste attached to the pin of the component from the component image, and determining a risk detection component containing a failure risk among the components arranged vertically according to the solder paste area corresponding to the solder paste image; After determining the component position information of the column where the risk detection component is located on the PCBA circuit board, calling the detection probe to perform fault detection on the risk detection component according to the component position information; The calling of the detection probe to perform fault detection on the risk detection component according to the component position information includes: Acquire characteristic information of the risk detection component, wherein the characteristic information includes solder joint size of component pins on a circuit board and component pin size; Searching for a detection probe of a corresponding size from a preset probe list according to the characteristic information; After generating a detection moving path based on the component position information, controlling the detection probe to perform fault detection on the risk detection component according to the detection moving path; The generating of the detection movement path based on the component position information comprises: If the height of the risk detection component corresponding to the component position information is greater than the height of the surrounding circuit components, obtaining the pin position coordinates of each component arranged vertically on the same side from the component position information; Connecting a plurality of the pin position coordinates in sequence according to the longitudinal arrangement order of the components to form a detection moving path; or; The generating of the detection movement path based on the component position information comprises: If the height of the risk detection component corresponding to the component position information is smaller than the height of the surrounding circuit components, obtaining the positions of the circuit components around the risk detection component to obtain the surrounding position information; Dividing the risk detection element into a plurality of first grids for movement according to the element position information and dividing the surrounding circuit elements into a plurality of second grids for obstacle movement according to the surrounding position information; Using the first grid and the second grid to generate a grid map, and using an adaptive genetic algorithm to generate a detection movement path according to the grid map; The grid map is constructed in the following manner: After numbering the first grid and the second grid, marking the first grid as a white feasible area, marking the second grid as a black infeasible area, and splicing the first grid and the second grid according to their positions to obtain; The correspondence between the grid numbers and grid coordinates of the grid map is as follows: ; Among them, p represents the grid number, (x, y) represents the coordinate point corresponding to the grid, and N represents the number of grids in each row; The method of determining the risk detection element containing the failure risk in the vertically arranged components according to the solder paste area corresponding to the solder paste image includes: Acquire, from the solder paste image, a first image area of ​​the solder paste at two pin positions of the component and a second image area of ​​the solder paste at a bottom surface position of the component; If the area of ​​any one of the first images is smaller than the first preset area, it is determined that the vertically arranged components include a risk detection component suspected of an open circuit; If the second image area is larger than the second preset area, respectively acquiring the solder paste image contour corresponding to the first image area and the solder paste image contour corresponding to the second image area to obtain the first image contour and the second image contour respectively; Determine whether the solder paste on the pin of the component is connected with the solder paste at the bottom of the component based on the first image profile and the second image profile; If it is determined that the solder paste of the component pin is connected to the solder paste at the bottom of the component, it is determined that the components arranged vertically include a risk detection component suspected of short circuit; The determining whether the solder paste on the pin of the component is connected with the solder paste at the bottom of the component based on the first image profile and the second image profile includes: Respectively acquiring contour edges of the first image contour and the second image contour to obtain a first edge line and a second edge line; Calculating the similarity between the first edge line and the second edge line to obtain edge line similarity; If the edge line similarity is greater than a preset similarity, it is determined that the solder paste of the component pin is connected to the solder paste at the bottom of the component; If the edge line similarity is less than a preset similarity, it is determined that the solder paste of the component pin is not connected to the solder paste at the bottom of the component; After acquiring the component image, the method further includes adjusting the clarity of the component image; The clarity adjustment comprises the following steps: Acquire pixel points of the component image, and pre-process the pixel points to obtain processed pixel points, wherein the pre-processing includes blur processing, high contrast retention processing and Gaussian filtering processing; Sharpening the processed pixel points using a preset sharpening algorithm to generate a sharpened image; Mixing the sharpened image and the component image using a preset image mixing algorithm to obtain a mixed image; The mixed image is subjected to contrast enhancement processing using a preset contrast enhancement processing algorithm to obtain a clear component image.

2. The PCBA circuit board fault detection method according to claim 1, characterized in that: After the step of calling the detection probe to perform fault detection on the risk detection component according to the component position information, the method further includes: Acquire a circuit image of the PCBA circuit board, and acquire image coordinates of the faulty component in the circuit image; The faulty components are marked in the circuit image based on the image coordinates to generate a marked image for review.

3. A PCBA circuit board fault detection device, characterized in that: The device comprises: The image acquisition module is used to acquire component images from the side of the components attached to the PCBA circuit during the process of mounting the PCBA circuit board. The component images are side images of the components arranged vertically. A suspect detection module, used to intercept a solder paste image of the solder paste attached to the component pin from the component image, and determine a risk detection component containing a failure risk among the components arranged vertically according to the solder paste area corresponding to the solder paste image; A fault detection module is used to determine the component position information of the column where the risk detection component is located on the PCBA circuit board, and then call the detection probe to perform fault detection on the risk detection component according to the component position information; The calling of the detection probe to perform fault detection on the risk detection component according to the component position information includes: Acquire characteristic information of the risk detection component, wherein the characteristic information includes solder joint size of component pins on a circuit board and component pin size; Searching for a detection probe of a corresponding size from a preset probe list according to the characteristic information; After generating a detection moving path based on the component position information, controlling the detection probe to perform fault detection on the risk detection component according to the detection moving path; The generating of the detection movement path based on the component position information comprises: If the height of the risk detection component corresponding to the component position information is greater than the height of the surrounding circuit components, obtaining the pin position coordinates of each component arranged vertically on the same side from the component position information; Connecting a plurality of the pin position coordinates in sequence according to the longitudinal arrangement order of the components to form a detection moving path; or; The generating of the detection movement path based on the component position information comprises: If the height of the risk detection component corresponding to the component position information is smaller than the height of the surrounding circuit components, obtaining the positions of the circuit components around the risk detection component to obtain the surrounding position information; Dividing the risk detection element into a plurality of first grids for movement according to the element position information and dividing the surrounding circuit elements into a plurality of second grids for obstacle movement according to the surrounding position information; Using the first grid and the second grid to generate a grid map, and using an adaptive genetic algorithm to generate a detection movement path according to the grid map; The grid map is constructed in the following manner: After numbering the first grid and the second grid, marking the first grid as a white feasible area, marking the second grid as a black infeasible area, and splicing the first grid and the second grid according to their positions to obtain; The correspondence between the grid numbers and grid coordinates of the grid map is as follows: ; Among them, p represents the grid number, (x, y) represents the coordinate point corresponding to the grid, and N represents the number of grids in each row; The method of determining the risk detection element containing the failure risk in the vertically arranged components according to the solder paste area corresponding to the solder paste image includes: Acquire, from the solder paste image, a first image area of ​​the solder paste at two pin positions of the component and a second image area of ​​the solder paste at a bottom surface position of the component; If the area of ​​any one of the first images is smaller than the first preset area, it is determined that the vertically arranged components include a risk detection component suspected of an open circuit; If the second image area is larger than the second preset area, respectively acquiring the solder paste image contour corresponding to the first image area and the solder paste image contour corresponding to the second image area to obtain the first image contour and the second image contour respectively; Determine whether the solder paste on the pin of the component is connected with the solder paste at the bottom of the component based on the first image profile and the second image profile; If it is determined that the solder paste of the component pin is connected to the solder paste at the bottom of the component, it is determined that the components arranged vertically include a risk detection component suspected of short circuit; The determining whether the solder paste on the pin of the component is connected with the solder paste at the bottom of the component based on the first image profile and the second image profile includes: Respectively acquiring contour edges of the first image contour and the second image contour to obtain a first edge line and a second edge line; Calculating the similarity between the first edge line and the second edge line to obtain edge line similarity; If the edge line similarity is greater than a preset similarity, it is determined that the solder paste of the component pin is connected to the solder paste at the bottom of the component; If the edge line similarity is less than a preset similarity, it is determined that the solder paste of the component pin is not connected to the solder paste at the bottom of the component; After acquiring the component image, the clarity of the component image is further adjusted; The clarity adjustment includes: Acquire pixel points of the component image, and pre-process the pixel points to obtain processed pixel points, wherein the pre-processing includes blur processing, high contrast retention processing and Gaussian filtering processing; Sharpening the processed pixel points using a preset sharpening algorithm to generate a sharpened image; Mixing the sharpened image and the component image using a preset image mixing algorithm to obtain a mixed image; The mixed image is subjected to contrast enhancement processing using a preset contrast enhancement processing algorithm to obtain a clear component image.

4. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the PCBA circuit board fault detection method according to any one of claims 1 to 2 is implemented.

5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the PCBA circuit board fault detection method according to any one of claims 1-2.

Citation Information

Patent Citations

  • Air pollution monitoring system based on Beidou positioning

    CN104849415A

  • Ant colony-clustering algorithm-based self-adaptive dynamic path planning method of robot

    CN109164810A

  • Mobile robot path planning method based on self-adaptive ant colony algorithm

    CN111323016A

  • Mobile robot and path planning method based on adaptive genetic algorithm

    CN112686429A

  • Circuit board fault detection method and device, equipment and storage medium

    CN113409284A