Search

CN-121985489-A - Brushless motor driving board PCBA laminating control method and system

CN121985489ACN 121985489 ACN121985489 ACN 121985489ACN-121985489-A

Abstract

The invention relates to the technical field of PCBA lamination, in particular to a method and a system for controlling the lamination of a brushless motor driving plate PCBA, wherein the method comprises the steps of acquiring a tray image by an industrial camera in overlooking mode, and obtaining a binary image through channel decomposition, median filtering and threshold segmentation; the method comprises the steps of screening candidate areas from morphology and connected areas, carrying out Sobel edge convolution to obtain edges, carrying out Hilditch refinement rules to obtain a single pixel outline, carrying out boundary rotation to obtain a minimum circumscribed rectangle, calculating a central coordinate point and an attitude angle, carrying out pixel-actual area conversion and length-width ratio/area threshold screening according to a scale, establishing image-to-working coordinate conversion based on Eye-to-Hand to generate linear dispensing tracks and speeds of left edges, carrying out multi-area in a traveling quotient + simulated annealing optimization sequence, and sending to a controller to realize X/Y linkage, Z-axis up and down and constant dispensing, and carrying out dispensing without returning to zero point by point. The invention can solve the problems that the existing dispensing is insufficient in positioning precision, the pixel coordinates and the execution coordinates are disjointed, the efficiency is limited due to travel redundancy and the like, and the prior art dispensing can not adapt to unordered products.

Inventors

  • CHEN YANGJUN
  • CHEN GUANJUN
  • GAO CHAN

Assignees

  • 德芯智控(深圳)有限公司

Dates

Publication Date
20260505
Application Date
20260203

Claims (10)

  1. 1. A method for controlling the lamination of a brushless motor driving board PCBA is characterized by comprising the following steps of S1-S8: S1, acquiring an image, wherein the image is acquired by an industrial camera based on a tray which shoots and carries a plurality of PCBA under overlooking vision; s2, carrying out channel decomposition on the image to obtain a binary image; s3, performing morphological opening and closing operation and connected domain analysis on the binary image, and removing non-target areas to obtain a plurality of candidate dispensing areas; S4, convoluting each candidate dispensing area in the horizontal direction and the vertical direction by adopting a template to obtain gradient approximation, extracting edges according to gradient amplitude threshold values, iteratively deleting pixels which are outside the edges and do not damage connectivity according to Hilditch refinement rules, and obtaining continuous contours of single pixel width of each candidate dispensing area; S5, calculating the rectangular area of each candidate dispensing area, selecting the smallest area as the smallest circumscribed rectangle, and calculating a center coordinate point and an attitude angle by four vertexes of the smallest circumscribed rectangle; the actual area represented by each pixel is obtained by scaling the actual area of the reference ruler area and the pixel area, so that the area of the dispensing area is obtained, and the abnormal area is removed according to the preset length-width ratio and the area threshold value, so that the actual dispensing area of each candidate dispensing area is obtained; S6 based on Eye to The Hand calibration is carried out, and the corresponding data of a plurality of groups of pixel coordinates and mechanical coordinates are utilized to obtain an internal and external parameter and a distortion model of the industrial camera, and a conversion relation from an image coordinate to a platform working coordinate system is established; S7, generating a linear dispensing track from a starting point to an end point according to the geometric dimension and boundary margin of the single real dispensing area and limiting the dispensing time to determine the dispensing speed; establishing a travel business model aiming at a plurality of dispensing areas by taking an origin, each central coordinate point and closed loop of the origin as targets, adopting a simulated annealing algorithm, starting from a random dispensing sequence, exchanging neighborhood operators according to an adjacent sequence to generate a new solution, accepting the solution with higher cost with decreasing probability along with temperature reduction, and iterating according to a temperature attenuation coefficient until a termination condition is met, thereby obtaining an optimized dispensing sequence; And S8, the obtained linear dispensing track, the dispensing speed and the dispensing sequence are issued to a motion controller, the X/Y axis linkage and the Z axis up and down are controlled, the dispensing needle head is driven to perform dispensing according to the constant dispensing amount, no return to zero is performed after dispensing is completed at one position, and the linear dispensing track, the dispensing speed and the dispensing sequence are directly moved to the next position according to the dispensing sequence until all dispensing is completed.
  2. 2. The method for PCBA lamination control of a brushless motor driving board according to claim 1, wherein when the image is decomposed in step S2, specifically comprising: The red channel is used as gray level input to increase the contrast between the dispensing area and the background, and a gray level image is obtained; removing impulse noise of the gray map by using median filtering; The occurrence probability of each gray level and the weights and the average values of the two types of pixels are calculated on the global gray level histogram of the gray level graph, and a threshold value which enables the square of the difference of the two types of average values to be maximum in the weighted sense is selected as a segmentation threshold value, so that the binary graph is obtained.
  3. 3. The method for PCBA lamination control of a brushless motor driving board according to claim 1, wherein step S5 specifically comprises: Calculating a minimum circumscribed rectangle by adopting a boundary rotation method, sequentially rotating the region to be horizontal according to the direction angle of each line segment of the boundary relative to the X axis during calculation, recording the vertex and rectangular area of the circumscribed rectangle under each rotation, and selecting the smallest area as the minimum circumscribed rectangle; the center coordinate point and the attitude angle are obtained through the four vertexes of the minimum circumscribed rectangle; taking a reference scale area with a known actual area and the pixel area thereof as a benchmark, obtaining the actual area of each pixel according to area proportion conversion, and obtaining the area of the dispensing area by counting pixels; And reserving the real dispensing area by taking the aspect ratio between preset intervals and the pixel area within a preset window as a screening criterion.
  4. 4. The method for controlling the lamination of the Printed Circuit Board Assembly (PCBA) of the brushless motor driving board according to claim 1, wherein the step S6 is characterized in that the pixel coordinates of the multi-position calibration points and the corresponding mechanical coordinates are adopted, the internal and external parameters of the industrial camera and the distortion model are combined, the homogeneous transformation matrix from the image coordinates to the platform working coordinate system is obtained through least square solution, and the transformed coordinates are subjected to linear interpolation correction to obtain the transformation relation.
  5. 5. The method for PCBA lamination control of a brushless motor driving board according to claim 1, wherein the generating of the linear dispensing trajectory in step S7 specifically comprises: setting a longitudinal margin and a transverse margin in the long-side direction for the real dispensing area with the preset size; Setting the dispensing width equal to the inner diameter of the dispensing needle head; Defining a single dispensing time to determine a dispensing speed accordingly; The starting point and the end point are obtained by geometric calculation of a central coordinate point, an attitude angle and a reserved edge in a working coordinate system, and a needle movement track is generated through linear interpolation, so that the linear dispensing track is obtained.
  6. 6. The brushless motor drive board PCBA fit control method according to claim 1, wherein the simulated annealing algorithm comprises: Setting an initial temperature and a coefficient to perform exponential decay; setting the iteration times at each temperature; The neighborhood operator adopts two-point sequence exchange or broken chain reconnection; the probability of decreasing with decreasing temperature accepts worse solution until the temperature decreases to a final threshold or the objective function stops when the change in continuous temperature segment is less than a preset amount, and the dispensing sequence is output.
  7. 7. The brushless motor drive board PCBA fitting control method according to claim 1, further comprising performing quality detection and closed loop correction after dispensing is completed: The industrial camera collects the images after dispensing, measures the length and the width of the real dispensing area along the long side and the short side directions of the minimum circumscribed rectangle, and judges whether the real dispensing area is within a preset tolerance; if the two paths are out of tolerance, the binarization threshold value, the edge threshold value or the dispensing speed is adjusted, and the paths and the tracks of the subsequent batches are updated.
  8. 8. The brushless motor drive board PCBA fitting control method according to claim 7, wherein the quality detection and closed loop correction further comprises: after an industrial camera collects images after dispensing is completed, a detection model based on CENTERNET-MobileNetV2 is called to automatically position a cutting range of each real dispensing area, and cutting and normalizing are carried out according to fixed dimensions to obtain detection images; Sending the cut detection image into a convolutional neural network classifier, sequentially performing convolution, pooling, discarding and fully connecting layers, and outputting a classification result and classification confidence thereof, wherein the classification result comprises one of less glue, good glue and more glue; setting a classification threshold to be a threshold that maximizes the reconciliation average of precision and recall; when the classification result is less glue or more glue, at least one of the glue dispensing parameters is adjusted according to the preset priority, wherein the glue dispensing parameters comprise glue dispensing time, glue dispensing speed and glue dispensing and dispensing quantity, and the adjusted glue dispensing parameters are applied to the execution of the step S7 and the step S8 of the subsequent workpieces in the method.
  9. 9. The method for PCBA laminating control of a brushless motor driving board according to claim 8, wherein the quality detection and closed loop correction locates and quantifies the classification result based on interpretable machine vision, and driving parameter correction accordingly, specifically comprising: The method comprises the steps of obtaining a characteristic diagram of a last convolution layer of a convolution neural network classifier, averaging the characteristic diagrams in a space dimension to obtain weights, carrying out weighted summation on the characteristic diagrams by the weights, inhibiting negative contribution to obtain a thermodynamic diagram with the same size as an input image, and overlapping the thermodynamic diagram with the input image to highlight a pixel region which plays a main role in a classification result; Acquiring a reference image, and retrospectively calculating the activation difference between the detection image and the reference image along an output layer and an input layer of the convolutional neural network classifier, so that positive/negative contribution scores for current judgment are given to each pixel, and a contribution graph is obtained; And when the non-uniformity index exceeds a threshold value, correcting one or more of the starting position, the reserved edge and the dispensing speed of the linear dispensing track in the step S7 according to a regular sequence, and executing dispensing in the step S8 by using the corrected linear dispensing track.
  10. 10. A brushless motor drive board PCBA fit control system, the system comprising: The acquisition module is used for acquiring images, wherein the images are acquired by the industrial camera based on a tray for shooting and bearing a plurality of PCBA under overlooking vision; the preprocessing module is used for carrying out channel decomposition on the image to obtain a binary image; The candidate region extraction module is used for executing morphological opening and closing operation and connected domain analysis on the binary image, removing non-target regions and obtaining a plurality of candidate dispensing regions; The edge extraction module is used for carrying out convolution on each candidate dispensing area in the horizontal direction and the vertical direction by adopting a template to obtain gradient approximation, and extracting an edge according to a gradient amplitude threshold; The pose and geometric parameter calculation module is used for calculating the rectangular area of each candidate dispensing area, selecting the smallest area as the smallest circumscribed rectangle, and calculating a center coordinate point and a pose angle by four vertexes of the smallest circumscribed rectangle; the actual area represented by each pixel is obtained by scaling the actual area of the reference ruler area and the pixel area, so that the area of the dispensing area is obtained, and the abnormal area is removed according to the preset length-width ratio and the area threshold value, so that the actual dispensing area of each candidate dispensing area is obtained; coordinate conversion module for Eye-based to The Hand calibration is carried out, and the corresponding data of a plurality of groups of pixel coordinates and mechanical coordinates are utilized to obtain an internal and external parameter and a distortion model of the industrial camera, and a conversion relation from an image coordinate to a platform working coordinate system is established; The path planning module is used for generating linear dispensing tracks from a starting point to an end point according to the geometric dimension and boundary margin of a single real dispensing area and limiting dispensing time to determine dispensing speed, establishing a traveling business model by taking an origin, each central coordinate point and closed loop of the origin as targets in a plurality of dispensing areas, adopting a simulated annealing algorithm, starting from a random dispensing sequence, generating new solutions according to adjacent sequence exchange and other neighborhood operators, receiving solutions with larger cost according to the decreasing probability along with temperature reduction, and iterating according to a temperature attenuation coefficient until the termination condition is met, thereby obtaining an optimized dispensing sequence; the control execution module is used for transmitting the obtained linear dispensing track, the dispensing speed and the dispensing sequence to the motion controller, controlling the X/Y axis linkage, the Z axis to move up and down and driving the dispensing needle head to execute dispensing with constant dispensing amount, and directly moving to the next dispensing according to the dispensing sequence until all dispensing is completed without returning to zero after dispensing at one place is completed.

Description

Brushless motor driving board PCBA laminating control method and system Technical Field The invention relates to the technical field of dispensing control, in particular to a method and a system for controlling lamination of a Printed Circuit Board Assembly (PCBA) of a brushless motor driving board. Background In the manufacturing process of brushless motor (BLDC) drive control products, the drive board PCBA generally integrates power devices, sampling/control circuits, connectors and other elements, and has the characteristics of high device density, large thermal/electrical stress, high requirements on insulation and sealing consistency and the like. In order to meet the requirements of heat dissipation, vibration reduction, sealing, moisture prevention and other processes, the driving board PCBA is often required to be subjected to relevant bonding procedures in production, such as bonding with structural members (such as heat dissipation members, cover plates, insulating gaskets and the like) after being coated with adhesive/heat conducting glue in designated areas, or linear/area dispensing before packaging and bonding to form stable bonding and sealing interfaces. The bonding quality directly influences the bonding strength, the heat conduction path, the sealing reliability and the appearance consistency of the driving plate, and further influences the long-term stable operation of the brushless motor system. In the existing driving board PCBA laminating process, common modes include laminating after manual dispensing or laminating by adopting semi-automatic/automatic dispensing equipment to be matched with a jig for positioning and then executing laminating. The technical scheme has the following general problems that firstly, the dependence on the consistency of the fixture and the placement is strong, PCBA is generally required to be arranged in a fixed position and a fixed orientation in a tray, and once translation and rotation deviation caused by feeding or placement occur or a plurality of PCBA are randomly placed in the tray, the glue dispensing track is not matched with an actual bonding area, so that defects such as glue deviation, less glue, more glue, glue overflow and the like are easily caused. Secondly, although partial equipment is introduced into machine vision for positioning, the traditional methods based on threshold segmentation, template matching, geometric features and the like are sensitive to illumination reflection, ground color difference and workpiece surface textures, and frequent manual parameter adjustment is often needed to maintain a stable recognition effect; meanwhile, most schemes only output pixel coordinates or local offset, and lack of accurate mapping and unified calibration of working coordinates of a motion platform leads to error accumulation between a visual positioning result and dispensing execution coordinates, and influences laminating consistency and yield. Thirdly, in the same tray multi-plate processing scene, the prior art always returns or returns to zero point by point according to a fixed sequence, and global optimization of multi-region tracks is lacked, so that stroke redundancy, beat limitation and efficiency are difficult to promote. Disclosure of Invention In view of the above technical problems, the invention provides a method and a system for attaching and controlling a Printed Circuit Board Assembly (PCBA) of a brushless motor driving board, which are used for solving the problems that in the prior art, the positioning accuracy is insufficient, the pixel coordinates and execution coordinates are disjointed, the efficiency is limited due to stroke redundancy and the like, and the problem that in the prior art, the dispensing cannot be suitable for unordered products. Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure. According to an aspect of the present invention, there is provided a brushless motor driving board PCBA attaching control method, the method including steps S1 to S8: S1, acquiring an image, wherein the image is acquired by an industrial camera based on a tray which shoots and carries a plurality of PCBA under overlooking vision; s2, carrying out channel decomposition on the image to obtain a binary image; s3, performing morphological opening and closing operation and connected domain analysis on the binary image, and removing non-target areas to obtain a plurality of candidate dispensing areas; S4, convoluting each candidate dispensing area in the horizontal direction and the vertical direction by adopting a template to obtain gradient approximation, extracting edges according to gradient amplitude threshold values, iteratively deleting pixels which are outside the edges and do not damage connectivity according to Hilditch refinement rules, and obtaining continuous contours of single pixel width of each c