Dispensing machine detection and control method

By determining the offset between the valve needle end and the camera's optical center in the dispenser, and combining the image detection results, the detection results of the dispenser are calculated, which solves the problem of difficulty in detecting and correcting the spraying of the dispenser in the prior art, and achieves higher detection accuracy and dispensing accuracy.

CN120038090APending Publication Date: 2025-05-27BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311597570.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-27
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

The prior art is difficult to effectively detect and correct the spraying of dispensers, resulting in low dispensing accuracy and affecting product yield.

Method used

By determining the first offset between the valve needle end and the camera optical center, and calculating the second offset based on this offset and the image detection result when the reference glue point is sprayed, the detection result of the dispenser is determined, and accurate reflection and correction of the spraying situation is achieved.

Benefits of technology

The detection accuracy of the dispenser is improved, and the dispensing accuracy can be reflected intuitively and quantitatively, and the dispensing effect can be achieved. It also provides accurate data for dispensing position correction, reduces dispensing errors and improves product yield.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120038090A_ABST
    Figure CN120038090A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent manufacturing, and particularly provides a glue dispenser detection and control method, which comprises the following steps: determining a first offset between the tail end of a valve needle and the optical center of a camera, obtaining a first position of a head module when the valve needle sprays a reference glue point, and controlling the head module to move to a second position based on the first offset, and collecting a first image of the reference glue point at the second position, performing image detection on the first image, determining a second offset based on the difference between the center coordinate of the reference glue point on the first image and the optical center of the camera, and determining a detection result of the glue dispenser based on the first offset and the second offset. In the embodiment of the invention, the detection result is determined based on the first offset and the second offset, so that the inclined spraying condition of the valve needle can be effectively reflected, the dispensing precision of the dispensing machine can be intuitively and quantitatively reflected, the early warning of the dispensing effect is realized, accurate correction data can be provided for the correction of the dispensing position of the dispensing machine, the dispensing error is reduced, and the accuracy of the dispensing machine is improved. And the dispensing precision and the product yield are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of intelligent manufacturing technology, and particularly to a method for detecting and controlling a dispensing machine. Background Art

[0002] With the development of intelligent manufacturing technology, the requirements of the manufacturing industry are getting higher and higher, and the degree of automation is also getting higher and higher. Among them, dispensing operation is one of the most common technologies in the manufacturing industry. For example, taking mobile phone manufacturing as an example, the middle frame and shielding of a mobile phone need to be adhesively connected, the waterproof sealing of a mobile phone needs to be sealed with glue, and the mobile phone chip needs to be dispensed with heat dissipation glue to dissipate heat, etc.

[0003] In the related art, the dispensing operation is mainly completed by an automatic dispensing machine. The accuracy of the dispensing machine will directly affect the product yield. Therefore, it is necessary to detect and correct the dispensing accuracy of the dispensing machine. Summary of the Invention

[0004] To improve the detection accuracy of the dispensing machine and thus ensure the dispensing operation accuracy, embodiments of the present disclosure provide a method and device for detecting a dispensing machine, a method and device for controlling a dispensing machine, an automatic dispensing machine, and a storage medium.

[0005] In a first aspect, embodiments of the present disclosure provide a method for detecting a dispensing machine. The dispensing machine includes a head module, and the head module includes a camera and a dispensing valve needle. The method includes:

[0006] Determine a first offset in the horizontal direction between the end of the valve needle and the optical center of the camera, where the horizontal direction represents a direction parallel to the ground;

[0007] Obtain a first position of the head module when the valve needle ejects a reference glue dot, and control the head module to move to a second position based on the first offset and the first position, and collect a first image of the reference glue dot at the second position, where the second position represents a pre-alignment position between the optical center of the camera and the center of the reference glue dot;

[0008] Perform image detection on the first image, and determine a second offset based on the difference between the center coordinates of the reference glue dot on the first image and the optical center of the camera;

[0009] Determine the detection result of the dispensing machine based on the first offset and the second offset.

[0010] In some embodiments, the determining the first offset in the horizontal direction between the end of the valve needle and the optical center of the camera includes:

[0011] Determine a first coordinate of the head module when the valve needle ejects a tooling glue dot, and control the head module to move horizontally so that the optical center of the camera moves above the tooling glue dot;

[0012] Collect a second image of the tool setting glue dot, and perform image detection on the second image to obtain a first difference between the optical center of the camera and the central coordinates of the tool setting glue dot;

[0013] Based on the PID control algorithm, perform closed-loop control on the first difference until the convergence condition is met, and determine the second coordinates of the head module;

[0014] Based on the difference between the first coordinates and the second coordinates, determine the first offset.

[0015] In some embodiments, determining the first coordinates of the head module when the valve needle ejects the tool setting glue dot includes:

[0016] Control the valve needle to move above the tool setting instrument;

[0017] Control the valve needle to descend in steps with a preset height until the tool setting instrument detects a target signal, where the target signal indicates that the end of the valve needle contacts the tool setting instrument;

[0018] Control the valve needle to rise by a first height and then eject the tool setting glue dot, and record the first coordinates of the head module, where the first height is the diameter of the tool setting glue dot.

[0019] In some embodiments, obtaining the first position of the head module when the valve needle ejects the reference glue dot and controlling the head module to move to a second position based on the first offset includes:

[0020] Control the valve needle to eject the reference glue dot at a preset working height, and record the first position of the head module when the reference glue dot is ejected;

[0021] Based on the first offset, control the head module to move horizontally from the first position to the second position.

[0022] In some embodiments, performing image detection on the first image and determining a second offset based on the difference between the central coordinates of the reference glue dot and the optical center of the camera on the first image includes:

[0023] Perform image detection on the first image to determine the central coordinates of the reference glue dot, and determine a second difference between the central coordinates of the reference glue dot and the optical center of the camera;

[0024] Based on the PID control algorithm, perform closed-loop control on the second difference until the convergence condition is met, and determine the third position of the head module;

[0025] Based on the difference between the third position and the first position, determine the second offset.

[0026] In some embodiments, determining the detection result of the dispensing machine based on the first offset and the second offset includes:

[0027] Determining the amount of deviation of the valve needle based on the difference between the first offset and the second offset;

[0028] In response to the amount of deviation being greater than a first preset threshold, determining that the detection result of the dispensing machine fails;

[0029] In response to the amount of deviation being less than or equal to the first preset threshold, collecting images of a plurality of reference glue dots and determining the dispensing stability based on the sizes of the respective reference glue dots on the images;

[0030] In response to the dispensing stability being less than a second preset threshold, determining that the detection result of the dispensing machine fails.

[0031] In some embodiments, collecting images of a plurality of reference glue dots and determining the dispensing stability based on the sizes of the respective reference glue dots on the images includes:

[0032] Controlling the head module to sequentially eject a plurality of reference glue dots at a plurality of different positions on the dispensing surface;

[0033] Collecting an image including the plurality of reference glue dots through the camera;

[0034] Performing image detection on the image including the plurality of reference glue dots to determine the size of each reference glue dot;

[0035] Determining the dispensing stability according to the standard deviation of the sizes of all the reference glue dots.

[0036] In a second aspect, an embodiment of the present disclosure provides a method for controlling a dispensing machine. The dispensing machine includes a head module, and the head module includes a camera and a dispensing valve needle. The method includes:

[0037] In response to the detection result of the dispensing machine being passed, during the dispensing operation, determining the position to be dispensed on the target object based on the collected image of the target object; the detection result is obtained according to the dispensing machine detection method described in any embodiment of the first aspect;

[0038] Correcting the position to be dispensed based on the second offset to obtain the target dispensing position;

[0039] Controlling the head module to move to the target dispensing position for dispensing.

[0040] In a third aspect, an embodiment of the present disclosure provides a dispensing machine detection device. The dispensing machine includes a head module, and the head module includes a camera and a dispensing valve needle. The device includes:

[0041] A first offset module configured to determine a first offset between the end of the valve needle and the optical center of the camera in the horizontal direction, where the horizontal direction represents a direction parallel to the ground;

[0042] A position movement module configured to obtain a first position of the head module when the valve needle ejects a reference glue dot, control the head module to move to a second position based on the first offset and the first position, and collect a first image of the reference glue dot at the second position, where the second position represents a pre-alignment position between the optical center of the camera and the center of the reference glue dot;

[0043] A second offset module configured to perform image detection on the first image and determine a second offset based on the difference between the center coordinates of the reference glue dot and the optical center of the camera on the first image;

[0044] A result determination module configured to determine a detection result of the dispensing machine based on the first offset and the second offset.

[0045] In some embodiments, the first offset module is configured to:

[0046] Determine a first coordinate of the head module when the valve needle ejects a tooling glue dot, and control the head module to move horizontally so that the optical center of the camera moves above the tooling glue dot;

[0047] Collect a second image of the tooling glue dot, perform image detection on the second image, and obtain a first difference between the optical center of the camera and the center coordinates of the tooling glue dot;

[0048] Perform closed-loop control on the first difference based on a PID control algorithm until a convergence condition is met, and determine a second coordinate of the head module;

[0049] Determine the first offset based on the difference between the first coordinate and the second coordinate.

[0050] In some embodiments, the first offset module is configured to:

[0051] Control the valve needle to move above the tooling instrument;

[0052] Control the valve needle to descend in steps with a preset height until the tooling instrument detects a target signal, where the target signal indicates that the end of the valve needle contacts the tooling instrument;

[0053] Control the valve needle to rise by a first height and then eject the tooling alignment glue dot, and record the first coordinate of the head module, where the first height is the diameter of the tooling alignment glue dot.

[0054] In some embodiments, the position movement module is configured to:

[0055] Control the valve needle to eject the reference glue dot at a preset operation height, and record the first position of the head module when the reference glue dot is ejected;

[0056] Based on the first offset, control the head module to horizontally move from the first position to the second position.

[0057] In some embodiments, the second offset module is configured to:

[0058] Perform image detection on the first image to determine the center coordinates of the reference glue dot, and determine the second difference between the center coordinates of the reference glue dot and the optical center of the camera;

[0059] Based on the PID control algorithm, perform closed-loop control on the second difference until the convergence condition is met, and determine the third position of the head module;

[0060] Based on the difference between the third position and the first position, determine the second offset.

[0061] In some embodiments, the result determination module is configured to:

[0062] Based on the difference between the first offset and the second offset, determine the amount of deviation of the valve needle;

[0063] In response to the amount of deviation being greater than a first preset threshold, determine that the detection result of the dispenser is not passed;

[0064] In response to the amount of deviation being less than or equal to the first preset threshold, collect images of multiple reference glue dots, and determine the glue spraying stability based on the sizes of the respective reference glue dots on the images;

[0065] In response to the glue spraying stability being less than a second preset threshold, determine that the detection result of the dispenser is not passed.

[0066] In some embodiments, the result determination module is configured to:

[0067] Control the head module to sequentially eject multiple reference glue dots at multiple different positions on the glue dispensing surface;

[0068] Collect an image including the multiple reference glue dots through the camera;

[0069] Perform image detection on the image including the multiple reference glue dots to determine the size of each reference glue dot;

[0070] Determine the glue spraying stability according to the standard deviation of the sizes of all the reference glue dots.

[0071] In a fourth aspect, an embodiment of the present disclosure provides a dispensing machine control device. The dispensing machine includes a head module, and the head module includes a camera and a dispensing valve needle. The device includes:

[0072] A position determination module, configured to, in response to the detection result of the dispensing machine being passed, during the dispensing operation, determine the position to be dispensed on the target object based on the acquired image of the target object; the detection result is obtained according to the dispensing machine detection method described in any embodiment of the first aspect;

[0073] A position correction module, configured to correct the position to be dispensed based on the second offset to obtain the target dispensing position;

[0074] A dispensing control module, configured to control the head module to move to the target dispensing position for dispensing.

[0075] In a fifth aspect, an embodiment of the present disclosure provides an automatic dispensing machine, including:

[0076] A head module, including a camera and a dispensing valve needle;

[0077] A controller, including a processor and a memory. The memory stores computer instructions, and the computer instructions are used to cause the processor to execute the method described in any embodiment of the first aspect or the second aspect.

[0078] In a sixth aspect, an embodiment of the present disclosure provides a storage medium storing computer instructions, and the computer instructions are used to cause a computer to execute the method described in any embodiment of the first aspect or the second aspect.

[0079] The dispensing machine detection method according to the embodiments of the present disclosure includes determining a first offset between the end of the valve needle and the optical center of the camera, obtaining a first position of the head module when the valve needle ejects a reference glue dot, and controlling the head module to move to a second position based on the first offset. A first image of the reference glue dot is collected at the second position, the first image is subjected to image detection, a second offset is determined based on the difference between the center coordinates of the reference glue dot on the first image and the optical center of the camera, and the detection result of the dispensing machine is determined based on the first offset and the second offset. In the embodiments of the present disclosure, determining the detection result based on the first offset and the second offset can effectively reflect the situation of the valve needle spraying obliquely, can intuitively and quantitatively reflect the dispensing accuracy of the dispensing machine, realize early warning of the dispensing effect, and can provide accurate correction data for the dispensing position correction of the dispensing machine, reduce the dispensing error, and improve the dispensing accuracy and product yield. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present disclosure. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0081] Figure 1 is a schematic structural diagram of a dispensing machine according to some embodiments of the present disclosure.

[0082] Figure 2 is a flowchart of a dispensing machine detection method according to some embodiments of the present disclosure.

[0083] Figure 3 is a flowchart of a dispensing machine detection method according to some embodiments of the present disclosure.

[0084] Figure 4 is a flowchart of a dispensing machine detection method according to some embodiments of the present disclosure.

[0085] Figure 5a is an effect diagram of a dispensing machine detection method in the related art.

[0086] Figure 5b is an effect diagram of a dispensing machine detection method according to some embodiments of the present disclosure.

[0087] Figure 6 is a flowchart of a dispensing machine detection method according to some embodiments of the present disclosure.

[0088] Figure 7 is a flowchart of a dispensing machine detection method according to some embodiments of the present disclosure.

[0089] Figure 8It is a flowchart of a dispensing machine detection method according to some embodiments of the present disclosure.

[0090] Figure 9 It is a flowchart of a dispensing machine control method according to some embodiments of the present disclosure.

[0091] Figure 10 It is a structural block diagram of a dispensing machine detection device according to some embodiments of the present disclosure.

[0092] Figure 11 It is a structural block diagram of a dispensing machine control device according to some embodiments of the present disclosure.

[0093] Figure 12 It is a structural block diagram of a dispensing machine according to some embodiments of the present disclosure. Specific embodiments

[0094] The technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments in the present disclosure belong to the scope of protection of the present disclosure. In addition, the technical features involved in different embodiments of the present disclosure described below can be combined with each other as long as they do not conflict with each other.

[0095] With the development of intelligent manufacturing technology, the requirements of the manufacturing industry are getting higher and higher, and the degree of automation is also getting higher and higher. Among them, dispensing operation is one of the most common technologies in the manufacturing industry. For example, taking mobile phone manufacturing as an example, the middle frame and shielding of the mobile phone need to be adhesively connected, the waterproof sealing of the mobile phone needs to be sealed with glue for holes and edges, and the mobile phone chip needs to be dispensed with heat dissipation glue to dissipate heat, etc.

[0096] At present, the dispensing operation is mainly completed by an automatic dispensing machine. The accuracy of the dispensing machine will directly affect the product yield. Therefore, it is necessary to detect and correct the dispensing accuracy of the dispensing machine. Figure 1 Shows a front view structural schematic diagram of an automatic dispensing machine for a mobile phone production line. The following will be combined with Figure 1 Explain the structure and principle of the dispensing machine.

[0097] As Figure 1 shown, the dispensing machine includes a head module and a workbench. For the convenience of understanding and description, in the embodiments of the present disclosure, the direction parallel to the ox axis is defined as the horizontal direction, and the direction parallel to the oy axis is defined as the vertical direction.

[0098] The workbench includes a carrier 20 and a conveyor belt that drives the carrier to move. The object to be dispensed is shown as the mobile phone 10. The mobile phone 10 is placed on the carrier 20 by the end of the manipulator and then moves under the head module driven by the conveyor belt.

[0099] The head module includes a camera 30 and a valve needle 40. The camera 30 is used to collect images of the lower working surface, determine the dispensing position on the lower mobile phone 10 based on image detection algorithms, and then the head module moves driven by a motor, so that the valve needle 40 moves above the dispensing position, and then dispenses glue drops based on a preset mode to complete the dispensing process.

[0100] During this process, due to factors such as mechanical errors and assembly errors, the dispensing position of the valve needle often deviates. In related technologies, a tool setter 50 is often used to detect and correct the horizontal dispensing position of the valve needle.

[0101] However, through research, it is found that during the long-term use of the dispenser, due to problems such as foreign objects at the valve needle orifice, valve nozzle deformation, and cured glue at the valve nozzle position, even if the position accuracy of the valve needle orifice is sufficient, at a certain working height, the dispensed glue drops will still be sprayed obliquely.

[0102] For example, taking the high-precision mobile phone dispensing operation as an example, the inner diameter of the high-precision valve needle is 0.2 mm, and the diameter of a dispensed glue drop is also 0.2 mm. Since the mobile phone is a high-precision electrical component, to prevent the valve needle from damaging the mobile phone, the valve needle cannot be too close to the mobile phone, and the height from the dispensing position is generally 3 mm to 5 mm. In this case, assuming that the valve needle orifice is partially blocked by cured glue and the dispensed glue line is sprayed obliquely by 45°, then the finally dropped glue on the working surface will also deviate from the predetermined position by 3 mm to 5 mm, that is, the dispensing requirements cannot be met, and at the same time, components in other working areas will be damaged. In severe cases, it may even cause damage and scrapping of the mobile phone electrical components, which is unacceptable for high-precision mobile phone processing.

[0103] In the detection method of related technologies, when using the tool setter 50 to detect the position of the valve needle, only the position of the valve needle orifice is detected and corrected, and the skew situation of the glue line sprayed by the valve needle cannot be truly reflected, resulting in the inability to effectively warn and correct the skew situation of dispensing, and the accuracy of the dispenser and the product yield are both relatively low.

[0104] Based on the defects of the above-mentioned related technologies, the embodiments of the present disclosure provide a dispenser detection method and device, a dispenser control method and device, an automatic dispenser, and a storage medium, aiming to effectively detect the skew situation of the dispenser, improve the detection accuracy, which can not only warn in advance about the dispensing situation, but also effectively correct the dispensing process based on the detection results, reduce the dispensing error, and improve the dispensing accuracy and product yield.

[0105] In some embodiments, the present disclosure provides a dispenser detection method, which can be used in an automatic dispenser to detect the dispensing position deviation of the automatic dispenser and obtain corresponding detection results. The automatic dispenser can be, for example Figure 1As shown in, the following will be combined with Figure 1 the dispensing machine shown to describe the detection method of the embodiments of the present disclosure.

[0106] As Figure 2 shown, in some embodiments, the dispensing machine detection method of the examples of the present disclosure includes:

[0107] S210. Determine the first offset in the horizontal direction between the end of the valve needle and the optical center of the camera.

[0108] Combined with Figure 1 shown, the head module of the dispensing machine includes a camera 30 and a valve needle 40. The camera 30 and the valve needle 40 can move in the horizontal and vertical directions following the head module. The horizontal direction is also the Figure 1 direction parallel to the ox axis shown in, and the vertical direction is the Figure 1 direction parallel to the oy axis shown in.

[0109] In the embodiments of the present disclosure, the first offset refers to the position offset in the horizontal direction between the end of the valve needle 40 and the optical center of the camera 30. For example Figure 1 shown, when the valve needle 40 dispenses glue, the dripping glue sprays out from the end of the valve needle 40, and the optical axis of the camera 30 is not necessarily collinear with the valve needle 40, but there may be a position deviation in the horizontal direction. Therefore, the first offset described in the present disclosure represents the horizontal position deviation between the optical center of the camera and the end of the valve needle.

[0110] In some embodiments, the valve needle can be pre-calibrated using a tool setter 50 to obtain the first offset between the valve needle and the optical center of the camera. The following embodiments of the present disclosure will explain this.

[0111] S220. Obtain the first position of the head module when the valve needle sprays a reference glue dot, control the head module to move to the second position based on the first offset and the first position, and collect the first image of the reference glue dot at the second position.

[0112] In the embodiments of the present disclosure, during the detection process, first, the head module can be controlled to dispense glue on the working plane according to the normal operation process. After the valve needle sprays a drop of glue, record the coordinates of the head module at this time. This coordinate is also the first position described in the present disclosure. The drop of glue sprayed by the valve needle on the working plane is the reference glue dot described in the present disclosure.

[0113] Then, based on the previously determined first offset, control the head module to move to the second position, where the second position represents the pre-alignment position of the camera optical center and the center of the reference glue dot. It can be understood that the first offset represents the horizontal offset between the end of the valve needle and the camera optical center. Assuming that the valve needle is not sprayed obliquely, when the head module is at the first position, the valve needle is directly above the center of the reference glue dot. When moving to the second position based on the first offset, at this time, the optical center of the camera will be directly above the center of the reference glue dot.

[0114] For example, taking the initial position of the head module on the horizontal plane as the coordinate origin, when the head module sprays glue at the first position (x 0 , y 0 ), assuming that the valve needle is not sprayed obliquely, then when the reference glue dot lands on the working plane, the center coordinates thereof are also (x 0 , y 0 ), that is, the valve needle is directly above the center of the reference glue dot. When the head module moves to the second position (x 0 + x 偏 , y 0 + y 偏 ), where (x 偏 , y 偏 ) represents the first offset between the valve needle and the camera optical center, at this time, the camera optical center will reach the position of (x 0 , y 0 ), that is, the camera optical center will be directly above the center of the reference glue dot.

[0115] However, the valve needle may be sprayed obliquely. Therefore, in fact, when the camera module moves to the second position, the camera optical center is not necessarily exactly directly above the center of the reference glue dot. Therefore, in the embodiments of the present disclosure, this position can be defined as the pre-alignment position at this time.

[0116] After the head module moves from the first position to the second position, the image of the lower working plane can be collected by the camera, so as to obtain the first image including the reference glue dot.

[0117] S230. Perform image detection on the first image, and determine the second offset based on the difference between the center coordinates of the reference glue dot on the first image and the camera optical center.

[0118] It should be noted that as described above, assuming that the valve needle is not sprayed obliquely, when the head module moves to the second position, the optical center of the camera will be directly above the center of the reference glue dot. Therefore, on the first image collected, the center point coordinates of the reference glue dot should be located at the position of the camera optical center (that is, the center of the image).

[0119] However, the valve needle may spray obliquely. Therefore, on the first image actually captured, the center coordinates of the reference glue dot may not necessarily be located at the camera optical center position, but there may be a certain positional deviation.

[0120] In some embodiments of the present disclosure, the center coordinates of the reference glue dot on the first image can be obtained through image detection technology, and then the head module is controlled to move in the horizontal direction so that the optical center of the camera coincides with the center coordinates of the reference glue dot, and then the third position of the head module is recorded. The second offset is determined based on the difference between the third position and the first position.

[0121] For example, in the previous example, in the world coordinate system, when the head module moves to the second position (x 0 +x 偏 , y 0 +y 偏 ) and captures the first image, the center coordinates of the actual reference glue dot on the first image are determined based on image detection technology, and the head module is controlled to move horizontally so that the camera optical center moves to coincide with the center coordinates of the reference glue dot. At this time, the head module moves to the third position (x 0 +x 偏 +Δx, y 0 +y 偏 +Δy), where (Δx, Δy) is the coordinate value of the difference between the center coordinates of the reference glue dot on the first image and the camera optical center mapped to the world coordinate system. Then, based on the difference between the third position (x 0 +x 偏 +Δx, y 0 +y 偏 +Δy) and the first position (x 0 , y 0 ), the second offset is determined to be (x 偏 +Δx, y 偏 +Δy).

[0122] It can be understood that assuming that the valve needle does not spray obliquely, in the above process, on the first image captured by the camera, the center coordinates of the reference glue dot should coincide with the camera optical center, so both (Δx, Δy) are zero, that is, the head module does not actually change its position. Therefore, the calculated second offset (x 偏 +Δx, y 偏 +Δy) should be the same as the first offset (x 偏 , y 偏 ). On the contrary, if the valve needle sprays obliquely, in the above process, on the first image captured by the camera, the center coordinates of the reference glue dot do not coincide with the camera optical center, so the calculated second offset (x 偏 +Δx, y 偏 +Δy) is also different from the first offset (x偏 , y 偏 ) is different.

[0123] S240. Determine the detection result of the dispensing machine based on the first offset and the second offset.

[0124] Combined with the foregoing, when the valve needle is not sprayed obliquely, the second offset is theoretically the same as the first offset. Therefore, in the embodiments of the present disclosure, the difference between the first offset and the second offset can be used as the amount of skew for evaluating the skew of the valve needle.

[0125] It can be understood that the smaller the difference between the first offset and the second offset, the smaller the amount of skew, that is, the less the dispensing machine is skewed. On the contrary, the larger the difference between the first offset and the second offset, the larger the amount of skew, that is, the more serious the skew of the dispensing machine. Based on this, in some embodiments of the present disclosure, this amount of skew can be used as the detection result for detecting the skew degree of the dispensing machine, so that based on this detection result, the dispensing accuracy of the dispensing machine can be intuitively and quantitatively reflected.

[0126] In some embodiments, considering that the dispensing stability of the dispensing machine is also an important factor affecting the dispensing accuracy, the final detection result can be further obtained by combining the detection of the dispensing stability. The following embodiments of the present disclosure will describe this.

[0127] Combined with Figure 1 As shown, it can be understood that assuming that there is no offset in the position and angle at the end of the valve needle 40, but the nozzle is partially blocked by the cured glue, the valve needle 40 may be severely skewed when spraying glue. If the detection method in the related art is used, the tool setter 50 can only detect the pose at the end of the valve needle 40, so it cannot effectively identify the skew situation of the valve needle 40, resulting in a distorted detection result. In the embodiments of the present disclosure, in the same scenario, the detection result determined by using the first offset and the second offset can accurately reflect the skew situation of the valve needle, so as to obtain a more accurate detection result.

[0128] Through the above, in the embodiments of the present disclosure, determining the detection result based on the first offset and the second offset can effectively reflect the skew situation of the valve needle, can intuitively and quantitatively reflect the dispensing accuracy of the dispensing machine, realize the early warning of the dispensing effect, and can provide accurate correction data for the dispensing position correction of the dispensing machine, reduce the dispensing error, and improve the dispensing accuracy and product yield.

[0129] As Figure 3 shown, in some embodiments, the process of determining the first offset in the detection method exemplified in the present disclosure includes:

[0130] S310. Determine the first coordinate of the head module when the valve needle ejects the knife-aligning glue point, and control the horizontal movement of the head module so that the optical center of the camera moves above the knife-aligning glue point.

[0131] Combined with Figure 1 As shown, in the embodiment of the present disclosure, when calculating the first offset between the end of the valve needle 40 and the optical center of the camera 30, a glue dispenser 50 can be used for glue dispensing measurement. The glue point dispensed on the glue dispenser 50 is the knife-aligning glue point described in the present disclosure. Below, combined with Figure 4 The process of glue dispensing and knife alignment for the glue point will be described.

[0132] As Figure 4 shown, in some embodiments, for the detection method exemplified in the present disclosure, the process of determining the first coordinate of the head module when the valve needle ejects the knife-aligning glue point includes:

[0133] S311. Control the valve needle to move above the glue dispenser.

[0134] S312. Control the valve needle to descend in steps with a preset height until the glue dispenser detects a target signal.

[0135] S313. Control the valve needle to rise by a first height and then eject the knife-aligning glue point, and record the first coordinate of the head module.

[0136] Combined with Figure 1 shown, first, the valve needle 40 can be controlled to move above the glue dispenser 50. For example, the head module can be automatically or manually controlled to move the valve needle 40 above the glue dispenser 50. The height of the valve needle 40 from the glue dispenser 50 can be set arbitrarily, as long as it is ensured that the end of the valve needle 40 is above the glue dispenser 50 and they do not touch.

[0137] Then, the valve needle 40 can be controlled to gradually descend in steps with a preset height. For example, in one example, the valve needle 40 can be controlled to descend 0.001 mm each time, that is, the preset height is 0.001 mm, until the glue dispenser 50 detects a target signal.

[0138] It can be understood that the glue dispenser 50 is a device used to adjust tools and other implements. When the end of the valve needle 40 does not touch the upper surface of the glue dispenser 50, the detection signal of the glue dispenser 50 is always off. As the valve needle 40 continues to descend until the end of the valve needle 40 touches the upper surface of the glue dispenser 50, at this time, the glue dispenser 50 detects that the target signal is on, indicating that the end of the valve needle 40 has contacted the glue dispenser 50.

[0139] After the glue dispenser 50 detects the target signal, the valve needle 40 can be controlled to rise by a first height for glue spraying. The purpose of rising by the first height is to reserve space for glue spraying, so as to avoid the influence of the valve needle 40 spraying obliquely. The value of the first height is equal to the diameter of the glue point for glue spraying.

[0140] For example, in one example, the diameter of the valve needle 40 is 0.2 mm, so the diameter of a drop of glue is also 0.2 mm, and the first height can be set to 0.2 mm. In this case, the glue is sprayed when the end of the valve needle 40 is 0.2 mm away from the upper surface of the tool setting instrument 50. On the one hand, space for a drop of glue can be reserved, and on the other hand, the influence of the valve needle 40 spraying deviation can be avoided. The position of the glue point sprayed can be regarded as coinciding with the position of the end of the valve needle 40. In the embodiment of the present disclosure, the glue point sprayed by the valve needle 40 at this time is defined as the tool setting glue point.

[0141] After the control valve needle 40 sprays out the knife setting glue point, the first coordinate of the head module at this time can be recorded. In the embodiment of the present disclosure, only the horizontal position of the head module is considered, so the first coordinate can be expressed as (x 1 ,y 1 ).

[0142] It is worth mentioning that in the embodiment of the present disclosure, since the valve needle 40 needs to gradually descend to contact with the tool setting instrument 50, the initial height of the valve needle 40 above the tool setting instrument 50 needs to be reasonably selected. If the initial height is too high, the process of the valve needle 40 descending to contact with the tool setting instrument 50 is very slow. If the initial height is too low, there is a risk of collision and interference between the valve needle 40 and the tool setting instrument 50, resulting in damage to the device.

[0143] Therefore, in some implementations, the initial height of the valve needle 40 from the tool setting instrument 50 can be reasonably selected based on the specific scene requirements, and then the approximator algorithm can be used to control the valve needle 40 to gradually contact the tool setting instrument 50, which will not be elaborated in this disclosure.

[0144] In the embodiment of the present disclosure, by Figure 4 After the glue spraying of the knife glue point is completed in the above process, the head module can be controlled to move horizontally so that the optical center of the camera moves above the knife glue point. For example, in some embodiments, the optical center of the camera can be moved manually or automatically above the knife glue point.

[0145] It is understandable that at this time, the optical center of the camera and the tool setting glue point are only roughly aligned, that is, the optical center of the camera and the center of the tool setting glue point are not completely coincident, but there is a certain horizontal coordinate deviation. If the first offset is calculated using the position coordinates at this time, a large position error will be introduced. Therefore, in the embodiment of the present disclosure, the PID (Proportional Integral Differential) algorithm can be used to perform closed-loop control on the position of the head module so that the optical center of the camera is kept coincident with the center of the tool setting glue point as much as possible, which is explained below in conjunction with S320 to S340.

[0146] S320. Collect a second image of the tool setting rubber point, and perform image detection on the second image to obtain a first difference between the camera optical center and the center coordinates of the tool setting rubber point.

[0147] In some embodiments of the present disclosure, after the camera optical center moves above the tool setting rubber point to complete rough alignment, the camera can be used to collect a second image including the tool setting rubber point below, and then the second image is processed based on an image detection algorithm to determine the pixel coordinates of the center of the tool setting rubber point on the second image.

[0148] After determining the pixel coordinates of the center of the tool setting rubber point, the pixel coordinate difference between the center of the tool setting rubber point and the camera optical center can be determined based on the pixel coordinates. In some embodiments, the camera optical center is the coordinate origin of the pixel coordinates, so the pixel coordinates of the center of the tool setting rubber point can represent the pixel coordinate difference between the two. For example, in one example, the pixel coordinates of the tool setting rubber point are represented as (u, v).

[0149] Then, it is necessary to convert the pixel coordinates to the world coordinate system. In some embodiments, the coordinate conversion can be achieved by using the nine-point calibration method, so as to convert the center coordinates of the tool setting rubber point from pixel coordinates to world coordinates, which is expressed as:

[0150]

[0151] In formula (1), u i and v i represent the pixel coordinates of the center point of the tool setting rubber point during the i-th photographing, a 1 , b 1 , c 1 , a 2 , b 2 , c 2 represent calibration parameters, and Δx i and Δy i i.e., represent the first difference between the camera optical center and the center coordinates of the tool setting rubber point during the i-th photographing.

[0152] Through formula (1), the deviation between the center coordinates of the tool setting rubber point and the camera optical center in the world coordinate system can be determined, and this deviation is also the first difference described in the present disclosure.

[0153] S330. Based on the PID control algorithm, perform closed-loop control on the first difference until the convergence condition is met, and determine the second coordinates of the head module.

[0154] It can be understood that the PID algorithm is the abbreviation of the Proportional, Integral, and Differential control algorithm, which is a most widely used automatic closed-loop controller.

[0155] Therefore, in the embodiments of the present disclosure, the PID algorithm can be used to perform closed-loop control on the first difference between the optical center of the camera and the central coordinates of the tool setting rubber point. The control objective is to make the first difference as small as possible, so that the optical center of the camera continuously approaches the central coordinates of the tool setting rubber point until the convergence condition is met.

[0156] In other words, in the embodiments of the present disclosure, the position of the head module is continuously adjusted by using the PID algorithm, so that the first difference between the optical center of the camera and the central coordinates of the tool setting rubber point converges iteratively until the optical center of the camera coincides with the central coordinates of the tool setting rubber point.

[0157] In some embodiments, the PID algorithm process of the present disclosure example can be expressed as:

[0158]

[0159] In formula (2), Δx i and Δy i are the first differences between the optical center of the camera and the central coordinates of the tool setting rubber point calculated by the aforementioned formula (1) during the i-th photographing. p represents the PID controller parameter, and Δm x and Δm y represent the position deviations that the head module needs to move during the i-th time.

[0160] Combining formulas (1) and (2), taking the c-th control as an example, first, the first differences Δx i and Δy i of the c-th control can be calculated based on the aforementioned formula (1), and then substituted into formula (2) to calculate the position deviations Δm x and Δm y that the head module needs to move during the c-th control process. Then, based on the position deviations Δm x and Δm y to control the movement of the head module, continue the (c + 1)-th control, and repeat the above process to continuously iterate the position of the head module until the convergence condition is met.

[0161] In some embodiments, the convergence condition of the PID controller can be: the first difference is less than the preset deviation value. Thus, during the i-th control process, the first differences Δx i and Δy i are compared with the preset deviation value. If the first difference is greater than the preset deviation value, repeat the above method process and execute the i-th control process. If the first difference is less than or equal to the preset deviation value, it means that the position deviation between the optical center of the camera and the central coordinates of the tool setting rubber center has met the accuracy requirements, and thus the PID control process can be stopped.

[0162] It should be noted that the specific value of the preset deviation value can be arbitrarily selected according to the accuracy requirements, and the present disclosure does not limit this. For example, in one example, the preset deviation value can be set to 0.003 mm. 0.003 mm is a reasonable threshold set considering interference factors such as mechanical errors, camera distortion, and light. That is, when the first differences Δx i and Δy i are both less than or equal to 0.003 mm, the PID control process can be stopped.

[0163] After the PID control process is completed, it indicates that the position deviation between the camera optical center and the center point of the tooling alignment glue point has converged to a very small range. At this time, it can be considered that the two coincide in the horizontal direction. At the same time, the position coordinates of the head module can be recorded to obtain the second coordinate, denoted as (x 2 , y 2 ).

[0164] S340. Determine the first offset based on the difference between the first coordinate and the second coordinate.

[0165] Combined with the foregoing, the first coordinate (x 1 , y 1 ) represents the position of the head module when the tooling alignment glue point is ejected. At this time, the valve needle 40 is aligned with the center point of the tooling alignment glue point. When the head module moves to the second coordinate (x 2 , y 2 ), at this time, the camera optical center is aligned with the center point of the tooling alignment glue point. Therefore, the difference between the first coordinate and the second coordinate represents the first offset between the valve needle 40 and the camera optical center in the horizontal direction, that is:

[0166]

[0167] In formula (3), (x 偏 , y 偏 ) represents the first offset between the valve needle 40 and the camera optical center in the horizontal direction.

[0168] As can be seen from the above, in the embodiment of the present disclosure, the automatic position adjustment of the head module is realized by using an approximator and a PID algorithm, so that the camera optical center can approximate the glue center as much as possible, thereby calculating a more accurate first offset and providing a high-precision data basis for subsequent detection.

[0169] For example Figure 5a shows a schematic diagram of the detection method using related technologies, the camera optical center (cross center) and the center of the tooling alignment glue point. It can be seen that the camera optical center does not completely coincide with the center of the tooling alignment glue point, but there is an obvious position deviation, so the first offset calculated based on this also has a large error. And in Figure 5bIn the detection method adopting the embodiment of the present disclosure as shown, the position error between the camera optical center and the center of the alignment glue dot is less than one pixel, and the accuracy is significantly higher.

[0170] In the embodiment of the present disclosure, after determining the first offset between the end of the valve needle 40 and the camera optical center, the spray deviation detection for the valve needle 40 can be realized based on this first offset. The following will be described in conjunction with Figure 6 for illustration.

[0171] As Figure 6 shown, in some embodiments, for the detection method exemplified in the present disclosure, the process of obtaining the first position of the head module when the valve needle ejects the reference glue dot and controlling the head module to move to the second position based on the first offset includes:

[0172] S221. Control the valve needle to eject the reference glue dot at a preset working height, and record the first position of the head module when the reference glue dot is ejected.

[0173] S222. Control the head module to horizontally move from the first position to the second position based on the first offset.

[0174] In the embodiment of the present disclosure, first, the valve needle 40 can be controlled to eject the reference glue dot at a preset working height from the working plane, and at the same time, record the position coordinates of the head module. This position coordinate is the first position described in the present disclosure.

[0175] The working plane refers to the working surface of the dispenser for dispensing glue on the target object. For example Figure 1 in the example, the target object is the mobile phone 10, so the working plane can be the glue - dispensing surface on the mobile phone 10.

[0176] In addition, combining the foregoing, during the glue - dispensing process, to avoid damaging the mobile phone 10, the end of the valve needle 40 generally has a certain height from the working plane, and this height is the preset working height described in the present disclosure. The specific value of the preset working height can be selected according to the working requirements, and the present disclosure does not limit this. For example, in an exemplary embodiment, the preset working height is 3 mm to 5 mm, that is, during glue - dispensing, the end of the valve needle 40 is 3 mm to 5 mm away from the working plane.

[0177] In the embodiment of the present disclosure, the valve needle can be controlled to eject one or more drops of glue dots arbitrarily on the working plane. When the glue dots fall on the working plane, the reference glue dots described in the present disclosure are formed. In some embodiments, the valve needle can be controlled to eject one drop of reference glue dot on the working plane.

[0178] In some other embodiments, the valve needle can be controlled to sequentially eject multiple drops of reference glue dots at different positions on the working plane. The purpose of ejecting multiple drops of reference glue dots is to consider that when the first drop of glue dot is ejected, it may have partially solidified at the position of the valve nozzle, resulting in the reference glue dot not being formed. Therefore, multiple drops of reference glue dots can be continuously ejected, and the glue dot after the ejection is stabilized is used as the reference glue dot. For example, in one example, the valve needle can be controlled to sequentially eject 3 drops of reference glue dots at different positions on the working plane, and then the 3rd drop of reference glue dot is selected for subsequent calculations.

[0179] In the embodiments of the present disclosure, taking any reference glue dot as an example, while the valve needle 40 ejects the reference glue dot, the head module can record the position coordinates when the reference glue dot is currently ejected. This position coordinate is also the first position, denoted as (x 0 , y 0 ).

[0180] Combined with the foregoing, assuming that the valve needle is not ejected obliquely, then when the reference glue dot lands on the working plane, its center coordinates are also (x 0 , y 0 ), that is, the valve needle is directly above the center of the reference glue dot.

[0181] Then, based on the previously determined first offset (x 偏 , y 偏 ), the head module is controlled to move to the second position (x 0 + x 偏 , y 0 + y 偏 ). It can be understood that the first offset (x 偏 , y 偏 ) represents the horizontal offset between the end of the valve needle and the optical center of the camera. Assuming that when the head module is at the first position (x 0 , y 0 ) and the valve needle is not ejected obliquely, the valve needle is directly above the center of the reference glue dot. And when moving to the second position (x 偏 , y 偏 ) based on the first offset (x 0 + x 偏 , y 0 + y 偏 ), at this time, the optical center of the camera will be directly above the center of the reference glue dot.

[0182] After the head module moves to the second position (x 0 + x 偏 , y 0 + y 偏 ), an image including the reference glue dot below can be collected by the camera. This image is the first image described in the present disclosure. Then, based on the first image, the second offset is determined. The following is combined with Figure 7A description will be given.

[0183] As Figure 7 shown, in some embodiments, in the detection method exemplified in the present disclosure, the process of determining the second offset includes:

[0184] S231. Perform image detection on the first image to determine the central coordinates of the reference glue point, and determine the second difference between the central coordinates of the reference glue point and the camera optical center.

[0185] In the embodiments of the present disclosure, after the first image is acquired, the first image is processed based on an image detection algorithm to determine the pixel coordinates of the center of the reference glue point on the first image.

[0186] After determining the pixel coordinates of the center of the reference glue point, the pixel coordinate difference between the center of the reference glue point and the camera optical center can be determined based on the pixel coordinates. In some embodiments, the camera optical center is the coordinate origin of the pixel coordinates, so the pixel coordinates of the center of the reference glue point can represent the pixel coordinate difference between the two.

[0187] Then, it is necessary to convert the pixel coordinates to the world coordinate system. In some embodiments, the coordinate conversion can be achieved by using the three-point calibration method, so as to convert the central coordinates of the reference glue point from pixel coordinates to world coordinates, expressed as:

[0188]

[0189] In formula (4), u i and v i represent the pixel coordinates of the center point of the reference glue point during the i-th photographing, and a 1 , b 1 , c 1 , a 2 , b 2 , c 2 represent calibration parameters, and Δx i+1 and Δy i+1 i.e., represent the second difference between the camera optical center and the central coordinates of the reference glue point during the i-th photographing.

[0190] Through formula (4), the deviation between the central coordinates of the reference glue point and the camera optical center in the world coordinate system can be determined, and this deviation is also the second difference described in the present disclosure.

[0191] S232. Perform closed-loop control on the second difference based on the PID control algorithm until the convergence condition is met, and determine the third position of the head module.

[0192] Similar to the foregoing, in the embodiments of the present disclosure, a PID algorithm can be used to perform closed-loop control on the second difference between the optical center of the camera and the central coordinates of the reference glue point. The control objective is to make the second difference as small as possible, so that the optical center of the camera continuously approaches the central coordinates of the reference glue point until the convergence condition is met.

[0193] In other words, in the embodiments of the present disclosure, the position of the nose module is continuously adjusted by using the PID algorithm, so that the second difference between the optical center of the camera and the central coordinates of the reference glue point converges iteratively until the optical center of the camera coincides with the central coordinates of the reference glue point.

[0194] In some embodiments, the PID algorithm process of the present disclosure example can be expressed as:

[0195]

[0196] In formula (5), Δx i+1 and Δy i+1 are the second differences between the optical center of the camera and the central coordinates of the reference glue point calculated by the foregoing formula (1) during the i-th photographing. p represents the PID controller parameter, and Δm x and Δm y represent the position deviations that the nose module needs to move during the i-th time.

[0197] Combining formulas (4) and (5), taking the d-th control as an example, first, the second differences Δx i+1 and Δy i+1 of the d-th control can be calculated based on the foregoing formula (4), and then substituted into formula (5) to calculate the position deviations Δm x and Δm y that the nose module needs to move during the d-th control process. Then, based on the position deviations Δm x and Δm y the nose module is controlled to move, and the d + 1-th control is continued. The foregoing process is repeated to continuously iterate the position of the nose module until the convergence condition is met.

[0198] In some embodiments, the convergence condition of the PID controller can be: the second difference is less than the preset deviation value. Thus, during the i-th control process, the second differences Δx i+1 and Δy i+1 are compared with the preset deviation value. If the second difference is greater than the preset deviation value, the previous method process is repeated to perform the i-th control process. If the second difference is less than or equal to the preset deviation value, it means that the position deviation between the optical center of the camera and the central coordinates of the reference glue center has met the accuracy requirements, and thus the PID control process can be stopped.

[0199] It should be noted that the specific value of the preset deviation value can be arbitrarily selected according to the accuracy requirements, and the present disclosure does not limit this. For example, in one example, the preset deviation value can be set to 0.003 mm. 0.003 mm is a reasonable threshold set considering interference factors such as mechanical errors, camera distortion, and light. That is, when the second differences Δx i+1 and Δy i+1 are both less than or equal to 0.003 mm, the PID control process can be stopped.

[0200] After the PID control process is completed, it indicates that the position deviation between the camera optical center and the center point of the reference glue dot has converged to a very small range. At this time, it can be considered that the two coincide in the horizontal direction. At the same time, the position coordinates of the head module can be recorded to obtain the third position, and the third position is expressed as (x 3 , y 3 ).

[0201] S233. Determine the second offset based on the difference between the third position and the first position.

[0202] As can be understood from the foregoing, the first position (x 0 , y 0 ) represents the head module coordinates when spraying the reference glue dot, and the third position (x 3 , y 3 ) represents the position where the head module first moves the first offset (x 偏 , y 偏 ) and then moves to the position where the camera optical center coincides with the center of the reference glue dot.

[0203] Therefore, the difference between the third position (x 3 , y 3 ) and the first position (x 0 , y 0 ) can reflect the actual deviation between the center coordinates of the reference glue dot and the camera optical center, which includes the first offset between the end of the valve needle and the camera optical center and the deviation of the reference glue dot caused by spraying crooked. That is, the relationship between the third position (x 3 , y 3 ) and the first position (x 0 , y 0 ) can be expressed as:

[0204]

[0205] In formula (6), (x 偏 + Δx) and (y 偏 + Δy) are the second offset, where Δx and Δy represent the position deviation of the reference glue dot caused by the valve needle spraying crooked.

[0206] As described above, assuming that the valve needle is not sprayed obliquely, then both (Δx, Δy) are zero, so that the second offset (x 偏 +Δx, y 偏 +Δy) should be the same as the first offset (x 偏 , y 偏 ). Therefore, in the embodiments of the present disclosure, the difference between the first offset and the second offset can be used as the amount of skew for evaluating the skew of the valve needle.

[0207] That is, in some embodiments of the present disclosure, based on the first offset (x 偏 , y 偏 ) and the second offset (x 偏 +Δx, y 偏 +Δy), the amount of skew of the valve needle can be determined, which is expressed as:

[0208]

[0209] In formula (7), tx and ty represent the amount of skew. The smaller the amount of skew, the smaller the difference between the first offset and the second offset, that is, the less the degree of skew of the dispenser. On the contrary, the larger the amount of skew, the greater the difference between the first offset and the second offset, that is, the more serious the degree of skew of the dispenser.

[0210] In some embodiments of the present disclosure, a first preset threshold can be set in advance for the amount of skew, and the first preset threshold represents the critical value for the dispenser to pass the detection.

[0211] If the amount of skew is less than or equal to the first preset threshold, it means that the precision error of the dispenser is within the controllable range at this time, and only algorithm correction is needed to still meet the precision requirements, so the detection result of the dispenser can be determined to be passed.

[0212] On the contrary, if the amount of skew is greater than the first preset threshold, it means that the precision error of the dispenser is already very large at this time, and only algorithm correction can no longer meet the precision requirements, and manual adjustment of the dispenser precision is required, so the detection result of the dispenser can be determined to be not passed.

[0213] In some embodiments, considering that the dispensing stability of the dispenser is also an important factor affecting the dispensing precision, therefore, when the amount of skew meets the conditions, it can be further determined whether the current dispensing stability meets the precision requirements.

[0214] For example, in some embodiments, when the amount of skew is less than or equal to the first preset threshold, images of multiple reference glue dots can be collected, and the dispensing stability can be determined based on the sizes of the reference glue dots on the images. The following will be described in conjunction with Figure 8 for illustration.

[0215] Such asFigure 8 As shown, in some embodiments, the detection method of the present disclosure example for determining the glue spraying stability includes:

[0216] S810. Control the head module to sequentially eject a plurality of reference glue dots at multiple different positions on the glue dispensing surface.

[0217] S820. Collect an image including a plurality of reference glue dots through a camera.

[0218] S830. Perform image detection on the image including a plurality of reference glue dots to determine the size of each reference glue dot.

[0219] S840. Determine the glue spraying stability according to the standard deviation of the sizes of all reference glue dots.

[0220] Combined with the foregoing Figure 6 embodiments, it can be known that when ejecting the reference glue dots, the valve needle can be controlled to sequentially eject multiple drops of reference glue dots at different positions on the working plane, so that the first image collected also includes these multiple reference glue dots.

[0221] Then, image detection can be performed on the first image to respectively determine the glue dot radius corresponding to each reference glue dot. For example, in one example, a total of 3 reference glue dots are included on the first image, and the radii of the 3 reference glue dots are determined to be r 1 、r 2 、r 3 .

[0222] It can be understood that in the case of good glue spraying stability, the shapes and sizes of the continuously ejected multiple reference glue dots should be very similar. Therefore, in the embodiments of the present disclosure, the standard deviation of the sizes of multiple reference glue dots can be used as a parameter for evaluating the glue spraying stability.

[0223] In the above example, the process of calculating the standard deviation of the sizes of 3 reference glue dots is expressed as:

[0224]

[0225]

[0226] In formulas (8) and (9), represents the average radius of the 3 reference glue dots, and σ represents the standard deviation of the size.

[0227] In some embodiments, a second preset threshold may be set in advance for the glue spraying stability, and the second preset threshold represents the critical value for the dispenser to pass the detection. If the glue spraying stability σ is less than or equal to the second preset threshold, it indicates that the glue spraying stability of the dispenser meets the working requirements at this time, so the detection result of the dispenser can be determined to be passed. On the contrary, if the glue spraying stability σ is greater than the second preset threshold, it indicates that the glue spraying stability of the dispenser is poor and cannot meet the working requirements, so the detection result of the dispenser can be determined to be not passed.

[0228] In the above embodiments of the present disclosure, the specific values of the first preset threshold and the second preset threshold can be selected according to the scenario requirements, and the present disclosure does not limit this.

[0229] In the embodiments of the present disclosure, in the case where the detection result of the dispenser is determined to be passed through the above method process, the above method process can be repeatedly executed at preset intervals, for example, the above detection method process is executed every 1 day, 7 days, 14 days, etc., to achieve periodic detection of the dispenser. Those skilled in the art can understand this, and the present disclosure will not elaborate further.

[0230] As can be seen from the above, in the embodiments of the present disclosure, determining the detection result based on the first offset and the second offset can effectively reflect the skew situation of the valve needle, can intuitively and quantitatively reflect the dispensing accuracy of the dispenser, realize the early warning of the dispensing effect, and can provide accurate correction data for the dispensing position correction of the dispenser, reduce the dispensing error, and improve the dispensing accuracy and product yield. Using the approximator and the PID algorithm to realize the automatic position adjustment of the head module, making the camera optical center as close as possible to the glue center, further improving the detection accuracy. Moreover, combining the glue spraying stability to realize multi-dimensional detection of the dispenser, further improving the detection effect and accuracy.

[0231] In some embodiments, the present disclosure provides a dispenser control method, which can be applied to, for example Figure 1 the automatic dispenser shown, so as to perform error correction on the dispensing position based on the second offset obtained from the foregoing detection method process during the dispensing operation, thereby improving the dispensing accuracy. The following will be described in conjunction with Figure 9 for illustration.

[0232] As Figure 9 shown, in some embodiments, the dispensing control method exemplified by the present disclosure includes:

[0233] S910. In response to the detection result of the dispenser being passed, during the dispensing operation, based on the image of the target object collected, determine the position to be dispensed on the target object.

[0234] Combined with Figure 1For the dispensing machine shown, when it is determined that the detection result of the dispensing machine is passed based on the detection method described above, it indicates that the dispensing accuracy of the dispensing machine can meet the accuracy requirements through algorithm calibration.

[0235] Therefore, during the dispensing operation, taking the target object as a mobile phone for example, refer to Figure 1 As shown, the mobile phone 10 is grasped by the manipulator and placed on the carrier 20. Driven by the conveyor belt below, the carrier 20 drives the mobile phone to move below the head module.

[0236] The camera 30 can collect an image of the target object (mobile phone 10) below, and then determine one or more dispensing positions on the target object based on image detection technology.

[0237] S920. Correct the position to be dispensed based on the second offset to obtain the target dispensing position.

[0238] Combined with the foregoing embodiments, it can be known that the second offset (x 偏 +Δx, y 偏 +Δy) includes the first offset between the end of the valve needle and the optical center of the camera, as well as the dispensing deviation caused by the valve needle being sprayed obliquely. Therefore, in the embodiments of the present disclosure, after determining the position to be dispensed, the position to be dispensed can be corrected based on the second offset.

[0239] For example, in one example, assume that the coordinates of the head module corresponding to the position to be dispensed on the target object are (x j , y j ). After correcting the position to be dispensed based on the second offset, the obtained target dispensing position of the head module is (x j +x 偏 +Δx, y j +y 偏 +Δy).

[0240] S930. Control the head module to move to the target dispensing position for dispensing.

[0241] In the embodiments of the present disclosure, the target dispensing position represents the position of the corrected head module. Therefore, after determining the target dispensing position, the head module can be controlled to move to the target dispensing position for dispensing.

[0242] For example, in the above example, when the target dispensing position is determined to be (x j +x 偏 +Δx, y j +y 偏 +Δy), the dispensing machine can control the head module to move to the target dispensing position of (x j +x 偏 +Δx, y j +y 偏+(Δy), and then control the valve needle to perform the dispensing operation.

[0243] As can be seen from the above, in the embodiments of the present disclosure, the second offset is used to correct the position to be dispensed, effectively eliminating or alleviating the deviation between the optical center of the camera and the end of the valve needle, as well as the dispensing error caused by the valve needle spraying obliquely, improving the dispensing accuracy and effect.

[0244] In some embodiments, the present disclosure provides a dispensing machine detection device, which can be applied to, for example Figure 1 the automatic dispensing machine shown.

[0245] As Figure 10 shown, in some embodiments, the dispensing machine detection device exemplified by the present disclosure includes:

[0246] A first offset module 1, configured to determine a first offset between the end of the valve needle and the optical center of the camera in the horizontal direction;

[0247] A position movement module 2, configured to obtain a first position of the head module when the valve needle sprays a reference glue dot, control the head module to move to a second position based on the first offset and the first position, and collect a first image of the reference glue dot at the second position;

[0248] A second offset module 3, configured to perform image detection on the first image, and determine a second offset based on the difference between the center coordinates of the reference glue dot on the first image and the optical center of the camera;

[0249] A result determination module 4, configured to determine a detection result of the dispensing machine based on the first offset and the second offset.

[0250] As can be seen from the above, in the embodiments of the present disclosure, determining the detection result based on the first offset and the second offset can effectively reflect the spraying skew of the valve needle, can intuitively and quantitatively reflect the dispensing accuracy of the dispensing machine, realize the early warning of the dispensing effect, and can provide accurate correction data for the dispensing position correction of the dispensing machine, reduce the dispensing error, and improve the dispensing accuracy and product yield.

[0251] In some embodiments, the first offset module 1 is configured to:

[0252] Determine a first coordinate of the head module when the valve needle sprays a knife-aligning glue dot, and control the head module to move horizontally so that the optical center of the camera moves above the knife-aligning glue dot;

[0253] Collect a second image of the knife-aligning glue dot, and perform image detection on the second image to obtain a first difference between the optical center of the camera and the center coordinates of the knife-aligning glue dot;

[0254] Perform closed-loop control on the first difference based on the PID control algorithm until the convergence condition is met, and determine the second coordinate of the head module;

[0255] Determine the first offset based on the difference between the first coordinate and the second coordinate.

[0256] In some embodiments, the first offset module 1 is configured to:

[0257] Control the valve needle to move above the tool setter;

[0258] Control the valve needle to descend in steps with a preset height until the tool setter detects a target signal, where the target signal indicates that the end of the valve needle contacts the tool setter;

[0259] Control the valve needle to rise by a first height and then eject the tool setting glue dot, and record the first coordinate of the head module, where the first height is the diameter of the tool setting glue dot.

[0260] In some embodiments, the position movement module 2 is configured to:

[0261] Control the valve needle to eject the reference glue dot at a preset operation height, and record the first position of the head module when the reference glue dot is ejected;

[0262] Control the head module to horizontally move from the first position to the second position based on the first offset.

[0263] In some embodiments, the second offset module 3 is configured to:

[0264] Perform image detection on the first image to determine the center coordinate of the reference glue dot, and determine the second difference between the center coordinate of the reference glue dot and the optical center of the camera;

[0265] Perform closed-loop control on the second difference based on the PID control algorithm until the convergence condition is met, and determine the third position of the head module;

[0266] Determine the second offset based on the difference between the third position and the first position.

[0267] In some embodiments, the result determination module 4 is configured to:

[0268] Determine the amount of deviation of the valve needle ejection based on the difference between the first offset and the second offset;

[0269] In response to the amount of deviation being greater than a first preset threshold, determine that the detection result of the dispensing machine fails;

[0270] In response to the amount of glue spraying deviation being less than or equal to the first preset threshold, images of a plurality of reference glue dots are collected, and the glue spraying stability is determined based on the sizes of the respective reference glue dots on the images;

[0271] In response to the glue spraying stability being less than the second preset threshold, it is determined that the detection result of the dispensing machine fails.

[0272] In some embodiments, the result determination module 4 is configured to:

[0273] Control the head module to sequentially spray a plurality of reference glue dots at multiple different positions on the dispensing surface;

[0274] Collect an image including the plurality of reference glue dots through the camera;

[0275] Perform image detection on the image including the plurality of reference glue dots to determine the size of each reference glue dot;

[0276] Determine the glue spraying stability according to the standard deviation of the sizes of all reference glue dots.

[0277] As can be seen from the above, in the embodiments of the present disclosure, the detection result is determined based on the first offset and the second offset, which can effectively reflect the deviation of the valve needle during glue spraying, can intuitively and quantitatively reflect the dispensing accuracy of the dispensing machine, realize early warning of the dispensing effect, and can provide accurate correction data for the dispensing position correction of the dispensing machine, reduce the dispensing error, and improve the dispensing accuracy and product yield. The automatic position adjustment of the head module is realized by using the approximator and the PID algorithm, so that the optical center of the camera is as close as possible to the glue center, further improving the detection accuracy. Moreover, the multi-dimensional detection of the dispensing machine is realized by combining the glue spraying stability, further improving the detection effect and accuracy.

[0278] In some embodiments, the present disclosure provides a dispensing machine control device, which can be applied to, for example Figure 1 the automatic dispensing machine shown.

[0279] As Figure 11 shown, in some embodiments, the dispensing machine detection device exemplified by the present disclosure includes:

[0280] A position determination module 5, configured to, in response to the detection result of the dispensing machine being passed, during the dispensing operation, determine the position to be dispensed on the target object based on the collected image of the target object; the detection result is obtained according to the dispensing machine detection method of any of the above embodiments;

[0281] A position correction module 6, configured to correct the position to be dispensed based on the second offset to obtain the target dispensing position;

[0282] The dispensing control module 7 is configured to control the head module to move to the target dispensing position for dispensing.

[0283] As can be seen from the above, in the embodiments of the present disclosure, the second offset is used to correct the position to be dispensed, effectively eliminating or alleviating the deviation between the optical center of the camera and the end of the valve needle, as well as the dispensing error caused by the valve needle spraying obliquely, and improving the dispensing accuracy and effect.

[0284] In some embodiments, the present disclosure provides an automatic dispenser, including:

[0285] A head module, including a camera and a dispensing valve needle;

[0286] A controller, including a processor and a memory, the memory stores computer instructions, and the computer instructions are used to cause the processor to execute the method described in any of the above embodiments.

[0287] In some embodiments, the present disclosure provides a storage medium storing computer instructions, and the computer instructions are used to cause a computer to execute the method described in any of the above embodiments.

[0288] Specifically, Figure 12 FIG. shows a schematic structural diagram of an automatic dispenser 600 suitable for implementing the method of the present disclosure. Through Figure 12 the shown dispenser system, the corresponding functions of the above-mentioned processor and storage medium can be realized.

[0289] As Figure 12 shown, the dispenser 600 includes a processor 601, which can perform various appropriate actions and processes according to the program stored in the memory 602 or the program loaded from the storage section 608 into the memory 602. In the memory 602, various programs and data required for the operation of the dispenser 600 are also stored. The processor 601 and the memory 602 are connected to each other through a bus 604. The input / output (I / O) interface 605 is also connected to the bus 604.

[0290] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that the computer program read from it can be installed into the storage section 608 as needed.

[0291] In particular, according to an embodiment of the present disclosure, the above method process can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product that includes a computer program tangibly embodied on a machine-readable medium, and the computer program includes program code for performing the above method. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from the removable medium 611.

[0292] The flowcharts and block diagrams in the accompanying drawings illustrate the architectures, functions, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0293] Obviously, the above embodiments are merely examples for clear illustration and are not limitations on the embodiments. For those of ordinary skill in the art, other different forms of changes or variations can be made based on the above description. It is not necessary and impossible to enumerate all the embodiments here. The obvious changes or variations derived therefrom are still within the protection scope of the present disclosure.

Claims

1. A dispensing machine detection method, It is characterized in that The dispensing machine includes a head module, the head module includes a camera and a dispensing valve needle, and the method includes: Determine a first offset between the valve needle end and the camera optical center in a horizontal direction, wherein the horizontal direction refers to a direction parallel to the ground; Acquire a first position of the head module when the valve needle sprays a reference glue dot, control the head module to move to a second position based on the first offset and the first position, and capture a first image of the reference glue dot at the second position, wherein the second position represents a pre-aligned position between the optical center of the camera and the center of the reference glue dot; Performing image detection on the first image, and determining a second offset based on a difference between a central coordinate of the reference glue point on the first image and an optical center of a camera; Based on the first offset and the second offset, a detection result of the dispensing machine is determined.

2. The method according to claim 1, It is characterized in that The determining of a first offset between the valve needle end and the camera optical center in the horizontal direction comprises: Determine the first coordinate of the head module when the valve needle sprays out the tool setting glue point, and control the head module to move horizontally so that the optical center of the camera moves above the tool setting glue point; Collecting a second image of the tool setting glue point, and performing image detection on the second image to obtain a first difference between the camera optical center and the center coordinates of the tool setting glue point; Performing closed-loop control on the first difference based on a PID control algorithm until a convergence condition is met, thereby determining a second coordinate of the head module; The first offset is determined based on a difference between the first coordinate and the second coordinate.

3. The method according to claim 2, It is characterized in that The determining of the first coordinate of the head module when the valve needle sprays out the tool setting glue point includes: Controlling the valve needle to move above the tool setting instrument; Controlling the valve needle to descend with a preset height as a step length until the tool setting instrument detects a target signal, wherein the target signal indicates that the end of the valve needle is in contact with the tool setting instrument; The valve needle is controlled to rise to a first height to spray out the tool setting glue dot, and the first coordinate of the head module is recorded, wherein the first height is the diameter of the tool setting glue dot.

4. The method according to claim 1, It is characterized in that The step of obtaining the first position of the die head module when the valve needle sprays the reference glue point, and controlling the die head module to move to the second position based on the first offset and the first position, comprises: Controlling the valve needle to spray the reference glue dot at a preset working height, and recording the first position of the head module when spraying the reference glue dot; The head module is controlled to move horizontally from the first position to the second position based on the first offset.

5. The method according to claim 1, It is characterized in that The performing image detection on the first image and determining the second offset based on the difference between the central coordinates of the reference glue point on the first image and the optical center of the camera includes: Performing image detection on the first image to determine the center coordinates of the reference glue dot, and determining a second difference between the center coordinates of the reference glue dot and the optical center of the camera; Performing closed-loop control on the second difference based on a PID control algorithm until a convergence condition is met, thereby determining a third position of the head module; The second offset is determined based on a difference between the third position and the first position.

6. The method according to claim 1, It is characterized in that The step of determining a detection result of the dispensing machine based on the first offset and the second offset includes: determining a spray deviation amount of the valve needle based on a difference between the first deviation and the second deviation; In response to the spray deviation amount being greater than a first preset threshold, determining that the detection result of the glue dispenser is failed; In response to the spray deviation amount being less than or equal to the first preset threshold, collecting images of a plurality of reference glue dots, and determining the glue spraying stability based on the size of each reference glue dot on the image; In response to the glue spraying stability being less than a second preset threshold, it is determined that the detection result of the glue dispenser is failed.

7. The method according to claim 6, It is characterized in that The collecting of images of a plurality of reference glue dots and determining the glue spraying stability based on the size of each reference glue dot on the image includes: Controlling the head module to sequentially spray a plurality of reference glue dots at a plurality of different positions on the glue dispensing surface; Acquiring an image including the plurality of reference glue dots by the camera; Performing image detection on the image including the plurality of reference glue dots to determine the size of each reference glue dot; The glue spraying stability is determined based on the size standard deviation of all reference glue dots.

8. A dispensing machine control method, It is characterized in that The dispensing machine includes a head module, the head module includes a camera and a dispensing valve needle, and the method includes: In response to the detection result of the glue dispenser being passed, during the glue dispensing operation, the position to be glued on the target object is determined based on the collected image of the target object; the detection result is obtained according to the glue dispenser detection method according to any one of claims 1 to 7; Correcting the position to be dispensed based on the second offset to obtain a target dispensing position; The head module is controlled to move to the target dispensing position for dispensing.

9. A dispensing machine detection device, It is characterized in that The dispensing machine includes a head module, the head module includes a camera and a dispensing valve needle, and the device includes: A first offset module is configured to determine a first offset between the valve needle end and the camera optical center in a horizontal direction, wherein the horizontal direction represents a direction parallel to the ground; a position movement module, configured to obtain a first position of the head module when the valve needle sprays a reference glue dot, control the head module to move to a second position based on the first offset and the first position, and capture a first image of the reference glue dot at the second position, wherein the second position represents a pre-aligned position between the optical center of the camera and the center of the reference glue dot; A second offset module is configured to perform image detection on the first image and determine a second offset based on a difference between a center coordinate of the reference glue point on the first image and an optical center of a camera; The result determination module is configured to determine a detection result of the dispensing machine based on the first offset and the second offset.

10. A dispensing machine control device, It is characterized in that The dispensing machine includes a head module, the head module includes a camera and a dispensing valve needle, and the device includes: A position determination module, configured to determine, in response to a detection result of the glue dispenser being passed, a position to be glued on the target object based on a captured image of the target object during a glue dispensing operation; the detection result is obtained according to the glue dispenser detection method according to any one of claims 1 to 7; A position correction module is configured to correct the position to be dispensed based on the second offset to obtain a target dispensing position; The glue dispensing control module is configured to control the head module to move to the target glue dispensing position for glue dispensing.

11. An automatic glue dispensing machine, It is characterized in that include: Head module, including camera and dispensing valve needle; A controller comprises a processor and a memory, wherein the memory stores computer instructions, and the computer instructions are used to enable the processor to execute the method according to any one of claims 1 to 7, or to execute the method according to claim 8.

12. A storage medium, It is characterized in that Computer instructions are stored, and the computer instructions are used to make a computer execute the method according to any one of claims 1 to 7, or execute the method according to claim 8.