A method and device for testing a circuit board, an electronic device and a storage medium
By acquiring template data and sample template data of the circuit board, and utilizing the high-brightness characteristics of the solder area, the robot arm path is identified and planned, solving the component obstruction problem and achieving high efficiency and accuracy in automated circuit board testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LCFC HEFEI ELECTRONICS TECH
- Filing Date
- 2023-02-15
- Publication Date
- 2026-06-26
Smart Images

Figure CN116106724B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing technology, and more particularly to a method, apparatus, electronic device, and storage medium for testing circuit boards. Background Technology
[0002] The heights of electronic components on circuit boards vary. In automated electronic signal measurement, taller components can block the robotic arm from measuring lower test pads.
[0003] Therefore, providing a method that can automatically, efficiently, and accurately test circuit boards has always been a goal. Summary of the Invention
[0004] This disclosure provides a method, apparatus, electronic device, and storage medium for testing circuit boards, to at least solve the above-mentioned technical problems existing in the prior art.
[0005] According to a first aspect of this disclosure, a method for testing a circuit board is provided, the method comprising: determining template data of the circuit board under test based on component information of the circuit board under test; determining sample template data corresponding to the circuit board under test; performing template defect detection on the template data of the circuit board under test based on the sample template data to obtain a target solder area in a non-defect area; and controlling a robotic arm to test the circuit board under test based on the target solder area.
[0006] In one embodiment, determining the template data of the circuit board under test based on the component information of the circuit board under test includes: establishing an obstacle avoidance model corresponding to the robotic arm; determining the orientation of the pads measured by the robotic arm in the obstacle avoidance model as a first dataset; the obstacle avoidance model is used to simulate the robotic arm holding the probe to measure the circuit board under test; acquiring images of the circuit board under test based on the component information and the first dataset; and performing image processing on the images of the circuit board under test to determine the template data of the circuit board under test; wherein the template data of the circuit board under test includes: the component information, image acquisition parameters, and corresponding template images.
[0007] In one possible implementation, determining the sample template data corresponding to the circuit board under test includes: determining the sample template data based on the three-dimensional model corresponding to the circuit board under test; or obtaining the sample template data corresponding to the circuit board under test from a template database.
[0008] In one embodiment, the template database is determined based on templates of sample circuit boards; the method further includes: acquiring images of components and pads on the sample circuit board to obtain sample images; performing image processing on the sample images to extract sample template images; marking the solder areas of the pads in the sample template images to obtain sample template images carrying solder marking data; and constructing the template database based on the sample template images carrying solder marking data.
[0009] In one possible implementation, obtaining the sample template data corresponding to the circuit board under test from the template database includes: using the component information as an index to search for the sample template data corresponding to the circuit board under test in the template database; wherein, the component information includes: component model, pad model, and pad orientation.
[0010] In one possible implementation, acquiring images of the circuit board under test based on the first dataset includes: taking the intersection of the first dataset and the pad directions in the template database to obtain a second dataset; sorting the second dataset to obtain a priority dataset, wherein the priority dataset is used for image acquisition of the circuit board under test.
[0011] In one possible implementation, the step of performing template defect detection on the template data of the circuit board under test based on the sample template data to obtain the target solder area in the non-defect area includes: determining the detected defect area as an obstacle area, the obstacle area cannot be measured by the robotic arm; and determining the target solder area based on the solder marking data corresponding to the non-defect area.
[0012] In one possible implementation, determining the target solder area based on the solder marking data corresponding to the non-defective area includes: determining whether solder marking data exists in the non-defective area; if solder marking data exists in the non-defective area, then determining the solder area directly above the center point of the pad as the target solder area; if solder marking data does not exist in the non-defective area, then repeatedly extracting the template data and corresponding sample template data of the circuit board under test and performing template defect detection until the solder area directly above the center point of the pad is determined; if the solder area directly above the center point of the pad cannot be determined, then the non-defective area is determined as an obstacle area.
[0013] In one possible implementation, controlling the robotic arm to test the circuit board under test based on the target solder area includes: marking the highest coordinate interval in the target solder area and calibrating the coordinate interval; controlling the movement of the robotic arm based on the calibrated coordinate interval so that the robotic arm can test the circuit board under test.
[0014] According to a second aspect of this disclosure, an apparatus for testing a circuit board is provided, the apparatus comprising: a determining module, configured to determine template data of the circuit board under test based on component information of the circuit board under test; and determine sample template data corresponding to the circuit board under test; a detecting module, configured to perform template defect detection on the template data of the circuit board under test based on the sample template data to obtain a target solder area in a non-defective region; and a control module, configured to control a robotic arm to test the circuit board under test based on the target solder area.
[0015] In one embodiment, the determining module is specifically used to establish an obstacle avoidance model corresponding to the robotic arm, and to determine the orientation of the pads measured by the robotic arm in the obstacle avoidance model as a first dataset. The obstacle avoidance model is used to simulate the robotic arm holding the probe and measuring the circuit board under test. Based on the component information and the first dataset, images of the circuit board under test are acquired, and image processing is performed on the images of the circuit board under test to determine the template data of the circuit board under test. The template data of the circuit board under test includes: the component information, image acquisition parameters, and the corresponding template image.
[0016] In one possible implementation, the determining module is specifically used to determine the sample template data based on the three-dimensional model corresponding to the circuit board under test; or to obtain the sample template data corresponding to the circuit board under test from the template database.
[0017] In one embodiment, the template database is determined based on templates of a sample circuit board; the device further includes: a database determination module, used to acquire images of components and pads on the sample circuit board to obtain sample images; to perform image processing on the sample images to extract sample template images; to annotate the solder areas of the pads in the sample template images to obtain sample template images carrying solder annotation data; and to construct the template database based on the sample template images carrying solder annotation data.
[0018] In one possible implementation, the determining module is specifically used to search for sample template data corresponding to the circuit board under test in the template database using the component information as an index; wherein, the component information includes: component model, pad model, and pad orientation.
[0019] In one possible implementation, the determining module is specifically used to take the intersection of the pad directions of the first dataset and the template database to obtain a second dataset; sort the second dataset to obtain a priority dataset, and the priority dataset is used to acquire images of the circuit board under test.
[0020] In one possible implementation, the detection module is specifically used to determine the detected defect area as an obstacle area, which cannot be measured by the robotic arm; and to determine the target solder area based on the solder marking data corresponding to the non-defect area.
[0021] In one possible implementation, the detection module is specifically used to determine whether solder marking data exists in the non-defective area. If solder marking data exists in the non-defective area, the solder area directly above the center point of the pad is determined as the target solder area. If solder marking data does not exist in the non-defective area, the template data and corresponding sample template data of the circuit board under test are repeatedly extracted and template defect detection is performed until the solder area directly above the center point of the pad is determined. If the solder area directly above the center point of the pad cannot be determined, the non-defective area is determined as an obstacle area.
[0022] In one possible implementation, the control module is specifically used to mark the highest coordinate interval in the target solder area and calibrate the coordinate interval; based on the calibrated coordinate interval, the control module controls the movement of the robotic arm so that the robotic arm can test the circuit board under test.
[0023] According to a third aspect of this disclosure, an electronic device is provided, comprising:
[0024] At least one processor; and
[0025] A memory communicatively connected to the at least one processor; wherein,
[0026] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the methods described in this disclosure.
[0027] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the methods described in this disclosure.
[0028] This disclosure discloses a method, apparatus, electronic device, and storage medium for testing circuit boards. By acquiring template data of the circuit board under test and corresponding sample template data, template defect detection is performed on the template data of the circuit board under test based on the sample template data. The solder area corresponding to the circuit board under test is identified as the target solder area. The obstruction of the robotic arm by the components is identified, and the path of the robotic arm is effectively planned. The circuit board is tested automatically, efficiently, and accurately by the robotic arm.
[0029] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0030] The above and other objects, features, and advantages of this disclosure will become readily apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. Several embodiments of this disclosure are illustrated in the drawings by way of example and not limitation, in which:
[0031] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
[0032] Figure 1 A schematic flowchart of a method for testing a circuit board according to an embodiment of the present disclosure is shown.
[0033] Figure 2 The diagram illustrates a process flow diagram of determining a template database in a method for testing a circuit board according to an embodiment of the present disclosure.
[0034] Figure 3 This illustration shows a flowchart of a process for determining template data of a circuit board under test based on component information of the circuit board under test according to an embodiment of the present disclosure.
[0035] Figure 4 This illustration shows a flowchart of a process for determining a target solder area based on solder marking data corresponding to a non-defective area, according to an embodiment of the present disclosure.
[0036] Figure 5 This diagram illustrates an overall flow chart of a method for testing a circuit board according to an embodiment of the present disclosure.
[0037] Figure 6 Another overall flowchart of a method for testing a circuit board according to an embodiment of the present disclosure is shown;
[0038] Figure 7 A schematic diagram of the composition structure of a test circuit board apparatus according to an embodiment of the present disclosure is shown;
[0039] Figure 8 A schematic diagram of the composition structure of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0040] To make the objectives, features, and advantages of this disclosure more apparent and understandable, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.
[0041] The heights of electronic components on circuit boards vary, and in automated electronic signal measurement, taller components can obstruct the robotic arm from measuring lower test pads. Manually identifying and measuring these pads is not only inaccurate and prone to errors, but also labor-intensive and inefficient. While functional circuit testing (FCT) or flying probe testing can use robotic arms to measure pads, they cannot automatically detect obstructions and require pre-adjustment of the measurement position and angle, presenting significant limitations.
[0042] Therefore, this disclosure proposes a method for testing circuit boards. By acquiring template data of the circuit board under test and corresponding sample template data, and using the sample template data as a reference, template defect detection is performed on the template data of the circuit board under test. Taking advantage of the high brightness of the solder area in image recognition, the corresponding solder area of the circuit board under test is determined. The obstruction of the robotic arm by the components is identified, and the path of the robotic arm is effectively planned. The circuit board is tested automatically, efficiently and accurately by the robotic arm.
[0043] Figure 1 A schematic flowchart of a method for testing a circuit board according to an embodiment of the present disclosure is shown.
[0044] refer to Figure 1 The present disclosure discloses a method for testing a circuit board, which includes at least the following steps:
[0045] Step S101: Determine the template data of the circuit board under test based on the component information of the circuit board under test.
[0046] In some embodiments, component information may include: component model, pad model, and pad orientation; template data of the circuit board under test may include: template image of the circuit board under test, component information, and image acquisition parameters.
[0047] Step S102: Determine the sample template data corresponding to the circuit board under test.
[0048] In some embodiments, the sample template data corresponding to the circuit board under test may include: a template image of the sample circuit board, sample component information, and corresponding image acquisition parameters.
[0049] In some embodiments, the method for determining the sample template data corresponding to the circuit board under test may include at least the following steps:
[0050] Step S102A: Determine sample template data based on the three-dimensional model corresponding to the circuit board under test.
[0051] In some embodiments, the dimensions of the components under test, the dimensions of the pads, and the shape of the solder on the sample circuit board can be collected to establish a three-dimensional model of the circuit board; the corresponding solder areas of the sample circuit board can be marked in the three-dimensional model.
[0052] In some embodiments, a sample template data corresponding to the circuit board under test can be generated using a 3D model, and the solder areas in the sample template data can be outlined. The image acquisition parameters (such as the direction and distance of image acquisition) of the sample template data are consistent with the image acquisition parameters corresponding to the circuit board under test.
[0053] Step S102B: Obtain the sample template data corresponding to the circuit board under test from the template database.
[0054] In some embodiments, component information can be used as an index to search for sample template data corresponding to the circuit board under test in the template database. The template database stores sample template data, and each sample template data corresponds to a component information; the component information may include: component model, pad model, and pad orientation.
[0055] Step S103: Based on the sample template data, perform template defect detection on the template data of the circuit board under test to obtain the target solder area in the non-defect area.
[0056] In some embodiments, the detected defective area can be identified as an obstacle area, which cannot be measured by the robotic arm; the target solder area is determined based on the solder marking data corresponding to the non-defective area.
[0057] In some embodiments, the solder portion of the pad is highlighted in image recognition and is easily identifiable. Based on sample template data, the template image corresponding to the circuit board under test is detected. By comparing the sample template image and the template image corresponding to the circuit board under test, the area blocking the highlighted portion is identified, which is the area blocking the robotic arm's point measurement (defect area).
[0058] Step S104: Based on the target solder area, control the robotic arm to test the circuit board under test.
[0059] In some embodiments, the target solder area can be the solder area directly above the center point of the solder pad; the highest coordinate range in the target solder area can be marked and the coordinate range can be calibrated, and the movement of the robotic arm can be controlled based on the calibrated coordinate range so that the robotic arm can test the circuit board under test.
[0060] Figure 2 The diagram illustrates a process flow diagram for determining a template database in a method for testing a circuit board according to an embodiment of the present disclosure.
[0061] refer to Figure 2 In one embodiment of the present disclosure, a specific implementation process for determining the template database in a method for testing circuit boards may include at least the following steps:
[0062] Step S201: Image acquisition is performed on the components and pads on the sample circuit board to obtain sample images.
[0063] In some embodiments, the orientation of components and pads on the sample circuit board can be determined based on the schematic diagram of the printed circuit board (PCB), or the orientation of components and pads on the sample circuit board can be defined according to actual needs.
[0064] In some embodiments, the direction in which the entire solder area of the pad can be captured is defined as the front direction of the pad. Appropriate image acquisition parameters are set to perform multi-dimensional image acquisition of the components soldered on the circuit board and the corresponding pads from different angles.
[0065] In some embodiments, image acquisition parameters may include: exposure, camera distance, and camera angle; the image acquisition parameters can be set according to actual needs. Specifically, the angle between the camera and the pad direction on the plane during image acquisition can be denoted as α, and the angle between the camera and the plane can be denoted as β.
[0066] As an example, the 0° direction relative to the PCB of the pad is defined as the front. This allows for the capture of the entire solder area of the pad. By setting appropriate exposure and camera distance, images are captured from different angles at intervals of 5° or less to obtain sample images. The area of the sample image can be 1.5 times the area of the pad, which more clearly shows the characteristics of the component and facilitates image matching. The interval for capturing sample images and the size of the sample images can be set as needed. 5° is the preferred interval angle for image capture, and 1.5 times the area of the pad is the preferred sample image area.
[0067] Step S202: Perform image processing on the sample image to extract the sample template image.
[0068] Step S203: Mark the solder area of the pad in the sample template image to obtain a sample template image carrying solder marking data.
[0069] In some embodiments, the sample image is processed into a grayscale image to obtain a corresponding grayscale image. Then, edge enhancement processing is performed. A binarization threshold is set to binarize the edge-enhanced image to obtain a corresponding binarized image. Template extraction is then performed on the binarized image to obtain a sample template image. The binarization threshold can be set according to actual needs.
[0070] In some embodiments, the solder area of the pads in the sample template image is outlined, and the outlined solder contour is used as solder annotation data to obtain a sample template image carrying solder annotation data.
[0071] Step S204: Construct a template database based on sample template images carrying solder annotation data.
[0072] In some embodiments, template images without solder areas can be deleted from the sample template images, and template data can be constructed by integrating sample template images with solder annotation data. The template database may include: component model, pad model, angle α between the camera and the pad direction on the plane during image acquisition, angle β between the camera and the plane, and the corresponding sample template image; the component model and pad model can be obtained from the circuit schematic and PCB diagram of the sample circuit board.
[0073] Figure 3 This illustration shows a flowchart of a process for determining template data of a circuit board under test based on component information of the circuit board under test according to an embodiment of the present disclosure.
[0074] refer to Figure 3 In one embodiment of the present disclosure, a specific implementation process for determining the template data of a circuit board under test based on the component information of the circuit board under test may include at least the following steps:
[0075] Step S301: Establish an obstacle avoidance model corresponding to the robotic arm. Determine the direction of the pads measured by the robotic arm in the obstacle avoidance model as the first dataset. The obstacle avoidance model is used to simulate the robotic arm holding the probe and measuring the circuit board under test.
[0076] In some embodiments, the probe is a device obtained by encapsulating a sensor, and the probe held by the robotic arm can be an oscilloscope probe or any probe that can be used to measure circuits.
[0077] In some embodiments, an obstacle avoidance model corresponding to the robotic arm can be established based on the test chamber, the robotic arm, and other related objects. The test chamber is a test space consisting of the robotic arm and the circuit board under test. Other objects may include: the test chamber frame, the robotic arm placement platform, the test equipment placement platform, and the test equipment, etc.
[0078] In some embodiments, the directions of the pads that the robotic arm can measure on the circuit board under test are calculated based on the obstacle avoidance model, and the directions of the pads that the robotic arm can measure on the circuit board under test are integrated to obtain a first dataset.
[0079] In some embodiments, the direction of the pads that the robotic arm can measure can be recorded as the target pad direction, and the target pad direction can be acquired by a camera device mounted on the robotic arm. The first dataset may include: the target pad direction and the camera angle when acquiring the target pad direction. The camera angle when acquiring the target pad direction may include: the angle α′ between the camera and the target pad direction on the plane and the angle β′ between the camera and the plane.
[0080] Step S302: Based on the component information and the first dataset, acquire an image of the circuit board under test, perform image processing on the image of the circuit board under test, and determine the template data of the circuit board under test.
[0081] The template data for the circuit board under test includes: component information, image acquisition parameters, and the corresponding template image.
[0082] In some embodiments, component information of the circuit board under test (PCB) can be obtained from the circuit schematic and PCB schematic of the PCB under test. Component information may include: component model, pad model, pad orientation, and pad coordinates.
[0083] In some embodiments, images of the circuit board under test can be acquired according to the angles concentrated in the first dataset. The order of image acquisition can be: acquiring images from largest to smallest based on the angle between the camera and the plane.
[0084] In some embodiments, the intersection of the first dataset and the camera angles in the template database can be taken to obtain the second dataset; then the second dataset can be sorted to obtain the priority dataset, and the circuit board under test can be imaged in the order of the priority dataset.
[0085] In some embodiments, if template database A contains the data set: β: 85°, 80°; α: 50°, 55°, 60°, and the first dataset B contains the data set: β′: 85°, 80°, 75°; α′: 45°, 50°, 55°, first take the intersection of angles β in template database A and the first dataset B, then take the intersection of angles α in template database A and the first dataset B to obtain the data set in the second dataset C: β: 80°, 85°; α: 55°, 50°. Sort angles β from largest to smallest according to the absolute value of the degree, and sort angles α from smallest to largest according to the absolute value of the degree. If the absolute values are the same, select any one of them to obtain priority data D: β: 85°, 80°; α: 50°, 55°. First, we need to find the intersection of angles β and β′. Then, based on the intersection of angles β and β′, we need to find the intersection of angles α and α′. Only when angles β and β′, as well as angles α and α′, all have intersections can we obtain the second dataset C.
[0086] In some embodiments, sorting angles β from largest to smallest based on the absolute value of the angle degree, and sorting angles α from smallest to largest based on the absolute value of the angle degree, is to start image acquisition from angles that are easy for the robotic arm to measure the circuit board.
[0087] In some embodiments, the circuit board under test is image acquired in the same manner and with the same parameters as in steps S201-S202, and the acquired image is used to extract a template image of the circuit board under test. The template image of the circuit board under test, component information, and image acquisition parameters (such as angle α and angle β) are determined as the template data of the circuit board under test.
[0088] Figure 4 This illustration shows a schematic diagram of a process for determining a target solder area based on solder marking data corresponding to a non-defective area, according to an embodiment of the present disclosure.
[0089] refer to Figure 4 In a processing flow of a method for testing a circuit board according to an embodiment of this disclosure, a specific implementation process for determining the target solder area based on solder marking data corresponding to non-defective areas may include at least the following steps:
[0090] Step S401: Determine whether there is solder marking data in the non-defect area. If there is solder marking data in the non-defect area, then the solder area directly above the center point of the solder pad is determined as the target solder area.
[0091] In some embodiments, the sample template image and the template image corresponding to the circuit board under test can be compared based on the sample template data to determine whether there is solder marking data in the non-defect area of the circuit board under test in the corresponding sample template image.
[0092] In some embodiments, the target solder area is the area where the robotic arm can perform point measurements.
[0093] In step S402, if there is no solder marking data in the non-defect area, the template data and corresponding sample template data of the circuit board to be tested are repeatedly extracted and template defect detection is performed until the solder area directly above the center point of the pad is determined.
[0094] In some embodiments, the specific implementation process of repeatedly extracting the template data and corresponding sample template data of the circuit board under test is the same as that in the above embodiments, and will not be repeated here.
[0095] In step S403, if the solder area directly above the center point of the pad cannot be determined, the non-defect area is determined as the obstacle area.
[0096] In some embodiments, the highest coordinate point in the solder area directly above the center point of the pad can be marked, the coordinate point can be calibrated, the coordinate point can be converted into the real coordinates on the circuit board under test, and the coordinates and coordinate angles can be output to the robotic arm point measurement system. According to the image acquisition parameters (angle α and angle β) corresponding to the target solder area, the robotic arm can be controlled to move away from the components on the circuit board under test so that the robotic arm is not blocked by the components.
[0097] Figure 5 A schematic diagram of an overall process for a method of testing a circuit board according to an embodiment of the present disclosure is shown.
[0098] refer to Figure 5 The system employs several mechanisms: a template acquisition module to capture images of components and pads on a sample circuit board, determining the corresponding template data and building a template database; a data information module to obtain component models, pad models, pad orientations, and pad coordinates from the schematic diagram; a robotic arm obstacle avoidance calculation module to establish an obstacle avoidance model for the robotic arm, determining the image acquisition parameters for the circuit board; a physical template extraction module to determine the template data for the circuit board and extracting the corresponding sample template data from the template database; a template defect detection module to detect defects in the template data and identify solder areas on the circuit board; and a coordinate and angle calculation module to determine the coordinates and angles at which the robotic arm can test the circuit board.
[0099] Figure 6 Another overall flowchart of a method for testing a circuit board according to an embodiment of the present disclosure is shown.
[0100] refer to Figure 6The system employs several key technologies: a model building module to acquire images of components and pads on a sample circuit board, creating a 3D model of the board; a data information module to obtain component models, pad models, pad orientations, and pad coordinates from the schematic diagram; a robotic arm obstacle avoidance calculation module to create an obstacle avoidance model for the robotic arm, determining the image acquisition parameters for the circuit board; a physical template extraction module to determine template data for the circuit board; a template generation module to determine sample template data for the circuit board based on its 3D model; a template defect detection module to detect defects in the template data and identify solder areas on the circuit board; and a coordinate and angle calculation module to determine the coordinates and angles at which the robotic arm can test the circuit board, enabling the robotic arm to perform the tests.
[0101] Figure 7 A schematic diagram of the composition structure of a test circuit board apparatus according to an embodiment is shown.
[0102] refer to Figure 7 An embodiment of a circuit board testing device 70 includes: a determining module 701, used to determine template data of the circuit board under test based on component information of the circuit board under test; and determine sample template data corresponding to the circuit board under test; a detection module 702, used to perform template defect detection on the template data of the circuit board under test based on the sample template data, and obtain a target solder area in the non-defect area; and a control module 703, used to control a robotic arm to test the circuit board under test based on the target solder area.
[0103] In some embodiments, the determining module 701 is specifically used to establish an obstacle avoidance model corresponding to the robotic arm, determine the direction of the pads measured by the robotic arm in the obstacle avoidance model as the first dataset, and use the obstacle avoidance model to simulate the robotic arm holding the probe to measure the circuit board under test; acquire images of the circuit board under test based on component information and the first dataset, and perform image processing on the images of the circuit board under test to determine the template data of the circuit board under test; wherein, the template data of the circuit board under test includes: component information, image acquisition parameters and corresponding template images.
[0104] In some embodiments, the determining module 701 is specifically used to determine sample template data based on the three-dimensional model corresponding to the circuit board under test; or to obtain sample template data corresponding to the circuit board under test from the template database.
[0105] In some embodiments, the template database is determined based on the template of the sample circuit board; the device 70 further includes: a database determination module 704, used to acquire images of components and pads on the sample circuit board to obtain sample images; to perform image processing on the sample images to extract sample template images; to annotate the solder areas of the pads in the sample template images to obtain sample template images carrying solder annotation data; and to construct a template database based on the sample template images carrying solder annotation data.
[0106] In some embodiments, the determining module 701 is specifically used to search for sample template data corresponding to the circuit board under test in the template database using component information as an index; wherein, the component information includes: component model, pad model and pad orientation.
[0107] In some embodiments, the determining module 701 is specifically used to take the intersection of the pad directions of the first dataset and the template database to obtain the second dataset; sort the second dataset to obtain the priority dataset, which is used for image acquisition of the circuit board under test.
[0108] In some embodiments, the detection module 702 is specifically used to determine the detected defect area as an obstacle area, which cannot be measured by the robotic arm; and to determine the target solder area based on the solder marking data corresponding to the non-defect area.
[0109] In some embodiments, the detection module 702 is specifically used to determine whether there is solder marking data in the non-defect area. If there is solder marking data in the non-defect area, the solder area directly above the center point of the pad is determined as the target solder area. If there is no solder marking data in the non-defect area, the template data and corresponding sample template data of the circuit board under test are repeatedly extracted and template defect detection is performed until the solder area directly above the center point of the pad is determined. If the solder area directly above the center point of the pad cannot be determined, the non-defect area is determined as an obstacle area.
[0110] In some embodiments, the control module 703 is specifically used to mark the highest coordinate interval in the target solder area and calibrate the coordinate interval; based on the calibrated coordinate interval, it controls the movement of the robotic arm so that the robotic arm can test the circuit board to be tested.
[0111] Figure 8A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable electronic devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0112] like Figure 8 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. The RAM 803 may also store various programs and data required for the operation of the electronic device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0113] Multiple components in electronic device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of displays, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows electronic device 800 to exchange information / data with other electronic devices through computer networks such as the Internet and / or various telecommunications networks.
[0114] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as a method for testing a circuit board. For example, in some embodiments, a method for testing a circuit board may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the method for testing a circuit board described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform a method for testing a circuit board by any other suitable means (e.g., by means of firmware).
[0115] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0116] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0117] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0118] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0119] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0120] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0121] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0122] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise explicitly specified.
[0123] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A method for testing a circuit board, characterized in that, The method includes: Establish an obstacle avoidance model corresponding to the robotic arm, and determine the direction of the pads measured by the robotic arm in the obstacle avoidance model as the first dataset. The obstacle avoidance model is used to simulate the robotic arm holding the probe and measuring the circuit board under test. Based on component information and the first dataset, images of the circuit board under test are acquired, and image processing is performed on the images of the circuit board under test to determine the template data of the circuit board under test. The template data of the circuit board under test includes: component information, image acquisition parameters, and corresponding template image; The method of acquiring images of the circuit board under test based on the first dataset includes: taking the intersection of the pad directions of the first dataset and the template database to obtain a second dataset; sorting the second dataset to obtain a priority dataset, wherein the priority dataset is used for image acquisition of the circuit board under test; Determine the sample template data corresponding to the circuit board under test; Based on the sample template data, template defects are detected in the template data of the circuit board under test; The detected defect area is identified as an obstacle area, which cannot be measured by the robotic arm. Determine whether there is solder marking data in the non-defect area. If there is solder marking data in the non-defect area, then the solder area directly above the center point of the pad is determined as the target solder area. If no solder marking data is found in the non-defect area, the template data and corresponding sample template data of the circuit board under test are repeatedly extracted and template defect detection is performed until the solder area directly above the center point of the pad is determined. If the solder area directly above the center point of the pad cannot be determined, the non-defect area is defined as an obstacle area. Based on the target solder area, the robotic arm is controlled to test the circuit board under test.
2. The method according to claim 1, characterized in that, The step of determining the sample template data corresponding to the circuit board under test includes: The sample template data is determined based on the three-dimensional model corresponding to the circuit board under test; Alternatively, sample template data corresponding to the circuit board under test can be obtained from the template database.
3. The method according to claim 2, characterized in that, The template database is determined based on templates from sample circuit boards; the method further includes: Image acquisition is performed on the components and pads on the sample circuit board to obtain sample images; The sample image is processed to extract the sample template image; The solder areas of the pads in the sample template image are annotated to obtain a sample template image carrying solder annotation data; The template database is constructed based on the sample template images carrying solder annotation data.
4. The method according to claim 3, characterized in that, The step of obtaining the sample template data corresponding to the circuit board under test from the template database includes: Using the component information as an index, the sample template data corresponding to the circuit board under test is searched in the template database; The component information includes: component model, pad model, and pad orientation.
5. The method according to claim 1, characterized in that, The step of controlling the robotic arm to test the circuit board under test based on the target solder area includes: Mark the highest coordinate range in the target solder area and calibrate the coordinate range; The robotic arm is controlled to move based on the calibrated coordinate range so that it can test the circuit board under test.
6. An apparatus for testing circuit boards, characterized in that, The device includes: A determination module is used to establish an obstacle avoidance model corresponding to the robotic arm. The orientation of the pads measured by the robotic arm in the obstacle avoidance model is determined as the first dataset. The obstacle avoidance model is used to simulate the robotic arm holding the probe and measuring the circuit board under test. Based on the component information and the first dataset, images of the circuit board under test are acquired, and image processing is performed on the images of the circuit board under test to determine the template data of the circuit board under test. The template data of the circuit board under test includes: the component information, image acquisition parameters, and the corresponding template image. Sample template data corresponding to the circuit board under test is determined. The detection module is used to perform template defect detection on the template data of the circuit board under test based on the sample template data; to determine the detected defect area as an obstacle area, which cannot be measured by the robotic arm; to determine whether there is solder marking data in the non-defect area; if there is solder marking data in the non-defect area, the solder area directly above the center point of the pad is determined as the target solder area; if there is no solder marking data in the non-defect area, the template data and corresponding sample template data of the circuit board under test are repeatedly extracted and template defect detection is performed until the solder area directly above the center point of the pad is determined; if the solder area directly above the center point of the pad cannot be determined, the non-defect area is determined as an obstacle area. The control module is used to control the robotic arm to test the circuit board under test based on the target solder area; The determining module is further configured to take the intersection of the first dataset and the pad directions in the template database to obtain a second dataset; sort the second dataset to obtain a priority dataset, the priority dataset being used for image acquisition of the circuit board under test.
7. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the test circuit board according to any one of claims 1-5.
8. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method of testing the circuit board according to any one of claims 1-5.