Disclosure of Invention
In order to overcome at least the above-mentioned deficiencies in the prior art, an object of the present invention is to provide a method for assembling a printed circuit board and a related device.
In a first aspect, an embodiment of the present application provides an assembly method of a printed circuit board, which is applied to a robot arm, where a PCB mounting table has a first camera, and the robot arm has a second camera mounted thereon, and the method includes: when the core board to be installed is moved to a first position of the PCB installation table, sending an image acquisition instruction to the first camera to acquire a first image; acquiring a grabbing center of the core board to be installed according to the first image; grabbing the core board to be installed according to the grabbing center; moving the mechanical arm to a second position, and acquiring a second image through the second camera; the second image is used for determining whether a bottom plate to be mounted is arranged on the PCB mounting table or not; matching the second image with a preset image, and judging whether the first mounting point position of the bottom plate to be mounted is in an uninstalled state; the first mounting point position is any one core board mounting point position of the bottom board to be mounted; if yes, the core board to be installed is installed to the first installation point.
In an optional embodiment, the acquiring, according to the first image, a capture center of the core board to be mounted includes: extracting a target feature matched with a first preset feature in the first image; acquiring a first matching area corresponding to the target feature; acquiring the central feature position of the first matching area through a first preset rule; and acquiring the grabbing center according to the center characteristic position.
In an optional embodiment, the first preset rule is a BLOB algorithm, and the obtaining the central feature position of the first matching region according to the first preset rule includes: taking the central point of the first matching area as a first point to be fixed; and determining the central feature position according to the BLOB algorithm and the first point to be fixed.
In an optional embodiment, the bottom plate to be installed has a hole, and the preset image has a standard hole characteristic of the bottom plate to be installed. The matching the second image with a preset image comprises: extracting the first hole characteristics of the bottom plate to be assembled in the second image according to a threshold processing algorithm; optimizing the first hole characteristic according to a BLOB algorithm to obtain a hole characteristic to be matched; and matching the hole characteristics to be matched with the standard hole characteristics.
In an optional embodiment, after the acquiring the capture center of the core board to be mounted according to the first image, the method further includes: receiving a position instruction sent by the PCB mounting table; the position instruction represents the placement information and the position information of the core board to be installed on the PCB installation table; judging whether the core board is grabbed or not according to the position instruction; and if so, executing the step of grabbing the core board to be installed according to the grabbing center.
In an alternative embodiment, after acquiring the first image or the second image, the method further comprises: and performing dynamic compensation on the first image or the second image.
In a second aspect, an embodiment of the present application provides an assembly robot arm for a printed circuit board, the PCB mounting table having a first camera thereon, the robot arm having a second camera mounted thereon, the robot arm including: the device comprises a communication module, a processing module and a control module. The communication module is used for sending an image acquisition instruction to the first camera to acquire a first image when the core board to be mounted is moved to the first position of the PCB mounting table; the processing module is used for acquiring a grabbing center of the core board to be installed according to the first image; the control module is used for controlling the mechanical arm to grab the core board to be installed according to the grabbing center; the second camera is used for acquiring a second image when the mechanical arm moves to a second position; the second image is used for determining whether a bottom plate to be mounted is arranged on the PCB mounting table or not; the processing module is further used for matching the second image with a preset image and judging whether the first mounting point position of the bottom plate to be mounted is in an uninstalled state or not; the first mounting point position is any one core board mounting point position of the bottom board to be mounted; the control module is further used for controlling the mechanical arm to install the core board to be installed to the first installation point when the first installation point is in the uninstalled state.
In an optional embodiment, the communication module is further configured to receive a position instruction sent by the PCB mounting station; the position instruction represents the placement information and the position information of the core board to be installed on the PCB installation table. The processing module is further used for judging whether to grab the core board according to the position instruction.
In a third aspect, an embodiment of the present application provides an assembly system for a printed circuit board, including: a PCB mounting table and a mechanical arm; the PCB mounting table is provided with a first camera, and the mechanical arm is provided with a second camera. The mechanical arm is used for sending an image acquisition instruction to the first camera to acquire a first image when the core board to be mounted is moved to the first position of the PCB mounting table; the mechanical arm is further used for acquiring a grabbing center of the core board to be installed according to the first image; the mechanical arm is further used for grabbing the core board to be installed according to the grabbing center; the second camera is used for acquiring a second image when the mechanical arm moves to a second position; the second image is used for determining whether a bottom plate to be mounted is arranged on the PCB mounting table or not; the mechanical arm is further used for matching the second image with a preset image and judging whether the first mounting point position of the bottom plate to be mounted is in an uninstalled state or not; the first mounting point position is any one core board mounting point position of the bottom board to be mounted; the mechanical arm is further used for installing the core board to be installed to the first installation point when the first installation point is in the uninstalled state.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the assembly method according to any one of the foregoing embodiments.
Compared with the prior art, the method has the following beneficial effects:
the vision combination machine realizes full-automatic assembly of the PCB, greatly saves labor cost and improves the assembly efficiency of the PCB.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present application, it is further noted that, unless expressly stated or limited otherwise, the terms "disposed," "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
In the existing PCB assembly technology, the labor cost is high, the semi-labor efficiency is low, and in order to improve the assembly efficiency of the PCB and reduce the labor cost, an embodiment of the application provides an assembly system of a printed circuit board, as shown in fig. 1, and fig. 1 is a schematic view of the assembly system of the printed circuit board provided by the embodiment of the application. The assembly system includes: a PCB mounting table 20 and a robotic arm 30.
The PCB mounting stage 20 has a first camera 21 thereon, and the robot arm 30 has a second camera 31 mounted thereon.
The robot arm 30 is configured to send an image capturing command to the first camera 21 to capture a first image when the core board to be mounted is moved to the first position 20a of the PCB mounting table 20.
The first camera 21 may adopt a high-resolution video camera to combine with a high-resolution lens with a pixel resolution of 500 ten thousand levels to acquire the first image, so that the acquired first image is clearer and the calculation accuracy is more accurate; it should be noted that the image acquisition card can also ensure that the task of image acquisition and calculation is completed in a short time, and the high-speed operation of the system is ensured.
The mechanical arm 30 is further configured to obtain a grabbing center of the core board to be loaded according to the first image. The robot arm 30 is also used for grasping the core board to be loaded according to the grasping center.
The second camera 31 is used to acquire a second image when the robot arm 30 is moved to the second position 20 b. The second image is used to determine whether there is a board to be mounted on the PCB mounting table 20.
The mechanical arm 30 is further configured to match the second image with a preset image, and determine whether the first mounting point of the to-be-mounted base plate is in an uninstalled state. The first installation point is any core board installation point of the bottom board to be installed.
The robot arm 30 is also configured to mount the core board to be mounted to the first mounting point when the first mounting point is in the unmounted state.
It should be noted that the robotic arm 30 and the first and second positions 20a and 20b of fig. 1 are merely illustrative and should not be construed as limiting the present application. It will be appreciated that the positions of the first camera 21 and the second camera 31 are also schematic.
The mechanical arm is handed to through giving all assembly work and going on, can effectual reduction manpower, improvement production efficiency.
Based on the robot arm 30 in fig. 1, in order to implement the assembly of the PCB, an embodiment of the present invention provides an assembly method of the PCB, as shown in fig. 2, and fig. 2 is a schematic flow chart of the assembly method provided in the embodiment of the present invention. The method comprises the following steps:
and S400, when the core board to be installed is moved to the first position of the PCB installation table, sending an image acquisition instruction to the first camera to acquire a first image.
Step S401, according to the first image, a grabbing center of the core board to be installed is obtained.
And S404, grabbing the core board to be installed according to the grabbing center.
Step S405, the mechanical arm is moved to a second position, and a second image is acquired by a second camera. The second image is used to determine whether there is a board to be mounted on the PCB mounting table.
And S406, matching the second image with a preset image, and judging whether the first mounting point position of the bottom plate to be mounted is in an uninstalled state. The first installation point is any core board installation point of the bottom board to be installed.
If yes, go to step S407; if not, go to step S408.
And step S407, mounting the core board to be mounted to the first mounting point.
And step S408, determining that the first installation point is installed completely.
In order to realize that the core board is installed at all the installation points of the core board of the bottom board to be installed, the installation can be realized through multiple times of installation. For example, when the to-be-installed base plate has 8 core board installation points, the states of the two installation points may be obtained each time the second image is obtained, and the core board installation is performed on the two installation points. It can be understood that at least one core board installation point can be installed at each time, and then the assembling of the to-be-installed base plate and the to-be-installed core board is achieved.
The PCB board is completely assembled by a machine, so that the problems of low yield and low efficiency caused by human errors can be greatly reduced.
It should be understood that although the embodiments of the present application use a robot arm, it should not be construed as limiting the present application, and a robot, a mounting station having a robot arm, or other mechanical equipment that can implement the assembly method of the present application should fall within the scope of the present application.
It can be understood that, in order to judge whether the core board to be installed is on the PCB mounting table, a sensor may be disposed on the PCB mounting table, and the data collected by the sensor is used to judge whether the core board to be installed is on the PCB mounting table.
It is contemplated that in order to determine whether the core board to be loaded and the core board to be loaded are assembled in place after the completion of the installation, the movement of the robot arm may be used to acquire an image using the second camera, and whether the installation has been completed may be determined using a method similar to the above-described steps S405 and S406. It can be understood that when all core board mounting points of the bottom board to be mounted are mounted, the mechanical arm can also move the mounted PCB away from the PCB mounting table.
In an alternative embodiment, in order to determine the grabbing center of the core board to be assembled, so that the robot arm can grab the core board to be assembled smoothly, a possible implementation manner is given on the basis of fig. 2, for example, fig. 3, and fig. 3 is a schematic flow chart of another assembly method provided in the embodiment of the present application. The step S401 includes:
and S4011, extracting a target feature matched with the first preset feature in the first image.
Step S4012, a first matching region corresponding to the target feature is obtained.
Step S4013, obtaining a central feature position of the first matching region according to a first preset rule.
And S4014, acquiring a capture center according to the center characteristic position.
It will be appreciated that different first preset features may be provided for different core boards to be assembled, so as to finally determine a grabbing center for the robot arm 30 to grab the core boards to be assembled smoothly.
The mechanical arm can be without specifically limiting the position of the core board to be installed on the PCB mounting table by grabbing the center and waiting to install the nominal size of the core board, so that the assembly efficiency of the PCB is improved.
In an alternative embodiment, in order to determine the capture center more accurately, taking the first preset rule as a BLOB algorithm as an example, the process of implementing the step S4013 may be: taking the central point of the first matching area as a first point to be fixed; and determining the central feature position according to the BLOB algorithm and the first point to be fixed.
For example, after acquiring the first image, the first image is processed, and a capture center of the core board to be installed is calculated, where the specific processing procedure may be: selecting a certain characteristic with obvious contrast (the characteristic selection should be the principle that the contrast is obvious and the characteristic is unique) of the core board to be installed to establish a matching template, and setting a binarization processing area (namely a first matching area) by taking the center of the established template as an origin of a reference coordinate system; the binarization processing is to preliminarily acquire and calculate the feature of the capture center (i.e. the center feature position), so the region setting should select the position capable of acquiring the center feature, and after the binarization processing is performed, the BLOB algorithm is used again to extract the accurate target feature (the primarily extracted feature is filtered for the second time by setting the filtering conditions of the area, the length, the rectangle degree, and the like), so as to acquire the capture center according to the target feature.
The precise target feature is extracted by using binarization processing and a BLOB algorithm. And then acquire the centre of snatching of waiting to adorn nuclear core plate, be favorable to improving the packaging efficiency of PCB board.
In an optional embodiment, in order to improve the yield of the assembly, taking the example that the substrate to be assembled has holes and the preset image has standard hole features of the substrate to be assembled as an example, the matching of the second image and the preset image in the step S406 includes: extracting the first hole characteristic of the bottom plate to be installed in the second image according to a threshold processing algorithm; optimizing the first hole characteristic according to a BLOB algorithm to obtain a hole characteristic to be matched; and matching the hole characteristics to be matched with the standard hole characteristics.
For example, when the to-be-assembled bottom plate is provided with two fixed rows of holes, a threshold processing algorithm is used for extracting hole features preliminarily, a BLOB algorithm is used for extracting accurate target features (the features extracted for the first time are filtered for the second time by setting filtering conditions such as area, length and rectangle degree), an assembly center is obtained by calculation according to the target features, and meanwhile the assembly center is matched with standard hole features in a preset image, so that the assembly yield is improved.
In an alternative embodiment, in order to realize the grabbing of the core board to be mounted, a possible implementation manner is given on the basis of fig. 2, for example, fig. 4 is a schematic flow chart of another assembly method provided in the embodiment of the present application. After step S401, the method further comprises:
and step S402, receiving a position command sent by the PCB mounting table.
The position instruction represents the placement information and the position information of the core board to be mounted on the PCB mounting table.
And S403, judging whether the core board is grabbed or not according to the position instruction.
If yes, go to step S404.
For example, after obtaining the core board capture center, the PCB mounting table may send a position command (e.g., "1, 999.999, 999.999, 999.999") in a fixed format to the robot arm through socket communication, and the robot arm determines whether to capture the core board according to the sent command, where 1 represents the material, and the next several bits represent the abscissa (X), the ordinate (Y), and the angle information (a), respectively.
Through the position command interaction of arm and PCB mount table, can realize treating snatching of treating dress nuclear core plate, improve the packaging efficiency of PCB board then.
In an alternative embodiment, the positioning accuracy is reduced due to the influence of unstable lighting conditions or unstable equipment, and in order to obtain a clearer image, after the first image or the second image is obtained, dynamic compensation may be performed on the first image or the second image.
For example, an algorithm for dynamic compensation may be added to the program in consideration of the influence of the above factors. Specifically, after the image is acquired each time, the change value is added to the target point according to the position change of the Mark point fixed in the image, and the change value is sent to the mechanical arm, so that a clearer acquired image is acquired.
To implement the above assembly method, please refer to fig. 5 for the robot arm 30, and fig. 5 is a block diagram illustrating an assembly robot arm for a printed circuit board according to an embodiment of the present disclosure. The robotic arm 30 includes a communication module 32, a processing module 33, and a control module 34.
The communication module 32 is configured to send an image acquisition instruction to the first camera 21 to acquire a first image when the core board to be mounted is moved to the first position of the PCB mounting table.
The processing module 33 is configured to obtain a capture center of the core board to be loaded according to the first image.
The control module 34 is configured to control the robot arm 30 to grasp the core board to be loaded according to the grasping center.
The second camera 31 is used to acquire a second image when the robot arm 30 is moved to the second position.
The second image is used to determine whether there is a board to be mounted on the PCB mounting table 20.
The processing module 33 is further configured to match the second image with a preset image, and determine whether the first mounting point of the to-be-mounted base plate is in an unmounted state.
The first installation point is any core board installation point of the bottom board to be installed.
The control module 34 is further configured to control the robot arm 30 to mount the core board to be mounted to the first mounting point when the first mounting point is in the unmounted state.
The PCB is fully automatically assembled through the vision combination machine, labor cost is greatly saved, and the assembly efficiency of the PCB is improved.
In an alternative embodiment, in order to realize the grabbing of the core board to be installed, the communication module 32 is further configured to receive a position command sent by the PCB mounting station. The position instruction represents the placement information and the position information of the core board to be mounted on the PCB mounting table. The processing module 33 is further configured to determine whether to capture the core board according to the position instruction.
It is understood that the communication module 32, the processing module 33, the control module 34 and the related devices provided in the present application may cooperatively implement the steps S400 to S408 described above.
The processing module 33 may be an integrated circuit chip having signal processing capability. The Processing module 33 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc.
By using the assembling method and the related device provided by the embodiment of the application, 1.5 of labor can be saved, the yield of assembled finished products is improved, and the assembling efficiency is improved by at least 10% compared with the prior art (semi-automation).
The embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the assembling method according to any one of the foregoing embodiments.
The computer-readable storage medium may be, but is not limited to, various media that can store program codes, such as a usb disk, a removable hard disk, a magnetic or optical disk, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an erasable Read Only Memory (EPROM), an electrically erasable Read Only Memory (EEPROM), and the like.
In summary, the present application provides a method and a related apparatus for assembling a printed circuit board, and relates to the field of automatic assembly of printed circuit boards. The assembling method is applied to a mechanical arm, a first camera is arranged on a PCB mounting table, and a second camera is mounted on the mechanical arm, and the method comprises the following steps: when the core board to be installed is moved to a first position of the PCB installation table, sending an image acquisition instruction to a first camera to acquire a first image; acquiring a grabbing center of the core board to be installed according to the first image; grabbing the core board to be installed according to the grabbing center; moving the mechanical arm to a second position, and acquiring a second image through a second camera; the second image is used for determining whether a bottom plate to be mounted is arranged on the PCB mounting table or not; matching the second image with a preset image, and judging whether the first mounting point position of the bottom plate to be mounted is in an uninstalled state; and if so, installing the core board to be installed to the first installation point. The vision combination machine realizes full-automatic assembly of the PCB, greatly saves labor cost and improves the assembly efficiency of the PCB.
The above description is only for various embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present application, and all such changes or substitutions are included in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.