Printed circuit board assembling and locking method, device, equipment and medium
By identifying the printed circuit board image data and generating the optimal locking path, combined with torque monitoring and control, the automatic locking of printed circuit board assembly is realized, solving the problem of locking time in traditional methods, and improving production efficiency and product quality .
Patent Information
- Application Number
- CN202411307352.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-19
AI Technical Summary
During the assembly process of printed circuit boards, traditional methods require manual or machine locking, which takes a long time and poor adaptability, resulting in low production efficiency and product quality.
By acquiring printed circuit board image data, identifying screw hole positions, generating the optimal locking path, controlling the electric batch head position using the mobile platform, and monitoring the torque sensor data during the locking process, automatically adjusting the applied torque to lock the screw.
It improves the automation level of printed circuit board assembly and production, reduces labor costs, improves production efficiency and product quality, and solves the problem of locking time in traditional methods.
Smart Images

Figure CN119115502A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of circuit board manufacturing, and in particular to a method, device, equipment and medium for assembling and locking a printed circuit board. Background Art
[0002] In the process of printed circuit board assembly (PCBA), some parts are involved in assembly, such as small backplane, large backplane, heat sink, etc., which need to be screwed at the connection. In the relevant technical solutions, manual screwing is usually performed or the screwing platform is used to teach the screwing points for each model, which is time-consuming and has poor adaptability to the diverse printed circuit board assembly designs. Summary of the invention
[0003] The purpose of the present invention is to provide a printed circuit board assembly locking method, device, equipment and medium, which can improve the automation level of printed circuit board assembly production, reduce labor costs, and improve production efficiency and product quality.
[0004] In order to solve the above technical problems, the present invention provides a printed circuit board assembly locking method, the method comprising:
[0005] Acquire image data of a printed circuit board to be tested, and identify the positions of screw holes to be fastened in the image data of the printed circuit board to be tested;
[0006] Generate an optimal locking path according to the identified screw hole positions to be locked;
[0007] Using the generated optimal locking path to control the movement of the mobile platform to adjust the position of the electric screwdriver bit and perform locking;
[0008] During the locking process, the data of the torque sensor is monitored, and the electric screwdriver bit is controlled to adjust the applied torque according to the monitored data so as to tighten the screw.
[0009] In a first aspect, in the printed circuit board assembly and locking method provided by the present invention, before acquiring the image data of the printed circuit board to be tested, the method further comprises:
[0010] Training the hole position recognition model;
[0011] Correspondingly, identifying the positions of the holes of the screws to be fastened in the image data of the printed circuit board to be tested includes:
[0012] Inputting the image data of the printed circuit board to be tested into the trained hole position recognition model, and outputting the pixel coordinates and matching degrees of a plurality of holes to be screwed in the image data of the printed circuit board to be tested;
[0013] Correspondingly, according to the identified screw hole positions to be fastened, an optimal fastening path is generated, including:
[0014] An optimal locking path is generated according to the pixel coordinates and matching degree of each screw hole to be locked.
[0015] On the other hand, in the printed circuit board assembly and locking method provided by the present invention, training the hole position recognition model includes:
[0016] Collecting a printed circuit board image data sample set; the printed circuit board image data sample includes various types of historical printed circuit board image data under different illuminations and angles;
[0017] Performing data annotation of screw hole positions on the printed circuit board image data sample set;
[0018] The hole position recognition model is trained using the labeled printed circuit board image data sample set.
[0019] On the other hand, in the above-mentioned printed circuit board assembly locking method provided by the present invention, an optimal locking path is generated according to the pixel coordinates and matching degree of each of the screw holes to be locked, including:
[0020] According to the transformation matrix between the mobile platform coordinate system and the image coordinate system, the pixel coordinates of each of the screw holes to be fastened are converted into the actual coordinate values of each of the screw holes to be fastened in the mobile platform coordinate system;
[0021] The optimal locking path is generated by using the actual coordinate value of each of the screw holes to be locked on the coordinate system of the mobile platform and the matching degree of each of the screw holes to be locked.
[0022] On the other hand, in the above-mentioned printed circuit board assembly locking method provided by the present invention, the optimal locking path is generated by using the actual coordinate value of each of the screw holes to be locked on the coordinate system of the mobile platform and the matching degree of each of the screw holes to be locked, including:
[0023] Obtaining a weight of each of the screw holes to be fastened according to the matching degree of each of the screw holes to be fastened;
[0024] Taking the zero point as the starting point, calculating the Euclidean distance of each of the screw holes to be fastened according to the actual coordinate value of each of the screw holes to be fastened on the coordinate system of the mobile platform;
[0025] According to the Euclidean distance of each of the screw holes to be fastened and the weight of each of the screw holes to be fastened, the distance degree of each of the screw holes to be fastened is calculated using the following formula:
[0026] ;
[0027] in, is the distance degree, is the Euclidean distance, is the weight;
[0028] The calculated distances of the screw holes to be fastened are sorted, and the screw hole to be fastened corresponding to the largest distance is obtained and used as the first fastening point;
[0029] Taking the first point as the starting point, according to the actual coordinate values of the remaining screw holes to be fastened except the screw hole to be fastened corresponding to the first point on the coordinate system of the moving platform, the Euclidean distances of the remaining screw holes to be fastened are calculated;
[0030] Calculate the distances of the remaining screw holes to be fastened according to the Euclidean distances of the remaining screw holes to be fastened and the weights of the remaining screw holes to be fastened;
[0031] The distances of the remaining screw holes to be fastened are sorted, and the screw hole to be fastened corresponding to the largest distance is obtained and used as the second fastening point;
[0032] The steps of calculating the Euclidean distance and the distance degree, and the sorting step are repeated until each locked point is obtained to generate an optimal locking path.
[0033] On the other hand, in the printed circuit board assembly locking method provided by the present invention, it also includes:
[0034] After locking, the screw holes to be locked in the image data of the printed circuit board to be tested are enlarged;
[0035] receiving new image data of a printed circuit board to be tested;
[0036] Comparing the new image data of the printed circuit board to be tested with the image data of the printed circuit board to be tested after the circle is expanded;
[0037] If all are inconsistent, it is determined that the locking is completed; if partly consistent, it is determined that the locking is partially incomplete; if all are consistent, it is determined that the locking is incomplete.
[0038] On the other hand, in the printed circuit board assembly locking method provided by the present invention, it also includes:
[0039] After locking, receiving new image data of the printed circuit board to be tested;
[0040] Inputting new image data of the printed circuit board to be tested into the trained screw recognition model, and outputting the recognition result of the screw hole position in the new image data of the printed circuit board to be tested;
[0041] If screws are identified at all screw holes, it is determined that the locking is completed; if screws are not identified at some screw holes, it is determined that the locking is partially incomplete; if screws are not identified at all screw holes, it is determined that the locking is incomplete.
[0042] In order to solve the above technical problems, the present invention also provides a printed circuit board assembly locking device, the device comprising:
[0043] A hole position identification module is used to obtain the image data of the printed circuit board to be tested, and identify the hole positions of the screws to be fastened in the image data of the printed circuit board to be tested;
[0044] A path generation module, used for generating an optimal locking path according to the identified screw hole positions to be locked;
[0045] A mobile control module, used to control the movement of the mobile platform using the generated optimal locking path, so as to adjust the position of the electric screwdriver bit and perform locking;
[0046] The monitoring control module is used to monitor the data of the torque sensor during the locking process, and control the electric screwdriver bit to adjust the applied torque according to the monitoring data so as to tighten the screw.
[0047] In order to solve the above technical problems, the present invention also provides a printed circuit board assembly locking device, the device comprising:
[0048] An image acquisition component is used to photograph the printed circuit board to be tested and obtain image data of the printed circuit board to be tested;
[0049] The edge server is used to obtain the image data of the printed circuit board to be tested, identify the screw holes to be fastened in the image data of the printed circuit board to be tested; generate an optimal fastening path according to the identified screw holes to be fastened, and control the movement of the mobile platform by using the generated optimal fastening path; and monitor the data of the torque sensor during the fastening process, and control the electric screwdriver according to the monitoring data;
[0050] The mobile platform is used to adjust the position of the electric screwdriver bit during movement;
[0051] The electric screwdriver bit is used for performing locking and also for adjusting the applied torque to tighten the screw.
[0052] In order to solve the above technical problem, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above printed circuit board assembly locking method are implemented.
[0053] It can be seen from the above technical scheme that a printed circuit board assembly locking method provided by the present invention includes: acquiring image data of the printed circuit board to be tested, identifying the screw hole positions to be locked in the image data of the printed circuit board to be tested; generating an optimal locking path according to the identified screw hole positions to be locked; using the generated optimal locking path to control the movement of the mobile platform to adjust the position of the electric screwdriver bit to perform locking; monitoring the data of the torque sensor during the locking process, and controlling the electric screwdriver bit to adjust the applied torque according to the monitoring data to tighten the screw.
[0054] The beneficial effect of the present invention lies in that the above-mentioned printed circuit board assembly locking method provided by the present invention first identifies the screw hole positions to be locked in the image data of the printed circuit board to be tested, generates an optimal locking path according to the screw hole positions to be locked, uses the optimal locking path to control the movement of the mobile platform, and then adjusts the position of the electric screwdriver bit, monitors the data of the torque sensor during the locking process, and then controls the electric screwdriver bit to adjust the applied torque to achieve the locking of the screws, which can improve the automation level of printed circuit board assembly production, solve the problem of time-consuming manual locking or machine locking teaching points in traditional solutions, reduce labor costs, and improve production efficiency and product quality.
[0055] In addition, the present invention also provides a corresponding printed circuit board assembly locking device, a printed circuit board assembly locking equipment and a computer-readable storage medium for the printed circuit board assembly locking method, which have the same or corresponding technical features as the above-mentioned printed circuit board assembly locking method and have the same effects as above. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0057] Figure 1 A flow chart of a printed circuit board assembly locking method provided by an embodiment of the present invention;
[0058] Figure 2 A schematic diagram of the structure of a printed circuit board assembly locking device provided by an embodiment of the present invention;
[0059] Figure 3 A schematic diagram of the structure of a calibration plate provided in an embodiment of the present invention;
[0060] Figure 4 A schematic diagram of the structure of a printed circuit board assembly locking device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0061] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Figure 1 A flowchart of a printed circuit board assembly locking method provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method includes:
[0063] S101, acquiring image data of a printed circuit board to be tested, and identifying screw hole positions to be fastened in the image data of the printed circuit board to be tested.
[0064] Figure 2 The schematic diagram of the structure of the printed circuit board assembly locking device provided by the embodiment of the present invention. Figure 2 As shown, the printed circuit board assembly locking device includes an image acquisition component 1 (such as a camera), an edge server 2, a mobile platform 3 (such as an XY mobile platform) composed of two servo click systems, and a set of intelligent electric screwdrivers 4 is fixed on the mobile platform 3. Among them, the image acquisition component 1 can be a 12-megapixel camera. Of course, the pixel of the camera can be determined according to the actual situation and is not limited here.
[0065] When the staff places the printed circuit board to be tested in the printed circuit board assembly locking device and presses a button, the device starts, and the image acquisition component 1 starts taking pictures. In the process of executing step S101, the image acquisition component 1 can capture the image of the printed circuit board to be tested; the edge server 2 can obtain the image data of the printed circuit board to be tested captured by the image acquisition component 1, and automatically identify the screw holes to be locked in the image data of the printed circuit board to be tested according to the image data of the printed circuit board to be tested.
[0066] It should be noted that the execution subject of the printed circuit board assembly locking method of the present invention may be an edge server 2, and the functions of the edge server 2 may include edge computing, servo control, data feedback, etc. The entire control system of the edge server 2 may be provided by a set of upper computer software, which controls the servo movement through the axis card, receives the camera image data, identifies the screw hole position in the image data, controls the movement of the mobile stage, and performs locking.
[0067] S102: Generate an optimal locking path according to the identified screw hole positions to be locked.
[0068] In implementation, the edge server 2 can perform corresponding calculations on the identified screw holes to be fastened, and automatically generate an optimal fastening path, thereby significantly reducing the equipment setup time.
[0069] S103, using the generated optimal locking path to control the movement of the mobile platform to adjust the position of the electric screwdriver bit and perform locking.
[0070] It should be noted that the electric screwdriver bit is a component installed on the smart electric screwdriver 4. In the process of executing step S103, the edge server 2 can use the generated optimal locking path to control the movement of the mobile platform 3. As the mobile platform 3 moves, the electric screwdriver bit also moves, and then the electric screwdriver bit is adjusted to the most suitable locking position, reducing the locking adjustment time.
[0071] S104, monitoring the data of the torque sensor during the locking process, and controlling the electric screwdriver bit to adjust the applied torque according to the monitoring data to tighten the screw.
[0072] During the execution of step S104, the edge server 2 can monitor the data of the torque sensor during operation, and control the smart electric screwdriver 4 to provide power to adjust parameters such as torque, speed, and angle based on the monitoring data, and then accurately apply torque to the screw through the electric screwdriver head to achieve precise operation of the screw and ensure that the screw is tightened.
[0073] In the above-mentioned printed circuit board assembly locking method provided by an embodiment of the present invention, the screw hole positions to be locked in the image data of the printed circuit board to be tested are first identified, and an optimal locking path is generated according to the screw hole positions to be locked. The optimal locking path is used to control the movement of the mobile platform, and then the position of the electric screwdriver bit is adjusted. During the locking process, the data of the torque sensor is monitored, and then the electric screwdriver bit is controlled to adjust the applied torque to achieve the locking of the screws. This can improve the automation level of printed circuit board assembly production, solve the problem of time-consuming manual locking or machine locking teaching points in traditional solutions, reduce labor costs, and improve production efficiency and product quality.
[0074] Furthermore, in the specific implementation, in the printed circuit board assembly and fastening method provided in the embodiment of the present invention, before executing step S101 to obtain the image data of the printed circuit board to be tested, it can also include: training a hole position recognition model. The hole position recognition model is used to recognize the screw hole positions in the image data.
[0075] Furthermore, in a specific implementation, the training of the hole position recognition model in the above steps may specifically include: first, collecting a sample set of printed circuit board image data; the printed circuit board image data samples include various types of historical printed circuit board image data under different lighting and angles; then, annotating the data of the screw hole positions of the printed circuit board image data sample set; finally, using the annotated printed circuit board image data sample set to train the hole position recognition model.
[0076] In practice, the present invention can collect sample sets of printed circuit board image data containing screw hole position annotations. These sample sets include different types of historical printed circuit board image data under different lighting and angles. It is best to use an acquisition component with the same parameters as the image acquisition component of the printed circuit board assembly locking device for shooting. After the data is collected, the data can be annotated to ensure that the screw holes in each image are accurately annotated. An annotation tool such as LabelImg (an image annotation tool) can be used to manually annotate the pixel coordinates of the screw holes.
[0077] After labeling, data preprocessing can be performed, such as adjusting the image size and normalizing the pixel value (dividing by 255) to increase the generalization ability of the model. The present invention can put the preprocessed data into a deep learning framework for training. Here, the deep learning framework can use TensorFlow (an end-to-end open source machine learning platform), and the training model uses VGGNet (Visual Geometry Group Network, a deep convolutional neural network). After the training is completed, the trained model is used as a hole position recognition model and saved as a file for use in the edge server.
[0078] Correspondingly, step S101 identifies the screw holes to be locked in the image data of the printed circuit board to be tested, which may specifically include: inputting the image data of the printed circuit board to be tested into a trained hole recognition model, and outputting the pixel coordinates and matching degree of multiple screw holes to be locked in the image data of the printed circuit board to be tested. In this way, the screw holes to be locked are identified by using technologies such as machine vision and deep learning, which is efficient and time-saving. The matching degree here is equivalent to the accuracy of each identified screw hole compared with the historical screw hole, that is, the probability value (i.e., the degree of recognition) that the identified screw hole may be the real screw hole.
[0079] Correspondingly, step S102 generates an optimal locking path according to the identified screw holes to be locked, which may specifically include: generating the optimal locking path according to the pixel coordinates and matching degree of each screw hole to be locked.
[0080] Furthermore, in a specific implementation, the above steps generate an optimal locking path based on the pixel coordinates and matching degree of each screw hole to be locked, which may specifically include: first, according to the transformation matrix between the mobile platform coordinate system and the image coordinate system, the pixel coordinates of each screw hole to be locked are converted into the actual coordinate value of each screw hole to be locked in the mobile platform coordinate system; then, the optimal locking path is generated using the actual coordinate value of each screw hole to be locked in the mobile platform coordinate system and the matching degree of each screw hole to be locked.
[0081] In implementation, before generating the optimal locking path according to the pixel coordinates and matching degree of each screw hole to be locked, the present invention may further include: calculating the transformation matrix between the mobile platform coordinate system and the image coordinate system. The image coordinate system may be a camera coordinate system. Figure 3 The schematic diagram of the structure of the calibration board provided in the embodiment of the present invention is shown in FIG. Figure 3 As shown, the present invention can first use the image acquisition component 1 to obtain the center coordinates of the nine circles of the calibration plate, and then control the servo to move the electric heads 4 of the intelligent electric screwdriver to the center cross positions of the circles, record the coordinates of the nine points, input them into the image processing software, call vector_to_hom_mat2d (an operator for converting a two-dimensional vector into a two-dimensional homogeneous transformation matrix), and generate a transformation matrix. The present invention adopts nine-point calibration, and the purpose of calibration is to calculate the transformation matrix T between the mobile platform coordinate system and the image coordinate system:
[0082] ;
[0083] ;
[0084] in, For the pixel coordinates of each screw hole to be fastened, The actual coordinate value of each screw hole to be fastened on the mobile platform coordinate system, is the element in the transformation matrix T. In this way, the calibration relationship is converted into the actual point coordinates, the data is more accurate, and then the optimal locking path is generated according to the path generation algorithm to ensure that each point can be locked and the running path is the shortest.
[0085] Further, in the specific implementation, in the above-mentioned printed circuit board assembly locking method provided by the embodiment of the present invention, the above-mentioned steps use the actual coordinate value of each screw hole to be locked in the mobile platform coordinate system and the matching degree of each screw hole to be locked to generate the optimal locking path, which may specifically include: obtaining the weight of each screw hole to be locked according to the matching degree of each screw hole to be locked; taking the zero point as the starting point, according to the actual coordinate value of each screw hole to be locked in the mobile platform coordinate system, calculating the Euclidean distance of each screw hole to be locked; according to the Euclidean distance of each screw hole to be locked and the weight of each screw hole to be locked, using the following formula to calculate the distance degree of each screw hole to be locked:
[0086] ;
[0087] in, is the distance degree, is the Euclidean distance, is the weight.
[0088] Next, the calculated distances of the screw holes to be locked are sorted, and the screw hole to be locked corresponding to the largest distance is obtained and used as the first point for locking; the first point is taken as the starting point, and the Euclidean distances of the remaining screw holes to be locked are calculated according to the actual coordinate values of the remaining screw holes to be locked except the screw hole to be locked corresponding to the first point in the coordinate system of the mobile platform; the distances of the remaining screw holes to be locked are calculated according to the Euclidean distances of the remaining screw holes to be locked and the weights of the remaining screw holes to be locked; the distances of the remaining screw holes to be locked are sorted, and the screw hole to be locked corresponding to the largest distance is obtained and used as the second point for locking; the steps of calculating the Euclidean distance and the distance, as well as the sorting steps, are repeated until each point for locking is obtained to generate the optimal locking path.
[0089] In practice, the present invention obtains the image data of the printed circuit board to be tested by photographing with the image acquisition component, and puts it into the pre-trained hole recognition model, which will identify the pixel position and matching degree of the screw holes to be locked in the image data. Then, the actual coordinate value of each screw hole to be locked on the coordinate system of the mobile platform (such as the XY mobile platform) is obtained according to the calibration relationship; and the weight of each screw hole to be locked is obtained according to the matching degree of each screw hole to be locked.
[0090] The actual coordinate value of each screw hole to be fastened on the XY mobile platform coordinate system is put into the algorithm calculation. Taking the zero point as the starting point, the Euclidean distance of each screw hole to be fastened is calculated using the following formula: :
[0091] ;
[0092] in, The actual coordinate value of each screw hole to be fastened in the coordinate system of the mobile platform. These Euclidean distances are combined with the weight of each screw hole to be fastened to calculate the distance degree of each screw hole to be fastened. . All the distances calculated are Sort them and get the screw hole position with the largest distance to be locked and use it as the first point for locking. That is, the screw hole position with the highest priority to be locked is used as the first point. Use this point as the starting point and use the following formula to calculate the Euclidean distance of the remaining screw holes to be locked. :
[0093] ;
[0094] in, is the actual coordinate value of the first point, The actual coordinate values of the remaining screw holes to be fastened in the coordinate system of the mobile platform.
[0095] Then calculate the distances of the remaining screw holes to be locked; sort the distances of the remaining screw holes to be locked, obtain the screw hole to be locked corresponding to the largest distance and use it as the second point for locking; repeat the steps of calculating the Euclidean distance and distance, as well as the sorting step, until each point of locking is obtained, so as to obtain the locking order and generate the optimal locking path. The present invention controls the mobile platform according to the coordinates of the points corresponding to the optimal locking path, and can move the electric head to the specified position for locking. After the locking is completed, the applied torque can be monitored and adjusted in real time to ensure that there is no problem of locking floating height.
[0096] It should be noted that the present invention can verify the locking result and provide feedback information to ensure that each screw is correctly tightened to avoid the problem of missed locking or locking failure. Specifically, the present invention can include the following two implementation methods:
[0097] In the first embodiment, in a specific implementation, the above-mentioned printed circuit board assembly locking method provided by the embodiment of the present invention may also include: after locking, expanding the screw holes to be locked in the image data of the printed circuit board to be tested; receiving new image data of the printed circuit board to be tested; comparing the new image data of the printed circuit board to be tested with the image data of the printed circuit board to be tested after the expansion; if all are inconsistent, it is determined that the locking is completed; if partly consistent, it is determined that the locking is partially incomplete; if all are consistent, it is determined that the locking is incomplete.
[0098] In practice, when all points are locked, the image acquisition component will take a second photo. Since the image acquisition component is fixed, the locking points in the photo before locking are expanded, that is, a circle is drawn with the coordinate as the center and 60px as the diameter. These circles are directly compared with the second photo to see if there is any inconsistency with the previous photo. If there is inconsistency, the task is locked. If there is a consistency, it is considered not locked. In this way, the image acquisition component takes photos again to feedback whether all the screw holes are locked, which improves the overall quality and reliability of the product. After completion, the staff can be prompted to take the board.
[0099] In the second embodiment, in specific implementation, the above-mentioned printed circuit board assembly locking method provided by the embodiment of the present invention may also include: after locking, receiving new printed circuit board image data to be tested; inputting the new printed circuit board image data to be tested into a trained screw recognition model, and outputting the recognition result of the screw hole positions in the new printed circuit board image data to be tested; if screws are recognized at all screw holes, it is determined that the locking is completed; if screws are not recognized at some screw holes, it is determined that the locking is partially incomplete; if screws are not recognized at all screw holes, it is determined that the locking is not completed.
[0100] In implementation, when all points are locked, the deep learning method can be used again to train a screw recognition model for identification. When all screws are identified at all points, it is considered that all locking is completed without any missed locking issues, thereby improving the overall quality and reliability of the product.
[0101] In the above embodiments, the printed circuit board assembly locking method is described in detail, and the present invention also provides embodiments corresponding to the printed circuit board assembly locking device and the printed circuit board assembly locking equipment. It should be noted that the present invention describes the embodiments of the device part from two perspectives, one is based on the functional module perspective, and the other is based on the hardware perspective.
[0102] Figure 4 This is a schematic diagram of the structure of the printed circuit board assembly locking device provided by an embodiment of the present invention. This embodiment is based on the perspective of functional modules, such as Figure 4 As shown, the device comprises:
[0103] The hole position identification module 10 is used to obtain the image data of the printed circuit board to be tested and identify the hole positions of the screws to be fastened in the image data of the printed circuit board to be tested;
[0104] A path generation module 11 is used to generate an optimal locking path according to the identified screw hole positions to be locked;
[0105] The mobile control module 12 is used to control the movement of the mobile platform by using the generated optimal locking path to adjust the position of the electric screwdriver bit and perform locking;
[0106] The monitoring control module 13 is used to monitor the data of the torque sensor during the locking process, and control the electric screwdriver bit to adjust the applied torque according to the monitoring data so as to tighten the screw.
[0107] In the printed circuit board assembly locking device provided in the embodiment of the present invention, the interaction of the four modules can first identify the screw hole positions to be locked in the image data of the printed circuit board to be tested, generate an optimal locking path according to the screw hole positions to be locked, use the optimal locking path to control the movement of the mobile platform, and then adjust the position of the electric screwdriver bit, monitor the data of the torque sensor during the locking process, and then control the electric screwdriver bit to adjust the applied torque to achieve the locking of the screws. This can improve the automation level of printed circuit board assembly production, solve the problem of time-consuming manual locking or machine locking teaching points in traditional solutions, reduce labor costs, and improve production efficiency and product quality.
[0108] Since the embodiments of the device part correspond to the embodiments of the method part, the embodiments of the device part refer to the description of the embodiments of the method part, and are not described here. And it has the same beneficial effects as the above-mentioned printed circuit board assembly locking method.
[0109] Furthermore, in a specific implementation, the printed circuit board assembly locking device provided in the embodiment of the present invention may further include:
[0110] The model training module is used to collect a sample set of printed circuit board image data; the printed circuit board image data samples include various types of historical printed circuit board image data under different lighting and angles; the printed circuit board image data sample set is annotated with data of screw hole positions; and the hole position recognition model is trained using the annotated printed circuit board image data sample set.
[0111] Furthermore, in a specific implementation, in the above-mentioned printed circuit board assembly locking device provided in an embodiment of the present invention, the hole position recognition module 10 can be specifically used to input the image data of the printed circuit board to be tested into a trained hole position recognition model, and output the pixel coordinates and matching degrees of multiple screw holes to be locked in the image data of the printed circuit board to be tested.
[0112] Correspondingly, the path generation module 11 can be specifically used to generate an optimal locking path according to the pixel coordinates and matching degree of each screw hole to be locked.
[0113] The path generation module 11 may specifically include:
[0114] A coordinate transformation unit, used for transforming the pixel coordinates of each screw hole to be fastened into the actual coordinate value of each screw hole to be fastened in the mobile platform coordinate system according to the transformation matrix between the mobile platform coordinate system and the image coordinate system;
[0115] The path generation unit is used to generate an optimal locking path by using the actual coordinate value of each screw hole to be locked on the coordinate system of the mobile platform and the matching degree of each screw hole to be locked.
[0116] Among them, the path generation unit can be specifically used to obtain the weight of each screw hole to be locked according to the matching degree of each screw hole to be locked; taking the zero point as the starting point, according to the actual coordinate value of each screw hole to be locked in the coordinate system of the mobile platform, calculate the Euclidean distance of each screw hole to be locked; according to the Euclidean distance of each screw hole to be locked and the weight of each screw hole to be locked, use the following formula to calculate the distance degree of each screw hole to be locked; sort the calculated distance degrees of the screw holes to be locked, obtain the screw hole to be locked corresponding to the largest distance degree and use it as the first point of locking; take the first point as Taking the point as the starting point, according to the actual coordinate values of the remaining screw holes to be locked except the screw hole to be locked corresponding to the first point in the coordinate system of the mobile platform, the Euclidean distances of the remaining screw holes to be locked are calculated; according to the Euclidean distances of the remaining screw holes to be locked and the weights of the remaining screw holes to be locked, the distance degrees of the remaining screw holes to be locked are calculated; the distance degrees of the remaining screw holes to be locked are sorted, and the screw hole to be locked corresponding to the largest distance degree is obtained and used as the second point to be locked; the steps of calculating the Euclidean distance and the distance degree, and the step of sorting are repeated until each point to be locked is obtained, so as to generate the optimal locking path.
[0117] Furthermore, in a specific implementation, the printed circuit board assembly locking device provided in the embodiment of the present invention may further include:
[0118] The first verification module is used to expand the screw holes to be locked in the image data of the printed circuit board to be tested after locking; receive new image data of the printed circuit board to be tested; compare the new image data of the printed circuit board to be tested with the image data of the printed circuit board to be tested after the expansion; if all are inconsistent, it is determined that the locking is completed; if partly consistent, it is determined that the locking is partially incomplete; if all are consistent, it is determined that the locking is not completed.
[0119] Furthermore, in a specific implementation, the printed circuit board assembly locking device provided in the embodiment of the present invention may further include:
[0120] The second verification module is used to receive new image data of the printed circuit board to be tested after locking; input the new image data of the printed circuit board to be tested into the trained screw recognition model, and output the recognition result of the screw hole positions in the new image data of the printed circuit board to be tested; if screws are recognized at all screw holes, it is determined that the locking is completed; if screws are not recognized at some screw holes, it is determined that the locking is partially incomplete; if screws are not recognized at all screw holes, it is determined that the locking is not completed.
[0121] This embodiment is based on the hardware perspective. Figure 2 As shown, the printed circuit board assembly locking device includes:
[0122] The image acquisition component 1 is used to photograph the printed circuit board to be tested and obtain image data of the printed circuit board to be tested;
[0123] The edge server 2 is used to obtain the image data of the printed circuit board to be tested, identify the screw hole positions to be fastened in the image data of the printed circuit board to be tested; generate an optimal fastening path according to the identified screw hole positions to be fastened, and control the movement of the mobile platform 3 using the generated optimal fastening path; and is also used to monitor the data of the torque sensor during the fastening process, and control the electric screwdriver 4 according to the monitoring data;
[0124] The mobile platform 3 is used to adjust the position of the electric screwdriver bit 4 during the movement;
[0125] The electric screwdriver bit 4 is used to perform locking and is also used to adjust the applied torque under the control of the edge server 2 to tighten the screw.
[0126] The image acquisition component 1 may be a camera, and the mobile platform 3 may be an XY mobile platform.
[0127] The edge server 2 can also be used to collect a sample set of printed circuit board image data; the printed circuit board image data samples include various types of historical printed circuit board image data under different lighting and angles; the printed circuit board image data sample set is annotated with data of screw hole positions; and the hole position recognition model is trained using the annotated printed circuit board image data sample set.
[0128] Finally, the present invention also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps recorded in the above method embodiment are implemented.
[0129] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes. The computer-readable storage medium provided by the present invention can realize the above-mentioned printed circuit board assembly locking method, and the effect is the same as above.
[0130] Finally, the present invention also provides an embodiment corresponding to a computer program product. The computer program product includes a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps described in the above-mentioned printed circuit board assembly locking method embodiment are implemented. The computer program product provided by the present invention can implement the above-mentioned printed circuit board assembly locking method, and the effect is the same as above.
[0131] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0132] The above is a detailed introduction to the printed circuit board assembly locking method, device, equipment and medium provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A printed circuit board assembly locking method, characterized in that: The method comprises: Acquire image data of a printed circuit board to be tested, and identify the positions of screw holes to be fastened in the image data of the printed circuit board to be tested; Generate an optimal locking path according to the identified screw hole positions to be locked; Using the generated optimal locking path to control the movement of the mobile platform to adjust the position of the electric screwdriver bit and perform locking; During the locking process, the data of the torque sensor is monitored, and the electric screwdriver bit is controlled to adjust the applied torque according to the monitored data so as to tighten the screw.
2. The printed circuit board assembly locking method according to claim 1, characterized in that: Before acquiring the image data of the printed circuit board to be tested, it also includes: Training the hole position recognition model; Correspondingly, identifying the positions of the holes of the screws to be fastened in the image data of the printed circuit board to be tested includes: Inputting the image data of the printed circuit board to be tested into the trained hole position recognition model, and outputting the pixel coordinates and matching degrees of a plurality of holes to be screwed in the image data of the printed circuit board to be tested; Correspondingly, according to the identified screw hole positions to be fastened, an optimal fastening path is generated, including: An optimal locking path is generated according to the pixel coordinates and matching degree of each screw hole to be locked.
3. The printed circuit board assembly locking method according to claim 2, characterized in that: Training the hole position recognition model includes: Collecting a printed circuit board image data sample set; the printed circuit board image data sample includes various types of historical printed circuit board image data under different illuminations and angles; Performing data annotation of screw hole positions on the printed circuit board image data sample set; The hole position recognition model is trained using the labeled printed circuit board image data sample set.
4. The printed circuit board assembly locking method according to claim 2, characterized in that: According to the pixel coordinates and matching degree of each of the screw holes to be fastened, an optimal fastening path is generated, including: According to the transformation matrix between the mobile platform coordinate system and the image coordinate system, the pixel coordinates of each of the screw holes to be fastened are converted into the actual coordinate values of each of the screw holes to be fastened in the mobile platform coordinate system; The optimal locking path is generated by using the actual coordinate value of each of the screw holes to be locked on the coordinate system of the mobile platform and the matching degree of each of the screw holes to be locked.
5. The printed circuit board assembly locking method according to claim 4, characterized in that: Using the actual coordinate value of each of the screw holes to be fastened on the coordinate system of the mobile platform and the matching degree of each of the screw holes to be fastened, an optimal fastening path is generated, including: Obtaining a weight of each of the screw holes to be fastened according to the matching degree of each of the screw holes to be fastened; Taking the zero point as the starting point, calculating the Euclidean distance of each of the screw holes to be fastened according to the actual coordinate value of each of the screw holes to be fastened on the coordinate system of the mobile platform; According to the Euclidean distance of each of the screw holes to be fastened and the weight of each of the screw holes to be fastened, the distance degree of each of the screw holes to be fastened is calculated using the following formula: ; in, is the distance degree, is the Euclidean distance, is the weight; The calculated distances of the screw holes to be fastened are sorted, and the screw hole to be fastened corresponding to the largest distance is obtained and used as the first fastening point; Taking the first point as the starting point, according to the actual coordinate values of the remaining screw holes to be fastened except the screw hole to be fastened corresponding to the first point on the coordinate system of the moving platform, the Euclidean distances of the remaining screw holes to be fastened are calculated; Calculate the distances of the remaining screw holes to be fastened according to the Euclidean distances of the remaining screw holes to be fastened and the weights of the remaining screw holes to be fastened; The distances of the remaining screw holes to be fastened are sorted, and the screw hole to be fastened corresponding to the largest distance is obtained and used as the second fastening point; The steps of calculating the Euclidean distance and the distance degree, and the sorting step are repeated until each locked point is obtained to generate an optimal locking path.
6. The printed circuit board assembly locking method according to claim 1, characterized in that: Also includes: After locking, the screw holes to be locked in the image data of the printed circuit board to be tested are enlarged; receiving new image data of a printed circuit board to be tested; Comparing the new image data of the printed circuit board to be tested with the image data of the printed circuit board to be tested after the circle is expanded; If all are inconsistent, it is determined that the locking is completed; If the parts are consistent, it is determined that the parts are not locked; If all are consistent, it is determined that the locking is not completed.
7. The printed circuit board assembly locking method according to claim 1, characterized in that: Also includes: After locking, receiving new image data of the printed circuit board to be tested; Inputting new image data of the printed circuit board to be tested into the trained screw recognition model, and outputting the recognition result of the screw hole position in the new image data of the printed circuit board to be tested; If screws are identified at all screw holes, it is determined that the locking is completed; if screws are not identified at some screw holes, it is determined that the locking is partially incomplete; if screws are not identified at all screw holes, it is determined that the locking is incomplete.
8. A printed circuit board assembly locking device, characterized in that: The device comprises: A hole position identification module is used to obtain the image data of the printed circuit board to be tested, and identify the hole positions of the screws to be fastened in the image data of the printed circuit board to be tested; A path generation module, used for generating an optimal locking path according to the identified screw hole positions to be locked; A mobile control module, used to control the movement of the mobile platform using the generated optimal locking path, so as to adjust the position of the electric screwdriver bit and perform locking; The monitoring control module is used to monitor the data of the torque sensor during the locking process, and control the electric screwdriver bit to adjust the applied torque according to the monitoring data so as to tighten the screw.
9. A printed circuit board assembly locking device, characterized in that: The device comprises: An image acquisition component is used to photograph the printed circuit board to be tested and obtain image data of the printed circuit board to be tested; The edge server is used to obtain the image data of the printed circuit board to be tested, identify the screw holes to be fastened in the image data of the printed circuit board to be tested; generate an optimal fastening path according to the identified screw holes to be fastened, and control the movement of the mobile platform by using the generated optimal fastening path; and monitor the data of the torque sensor during the fastening process, and control the electric screwdriver according to the monitoring data; The mobile platform is used to adjust the position of the electric screwdriver bit during movement; The electric screwdriver bit is used for performing locking and also for adjusting the applied torque to tighten the screw.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the printed circuit board assembly locking method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Screw locking route planning method using ant colony algorithm
CN110243371A
Intelligent visual full-automatic screw locking method and device
CN112935775A
Method, device and equipment for measuring hole site of manufactured part and medium
CN115690204A
Automatic locking method, device and equipment and storage medium
CN117444602A
Method and system for disassembling screws on upper cover of retired battery pack
CN118578368A
