Defect detection method and device and computer equipment
By obtaining the through hole position information on the PCB board and detecting its spacing, the problem of low defect detection efficiency in PCB board design is solved, fast and accurate defect detection is achieved, and product quality and reliability are improved.
Patent Information
- Application Number
- CN202311657232.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-05
- Publication Date
- 2025-06-06
AI Technical Summary
During the PCB board design process, how to quickly and effectively perform defect detection to avoid quality problems during the manufacturing process?
By obtaining the position information of the through holes in the circuit board, the spacing of each through hole is detected, and the defect detection result of the circuit board is determined based on the detection results. The method includes responsive to the detection request of the circuit board, obtaining through hole position information, calculating through hole spacing, and determining whether it meets the design requirements.
It realizes rapid and accurate detection of through-hole spacing on the circuit board, effectively improving defect detection efficiency, avoiding quality problems in the manufacturing process, and improving product quality and reliability.
Smart Images

Figure CN120101725A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic technology, and in particular to a defect detection method, device and computer equipment. Background Art
[0002] With the development of electronic technology and communication technology, circuit boards are used more and more widely.
[0003] Take Printed Circuit Board (PCB) as an example. As the market demand grows, there are more and more high-density and super-large PCBs. Therefore, in the design process of PCBs, it is necessary to take into account multiple design requirements, which makes the design of PCBs more complicated. In order to avoid poor quality problems of PCBs, how to detect defects in designed PCBs has become an urgent problem to be solved. Summary of the invention
[0004] Based on this, it is necessary to provide a defect detection method, device and computer equipment that can perform defect detection on PCB boards in response to the above technical problems.
[0005] In a first aspect, the present application provides a defect detection method, comprising:
[0006] In response to a circuit board detection request, obtaining through hole position information of at least one through hole in the circuit board;
[0007] According to the position information of each through hole, the spacing detection result of each through hole is obtained;
[0008] According to the detection results of each spacing, the defect detection result of the circuit board is determined.
[0009] In the technical solution provided by the embodiment of the present application, in response to the detection request of the circuit board, the through-hole position information of at least one through-hole in the circuit board is obtained, and then the spacing detection results of each through-hole are obtained according to the through-hole position information, and finally the defect detection result of the circuit board is determined according to each spacing detection result. In this method, after responding to the response request of the circuit board, the spacing of each through-hole is detected according to the through-hole position information of each through-hole in the circuit board, and the spacing detection result of each through-hole is determined, so that the spacing of the through-holes can be conveniently and quickly checked, so that the through-holes can meet the use requirements; further, the defect detection result of the circuit board is determined according to the spacing detection results of each through-hole to determine whether the circuit board has a design defect, which can effectively improve the defect detection efficiency of the circuit board, and the defect detection of the circuit board during the circuit board design process can effectively avoid defects in the circuit board during the manufacturing process, and improve the product quality of the circuit board.
[0010] In one embodiment, obtaining through-hole position information of at least one through-hole in a circuit board includes:
[0011] Obtaining position information of a target device in a circuit board; the target device refers to a device on the circuit board that adopts a preset welding method;
[0012] According to the position information of the target device, the through hole position information of at least one through hole in the circuit board is obtained.
[0013] In the technical solution provided in the embodiment of the present application, since the through hole is the hole required when welding the device on the circuit board using a preset welding method, the through hole position information of at least one through hole in the circuit board is determined by obtaining the position information of the target device on the circuit board using the preset welding method, so that the obtained through hole position information is more accurate.
[0014] In one embodiment, the through hole position information includes through hole coordinates; obtaining through hole position information of at least one through hole in the circuit board according to the position information of the target device includes:
[0015] According to the location information of the target device, determine the pin coordinates of each pin in the target device in the circuit board;
[0016] The pin coordinates of each pin are determined as the through hole coordinates of the corresponding through hole; each pin corresponds to one through hole.
[0017] In the technical solution provided in the embodiment of the present application, when the target device is welded to the circuit board, each pin of the target device is welded in each through-hole. Therefore, the pin coordinates of each pin are determined as the through-hole coordinates of the corresponding through-hole, making the through-hole position information more accurate and reliable.
[0018] In one embodiment, obtaining the spacing detection result of each through hole according to the position information of each through hole includes:
[0019] For any through hole, determine the through hole spacing detection area according to the through hole position information;
[0020] Get the minimum enclosing rectangle of the spacing detection area;
[0021] A through-hole spacing detection result is obtained according to at least one back-side device and a minimum circumscribed rectangle of the through-hole.
[0022] In the technical solution provided in the embodiment of the present application, by obtaining the minimum circumscribed rectangle of the spacing detection area of the through hole, the spacing detection range of the through hole has a certain regularity, so that the subsequent method of judging whether the back device of the through hole meets the spacing requirements with the through hole through the regular minimum circumscribed rectangle is more concise, which can save time and resources and improve detection efficiency.
[0023] In one of the embodiments, obtaining a through-hole spacing detection result according to at least one back-side device and a minimum circumscribed rectangle of the through-hole includes:
[0024] If all back-side devices are not within the minimum bounding rectangle, the spacing detection result is determined to be passed;
[0025] If there is a target back-side device in the minimum circumscribed rectangle among the back-side devices, and the position of the target back-side device overlaps with the spacing detection area, the spacing detection result is determined to be failed; otherwise, the spacing detection result is determined to be passed.
[0026] In the technical solution provided in the embodiment of the present application, it is first determined whether each back-side device of the through hole is in the minimum circumscribed rectangle of the spacing detection area of the through hole. If there is a target back-side device in the minimum circumscribed rectangle, it is further determined whether the target back-side device is in the spacing detection area of the through hole. In this way, it is only necessary to compare the target back-side device in the minimum circumscribed rectangle with the spacing detection area of the through hole, without the need to detect the devices in the entire circuit board, which can save time and resources and improve detection efficiency.
[0027] In one embodiment, the through hole position information includes through hole coordinates, and determining the through hole spacing detection area according to the through hole position information includes:
[0028] Determine a two-dimensional graphic of the through hole according to the through hole coordinates of the through hole;
[0029] The two-dimensional pattern of the through hole is expanded by a preset length to obtain a spacing detection area.
[0030] In the technical solution provided in the embodiment of the present application, the two-dimensional pattern of the through hole is predetermined and the preset length is expanded, which can ensure the accuracy of the spacing detection area, thereby effectively detecting whether the spacing between the through holes meets the design requirements, and simplifying the through hole spacing detection process, thereby improving the production efficiency of the circuit board.
[0031] In one embodiment, determining a defect detection result of a circuit board according to a spacing detection result of each through hole includes:
[0032] If there is a through hole among the through holes whose spacing detection result is not passed, it is determined that the circuit board has a defect;
[0033] If the spacing test results of each through hole are passed, it is determined that the circuit board has no defects.
[0034] In the technical solution provided by the embodiment of the present application, if there is a through hole among the through holes whose spacing detection result is not passed, it is determined that the circuit board has a defect; if the spacing detection results of all through holes are passed, it is determined that the circuit board does not have a defect. By detecting whether the through holes on the circuit board meet the design requirements to determine whether the circuit board has a design defect, defects in the circuit board can be effectively avoided during the manufacturing process, thereby improving product quality and reliability.
[0035] In one embodiment, the method further comprises:
[0036] Obtaining through-hole position information of a target through-hole for which a spacing detection result is failure, and a device to which a pin corresponding to the target through-hole belongs;
[0037] Displays the through-hole location information of the target through-hole and the device name of the device to which it belongs.
[0038] In the technical solution provided in the embodiment of the present application, the through-hole position information of the target through-hole whose spacing detection result is failed and the device to which the pin corresponding to the target through-hole belongs are displayed, which can help the designer quickly locate the target through-hole and facilitate the designer to view and modify it.
[0039] In a second aspect, the present application also provides a defect detection device, comprising:
[0040] An acquisition module, configured to acquire through-hole position information of at least one through-hole in the circuit board in response to a detection request of the circuit board;
[0041] A detection module, used to obtain the spacing detection result of each through hole according to the position information of each through hole;
[0042] The determination module is used to determine the defect detection result of the circuit board according to the detection results of each spacing.
[0043] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method in any one of the embodiments of the first aspect are implemented.
[0044] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method in any one of the embodiments of the first aspect above.
[0045] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method in any one of the embodiments of the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 is an internal structure diagram of a computer device in one embodiment;
[0048] Figure 2 is a schematic flow chart of a defect detection method in one embodiment;
[0049] Figure 3 is a flow chart of a defect detection method in another embodiment;
[0050] Figure 4 is a flow chart of a defect detection method in another embodiment;
[0051] Figure 5 is a flow chart of a defect detection method in another embodiment;
[0052] Figure 6 is a flow chart of a defect detection method in another embodiment;
[0053] Figure 7 is a flow chart of a defect detection method in another embodiment;
[0054] Figure 8 is a flow chart of a defect detection method in another embodiment;
[0055] Fig. 9 is a flow chart of a defect detection method in another embodiment;
[0056] Fig.10 1 is a structural block diagram of a defect detection device in one embodiment. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0058] The identity authentication method provided in the embodiment of the present application can be applied to a computer device. The computer device can be a server, and its internal structure diagram can be as follows: Figure 1As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store defect detection data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a defect detection method is implemented.
[0059] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0060] Taking PCB as an example, the design process of PCB board should take into account many design requirements, such as signal integrity (SI), power integrity (PI), design for manufacturing (DFM), assembly, heat dissipation, structure, automation and reliability. Among them, the design for manufacturability, assembly and automation are production-oriented. When designing PCB, it is necessary to ensure that the product has high production efficiency and avoid poor quality problems.
[0061] Taking the design for manufacturability of PCB as an example, problems are usually discovered through DFM inspection. One of the important DFM inspection items is whether the spacing between the through-holes of wave soldering components and the components on the back of the PCB meets the requirements. It is usually required that the through-holes of wave soldering components and the components on the back maintain a spacing of more than 3mm, otherwise it will lead to problems such as insufficient tinning rate of wave soldering components and poor soldering.
[0062] However, due to the increasing density of motherboards, it is often difficult to achieve this distance requirement, which results in the wave soldering tinning rate of some local PCBs being less than 50% (the specification requires more than 75%). This will greatly affect the performance and reliability of wave soldering devices, especially some power-related devices. If the tinning is insufficient, it will directly affect the power supply operation, and in severe cases will cause the PCB to be scrapped.
[0063] In addition, due to market demand, there are more and more high-density and ultra-large PCB designs, and more and more PCB designs with more than dozens of layers, resulting in very limited space for PCBs. On this basis, production requirements must also be met, which requires designers to have superb design skills.
[0064] In the related art, usually only each through hole of the wave soldering device in the PCB can be inspected and modified manually, and the back-side devices with a spacing less than 3mm from the through hole are moved out of the range. This inspection method is a single repetitive work, which requires a lot of repetitive labor by humans, seriously affecting R&D efficiency and having a heavy labor load.
[0065] Based on this, the present application provides a defect detection method, which, after responding to a response request of a circuit board, detects the spacing of each through hole according to the through hole position information of each through hole in the circuit board, determines the spacing detection results of each through hole, and then determines the defect detection result of the circuit board according to the spacing detection results, thereby improving the defect detection efficiency of the circuit board.
[0066] It should be noted that the beneficial effects brought about by the embodiments of the present application or the technical problems solved are not limited to this one, but may also include other implicit or related problems. For details, please refer to the description of the following embodiments.
[0067] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0068] In an exemplary embodiment, Figure 2 As shown, a defect detection method is provided, which is described by taking the method applied to a computer device as an example, and includes the following steps:
[0069] S201, in response to a circuit board detection request, obtaining through hole position information of at least one through hole in the circuit board.
[0070] Among them, the circuit board can be a substrate that supports and connects devices, usually made of insulating materials and covered with conductive paths; the devices can include electronic components, connectors, switches, indicator lights, sensors, power supply components, etc. The circuit board includes multiple through holes. When the device needs to be connected to the circuit board, the pins of the device can be inserted and fixed in the through holes on the PCB board. Therefore, obtaining the through hole position information of at least one through hole in the circuit board can obtain all the holes in the circuit board that need to be connected to the pins of the device. The circuit board can be a PCB board, a rigid circuit board, etc.
[0071] The circuit board inspection request may be a circuit board defect inspection request.
[0072] A user sends a circuit board inspection request to a computer device, and the circuit board inspection request includes design information of the circuit board. After receiving the circuit board inspection request, the computer device can obtain through-hole position information of at least one through-hole in the circuit board from the design information in the inspection request; wherein the design information of the circuit board includes the position, shape, size, coordinates, device name, through-hole position information, etc. of all devices to be installed on the circuit board.
[0073] The circuit board can be designed in the circuit board design software, and the circuit board designed in the circuit board design software can be exported to obtain the design information of the circuit board.
[0074] Optionally, the circuit board design software is integrated in the computer device. After the user completes the design of the circuit board in the circuit board design software or after the user imports the designed PCB board into the circuit board design software, the user can directly click the "Defect Detection" button in the dynamic menu of the circuit board design software to trigger the circuit board inspection request. After the circuit board design software responds to the circuit board inspection request triggered by the user, it directly obtains the through-hole position information of at least one through hole in the circuit board.
[0075] The circuit board design software may be Cadence Allegro software, and the through hole position information may be the coordinates of the through hole on the circuit board.
[0076] S202, obtaining the spacing detection result of each through hole according to the position information of each through hole.
[0077] The spacing between the through holes and other devices on the circuit board can be detected according to the position information of each through hole to obtain the spacing detection results of each through hole. The spacing detection results may include spacing detection failure and spacing detection pass.
[0078] In one embodiment, the spacing detection result of each through hole can be determined by a preset through hole spacing detection model; specifically, the position information of each through hole is directly input into the through hole spacing detection model, and the position information of each through hole is analyzed by the through hole spacing detection model to obtain the spacing detection result of each through hole output by the through hole spacing detection model.
[0079] It should be noted that there are many ways to connect various components in a circuit board to the circuit board, such as crimping, reflow soldering, wave soldering, etc. Due to the different connection processes, the spacing requirements of the through holes corresponding to the components are also different.
[0080] Therefore, in another embodiment, the position information of each through hole can be first differentiated according to the connection method between the corresponding device and the circuit board, and then the corresponding through hole position information can be detected according to the through hole spacing requirements corresponding to different connection methods, so as to obtain the spacing detection results of each through hole.
[0081] For example, for any through hole, first determine the connection method between the device to which the through hole belongs and the circuit board; if the connection method is wave soldering, obtain the spacing requirements corresponding to the wave soldering, and perform spacing detection on the through hole based on the spacing requirements corresponding to the wave soldering and the through hole position information to determine whether the through hole meets the spacing requirements and obtain the through hole spacing detection result.
[0082] S203, determining a defect detection result of the circuit board according to the detection results of each spacing.
[0083] The defect detection result of the circuit board can be that the circuit board has a defect or that the circuit board does not have a defect.
[0084] In one embodiment, each spacing detection result may be input into a defect detection model, and all spacing detection results may be analyzed by the spacing detection model to obtain a defect detection result of the circuit board output by the defect detection model.
[0085] In another embodiment, the defect detection result of the circuit board is determined based on the spacing detection results of each through hole, and it can also include: if there is a through hole among the through holes whose spacing detection result is not passed, it is determined that the circuit board has a defect; if the spacing detection results of each through hole are passed, it is determined that the circuit board does not have a defect.
[0086] Specifically, if there are through holes whose spacing detection results fail among the through holes, it means that there are through holes in the circuit board that fail the spacing detection, and it is determined that there are defects in the design of the circuit board; if the spacing detection results of all through holes pass, it means that there are no through holes in the circuit board that fail the spacing detection, and it is determined that there are no defects in the design of the circuit board.
[0087] In this embodiment, if there is a through hole among the through holes that fails the spacing detection result, it is determined that the circuit board has a defect; if the spacing detection results of all through holes are passed, it is determined that the circuit board does not have a defect. By detecting whether the through holes on the circuit board meet the design requirements to determine whether the circuit board has a design defect, defects in the circuit board can be effectively avoided during the manufacturing process, thereby improving product quality and reliability.
[0088] In an embodiment of the present application, in response to a detection request of a circuit board, the through-hole position information of at least one through-hole in the circuit board is obtained, and then the spacing detection results of each through-hole are obtained according to the through-hole position information, and finally the defect detection result of the circuit board is determined according to each spacing detection result. In this method, after responding to the response request of the circuit board, the spacing of each through-hole is detected according to the through-hole position information of each through-hole in the circuit board, and the spacing detection result of each through-hole is determined, so that the spacing of the through-holes can be conveniently and quickly checked, so that the through-holes can meet the use requirements; further, the defect detection result of the circuit board is determined according to the spacing detection results of each through-hole to determine whether the circuit board has a design defect, which can effectively improve the defect detection efficiency of the circuit board, and the defect detection of the circuit board during the circuit board design process can effectively avoid defects in the circuit board during the manufacturing process, and improve the product quality of the circuit board.
[0089] The following describes how to obtain the through-hole position information of at least one through-hole in a circuit board through an embodiment. In an exemplary embodiment, Figure 3 As shown, obtaining through hole position information of at least one through hole in a circuit board includes the following steps:
[0090] S301, obtaining position information of a target device in a circuit board; the target device refers to a device on the circuit board that adopts a preset welding method.
[0091] The preset soldering method may be a wave soldering method, a reflow soldering method, etc. For example, taking the preset soldering method as wave soldering as an example, the target device is a device that needs to be soldered by wave soldering on a circuit board; the target device may include multiple devices.
[0092] The circuit board detection request includes the design information of the circuit board, and the design information includes the device name of each device in the circuit board, the welding method on the circuit board, the position information in the circuit board, etc. Therefore, the device corresponding to the preset welding method in the design information can be determined as the target device, and the position information corresponding to the target device can be obtained.
[0093] S302, acquiring through-hole position information of at least one through-hole in a circuit board according to the position information of the target device.
[0094] Among them, the through hole represents a through hole corresponding to the target device that is welded in a preset welding method, and the device is welded on the circuit board through the through hole. Therefore, the through hole position information of at least one through hole in the circuit board can be determined based on the position information of the target device.
[0095] The position information of the target device may include the position information of the corresponding through hole, and therefore, the through hole position information of at least one through hole in the circuit board may be directly obtained from the position information of the target device; wherein the through hole position information includes the position of the through hole on the circuit board.
[0096] In the embodiment of the present application, since the through holes are holes required when welding devices on a circuit board using a preset welding method, the through hole position information of at least one through hole in the circuit board is determined by obtaining the position information of the target device on the circuit board using the preset welding method, so that the obtained through hole position information is more accurate.
[0097] In an exemplary embodiment, Figure 4 As shown, the through hole position information includes through hole coordinates; according to the position information of the target device, obtaining the through hole position information of at least one through hole in the circuit board includes the following steps:
[0098] S401, determining the pin coordinates of each pin of the target device in the circuit board according to the position information of the target device.
[0099] Since the target device is soldered on the circuit board by a preset soldering method, the pins of the target device are soldered in the through holes, and since the position information of the target device has been pre-designed in the circuit board, the through hole position of at least one through hole in the circuit board can be directly determined based on the pin position of the target device.
[0100] Therefore, before determining the through-hole position information of at least one through-hole in the circuit board, it is necessary to first obtain the pin position information of the target device, where the pin position information includes the pin coordinates of the pin in the circuit board.
[0101] The location information of the target device includes the pin coordinates of each pin in the target device in the circuit board. Therefore, the pin coordinates of each pin in the target device in the circuit board can be directly obtained from the location information of the target device.
[0102] S402, determining the pin coordinates of each pin as the through hole coordinates of the corresponding through hole; each pin corresponds to one through hole.
[0103] The pin coordinates of each pin are determined as the through-hole coordinates of the corresponding through-hole, wherein one through-hole is soldered with one pin, and therefore each pin corresponds to one through-hole.
[0104] It should be noted that since the pins are soldered in the through holes, in order to allow the pins to be easily inserted into the through holes and to fully wet the solder during soldering to ensure the reliability of soldering, the size of the through holes can be set slightly larger than the size of the pins.
[0105] Therefore, the pin coordinates of the pin can be expanded outward by a preset length, and the expanded pin coordinates are determined as the through-hole coordinates of the corresponding through-hole; for example, the pin coordinates of the pin can be expanded outward by about 0.1 mm to 0.2 mm.
[0106] In the embodiment of the present application, when the target device is welded to the circuit board, each pin of the target device is welded in each through-hole. Therefore, the pin coordinates of each pin are determined as the through-hole coordinates of the corresponding through-hole, making the through-hole position information more accurate and reliable.
[0107] In an exemplary embodiment, Figure 5 As shown, according to the position information of each through hole, the spacing detection result of each through hole is obtained, including the following steps:
[0108] S501, for any through hole, determine the through hole spacing detection area according to the through hole position information.
[0109] Among them, the embodiment of the present application is mainly to detect the distance between the through hole and other devices in the circuit board. Therefore, the spacing detection area of the through hole can be the minimum allowable spacing area between the through hole and other devices, that is, no other devices are allowed in this spacing detection area.
[0110] In one embodiment, the through-hole spacing detection area can be determined according to a preset area generation model. Specifically, the through-hole position information is input into the area generation model, and the through-hole position information is analyzed by the area generation model to obtain the through-hole spacing detection area output by the area generation model.
[0111] The through hole position information may include through hole coordinates. In another embodiment, Figure 6 As shown, according to the through hole position information, determining the through hole spacing detection area includes the following steps:
[0112] S601, determining a two-dimensional graphic of the through hole according to the through hole coordinates of the through hole.
[0113] Since the through hole is a hole with a certain shape, the through hole can be converted into a two-dimensional figure according to the through hole coordinates of the through hole.
[0114] It should be noted that the through hole coordinates may be coordinates in a rectangular coordinate system of the circuit board, and therefore, the two-dimensional figure of the through hole may be an area enclosed by the through hole coordinates in the rectangular coordinate system. The two-dimensional figure may be, but is not limited to, a circle, a square, a rectangle or other regular or irregular shapes.
[0115] S602, expanding the two-dimensional pattern of the through hole by a preset length to obtain a spacing detection area.
[0116] Each boundary point on the two-dimensional pattern of the through hole can be expanded outward by a preset length, and a new two-dimensional pattern is obtained after the preset length is expanded outward, and the new two-dimensional pattern is determined as the spacing detection area. For example, the preset length can be 3mm.
[0117] For example, if the two-dimensional figure of the through hole is a circle with a radius of 5 mm, then all the boundary points of the two-dimensional figure are expanded by 3 mm to obtain a circle with a radius of 8 mm, and the circle with a radius of 8 mm is determined as the spacing detection area; for example, if the two-dimensional figure of the through hole is a rectangle, then all the boundary points of the rectangle are expanded outward by 3 mm to obtain an irregular figure, and the irregular figure is determined as the spacing detection area.
[0118] It should be noted that the preset length of the further expansion of the through hole corresponding to different welding methods is different; for example, the preset length of the through hole corresponding to wave soldering may be 3mm, and the preset length of the through hole corresponding to reflow soldering may be less than 3mm.
[0119] In the embodiment of the present application, the two-dimensional pattern of the through hole is predetermined and the preset length is expanded, so as to ensure the accuracy of the spacing detection area, thereby effectively detecting whether the spacing between the through holes meets the design requirements, and simplifying the through hole spacing detection process, thereby improving the production efficiency of the circuit board.
[0120] S502, obtaining the minimum circumscribed rectangle of the spacing detection area.
[0121] Since the gap detection area may be of irregular shape, in order to simplify the detection process, the minimum circumscribed rectangle of the gap detection area may be obtained to obtain a regular-shaped figure.
[0122] The method for obtaining the minimum enclosing rectangle of the spacing detection area can be to obtain the extreme points of the spacing detection area, that is, to obtain the leftmost, optimal, topmost and bottommost points in the spacing detection area, use these extreme points as points on the minimum enclosing rectangle, and determine the height and width of the minimum enclosing rectangle according to the leftmost, optimal, topmost and bottommost points in the spacing detection area, for example, use the horizontal distance between the leftmost point and the rightmost point as the width of the minimum enclosing rectangle, and use the vertical distance between the topmost point and the bottommost point as the height of the minimum enclosing rectangle; determine the area of the minimum enclosing rectangle according to the width, height and position of the extreme points, and use the area as the minimum enclosing rectangle of the spacing detection area.
[0123] S503, obtaining a through-hole spacing detection result according to at least one back-side component and a minimum circumscribed rectangle of the through-hole.
[0124] Among them, the back device is the device on the circuit board on the back side of the through hole. For example, the through hole includes the front and back sides, and the circuit board also includes side A and side B. The front side of the through hole is the side where the target device to which the through hole belongs is located, and the back device of the through hole refers to the device on the circuit board corresponding to the back side of the through hole. There may be multiple back devices.
[0125] For example, if the target device is on side A of the circuit board, the front side of the through hole is on side A of the circuit board, and the back side of the through hole is on side B of the circuit board, obtaining at least one back side device of the through hole can be expressed as obtaining all devices on side B of the circuit board, that is, the device on side B of the circuit board is at least one back side device of the through hole.
[0126] It should be noted that the minimum circumscribed rectangle of the through hole also represents the minimum circumscribed rectangle of the back side of the through hole.
[0127] In one embodiment, the device position information and the minimum bounding rectangle of at least one back device of the through hole can be input into a pre-trained spacing judgment model, and the minimum bounding rectangle and the device position information can be analyzed by the spacing judgment model to determine the spacing detection result of the through hole.
[0128] In the embodiment of the present application, by obtaining the minimum circumscribed rectangle of the spacing detection area of the through hole, the spacing detection range of the through hole has a certain regularity, so that the subsequent method of judging whether the back device of the through hole meets the spacing requirements with the through hole through the regular minimum circumscribed rectangle is more concise, which can save time and resources and improve detection efficiency.
[0129] The following is a specific description of how to obtain the through-hole spacing detection result according to at least one back-side device and the minimum circumscribed rectangle of the through-hole through an embodiment. In an exemplary embodiment, Figure 7 As shown, obtaining the through-hole spacing detection result according to at least one back-side device and the minimum circumscribed rectangle of the through-hole includes the following steps:
[0130] S701: If all back-side devices are not within the minimum bounding rectangle, determine that the spacing detection result is passed.
[0131] Check whether there are back-side devices in the minimum bounding rectangle. If there are no back-side devices in the minimum bounding rectangle, that is, all back-side devices are not in the minimum bounding rectangle, it means that there are no other devices in the preset length range of the corresponding through hole, and the distance between the through hole and the back-side device is large, and the through hole spacing detection result is determined to be passed.
[0132] S702, if there is a target back-side device in the minimum circumscribed rectangle among the back-side devices, and the position of the target back-side device overlaps with the spacing detection area, then determine that the spacing detection result is failed; otherwise, determine that the spacing detection result is passed.
[0133] It is detected whether there is a back-side device in the minimum bounding rectangle. If there is a back-side device in the minimum bounding rectangle, the back-side device in the minimum bounding rectangle is determined as a target back-side device.
[0134] Since the minimum bounding rectangle is the minimum bounding rectangle of the spacing detection area, and the range of the minimum bounding rectangle is greater than or equal to the range of the spacing detection area, the target back-side device in the minimum bounding rectangle is not necessarily in the spacing detection area.
[0135] Therefore, when the target back side device exists in the minimum circumscribed rectangle, it is further determined whether the position of the target back side device overlaps with the spacing detection area. If the position of the target back side device overlaps with the spacing detection area, it means that the target back side device is close to the through hole position, and the spacing detection result of the corresponding through hole is determined to be failed.
[0136] When the target back side device exists in the minimum circumscribed rectangle, if the position of the target back side device does not overlap with the spacing detection area, it means that the target back side device is far from the through hole position, and the spacing detection result of the corresponding through hole is determined to be passed.
[0137] When judging whether the position of the target back side device overlaps with the spacing detection area, the two-dimensional graphic of the target back side device can be determined according to the coordinates of the target back side device, and it can be judged whether the two-dimensional graphic of the target back side device and the spacing detection area overlap. If the two-dimensional graphic of the target back side device and the spacing detection area overlap, it is determined that the position of the target back side device overlaps with the spacing detection area; otherwise, it is determined that the position of the target back side device does not overlap with the spacing detection area.
[0138] It should be noted that if there are multiple target back-side devices, the target back-side devices can be traversed separately, and it can be determined in turn whether the position of each target back-side device overlaps with the spacing detection area. If the position of a target back-side device overlaps with the spacing detection area, the spacing detection result is determined to be failed; otherwise, the spacing detection result is determined to be passed.
[0139] In an embodiment of the present application, it is first determined whether each back-side device of the through hole is within the minimum circumscribed rectangle of the spacing detection area of the through hole. If there is a target back-side device within the minimum circumscribed rectangle, it is further determined whether the target back-side device is within the spacing detection area of the through hole. In this way, it is only necessary to compare the target back-side device in the minimum circumscribed rectangle with the spacing detection area of the through hole, without the need to detect the devices in the entire circuit board, which can save time and resources and improve detection efficiency.
[0140] When the through hole whose spacing detection result is not passed in the circuit board is determined, the corresponding information of the through hole can be displayed to facilitate the designer to view and modify. This is described in detail below. In an exemplary embodiment, Figure 8 As shown, this embodiment includes the following steps:
[0141] S801, obtaining through-hole position information of a target through-hole for which a spacing detection result is failure, and a device to which a pin corresponding to the target through-hole belongs.
[0142] The target through holes are through holes with different spacing detection results in the circuit board.
[0143] After completing the pitch detection of at least one through hole in the circuit board, obtain the target through hole whose pitch detection result is failed, and obtain the through hole position information of the target through hole and the device to which the pin corresponding to the target through hole belongs according to the design information of the circuit board.
[0144] S802, displaying the through hole position information of the target through hole and the device name of the device to which it belongs.
[0145] The through-hole position of the target through-hole and the device name of the device to which it belongs can be displayed in the form of a pop-up window. Optionally, the through-hole position information of the target through-hole in the circuit board and the device name of the device to which it belongs can be displayed in the display interface of the circuit board design software.
[0146] In addition, a link relationship can be created between the displayed through-hole position information and the through-hole on the circuit board, so that after the user clicks on the displayed through-hole position information, the user can jump to the corresponding position of the through-hole on the circuit board, making it easier to find the through-hole; the target through-hole can also be highlighted on the circuit board, and the through-hole position information of the target through-hole and the device name of the device to which it belongs can be displayed based on the highlighted target through-hole.
[0147] Since there may be multiple target through holes with failed spacing detection results in the circuit board, when displaying the through hole position information of the target through holes and the device name of the device to which they belong, in order to improve readability, corresponding spaces may be added according to the through hole position information of each target through hole and the character length of the device name of the device to which they belong, so that the through hole position of each target through hole and the device name of the device to which they belong are aligned.
[0148] In addition, if the spacing detection result of more than one through-hole in a device fails, the device name will be filtered and only one device name will be displayed, that is, one device name corresponds to the through-hole position information of multiple target through-holes.
[0149] In an embodiment of the present application, the through-hole position information of the target through-hole whose spacing detection result is failure and the device to which the pin corresponding to the target through-hole belongs are displayed, which can help the designer quickly locate the target through-hole and facilitate the designer to view and modify it.
[0150] In an exemplary embodiment, based on the Skill language that comes with Allegro, the defect detection method is integrated into the dynamic menu of the Cadence Allegro software. By the user triggering the circuit board detection request on the dynamic menu, the automatic detection function can be realized, and the circuit board is automatically defect-detected through the background program, and the target through-holes with failed spacing detection results in the circuit board and the device names of the devices to which the target through-holes belong are directly displayed in the Cadence Allegro software in the form of pop-up windows; and the target through-holes are highlighted on the circuit board in the Cadence Allegro software. The defect detection method in the embodiment of the present application can realize one-click inspection of the circuit board, and display the through-hole coordinates of the through-holes that do not meet the requirements. Clicking the through-hole coordinates can jump to the corresponding through-hole position on the circuit board, which is convenient and fast, saving a lot of manpower.
[0151] In an exemplary embodiment, the present application also provides a defect detection method, taking the circuit board as a PCB, and the through hole in the circuit board as a through hole of a wave soldering device as an example, such as Fig. 9 As shown, this embodiment includes the following steps:
[0152] S901, obtaining design information of all components on the PCB.
[0153] The design information includes the position, shape, coordinates, device name, pin coordinates, device identification, and the surface on the PCB of the device.
[0154] S902, according to the component identification in the design information of each component, obtain the pin coordinates of the component identified as the wave soldering component.
[0155] S903, determining the through hole coordinates of the through hole according to the pin coordinates of the wave soldering component; the through hole includes a plurality of through holes.
[0156] S904, for any through hole, obtain a two-dimensional graphic of the through hole according to the through hole coordinates of the through hole.
[0157] S905, expanding the two-dimensional pattern of the through hole by 3 mm to obtain a spacing detection area, and obtaining a minimum circumscribed rectangle of the spacing detection area.
[0158] S906, obtaining the back side components of the through hole from the components in the circuit board, and obtaining the candidate components in the minimum circumscribed rectangle according to the component coordinates of the back side components.
[0159] S907: If there is no candidate component in the minimum circumscribed rectangle, it is determined that all through holes of the wave soldering components in the circuit board meet the requirements.
[0160] S908: If there is a candidate device in the minimum circumscribed rectangle, traverse each candidate device to determine whether there is an overlapping area between each candidate device and the spacing detection area.
[0161] S909, if there is an overlapping area between the candidate device and the spacing detection area, the corresponding through hole is highlighted, and the through hole coordinates and the device name to which the through hole belongs are recorded.
[0162] S910, after all through-hole detection is completed, through-hole coordinates and device names of all through-holes whose spacing detection areas overlap with candidate devices are displayed in a pop-up window.
[0163] In the embodiments of the present application, automated inspection of the spacing between the through-holes of wave soldering components and the components on the back side in circuit board design is implemented, saving time and cost; improving the reliability and standardization of circuit board design, ensuring the stability and reliability of later soldering, making the design meet DFM requirements, and improving product production quality and production efficiency; and avoiding the occurrence of legacy or errors caused by negligence of engineers in a single repetitive inspection process, which can significantly improve the design efficiency of circuit boards and shorten the product development cycle.
[0164] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0165] Based on the same inventive concept, the embodiment of the present application also provides a defect detection device for implementing the defect detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more defect detection device embodiments provided below can refer to the limitations on the defect detection method above, and will not be repeated here.
[0166] In an exemplary embodiment, Fig.10 As shown, a defect detection device is provided, including: an acquisition module 1001, a detection module 1002 and a determination module 1003, wherein:
[0167] An acquisition module 1001 is used to acquire through-hole position information of at least one through-hole in the circuit board in response to a detection request of the circuit board;
[0168] A detection module 1002 is used to obtain the spacing detection result of each through hole according to the position information of each through hole;
[0169] The determination module 1003 is used to determine the defect detection result of the circuit board according to the detection results of each spacing.
[0170] In an exemplary embodiment, the acquisition module 1001 includes: a first position acquisition unit and a second position acquisition unit, wherein:
[0171] A first position acquisition unit is used to acquire position information of a target device in a circuit board; the target device refers to a device on the circuit board that adopts a preset welding method;
[0172] The second position acquisition unit is used to acquire through-hole position information of at least one through-hole in the circuit board according to the position information of the target device.
[0173] In an exemplary embodiment, the through hole position information includes through hole coordinates; the second position acquisition unit includes: a first coordinate determination subunit and a second coordinate determination subunit, wherein:
[0174] A first coordinate determination subunit, used to determine the pin coordinates of each pin in the target device in the circuit board according to the position information of the target device;
[0175] The second coordinate determination subunit is used to determine the pin coordinates of each pin as the through hole coordinates of the corresponding through hole; each pin corresponds to one through hole.
[0176] In an exemplary embodiment, the detection module 1002 includes: a region determination unit, a rectangle determination unit and a first result determination unit, wherein:
[0177] An area determination unit, for determining a through-hole spacing detection area for any through-hole according to the through-hole position information;
[0178] A rectangle determination unit, used to obtain the minimum bounding rectangle of the spacing detection area;
[0179] The first result determination unit is used to obtain the through-hole spacing detection result according to at least one back-side device and a minimum circumscribed rectangle of the through-hole.
[0180] In an exemplary embodiment, the first result determination unit includes: a first result determination subunit and a second result determination subunit, wherein:
[0181] A first result determination subunit, configured to determine that the spacing detection result is passed if all back-side devices are not within the minimum bounding rectangle;
[0182] The second result determination subunit is used to determine that the spacing detection result is failed if there is a target back-side device in the minimum circumscribed rectangle among the back-side devices and the position of the target back-side device overlaps with the spacing detection area; otherwise, determine that the spacing detection result is passed.
[0183] In an exemplary embodiment, the through hole position information includes through hole coordinates, and the region determination unit includes: a pattern determination subunit and a region determination subunit, wherein:
[0184] A graphic determination subunit, for determining a two-dimensional graphic of the through hole according to the through hole coordinates of the through hole;
[0185] The area determination subunit is used to expand the two-dimensional pattern of the through hole by a preset length to obtain a spacing detection area.
[0186] In an exemplary embodiment, the determination module 1003 includes: a second result determination unit and a third result determination unit, wherein:
[0187] A second result determination unit is used to determine that the circuit board has a defect if there is a through hole in each through hole whose spacing detection result is not passed;
[0188] The third result determination unit is used to determine that the circuit board does not have defects if the spacing detection results of each through hole are all passed.
[0189] In an exemplary embodiment, the device further includes: an information acquisition module and a display module, wherein:
[0190] An information acquisition module, used to acquire through-hole position information of a target through-hole for which the spacing detection result is failure, and a device to which the pin corresponding to the target through-hole belongs;
[0191] The display module is used to display the through-hole position information of the target through-hole and the device name of the device to which it belongs.
[0192] Each module in the above defect detection device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0193] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0194] The implementation principles and technical effects of each step implemented by the processor in the embodiment of the present application are similar to the principles of the above-mentioned defect detection method and will not be repeated here.
[0195] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0196] The implementation principles and technical effects of the steps implemented when the computer program in the embodiment of the present application is executed by the processor are similar to the principles of the above-mentioned defect detection method and will not be repeated here.
[0197] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0198] The implementation principles and technical effects of the steps implemented when the computer program in the embodiment of the present application is executed by the processor are similar to the principles of the above-mentioned defect detection method and will not be repeated here.
[0199] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0200] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0201] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0202] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A defect detection method, It is characterized in that The method comprises: In response to a detection request of a circuit board, obtaining through-hole position information of at least one through-hole in the circuit board; According to the position information of each through hole, obtaining the spacing detection result of each through hole; According to each of the spacing detection results, a defect detection result of the circuit board is determined.
2. The method according to claim 1, It is characterized in that The obtaining of through-hole position information of at least one through-hole in the circuit board comprises: Acquiring position information of a target device in the circuit board; the target device represents a device on the circuit board that adopts a preset welding method; According to the position information of the target device, the through hole position information of at least one through hole in the circuit board is acquired.
3. The method according to claim 2, It is characterized in that The through hole position information includes through hole coordinates; and obtaining through hole position information of at least one through hole in the circuit board according to the position information of the target device includes: Determining the pin coordinates of each pin in the target device in the circuit board according to the position information of the target device; The pin coordinates of each of the pins are determined as the through hole coordinates of the corresponding through hole; each pin corresponds to one through hole.
4. The method according to any one of claims 1 to 3, It is characterized in that The step of obtaining the spacing detection result of each through hole according to the position information of each through hole comprises: For any through hole, determining a spacing detection area of the through hole according to the through hole position information; Obtain the minimum bounding rectangle of the spacing detection area; A spacing detection result of the through hole is obtained according to at least one back surface device of the through hole and the minimum circumscribed rectangle.
5. The method according to claim 4, It is characterized in that The obtaining the through-hole spacing detection result according to at least one back-side device of the through-hole and the minimum circumscribed rectangle includes: If none of the back-side devices is within the minimum bounding rectangle, determining that the spacing detection result is passed; If there is a target back-side device in the minimum circumscribed rectangle among the back-side devices, and the position of the target back-side device overlaps with the spacing detection area, the spacing detection result is determined to be failed; otherwise, the spacing detection result is determined to be passed.
6. The method according to claim 4, It is characterized in that The through hole position information includes through hole coordinates, and determining the through hole spacing detection area according to the through hole position information includes: Determining a two-dimensional graphic of the through hole according to the through hole coordinates of the through hole; The two-dimensional pattern of the through hole is expanded by a preset length to obtain the spacing detection area.
7. The method according to any one of claims 1 to 3, It is characterized in that Determining the defect detection result of the circuit board according to the spacing detection result of each of the through holes includes: If there is a through hole among the through holes whose spacing detection result is not passed, it is determined that the circuit board has a defect; If the spacing detection results of each through hole are passed, it is determined that the circuit board has no defects.
8. The method according to any one of claims 1 to 3, It is characterized in that The method further comprises: Obtaining through-hole position information of a target through-hole for which a spacing detection result is failure, and a device to which a pin corresponding to the target through-hole belongs; The through-hole position information of the target through-hole and the device name of the device to which it belongs are displayed.
9. A defect detection device, It is characterized in that The device comprises: An acquisition module, configured to acquire through-hole position information of at least one through-hole in the circuit board in response to a detection request of the circuit board; A detection module, used for obtaining a spacing detection result of each through hole according to the position information of each through hole; A determination module is used to determine a defect detection result of the circuit board according to each of the spacing detection results.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Less qualified solder pad space length detection device and method
CN101216301A
Through hole arrangement system and through hole arrangement method
CN101582094A
Method and device for detecting state of via holes in wave-soldering zone
CN105717256A
Method and device for automatically detecting backflow ground hole near differential signal via hole
CN111208409A
Method for detecting PAD interval between devices on PCB and related device
CN111998815A