Tool detection device and method capable of being integrated into tool magazine

By integrating tool detection devices on the tool magazine, using image acquisition and processing technology, rapid and accurate detection of tool wear is achieved, which solves the problem of low tool change accuracy of tool magazine and improves machining accuracy and efficiency.

CN116000701BActive Publication Date: 2025-09-02NANJING UNIV OF SCI & TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211632154.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-19
Publication Date
2025-09-02
Estimated Expiration
2042-12-19

AI Technical Summary

Technical Problem

The prior art cannot effectively combine tool magazine with tool wear detection, resulting in low tool change accuracy and inability to replace wear tools in time, affecting machining accuracy and efficiency.

Method used

A tool detection device that can be integrated into the tool magazine is designed, including an image acquisition module and a control module. The tool position is adjusted through the image acquisition support device, and combined with image processing technology, the tool wear amount is automatically measured to achieve fast and accurate wear detection.

Benefits of technology

It improves the accuracy of tool change in tool magazines, can replace worn tools in time, improve processing accuracy and efficiency, and reduce labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116000701B_ABST
    Figure CN116000701B_ABST
Patent Text Reader

Abstract

The present invention discloses a tool detection device and method that can be integrated on a tool magazine. The device includes an image acquisition module, a cleaning module, a control module, etc.; the image acquisition module includes an image acquisition support device, a bottom blade image acquisition device, a side blade image acquisition device, a shell structure, etc., the lighting module is composed of two annular light sources, and the control module is composed of a controller, a memory, etc.; the image acquisition support device can realize the up and down movement of the bottom blade image acquisition device and the side blade image acquisition device, and the full rotation of the side blade image acquisition device, and then through a visual detection method, the type of tools on the tool magazine and the degree of tool wear can be detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of mechanical automation, and in particular relates to a tool detection device and method that can be integrated on a tool magazine. Background Art

[0002] High-precision, high-efficiency, and multifunctional composite machining centers are a major development direction for CNC equipment. Tool magazines and automatic tool changers are integrated into large and medium-sized composite machining centers, helping to achieve high efficiency, high precision, and high integration. During the machining process, tool wear is one of the key issues affecting product machining accuracy, quality, and efficiency. With the development of society and science and technology, the demand for product manufacturing quality is becoming increasingly stringent, making the detection of tool wear during the machining process even more important. Therefore, during the tool change process in the tool magazine, the system can automatically determine the degree of tool wear and replace the tool in a timely manner. This is of great significance for avoiding degradation in machining quality or other losses caused by excessive tool wear, while also improving production efficiency and reducing labor costs.

[0003] At present, there is insufficient research on tool wear detection in China, especially the detection of tool wear in tool magazines.

[0004] CN201822210994.6 discloses a machine tool monitoring and data measurement system that uses strain gauges to detect tool wear within the toolholder, but this system lacks accuracy. Current detection devices and methods primarily focus on machine tool tool wear detection, but fail to integrate tool magazines with tool wear detection. This makes it impossible to simultaneously detect tool wear and enable timely tool replacement while improving tool change accuracy. Summary of the Invention

[0005] The object of the present invention is to provide a tool detection device and method that can be integrated into a tool magazine, so as to improve the accuracy of tool change and detect tool wear in the tool magazine.

[0006] The technical solutions for achieving the purpose of the present invention are:

[0007] A tool detection device that can be integrated into a tool magazine includes an image acquisition module and a control module; the image acquisition module includes:

[0008] A bottom blade image acquisition device, used for acquiring an image of the bottom blade of the tool;

[0009] A side edge image acquisition device for acquiring images of the tool's measuring edge;

[0010] The image acquisition support device can simultaneously drive the rotation and lifting of the bottom blade image acquisition device and the side blade image acquisition device; by lifting, the bottom blade of the tool is placed within the depth of field of the bottom blade image acquisition device lens, and the side blade image acquisition device obtains a standard position image of each blade of the tool; by rotating, the side blade image acquisition device can obtain a standard position image of the bottom blade of the tool;

[0011] The horizontal distance of the side edge image acquisition device relative to the image acquisition support device is adjustable, and is used to adjust the position of the tool side edge within the depth of field of the side edge camera lens;

[0012] The control module is used to control the rotation and lifting of the image acquisition support device.

[0013] A tool wear detection method for a tool detection device that can be integrated on a tool magazine, including two processes: parameter acquisition and wear measurement;

[0014] The parameter acquisition process is used to enter the information of the new tool before the machining activity begins, including the tool model, number of edges, diameter and image template;

[0015] The wear measurement process is used when the tool returns to the tool magazine after processing the workpiece and before the next processing activity, the tool is taken out by the robotic arm for wear detection. The worn tool threshold image and the unworn image template are masked to extract the worn area, and the average pixel value of the worn area is calculated and converted into the actual average wear size.

[0016] Compared with the prior art, the present invention has the following significant advantages:

[0017] (1) The tool detection device of the present invention has a high degree of integration and can realize rapid, efficient and accurate automatic measurement of tool wear, and can be applied to different types of tool magazines.

[0018] (2) Combined with the tool magazine, it can not only improve the accuracy of tool change in the tool magazine, but also replace excessively worn tools in time by monitoring wear accuracy, thereby improving processing accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is the overall structure diagram of the tool magazine and wear detection device.

[0020] Figure 2 This is a diagram of the wear detection device.

[0021] Figure 3 This is a cross-sectional view of the image acquisition support device.

[0022] Figure 4 This is a diagram of the image acquisition support device.

[0023] Figure 5This is a diagram of the bottom blade image acquisition device.

[0024] Figure 6 This is a diagram of the side blade image acquisition device.

[0025] Figure 7 Schematic diagram of the parameter calibration board installation. Figure (a) is a schematic diagram of the side blade camera calibration, and Figure (b) is a schematic diagram of the bottom blade camera calibration.

[0026] Figure 8 This is the coordinate diagram of the lens and tool.

[0027] Figure 9 Tool positioning diagram.

[0028] Figure 10 Schematic diagram of tool angle and standard position. Figure (a) shows the tool bottom edge before rotation, and Figure (b) shows the tool bottom edge in the standard position after rotation.

[0029] Figure 11 The bottom blade template extraction process diagram is shown in Figure (a) which shows an unworn bottom blade of the tool, and Figure (b) which shows a partial cut of the bottom blade of the tool.

[0030] Figure 12 The following figure shows the process of extracting the side edge template. Figure (a) shows the side edge of the tool without wear, and Figure (b) shows a partial cut of the side edge of the tool.

[0031] Figure 13 Figure 1 is a diagram of the side edge wear area extraction process. Figure (a) is the side edge wear threshold diagram, Figure (b) is the side edge wear template diagram, Figure (c) is the side edge mask diagram, and Figure (d) is the side edge wear band diagram.

[0032] Figure 14 Figure 1 is a diagram of the bottom blade wear area extraction process. Figure (a) is the bottom blade wear threshold map, Figure (b) is the bottom blade wear template map, Figure (c) is the bottom blade mask map, and Figure (d) is the bottom blade wear band map.

[0033] Figure 15 Figure (a) is a schematic diagram of the tool side edge wear zone VB, and Figure (b) is a schematic diagram of the tool bottom edge wear zone. DETAILED DESCRIPTION

[0034] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0035] Combine Figure 1The present invention first introduces the tools in the tool magazine of the detection object, and the tool magazine includes a chain tool magazine 1, a tool magazine base 2, a tool changing arm 3, a tool holder and a tool 4; the tool is installed in the tool holder, and the tool holder is stored in the tool magazine. When it needs to be called, the tool magazine will transport the corresponding tool holder to the tool reversing position and then reversing the tool, and the machine tool tool holder and the tool magazine tool holder will be interchanged through the tool changing arm.

[0036] Combine Figure 2-Figure 6 The present invention is a tool wear detection device 5 for use on a tool magazine, comprising an image acquisition module, a cleaning module, and a control module; the image acquisition module comprises an image acquisition support device 6, a bottom blade image acquisition device 7, a side blade image acquisition device 8, and a housing structure 9;

[0037] The image acquisition support device 6 includes a fixed frame 6-1, a vertical drive electric cylinder 6-2, a guide device 6-3, a support platform 6-4, a rotation drive device 6-5, a small gear 6-6, a large gear 6-7, a hollow sleeve 6-8, a connecting sleeve 6-9, an encoder 6-10, an encoder support shaft 6-11, and an encoder connecting sleeve 6-12;

[0038] The vertical driving electric cylinder 6-2 is fixed to the fixed frame 6-1, and the driving end of the vertical driving electric cylinder 6-2 is fixed to the support platform 6-4, thereby driving the support platform 6-4 to move up and down relative to the fixed frame 6-1. The fixed end of the guide device 6-3 is fixed to the fixed frame 6-1, and the guide movable end is fixed to the support platform 6-4;

[0039] The rotary drive device 6-5 (motor) is fixedly connected to the bottom of the support platform 6-4, and its driving end is fixedly connected to the small gear 6-6. The small gear 6-6 and the large gear 6-7 constitute a gear transmission. The large gear 6-7 is rotatably connected to the hollow sleeve 6-8. The hollow sleeve 6-8 is fixedly connected to the top of the support platform 6-4. The encoder support shaft 6-11 is fixedly connected to the bottom of the support platform 6-4, and the hollow sleeve 6-8 is coaxial with the encoder support shaft 6-11; the encoder 6-10 is fixedly connected to the encoder support shaft 6-11;

[0040] The connecting sleeve 6-9 is fixedly connected to the large gear 6-7, the encoder connecting sleeve 6-12 is fixedly connected to the lower inner part of the connecting sleeve 6-9, and the encoder connecting sleeve 6-12 is embedded in the inner cavity of the hollow sleeve 6-8, and the output shaft of the encoder 6-10 is fixedly connected to the encoder connecting sleeve 6-12;

[0041] The axis of the large gear 6-7, the axis of the connecting sleeve 6-9, the encoder connecting shaft 6-12, and the output shaft of the encoder 6-10 are coaxial;

[0042] The bottom blade image acquisition device 7 includes a bottom blade ring light source 7-1, a bottom blade light source support component 7-2, a bottom blade camera 7-3, and a bottom blade camera support component 7-4; the bottom blade camera support component 7-4 is fixedly connected to the lower inner portion of the connecting shaft sleeve 6-9, the bottom blade camera 7-3 is fixedly connected to the bottom blade camera support component 7-4, the bottom blade light source support component 7-2 is fixedly connected to the connecting shaft sleeve 6-9, and the bottom blade ring light source 7-1 is fixedly connected to the bottom blade light source support component 7-2 to provide light source for the bottom blade camera 7-3;

[0043] The side blade image acquisition device 8 includes a side blade ring light source 8-1, a side blade light source support 8-2, a side blade camera 8-3, and a side blade camera support; the side blade camera support includes a guide rail mounting plate 8-4, a guide rail pair 8-5 with a clamp, and a support rod 8-6; the side blade ring light source 8-1 is fixedly connected to the side blade camera 8-3 through the side blade light source support component 8-2, providing a light source for the side blade camera 8-3; the guide rail mounting plate 8-4 is fixedly connected to the connecting shaft sleeve 6-9, the guide rail pair 8-5 with a clamp is fixedly connected to the guide rail mounting plate 8-4, and the support rod 8-6 is fixedly connected to the slider of the guide rail pair 8-5 with a clamp; the side blade camera 8-3 is fixedly connected to the support rod 8-6.

[0044] The camera module of the image acquisition module includes a bottom edge camera 7-3 and a side edge camera 8-3, one of which is placed directly below the tool to capture a clear picture of the bottom edge of the tool, and the other is placed on the side of the tool to capture an image of the tool measuring edge; the actual size of the tool is calculated by the pixel points and magnification of the obtained image.

[0045] The lighting module of the image acquisition module includes a bottom blade ring light source 7-1 and a side blade ring light source 8-1, which are used to provide good lighting and improve the clarity of the acquired image; the ring light source is coaxial with the camera and can be moved up and down to obtain optimal lighting; the ring light source is perpendicular to the tool, and the image is obtained by reflecting light from the tool surface and imaging inside the camera.

[0046] The motion support module of the image acquisition module includes a rotary drive device 6-5, a vertical drive electric cylinder 6-2, a guide pair 8-5 for the clamp, and several other components. This support module enables automatic adjustment of the bottom blade camera structure, including vertical movement and rotation, as well as manual adjustment of the side blade camera structure. The vertical drive electric cylinder 6-2 is used to achieve vertical movement of the bottom blade camera structure. The vertical movement of the piston rod, coupled with the guide device 6-3, propels the image acquisition structure vertically, ensuring that the tool bottom blade is within the depth of field of the lens, thus achieving focus. The rotary drive device 6-5 provides rotational force to the bottom blade camera 7-3, causing the bottom blade camera structure to rotate at a low speed. Rotating the bottom blade camera 7-3 captures an image of the tool bottom blade in its standard position, providing a basis for subsequent image processing. The standard position, defined as the line connecting the tool tip and the center of the tool bottom surface, is parallel to the vertical edge of the bottom blade image. The side blade camera 8-3 is fixed to the bottom blade camera structure via a side blade camera support, enabling the bottom blade camera structure to rotate, thereby capturing images of each tool edge in its standard position. At the same time, the side blade camera structure can be manually adjusted to a distance from the bottom blade camera structure through a guide rail; after reaching the appropriate position (the side blade of the tool is within the depth of field of the side blade camera lens), the position of the side blade camera structure is limited by a clamp.

[0047] The cleaning module is replaced by a machine tool cleaning module, which is used to clean the tool with cutting fluid, reduce cutting chips, and ensure the effectiveness of the collected images.

[0048] The control module includes an industrial computer, an encoder, a motion control card, and a servo driver. The servo driver drives the actuator and servo motor. The absolute encoder forms a feedback system with the servo motor to improve the accuracy of the bottom blade camera's rotational positioning. The motion control card receives and stores instructions, and the industrial computer performs data calculations. Fuzzy-PID control is used to control the servo motor's speed, ensuring smooth and fast response and strong anti-interference capabilities. An S-curve algorithm is used to perform trajectory planning on the input position signal, enabling trapezoidal acceleration and deceleration of the motor for smoother operation.

[0049] Combine Figure 7-Figure 15 The present invention designs a tool wear detection method based on a tool detection device, characterized by comprising two processes: parameter acquisition and wear measurement. Parameter acquisition occurs before any machining activity begins. Each time a new tool is entered into the tool magazine, the wear detection device must enter the tool information. This information includes the tool model, number of blades, diameter, and image template. Wear measurement occurs when the tool is returned to the tool magazine after machining a workpiece and before the next machining activity, the tool is removed by a robotic arm for wear detection.

[0050] The parameter acquisition is characterized in that the process includes the following steps: the following steps are tool wear detection parameter acquisition steps based on the milling cutter, and the initialization steps of other types of tools are taken as an example.

[0051] Step 1: Calibrate the camera parameters: Calibrate the bottom blade camera 7-3 and the side blade camera 8-3 respectively:

[0052] Use the tooling to place the bottom-edge camera parameter calibration plate within the bottom-edge camera's depth of field, so that the bottom-edge camera parameter calibration plate is facing the bottom-edge camera 7-3. Turn on the bottom-edge ring light source 7-1 and move it up and down to provide good lighting for the bottom-edge camera 7-3. The rationality of the position of the bottom-edge ring light source 7-1 is judged by the clarity of the image inside the camera. Use the bottom-edge camera 7-3 to collect three photos of the bottom-edge camera parameter calibration plate. Select the clearest photo for camera correction to obtain the internal parameter value of the bottom-edge camera 7-3 and eliminate the error caused by lens distortion.

[0053] Use the tooling to place the calibration plate for the side blade camera within the depth of field of the side blade camera, with the plate facing the side blade camera. Turn on the side blade ring light source 8-1 and move it up and down to provide good lighting for the side blade camera 8-3. The rationality of the position of the side blade ring light source 8-1 is judged by the clarity of the image inside the camera. Use the side blade camera 8-3 to collect three photos of the calibration plate for the side blade camera. Select the clearest photo for camera calibration to obtain the internal parameter values ​​of the side blade camera 8-3 and eliminate the error caused by lens distortion.

[0054] Step 2, initializing the position of the image acquisition device: First, by adjusting the position of the slider on the guide rail, move the side blade image acquisition device 8 to the position farthest from the center line of the bottom blade camera. Secondly, turn on the power and control the vertical drive cylinder 6-2 through the control module to operate and lower the support platform 6-4 to the lowest position, thereby driving the bottom blade image acquisition device 7 and the side blade image acquisition device 8 to the lowest position.

[0055] At the same time, the control module controls the rotation drive device 6-5 to rotate the side blade image acquisition device 8 to the initial position. Here, the guide rail movement direction of the side blade image acquisition device 8 can be perpendicular to the plane where the tool is located as its initial position.

[0056] Step 3: Installation of tool wear detection device: Use the tool magazine and tool changing manipulator to transport a standard tool to the tool detection point, and place the tool wear detection device directly below the tool detection point.

[0057] Step 4. Preliminary adjustment of the image acquisition device: adjust the height of the bottom blade image acquisition device 7 and the side blade image acquisition device 8 by vertically driving the electric cylinder 6-2 so that the bottom blade of the tool is within the depth of field of the bottom blade camera lens. When the position of the bottom blade camera is adjusted into place, turn on the clamp switch in the guide rail pair, and adjust the distance between the side blade camera 8-3 and the center line of the tool by moving the slider so that the side blade of the tool is within the depth of field of the side blade camera 8-3. Then close the clamp switch to fix the position of the side blade camera 8-3.

[0058] Step 5: Pixel equivalent calibration: The bottom edge camera 7-3 is used to obtain an image of the unworn bottom edge of the tool and preprocess the image. Here, the image preprocessing process includes grayscale and filtering the image, and then adjusting the image contrast to complete the image preprocessing.

[0059] After the image is preprocessed, the diameter of the tool in the image is extracted using the Hough circle detection method. Assuming that the size of the tool diameter in the image is N pixels and the actual size of the tool diameter is D, the pixel equivalent is

[0060] Step 6. Calculation of the relative position of the tool bottom blade and the bottom blade camera: Use the side blade camera 8-3 to capture the image of the tool side blade, pre-process the image, and then use image analysis to obtain the specific position coordinates of the tool bottom blade; the method of image analysis to calculate the specific position coordinates of the tool bottom blade is as follows: establish a coordinate system σ0 (O0X0Y0Z0) with the bottom blade camera lens center, the coordinate system O0 is the bottom blade camera lens center, the Z0 axis is vertically upward, and the Y0 axis is parallel to the extension line of the side blade guide rail; in this coordinate system, set the side blade camera lens center coordinate to O1 (X1Y1Z1), and the tool bottom surface center coordinate to O2 (X2Y2Z2). Use the side blade camera 8-3 to capture the tool image, and at the pixel origin O P1 Establish pixel coordinate system σ1(O P1 -U1V1), with the U1 axis as the horizontal line and the V1 axis as the vertical line, so that all pixel points of the image that do not coincide with the coordinate axis are in the first quadrant of the coordinate axis. And let the coordinates of the center point of the image in the coordinate system σ1 be O3 (W3H3). Analyze the image by the minimum circumscribed rectangle method to obtain the circumscribed rectangle of the tool image, and let the coordinates of the center point of the side of the circumscribed rectangle that is parallel to the bottom surface of the tool and closest to the bottom surface of the tool in the coordinate system be O2 (W2H2). The relative position of the bottom edge of the tool and the bottom edge camera can be obtained: Z = H3-H2+Z1. Store the specific position coordinates of the tool, and when the tool is measured next time, the data can be automatically called to achieve rapid adjustment of the bottom edge camera position.

[0061] Step 7, positioning of the side edge camera: The bottom edge camera 7-3 is used to obtain an image of the tool bottom edge. After pre-processing the image, the feature point of the tool closest to the tool center is obtained through image analysis. The minimum angle θ between the straight line formed by the feature point connection and the vertical line of the image is obtained based on the angle of the straight line formed by the feature point connection. The angle θ is calculated by: P2 Establish pixel coordinate system σ2(O P2 -U2V2), the U2 axis is a horizontal line, and the V2 axis is a vertical line, so that all pixels in the image that do not coincide with the coordinate axis are in the first quadrant of the coordinate axis. The image is processed by the Hough circle detection algorithm to obtain the outer contour of the tool in the image, which is a circle; let the coordinates of the center of the circle on the image be O4 (W4H4). The tool feature points are detected by the sub-pixel level corner point detection method. Different feature points are selected according to different tools, and the feature point closest to the center of the tool bottom surface is selected; the relative feature points are connected to construct a straight line. A vertical line is constructed on the image through the image center point O4, and the minimum acute angle γ connecting the vertical line and the relative feature point is calculated. The minimum angle from the standard position is: θ = γ-α, where α is the fixed tool feature angle.

[0062] Assume that clockwise is positive in this coordinate system. If the angle θ>0°, the servo motor drives the connecting sleeve 6-9 to rotate clockwise by θ; if the angle θ≤0°, the connecting sleeve rotates counterclockwise by θ;

[0063] Once the side blade image acquisition device 8 is rotated into position, the bottom blade image is captured again. The bottom blade image is processed and the angle θ is read. If θ is within the range of 0±Δδ, the tool side blade positioning is complete, where Δδ is determined based on the specific accuracy requirements. If θ does not meet the standard, it is adjusted again. If the number of adjustments exceeds three, an alarm is issued, notifying the operator of a machine failure.

[0064] Step 8, manufacturing the tool bottom blade template: After the camera position is adjusted, the bottom blade image is obtained through the bottom blade camera 7-3. First, the image is preprocessed to obtain a clear image. Then the image is processed by the Hough circle detection algorithm to obtain the outer contour of the tool in the image, which is a circle; let the center of the circle be Q1. With the Hough circle center Q1 as the center, a square with a side length of X1 is intercepted, and the image inside the square is intercepted; the size of X1 is equal to the pixel value corresponding to the tool diameter in the image; let the blade image be the foreground, and the image excluding the blade be the background. The foreground of the unworn tool bottom surface image in the intercepted image is extracted through OTUS threshold detection, the pixels in the foreground area are set to 255, and the pixels in other parts are set to 0, and the resulting image is stored as the tool bottom blade template.

[0065] Step 9, manufacturing of tool side blade template: After the camera position is adjusted, the side blade image is obtained through the side blade camera 8-3. First, preprocess the image to obtain a clear image. Then process the image through canny edge detection to obtain the tool side blade contour image. The minimum enclosing rectangle of the side blade is identified by the minimum enclosing rectangle algorithm, and the midpoint of the lower side of the minimum enclosing rectangle is taken as Q2. Based on Q2, a rectangle with a length and width of X2 and Y2 is intercepted from the preprocessed tool side blade image, and the image inside the rectangle is intercepted; X2 is equal to 1 / 2 of the pixel value corresponding to the tool diameter in the image, and Y2=2X2; in the intercepted image, at the pixel origin O of the image P3 Establish pixel coordinate system σ3(O P3 -U3V3), with the U3 axis as the horizontal line and the V3 axis as the vertical line, so that all the pixels of the image that do not coincide with the coordinate axis are in the first quadrant of the coordinate axis; the coordinates of point Q2 in the coordinate system σ3 are Hough line detection is used to identify straight lines in the image, and the angle information is used to extract the desired straight lines along the tool side edge. The blade image is considered the foreground, and the image excluding the blade is the background. The foreground pixels of the unworn tool side edge image are set to 255, and all other pixels are set to 0. The resulting image is stored as the tool side edge template.

[0066] The wear measurement is characterized in that the process includes the following steps: the following steps are tool wear detection steps based on milling cutters, and other types of tool wear measurement steps are listed here.

[0067] Step 1: Initialization of the device: Same as the initialization step 2 above.

[0068] Step 2: Tool placement: Use the tool magazine and tool changing manipulator to transport a standard tool to the tool inspection point.

[0069] Step 3. Adjust the position of the bottom blade camera: the tool magazine obtains the signal of the measured tool, calls the stored value Z, and adjusts the height of the bottom blade image acquisition device 7 and the side blade image acquisition device 8 by the vertical drive electric cylinder 6-2; the bottom blade camera 7-3 obtains the image of the bottom blade of the tool, and judges the clarity of the bottom blade image by the Laplacian gradient method. If the clarity score is lower than S, it means that the tool magazine has a tool change error, the process is terminated, and the data is fed back; where S is the clarity image score set according to the algorithm.

[0070] Step 4: Determine Tool Type: After the camera position is adjusted, the bottom blade camera 7-3 captures an image of the tool's bottom blade. Image preprocessing yields a clear image of the tool's bottom blade. This image is then matched against the tool template information in the database to obtain the best matching image. This image represents the unworn tool template. If the tool information obtained through image recognition does not match the tool change data in the tool magazine, this indicates a tool change error, the process is terminated, and data is returned.

[0071] Step 5. Positioning of the side blade camera: Same as the parameter acquisition step 7 above. Using the obtained angle θ, rotate the side blade image acquisition device 8 so that the side blade camera lens plane is perpendicular to the line connecting the tool tip and the tool center on any tool bottom blade plane; the tool image captured by the bottom blade camera is an image of the tool in a standard state.

[0072] Step 6: Acquire an image of the worn bottom blade: Acquire an image of the tool bottom blade using the same technique as above. Preprocess the image to identify the tool's Hough circle. Create a square with a side length of X1, centered on the Hough circle Q1, and capture the image inside the square.

[0073] Step 7: Image processing of the worn area of ​​the bottom blade: The worn area in the square image is extracted through OTUS threshold detection, and the pixels of the worn area are set to 255, and the pixels of other parts are set to 0.

[0074] Step 8: Extraction of the bottom blade wear area: Mask the worn tool threshold image and the existing unworn tool template, and set the image pixels outside the current blade to be extracted to 0;

[0075] Step 9, acquiring an image of the side edge wear area: Similar to the above parameter acquisition step 9, an image screenshot of the tool side edge wear area is acquired by image cropping.

[0076] Step 10: Image processing of the side blade wear area: The wear area inside the obtained rectangular image is extracted through OTUS threshold detection, and the pixels of the wear area are set to 255, and the pixels of other parts are set to 0.

[0077] Step 11: Extract the side edge wear area: Mask the worn tool threshold image with the existing unworn tool template, setting all image pixels outside the current tool edge to be extracted to 0. Rotate the wear area counterclockwise around the tool tip by the angle of the tool's helix angle, so that the wear area forms a vertical band. Repeat this process multiple times to extract all side edge wear areas.

[0078] Step 12: Calculate the wear amount;

[0079] For the processed bottom and side edge wear images, scan them from bottom to top along a horizontal line and calculate the average horizontal pixel value a of the worn area. Substituting this into the formula VB = M × a, this value is converted to the actual average wear dimension VB. The bottom edge wear dimension is VB1, and the side edge wear dimension is VB2. The wear of each bottom and side edge is calculated and stored.

[0080] Step 13: Wear evaluation; damage characteristic indicators

[0081] If any VB1 or VB2 of the tool is greater than Lmm, the tool is excessively worn, an alarm is sent to the machining center system, and the tool is stopped from being used; where L is the blunting standard set according to the national standard.

Claims

1. A tool wear detection method for a tool detection device that can be integrated into a tool magazine, characterized in that: It includes two processes: parameter acquisition and wear measurement; The parameter acquisition process is used to enter the information of the new tool before the machining activity begins, including the tool model, number of edges, diameter and image template; The wear measurement process is used when the tool is returned to the tool magazine after processing the workpiece and before the next processing activity, the tool is taken out by the robot arm for wear detection. The worn tool threshold image and the unworn image template are masked to extract the worn area, and the average pixel value of the worn area is calculated and converted into the actual average wear size; The parameter process includes the following steps: Step 1: calibrate the bottom blade image acquisition device and the side blade image acquisition device respectively; Step 2: Initialize the position of the image acquisition device; Step 3: Place the tool detection device directly below the tool detection point; Step 4: Make the bottom edge of the tool within the depth of field of the bottom edge image acquisition device lens, and make the side edge of the tool within the depth of field of the side edge image acquisition device; Step 5: Acquire an image of the unworn bottom blade of the tool through a bottom blade image acquisition device; Step 6: Acquire an image of the unworn side edge through the side edge image acquisition device, and determine the position Z of the tool bottom edge relative to the bottom edge image acquisition device through image analysis; Step 7, side blade camera positioning: The feature point of the tool closest to the tool center is determined through bottom blade image analysis. The minimum angle θ between the line formed by the relative feature points and the vertical line of the image is calculated based on the minimum acute angle between the line and the vertical line of the image. When the side blade image acquisition device is rotated into place, the bottom blade image is acquired again and the angle θ is read. If θ is within the set range, it indicates that the tool side blade camera positioning has been completed. The angle θ is calculated as follows: at the pixel origin O of the image of the tool bottom edge P2 Establish pixel coordinate system σ2(O P2 -U2V2), the U2 axis is a horizontal straight line, and the V2 axis is a vertical straight line, so that all pixel points of the image that do not coincide with the coordinate axis are in the first quadrant of the coordinate axis; the image is processed by the Hough circle detection algorithm to obtain the outer contour of the tool in the image, and the contour is a circle; the coordinates of the center of the circle on the image are set to O4 (W4H4); the tool feature points are detected by the sub-pixel level corner point detection method, different feature points are selected according to different tools, and the feature point closest to the center of the bottom surface of the tool is selected; the relative feature points are connected to construct a straight line; a vertical line is constructed on the image through the image center point O4, and the minimum acute angle γ between the vertical line and the relative feature point is calculated; the minimum angle from the standard position is: θ = γ-α, where α is the fixed tool feature angle; Step 8: Manufacturing of tool template: The bottom blade image is acquired through a bottom blade image acquisition device, and the image is processed using the Hough circle detection algorithm to obtain the outer contour of the tool in the image. A square with a side length of X1 is intercepted with the Hough circle center Q1 as the center, and the image inside the square is intercepted; the size of X1 is equal to the pixel value corresponding to the tool diameter in the image; the blade image is set as the foreground, and the image excluding the blade is the background; the foreground of the unworn tool bottom surface image in the intercepted image is extracted through OTUS threshold detection, the pixels in the foreground area are set to 255, and the pixels in other parts are set to 0, and the resulting image is stored as the bottom blade template of the tool; The side edge image is acquired by the side edge image acquisition device, and the tool side edge contour image is obtained by canny edge detection processing. The minimum enclosing rectangle of the side edge is identified by the minimum enclosing rectangle algorithm. The midpoint of the lower side of the minimum enclosing rectangle is taken as Q2. Based on Q2, a rectangle with a length of X2 and a width of Y2 is intercepted from the pre-processed tool side edge image, and the image inside the rectangle is intercepted; the size of X2 is equal to 1 / 2 of the pixel value corresponding to the tool diameter in the image, and Y2=2X2; in the intercepted image, at the pixel origin O of the image P3 Establish pixel coordinate system σ3(O P3 -U3V3), with the U3 axis as the horizontal line and the V3 axis as the vertical line, so that all the pixels of the image that do not coincide with the coordinate axis are in the first quadrant of the coordinate axis; the coordinates of point Q2 in the coordinate system σ3 are Hough line detection is used to identify the straight lines in the image, and the required straight lines on the tool side edge are extracted using angle information. The blade image is set as the foreground, and the image excluding the blade is the background. The foreground pixels of the unworn tool side edge image are set to 255, and the other pixels are set to 0. The resulting image is stored as the tool side edge template. The tool detection device includes an image acquisition module and a control module; the image acquisition module includes: A bottom blade image acquisition device, used for acquiring an image of the bottom blade of the tool; A side edge image acquisition device for acquiring images of the tool's measuring edge; The image acquisition support device can simultaneously drive the rotation and lifting of the bottom blade image acquisition device and the side blade image acquisition device; by lifting, the bottom blade of the tool is placed within the depth of field of the bottom blade image acquisition device lens, and the side blade image acquisition device obtains a standard position image of each blade of the tool; by rotating, the side blade image acquisition device can obtain a standard position image of the bottom blade of the tool; The horizontal distance of the side edge image acquisition device relative to the image acquisition support device is adjustable, and is used to adjust the position of the tool side edge within the depth of field of the side edge camera lens; The control module is used to control the rotation and lifting of the image acquisition support device.

2. The tool wear detection method according to claim 1, characterized in that: Wear measurement includes the following steps: Step 9: Initialize the position of the image acquisition device; Step 10: Use the tool magazine and tool changing manipulator to transport a standard tool to the tool detection point; Step 11: Adjust the position of the bottom blade camera: The tool magazine obtains the signal of the tool being tested, retrieves the position Z value, adjusts the bottom blade image acquisition device and the side blade image acquisition device, obtains the image of the bottom blade of the tool, and uses the Laplacian gradient method to determine the clarity of the bottom blade image. If the clarity score is lower than the set value, it indicates that the tool magazine tool change error occurs, and the process is terminated. Step 12: Determine the tool type: Obtain an image of the tool's bottom edge and perform template matching with the tool template information in the database to obtain the best matching image. This image is the tool template of the unworn tool. If the tool information obtained by image recognition does not match the data of the tool to be replaced in the tool magazine, it indicates a tool change error and the process is terminated. Step 13: Positioning the swarf blade camera: Same as step 7 of the parameter acquisition process, so that the swarf blade camera lens plane is perpendicular to the line connecting the tool tip and the tool center on the bottom edge plane of any tool; Step 14, acquiring an image of the worn area of ​​the bottom blade: After pre-processing the image, the Hough circle of the tool is identified, and a square with a side length of X1 is intercepted with the Hough circle Q1 as the center, and the image inside the square is intercepted; Step 15: Image processing of the worn area of ​​the bottom blade: extract the worn area from the square image through OTUS threshold detection, set the pixels of the worn area to 255, and set the pixels of other parts to 0; Step 16: Extraction of the bottom blade wear area: Mask the worn tool threshold image and the existing unworn tool template, and set the image pixels outside the current blade to be extracted to 0; Step 17, obtaining an image of the side edge wear portion: obtaining an image screenshot of the tool side edge wear portion by image cropping; Step 18: Image processing of the side edge wear area: extract the wear area of ​​the obtained rectangular internal image through OTUS threshold detection, set the pixels of the wear area to 255, and set the pixels of other parts to 0; Step 19, extraction of side edge wear areas: Mask the worn tool threshold image and the existing unworn tool template, and set the image pixels outside the current tool edge to be extracted to 0; rotate the wear area counterclockwise around the tool tip, the rotation angle being the helix angle of the corner tool, so that the wear area becomes a vertical band; repeat multiple times to extract all side edge wear areas; Step 20: Calculate the wear amount. For the processed bottom edge and side edge wear images, scan from bottom to top along a horizontal straight line to calculate the horizontal average pixel value of the wear area, and convert it into the actual average wear amount size.

3. The tool wear detection method according to claim 1, characterized in that: The calculation process of the position of the tool bottom edge relative to the bottom edge image acquisition device is as follows: a coordinate system σ0 (O0-X0Y0Z0) is established with the center of the bottom edge camera lens of the bottom edge image acquisition device, the origin O0 is the center of the bottom edge camera lens, the Z0 axis is vertically upward, and the Y0 axis is parallel to the extension line of the side edge guide rail; in this coordinate system, the coordinates of the center of the side edge image acquisition device lens are set as O1 (X1Y1Z1), and the coordinates of the center of the tool bottom surface are set as O2 (X2Y2Z2); the tool image is captured by the side edge image acquisition device, and the pixel origin O0 of the image is set as O1. P1 Establish pixel coordinate system σ1(O P1 -U1V1), with the U1 axis as the horizontal line and the V1 axis as the vertical line, so that all pixel points of the image that do not coincide with the coordinate axis are in the first quadrant of the coordinate axis; and the coordinates of the center point of the image in the coordinate system σ1 are set to O3 (W3H3); the image is analyzed by the minimum circumscribed rectangle method to obtain the circumscribed rectangle of the tool image, and the coordinates of the center point of the side of the circumscribed rectangle that is parallel to the bottom surface of the tool and closest to the bottom surface of the tool are set in the coordinate system to be O2 (W2H2), then the relative position of the bottom edge of the tool and the bottom edge camera is: Z = H3-H2+Z1.

4. A tool detection device that can be integrated into a tool magazine, which is applied to the tool wear detection method according to claim 1, characterized in that: The image acquisition support device includes a fixed frame, a vertical drive electric cylinder, a guide device, a support platform, a rotary drive device, a small gear, a large gear, a hollow shaft sleeve, a connecting shaft sleeve, an encoder for acquiring the position of the connecting shaft sleeve, and an encoder for acquiring the position of the vertical drive electric cylinder; The rotary drive device is fixedly connected to the bottom of the support platform, and its driving end is fixedly connected to the small gear; the small gear and the large gear constitute a gear transmission, and the large gear is rotatably connected to the hollow sleeve, and the hollow sleeve is fixedly connected to the top of the support platform; the connecting sleeve is fixedly connected to the large gear; the encoder is fixedly connected to obtain the rotation angle of the connecting sleeve.

5. The tool detection device that can be integrated into the tool magazine according to claim 4 is characterized in that: The bottom blade image acquisition device includes a bottom blade ring light source, a bottom blade light source support component, a bottom blade camera and a bottom blade camera support component; the bottom blade camera support component is fixedly connected to the lower inner part of the connecting shaft sleeve, the bottom blade camera is fixedly connected to the bottom blade camera support component, the bottom blade light source support component is fixedly connected to the connecting shaft sleeve, and the bottom blade ring light source is fixedly connected to the bottom blade light source support component to provide a light source for the bottom blade camera.

6. The tool detection device that can be integrated into the tool magazine according to claim 4, characterized in that: The side blade image acquisition device includes a side blade ring light source, a side blade light source support, a side blade camera and a side blade camera support; the side blade ring light source is fixedly connected to the side blade camera through the side blade light source support component to provide a light source for the side blade camera; the side blade camera support is fixedly connected to the connecting shaft sleeve; the side blade camera is fixedly connected to the side blade camera support and can slide relative to the side blade camera support to achieve adjustable horizontal distance relative to the image acquisition support device.

7. The tool detection device that can be integrated into the tool magazine according to claim 6 is characterized in that: The side blade camera support includes a guide rail mounting plate, a guide rail pair containing a clamp and a support rod; the guide rail mounting plate is fixedly connected to the connecting sleeve, the guide rail pair containing the clamp is fixedly connected to the guide rail mounting plate, and the support rod is fixedly connected to the slider of the guide rail pair containing the clamp; the side blade camera is fixedly connected to the support rod.

Citation Information

Patent Citations

  • Machine tool monitoring and data measuring system

    CN209380402U

  • Method for positioning and monitoring wear of ball nose end mill cutter

    CN102501140A

  • Tool magazine integrated tool damage detection system and method based on machine vision

    CN113752088A