Fine metal wire alignment welding device and method based on binocular vision

By controlling a moving platform with a binocular vision system to perform wire alignment welding, the problems of complex structure and long adjustment time of existing welding systems are solved, and high-quality welding results are achieved.

CN121589508APending Publication Date: 2026-03-03TANGSHAN COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511982759.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing fine metal wire welding systems are complex in structure, have high rigidity, require long adjustment time, are prone to poor welding due to wire bending or uneven end face, and take a long time to restore to the original state.

Method used

A fine metal wire alignment and welding device based on binocular vision is used. The image acquisition system acquires images of the metal wire, the control system controls the moving platform to perform alignment, and short-circuit current welding is performed after alignment is completed.

Benefits of technology

It achieves precise alignment in wire welding, improves welding quality, reduces welding defects, and shortens adjustment time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121589508A_ABST
    Figure CN121589508A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of metal wire welding, in particular to a fine metal wire alignment welding device and method based on binocular vision, and the fine metal wire alignment welding device comprises a horizontal image acquisition camera, a vertical image acquisition camera, a first moving platform, a second moving platform and a rotating platform; the end parts of the clamp assemblies are electrically connected with positive and negative electrodes of a welding power supply respectively; the control system firstly controls the rotating platform to rotate, so that the directions of the two metal wires to be welded are consistent, and then controls the first moving platform and the second moving platform to do translational motion to complete alignment of the two metal wires to be welded; after alignment of the two metal wires to be welded is completed, the control system controls the welding power source to provide short-circuit current for the two clamp assemblies, and the two metal wires are welded through the short-circuit current; metal wire welding motion control is more accurate, alignment parameters can be automatically adjusted or early warning can be carried out according to the end face condition of the metal wire, and the welding quality of the metal wire is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of fine metal wire welding technology, specifically to a fine metal wire alignment welding device and method based on binocular vision. Background Technology

[0002] In neurointerventional therapy, microguidewires serve as the "pathfinders" for interventional procedures. Guidewires guide catheters percutaneously into the vascular lumen, assisting in the selective entry of catheters into small vascular branches or other lesion cavities, and are crucial tools for catheter replacement during the procedure. Magnetostrictive wires are also used as the signal transmission medium in magnetostrictive displacement sensors, and the manufacturing process of these sensors requires addressing the issue of wire bonding. Currently, ultrasonic wire welding devices are used to solve the problem of wire bonding. A mechanical guide device completes the wire feeding and welding process, welding the same type of stainless steel wires together. The diameter of the welded wires ranges from 0.28 mm to 0.18 mm. The welding process uses a hard alloy shaft guide mechanism to control the direction, employs a cold welding power source, and the welding speed is controlled by a programmable controller.

[0003] However, current fine wire welding systems are complex in structure and have high rigidity. After changing the metal type, the mechanism requires a long adjustment period. When the fine wire is bent or the end face of the metal wire is uneven, welding defects occur, which can easily lead to welding failure. When welding abnormalities occur, it takes a long time for the device to return to its original state. Summary of the Invention

[0004] To overcome the above-mentioned technical problems, the present invention provides a device and method for fine metal wire alignment welding based on binocular vision, which uses a visual image sensor to complete center alignment and avoid welding abnormalities.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a fine metal wire alignment and welding device based on binocular vision, comprising: Cross-shaped fixed frame; The image acquisition system includes a horizontal image acquisition camera and a vertical image acquisition camera fixed on a cross-shaped mounting frame; The motion alignment system includes a first moving platform and a second moving platform fixed on a fixed base plate; A clamping assembly for clamping the metal wire to be welded, wherein there are two clamping assemblies, which are respectively fixed on the first moving platform and the second moving platform; and the ends of the two clamping assemblies are respectively electrically connected to the positive and negative poles of the welding power source. The control system receives images of the metal wires to be welded, which are mounted on two clamping assemblies, from the image acquisition system. It then uses these images to determine the spatial distance between the two wires and controls the first and second moving platforms to align them. Once aligned, the control system directs the welding power supply to provide a short-circuit current to the two clamping assemblies, using this current to weld the two wires.

[0006] Preferably, the cross-shaped fixing frame includes a first cross-shaped fixing frame and a second cross-shaped fixing frame; the horizontal image acquisition camera is fixed on the first cross-shaped fixing frame and is used to acquire a top view image of the metal wire to be welded; the vertical image acquisition camera is fixed on the second cross-shaped fixing frame and is used to acquire a front view of the metal wire to be welded; the lens segments of the horizontal and vertical image acquisition cameras are respectively connected to telecentric lenses.

[0007] Preferably, the first moving platform includes a rotating platform fixedly connected to a fixed base plate, a first lifting platform fixedly connected to the rotating platform, a front-to-back moving platform fixedly connected to the upper end of the first lifting platform, a first left-to-right moving platform fixedly connected to the upper end of the front-to-back moving platform, and a clamping assembly fixedly connected to the first left-to-right moving platform. Before welding the metal wire, the control system controls the rotating platform, the first lifting platform, the front-to-back moving platform, and the first left-to-right moving platform to move, so that the metal wire to be welded held by the clamping assembly on the first moving platform is connected to the metal wire to be welded held by the clamping assembly on the second moving platform.

[0008] Preferably, the second moving platform includes a fixed pad block fixedly connected to a fixed base plate, a second lifting platform fixedly connected to the fixed pad block, a second left and right moving platform fixedly connected to the second lifting platform, and a clamping assembly fixedly connected to the second left and right moving platform. Before the metal wire is welded, the control system controls the second lifting platform and the second left and right moving platform to move, so that the metal wire to be welded held by the clamping assembly on the second moving platform is connected to the metal wire to be welded held by the clamping assembly on the first moving platform.

[0009] Preferably, the second rack is equipped with a fill light, and the fill light is located directly in front of the vertical image acquisition camera.

[0010] Preferably, the control system receives images of the two metal wires to be welded captured by the horizontal image acquisition camera and the vertical image acquisition camera, extracts the edge images of the two metal wires from the images, and uses the edge images of the two metal wires to obtain the spatial distance between the welding parts of the two metal wires; the control system uses the spatial distance between the welding parts of the two metal wires to control the motion trajectory of the first moving platform and the second moving platform.

[0011] Preferably, the clamping assembly includes a clamping base fixedly connected to the first moving platform, the clamping base having a groove for placing a metal wire, and a pressure plate fixedly connected to the base, the end of the pressure plate connected to the base having a protrusion extending into the groove, the metal wire located in the groove being pressed into the groove by the protrusion.

[0012] A method for aligning and welding fine metal wires based on binocular vision, including any kind of fine metal wire alignment and welding device; The welding method includes the following steps: The horizontal and vertical image acquisition cameras in the image acquisition system are used to acquire horizontal and vertical images of the clamping assembly and the clamped metal wire located on the first and second moving platforms, respectively. The edge images of the metal wire located on the first moving platform in the horizontal image and the edge images of the metal wire in the vertical image are extracted respectively; the edge images of the metal wire on the second moving platform in the horizontal image and the edge images of the metal wire in the vertical image are extracted respectively. The spatial distance between the welding positions of the two metal wires to be welded is obtained by using the edge images of the metal wires on the first and second moving platforms. The spatial distance between the welding positions of the two metal wires to be welded is used to adjust the moving positions of the first and second moving platforms and the moving angle of the rotary table; after the first and second moving platforms are adjusted, the two metal wires to be welded are energized for welding.

[0013] Preferably, the spatial distance between the welding positions of the two metal wires to be welded includes the inclination angle, horizontal distance, and vertical distance between the two metal wires to be welded.

[0014] Compared with the prior art, the present invention has the following advantages: This invention uses an image acquisition system to acquire images of the metal wires to be welded. After processing the acquired images, the spatial distance between the two metal wires to be welded is obtained. Based on the obtained spatial distance, two moving platforms are controlled to move relative to each other, so that the welding parts of the two metal wires are aligned and the welding is completed. This makes the metal wire welding motion control more accurate. The alignment parameters can be automatically adjusted or warnings can be issued based on the end face condition of the metal wires, thereby improving the quality of metal wire welding. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the welding device in an embodiment of the present invention; Figure 2 This is a top view of the welding device in an embodiment of the present invention; Figure 3 This is a schematic diagram of the installation structure of the second moving platform in the welding device in an embodiment of the present invention; Figure 4 This is a schematic diagram of the installation structure of the first moving platform in the welding device according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the fixture assembly in the welding device according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the vertical metal wire alignment structure in an embodiment of the present invention; Figure 7 This is a schematic diagram of the horizontal metal wire alignment structure in an embodiment of the present invention; Figure 8 This is a flowchart illustrating the welding process in an embodiment of the present invention; Figure 9 This is a schematic diagram of the control system equipment in an embodiment of the present invention; Figure 10 This is a schematic diagram illustrating the calculation of the alignment angle of the metal wire in an embodiment of the present invention. Detailed Implementation

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

[0017] Example 1: The welding device in this embodiment includes imaging in two spatial directions. An electric servo device guides the metal wire to a specific position, and after center docking, a short-circuit contact is established. A high-density current flows through the short-circuit contact area, melting the metal wire and welding them together. This welding device is an opto-mechatronics integrated system, containing a set of binocular image sensors to acquire the contour image of the object. To acquire a clear image, an LED strip light source illuminates the object, and then a contour positioning algorithm detects the object's position. Spatial photogrammetry is then used to calculate the actual positions of the alloy metal wire and the stainless steel rod to be welded, calculating their displacement difference. This displacement difference includes height difference, XY horizontal direction difference, and attitude angle difference. The actual position difference data in multiple directions is then sent to different motor (stepper motor) controllers. The motor (stepper motor) controllers, through rotation, XY plane movement, and height adjustment, align the central axes of the alloy metal wire and the stainless steel rod, moving them to the ready-to-weld position and adjusting their attitude to a suitable welding state. Then, the supercapacitor spot welding circuit switch is activated, and a large current is applied to the alloy metal wire and stainless steel wire rod to be welded for welding. During the welding process, a motor (stepper motor) is used to apply a given feed amount to the alloy metal wire and stainless steel wire rod at a constant speed to complete the welding.

[0018] Specifically, such as Figure 1 , Figure 2 , Figure 3 and Figure 4 The device shown is a fine metal wire alignment welding device based on binocular vision, comprising: A cross-shaped fixing frame 1, which includes a first cross-shaped fixing frame 101 and a cross-shaped fixing frame 102 fixed on a fixed base plate 4; The image acquisition system includes a horizontal image acquisition camera 2 and a vertical image acquisition camera 3 fixed on a cross-shaped fixing frame 1. The horizontal image acquisition camera 2 is fixed on the first cross-shaped fixing frame 101 and is used to acquire top-view images and horizontal images of the metal wires 6 to be welded, for later adjustment of the horizontal deviation between the two metal wires to be welded. The vertical image acquisition camera 3 is fixed on the second cross-shaped fixing frame 102 and is used to acquire a front view (i.e., a vertically reversed view) of the metal wires 6 to be welded; it is mainly used for later alignment of the welding positions of the two metal wires 6. The lens segments of the horizontal image acquisition camera 2 and the vertical image acquisition camera 3 are respectively connected to telecentric lenses 103. In this embodiment, the telecentric lens 103 uses a 2x magnification telecentric lens to obtain a field of view of 3.5mm × 2.5mm. Meanwhile, a supplementary light 104 is provided on the second cross frame 102, and the supplementary light 104 is located directly in front of the vertical image acquisition camera 3. This supplementary light 104 provides a light source for vertical image acquisition, and it uses a red LED light source with a wavelength of 650nm.

[0019] The motion alignment system includes a first moving platform 7 and a second moving platform 8 fixed on a fixed base plate 4; The clamping assembly 5 is used to clamp the metal wire 6 to be welded. There are two clamping assemblies 5, which are respectively fixed on the first moving platform 7 and the second moving platform 8; and the ends of the two clamping assemblies 5 are respectively electrically connected to the positive and negative poles of the welding power source. The main purpose of this motion alignment system is to align the two metal wires 6 to be welded before welding, and then perform welding after alignment. Specifically, as follows: Figure 4 The first moving platform 7 shown includes a rotating platform 9 fixedly connected to the fixed base plate 4. The rotating platform 9 is capable of creeping rotation in the horizontal direction. Specifically, it is controlled and driven by a motor (stepper motor) to correct the deviation of the bimetallic wire in the spatial Z-axis posture. The fixed base plate in this embodiment is to ensure that the entire device can be kept on a mounting platform. A first lifting platform 701 is fixedly connected to the rotating platform 9. The first lifting platform 701 is capable of lifting and lowering, driven by a motor (stepper motor). Specifically, it can drive the front-to-back moving platform 702 fixed on the first lifting platform to move up and down. In this embodiment, the first lifting platform 701 is a conventional cross-type lifting platform in this technical field. Its specific structure will not be described in detail here. The front-to-back moving platform 702 is used to drive the first left-to-right moving platform 703 set on the front-to-back moving platform to move back and forth. The first left-to-right moving platform 703 is used to drive a clamp assembly 5 set on the first left-to-right moving platform 703 to move left and right. The clamp assembly 5 can realize the rotation angle adjustment, height adjustment and front-to-back and left-to-right adjustment of the metal wire 6 clamped on the clamp assembly 5 through the rotating platform 9, the first lifting platform 701, the front-to-back moving platform 702 and the first left-to-right moving platform 703. Therefore, the metal wire 6 on the clamp assembly 5 can realize multi-directional and multi-space adjustment.

[0020] In conjunction with the first mobile platform 7, such as Figure 3The second moving platform 8 shown includes a fixed pad 801 fixedly connected to the fixed base plate 4, and a second lifting platform 802 fixedly connected to the fixed pad 801. In this embodiment, the second lifting platform 802 has the same structure and driving method as the first lifting platform 701. It is used to drive the second left and right moving platform 803 fixed on the second moving platform 802 to move up and down. The second left and right moving platform 803 is used to drive the clamp assembly 5 fixed on it to move left and right. Specifically, it drives another metal wire 6 to be welded to move left and right, and to move up and down and left and right, so as to match with the first moving platform 7. It can drive the two metal wires to be welded to adjust their relative angle and orientation distance. In this embodiment, the front-to-back moving platform 702, the first left-to-right moving platform 703, and the second left-to-right moving platform 803 have the same structure, which is a linear guide rail type moving platform. The only difference is that the front-to-back moving platform 702 and the first moving platform 703 are designed to cross each other, enabling them to move forward, backward, left, and right. The specific structure is a conventional method in this technical field and will not be described in detail here.

[0021] In this embodiment, as shown Figure 5 The clamp assembly 5 shown is used to clamp the metal wire 6 to be welded. The clamp assembly 5 includes a clamp base 501 fixedly connected to the first moving platform 7. The clamp base 501 is provided with a groove 502 for placing the metal wire 6. It also includes a pressure plate 503 fixedly connected to the base 501. The end of the pressure plate 503 connected to the base 501 is provided with a protrusion 504 extending into the groove 502. The metal wire 6 located in the groove 502 is pressed into the groove 502 by the protrusion 504. The fixture base 501 and the pressure plate 503 are made of copper. The fixture base 501 and the pressure plate 503 are connected by bolts. The pressure plate 503 is provided with screws for fixing the electrode wires. M3 countersunk screws are selected. The groove width of the groove 502 is 0.1mm larger than the diameter of the metal wire. The metal wire is pressed into the groove 502 to prevent it from moving back and forth during welding. M3 screw holes are opened on the bottom surface of the lower half of the fixture base 501. The fixture and the motion platform are fixed together through the screw holes.

[0022] The control system receives images of the metal wires 6 to be welded, which are mounted on two clamping assemblies 5, from the image acquisition system. It then uses these images to determine the spatial distance between the two metal wires 6. Based on the determined spatial distance, it controls the first moving platform 7 and the second moving platform 8 to move and align the two metal wires 6. Once aligned, the control system controls the welding power supply to provide a short-circuit current to the two clamping assemblies 5, and uses this short-circuit current to weld the two metal wires 6.

[0023] Specifically, during welding, two metal wires 6 to be welded are clamped onto the clamping assembly 5 on the first moving platform 7 and the second moving platform 8, respectively. Then, the image acquisition system acquires images of the two metal wires 6 to be welded, and uses the acquired images to obtain the spatial position of the two metal wires 6 to be welded. Then, the first moving platform 7 and the second moving platform 8 are controlled to move relative to each other. When the welding parts of the two metal wires 6 to be welded are connected and the center lines of the two metal wires 6 to be welded are on the same straight line, then the power is applied for welding.

[0024] In one embodiment, after the metal wire 6 is fed, the end faces of the first moving platform 7 and the second moving platform 8 will inevitably have a spatial deviation from the same axis. This embodiment uses cameras in two directions to detect the spatial deviation, and then adjusts the first moving platform 7 and the second moving platform 8 to make the metal wire 6 concentric. The spatial state of the metal wire 6 during alignment is imaged, such as... Figure 6 The image shows two metal wires 6 to be welded within the imaging window of a camera installed vertically. When the metal wires are misaligned in the horizontal X direction, the vertical image acquisition camera 3 can clearly detect the displacement distance d1. Figure 7 As shown in the imaging window of the horizontally mounted camera, when the metal wire 6 is misaligned in the vertical Y direction, the horizontal image acquisition camera 2 can clearly detect the displacement distance d2, use the image processing algorithm to detect the distance L of the center of the end face of the metal wire, and send the values ​​of d1, d2 and L to the motion controller to control the short-circuit contact alignment of the metal wire.

[0025] The wire alignment welding process in this embodiment is as follows: Figure 8As shown, first, two metal wires 6 are placed into the clamp assembly 5 and tightened with screws. The clamp assembly 5 is connected to the positive and negative terminals of the welding power supply. The power of the welding power supply is set, and its input is connected to the supercapacitor. In this embodiment, a 3700-farad supercapacitor is used, with six sections connected in series. Each supercapacitor operates at 2.7V, therefore the rated operating voltage of the main circuit is 16.2 volts. The positions of the horizontal image acquisition camera 2 and the vertical image acquisition camera 3 are adjusted so that the welding area of ​​the metal wires 6 is clearly visible in the cameras. The adjustment process is assisted by the dynamic image acquisition function of the visual alignment software developed in this embodiment, using a human-centered approach within the loop. During the adjustment process, the cameras and metal wires are first aligned to a suitable position, and then the angle of the rotating stage is adjusted under image monitoring to ensure the direction of the metal wires is consistent. After the bimetallic wire 6 is installed, the acquisition program is started. The acquisition program establishes two interrupt service threads, each receiving image data from one direction. After receiving the image data, the image buffer is mapped to the user application space, the data is copied to the image processing buffer, and then the program enters an interrupt state non-blocking to wait for the next frame. The positional deviation of the bimetallic wire 6 is detected using images from both directions, and then the positional deviation is input into the control system. The control system adjusts the position of the stage for the two wires 6 so that they are on the same axis. Then, the control system controls the two wires to move towards each other until they make contact. Simultaneously, the welding discharge circuit board is activated, releasing a short-circuit current of over 100A. Under the action of the short-circuit current, the bimetallic wires heat up, soften, and weld together. After welding, the welding power is disconnected, the fixing screws of the wires are loosened, and the welded wires are removed. Then, the above process is repeated for the next welding.

[0026] In this embodiment, a dedicated motion controller for the control system is designed to control the movement and short-circuit contact process of the bimetallic wire. One end of the wire is fixed, while the other end moves in a creeping motion under the control of the motion controller. The acceleration and deceleration of the motion adopts a segmented S-curve method with software lookup table to smoothly transition the speed. The motion speed is set once for each step pulse detection, and the minimum creeping distance can be controlled below 0.02mm. Figure 7This describes the hardware structure of the system controller. This embodiment uses the high-performance 32-bit microcontroller STM32F407IET6 with a Cortex-M4 core as the core of the motion controller, abandoning the traditional FPGA control method, thus reducing hardware cost, circuit complexity, and system power consumption. The 32-bit microcontroller STM32F407IET6 has 1M Byte of flash memory, 192K Byte of RAM, a floating-point unit (FPU), three 12-bit ADCs, two DACs, one low-power RTC, twelve general-purpose 16-bit timers (including two PWM timers for motor control), and two general-purpose 32-bit timers. It also features a true random number generator (RNG) and standard and advanced communication interfaces. This embodiment uses the microcontroller's timer TIM8 as the PWM pulse output generator for motor control. TIM8 has four channels for outputting PWM pulse signals. Each channel in this embodiment is used as a control channel for a stepper motor (motor) of a displacement slide, and the four channels can control the movement of the displacement slide along four axes. In this embodiment, the pin assignment table shown in Table 1 is used to configure each control pin; Table 1 is the pin assignment table. Each group of motors has control pins including pulse output, enable output, and forward / reverse output. The control board interface and corresponding input / output pins are also included. Figure 9 In this embodiment, the STM32F407IET6 is used as the MCU controller. The MCU controller has 1Mbytes of flash and 192kbytes of RAM. The embodiment uses the MCU's RAM to store speed calibration tables for the rising and falling speed ranges of the motor. The speed formula calculation process is transformed into a lookup algorithm for the speed calibration tables. The speed calibration tables for all four axes are stored in RAM, with each table occupying 8kbytes of space. When the MCU controller controls the motor (stepper motor) to move to the specified position, it sends a start signal to the welding power supply through the GPIO PA5 interface.

[0027] The power management module and motion control board are powered by a 24-volt DC voltage. The 24-volt DC voltage is converted into a 5-volt DC regulated output using a BuckPWM DC-DC switching power supply module. Then, the 5-volt DC voltage is converted into a 3.3-volt regulated output using an AMS1117S-3.3 linear regulator to power the MCU control core circuit. This method can effectively reduce the heat generation of the system power supply and improve the energy efficiency.

[0028] The communication interface uses differential RS485 to communicate with the host computer. The RS485 communication interface uses automatic flow control technology, that is, it uses TTL voltage RX to receive and TX to transmit data bidirectionally, without requiring other control status input and output signals.

[0029] The button input interface uses four buttons, each connected to the GPIO pins such as PA0 on the MCU STM32F407IET6. The button response processing adopts the EXTI external interrupt method. When any button is pressed, one EXTI is triggered, and the MCU enters the corresponding interrupt service process to process the button press event.

[0030] The four motor output interfaces each include a pulse output, a direction signal output, and a motor enable signal output. All three outputs can be connected to the signal input interface of a motor (stepper motor) driver to control the motor's movement.

[0031] The encoder input interface allows for image acquisition hardware control and the recording of the distance moved by the alignment system.

[0032] The welding power interface uses the GPIO port of PA5 to send a welding power enable signal, which enables the welding power supply to output a short-circuit welding current of more than 50 amps.

[0033] This embodiment uses the advanced timer TIM8 of the STM32F407IET6 to control the motor pulse output. TIM8 has four PWM output channels, each controlling a single moving axis motor (stepper motor). TIM8 has a pulse output event interrupt. This application uses an interrupt service routine to control the position and speed of the motor (stepper motor). The system employs a smooth S-curve acceleration / deceleration control method for the motor (stepper motor) movement. The host computer calculates the wire's movement speed, configures the acceleration and acceleration time, and transmits this information via the RS-485 communication interface. The motion controller then calculates the speed distribution table for the entire motion process. Based on the motion distribution table, it sets the PWM reference frequency of the TIM8 timer. The PWM reference frequency is directly proportional to the motor's (stepper motor's) rotational speed; changing the reference frequency changes the rotational speed. During the bimetallic wire alignment process, speed, position, and acceleration parameters need to be adjusted. The host computer communicates with the controller using a 485 interface. The host computer sends data to the 485 converter via a serial port, and then the 485 converter sends data to the controller's 485 receiver. The controller's 485 receiver converts the 485 differential signal into a TTL voltage signal. The TTL voltage signal's potential varies between 3.3V and 0V, and this TTL signal is then connected to the MCU's USART2 peripheral interface. The MCU uses the Rx interrupt of USART2 to receive instruction data from the host computer. The data sent from the host computer to the controller uses the Modbus RTU protocol. A 4-byte header is added before the Modbus protocol. The first 2 bytes indicate the protocol type (Modbus protocol is represented by 502), and the following 2 bytes indicate the length of the instruction data packet. After the 4-byte header is the actual instruction packet encoded according to the Modbus RTU protocol. The host computer transmits two types of instructions to the slave computer: write register instruction packets and read register instruction packets. Before sending commands, the host computer opens the COM port specified by the host computer, and closes the COM port after sending the commands.

[0034] In the above welding embodiments, visual images are used for positioning. The positioning imaging optical path is a telecentric optical path with backlight projection. The lens of the telecentric optical path uses a dual telecentric high-magnification lens. The image sensor uses a 6-megapixel CMOS industrial camera. To improve the edge contrast of the positioning image, the CMOS camera sensor chip is a black-and-white grayscale output sensor with a wide-spectrum response range of 400nm-1100nm. In the patent embodiment, the diameter of the metal wire is 0.5mm-0.3mm, the wire elongation is 1mm, the spacing is 1.2mm, and the image sensor target surface is 1.8 inches, i.e., 6.6mm × 4.8m. Therefore, the magnification ratio of the optical imaging is set to 2:1, so the pixel resolution can reach 0.003 micrometers, thereby enabling high-resolution monitoring of the alignment process.

[0035] To improve image acquisition speed, the camera interface uses a USB 3.0 data output bus. The industrial control computer hardware for image processing has four independent USB 3.0 interfaces. The industrial control computer directly connects to two USB 3.0 CMOS cameras, achieving a data transfer rate of up to 3.5Gbps between each camera and the industrial control computer. Compared to conventional gigabit network industrial vision systems, this increases the frame rate of image acquisition by 2-3 times. The image alignment process is dynamic. This embodiment employs a human-in-the-loop implementation method for multi-camera image acquisition, processing, and display, allowing operators to monitor the alignment process status in real time. Image acquisition uses an event interrupt method. First, the program calls the camera's initialization and configuration functions. In the configuration function, the camera's acquisition parameters are set, including exposure time, magnification gain, and acquisition mode. The camera acquisition mode has two methods: soft trigger and hard trigger. This embodiment uses the software trigger method to acquire images, which is convenient for the operator to observe. In the initialization function, an event callback function for the completion of camera image data reception is registered. When the hardware acquisition driver finishes receiving a frame of data, the event callback function is activated. In the event function, the received image data is stored in a pre-allocated image buffer (raw image), and then the reception completion event is released.

[0036] To maintain system continuity, a software pipeline approach with multiple image buffers was employed. First, during system startup, multiple image buffers were allocated using C++ memory allocation functions. The size of each buffer was consistent with the size of the captured images. Then, a semaphore, ImageCapFinish, was created and encapsulated as a member variable within the camera object variable, set to the "reset" state. The system program created an independent image processing thread, ImageProcessThread, within its process. After starting, this thread entered a polling detection state. When a camera data reception interrupt occurred, the interrupt callback function copied the camera driver data to the raw image buffer, and the corresponding camera object's semaphore was set to "set." Upon detecting that ImageCapFinish was set, the polling detection thread ImageProcessThread copied the data from the raw image buffer to the image algorithm processing buffers ProcessImage and DispImage. DispImage, with the same size as the original image, was responsible for displaying features during the processing. The size of the operator's visualization window is inconsistent with that of the DispImage. In one embodiment, the resolution of the display hardware is 1920×1080 pixels, while the operator's visualization window is configured to be 800×600 pixels. Therefore, this application uses a resolution conversion algorithm to project the 3024×1944 pixel image data from the camera onto a ScreenImage buffer of the same size as the visualization window. Then, the ScreenImage buffer is set within the operating system window display work area. In this way, color distortion and horizontal and vertical coordinate ratio distortion in the image display can be avoided, achieving a WYSIWYG effect. Figure 8 This is a schematic diagram illustrating the definition of the image acquisition data stream data buffer area of ​​the wire alignment system of this application.

[0037] After the positioning system acquires images, it performs image processing on the images from the dual cameras. The core algorithm in this image processing uses a contour shape tracking method, calculating the end face position of the bimetallic object using contour feature points. The image processing steps are as follows: First, the image is segmented. The metal wire appears as a black stripe in the image, against a bright background. Pixel grayscale statistics are used to calculate the proportion of pixels at each grayscale level. Since the image pixel grayscale range is 0-255 levels, the number of pixels at each grayscale level is stored in an array. The values ​​in the grayscale array are summed from smallest to largest. Based on the summation ratio, a grayscale segmentation threshold is calculated. Pixels with a value less than the segmentation threshold are set as active pixels with a brightness value of 255, while pixels with a value greater than the segmentation threshold are inactive pixels with a brightness value of 0. The grayscale value of the metal wire is 255. After image segmentation, a connected component scanning algorithm is used to detect the features of the bright metal wire blocks. This algorithm checks whether any pixel in the image is connected to its neighboring pixels from left to right and from top to bottom. This embodiment uses the 8-connectivity rule, meaning the current pixel is active if it is connected to the pixels above, below, left, right, top left, bottom left, top right, and bottom right. If active, it is assigned the same label as its adjacent pixel below. After connected component scanning, the metal wire can be marked with an coded image; pixels belonging to the same segment of the metal wire have a unique code. After obtaining the coded image, boundary contour tracking is performed to calculate four features: the length, width, boundary contour pixels, and center position of the metal wire object image.

[0038] The axial characteristics of the wire, including the direction of the central axis and the intercept, are calculated using the boundary profile from the four features mentioned above. The calculation process for the axial characteristics of the wire during alignment is as follows: First, the detection area is set as a mask template to extract the effective wire outline.

[0039] Then, using the contour center as a local reference center, and following the set detection direction, from the outside in, pixel positions where the gradient change of the edge exceeds a certain threshold are detected. At these pixel positions, the detection is repeated using a different scale. Only when the pixel gradient change at both scales exceeds a certain threshold is the pixel confirmed as a candidate edge point set. Sixteen pixels in the neighborhood of each edge pixel are selected as input for sub-pixel edge calculation, and the spline curve method is used to calculate the sub-pixel edge coordinates. Each metal wire segment has two edges, top and bottom. Along the edge direction, the sub-pixel edge coordinates of each edge pixel are calculated sequentially. The edge coordinates of each edge direction are combined into a two-dimensional point set, and the least squares method is used to fit the linear equation of each edge direction of the metal wire.

[0040] Before calculating the edge direction, the calculation coordinate system UVW is first established. UVW uses Cartesian coordinates. Because the camera is relatively stationary, the horizontal and vertical directions of the camera sensor are used as the calculation coordinate system for the wire's state. The linear equation for the wire's motion is expressed using the general formula for a straight line. A calculation diagram is shown below. Figure 10 As shown. The edge equations on the top and bottom sides of the metal wire are respectively: a1u+b1v+c1=0 (1) a2u+b2v+c2=0 (2) The angle of inclination of the edge is calculated according to equation (1) as θ. 1, The inclination angle calculated using (2) is θ2, then The inclination angle of the metal wire is θ = θ1 + θ2.

[0041] In calculating the inclination angle of the metal wire, edge detection inevitably encounters errors, resulting in erroneous data points in the coordinate data set. This application employs a quadratic regression iteration method to clean the data points and filter out invalid ones. The specific process is as follows: (1) First, use the least squares method to fit the data points that are expected to be on a straight line, and calculate the parameters of the theoretical straight line equation au+bv+c=0 to which the data coordinates belong. The parameters include three parameters: a, b, and c. Then, calculate the squared distance D2 from each data point to the theoretical straight line equation. Here, the equation D2=(au+bv+c) is used. 2 / (a 2 +b 2 ).

[0042] (2) Calculate the squared distance D2 from all data points to the theoretical line equation. i Then, for all data points D2 i The data points are sorted using a bubble sort algorithm. After sorting, a percentage m% of the coordinate data points are eliminated based on their numerical values. The larger the value, the greater the distance between the data point and the theoretical straight line equation, and the higher the probability of elimination. In the metal wire edge detection embodiment, m is taken as 5 to 30, and the elimination percentage can be set according to the lighting and material characteristics.

[0043] (3) Refit the remaining edge coordinate data, and calculate the distance from the remaining data points to the theoretical straight line equation after fitting. Take the average value of the distance data as the regression error of the metal wire edge.

[0044] After the calculations in (1) to (3) above, the theoretical value of the straight line model of the metal wire edge can be accurately calculated, and the error at both ends of the straight line segment is less than 0.5 pixels. The edge of the metal wire includes two edges, the upper and lower edges. The straight line detection method described above is used to calculate the straight line equation parameters (a1,b1,c1) and (a2,b2,c2) of the upper and lower edges. Then, the average value of the two sets of straight line equation parameters (a0,b0,c0) is taken as the equation of the central axis.

[0045] a0=(a1+a2) / 2 (3) b0=(b1+b2) / 2 (4) c0=(c1+c2) / 2 (5) This embodiment includes two metal wires, left and right. The theoretical straightness parameters of the central axis of each metal wire are calculated using the method described above. When the angle between the two central axes is greater than a certain threshold, the system prompts the user that the possibility of alignment failure has increased. When the angle is less than a certain threshold, the system prompts that subsequent alignment and welding operations can be performed.

[0046] In this embodiment, the intersection of the central axis of the left and right metal wires and their own wire outlines is used as the alignment reference point for a section of metal wire. There are two alignment reference points in the alignment system: P1 for the left metal wire and P2 for the right metal wire. The projected coordinates of alignment reference points P1 and P2 in the UVW coordinate plane are (U1, V1) and (U2, V2), respectively. During system operation, the angle between the two metal wires and the motion axis is very small. Before alignment welding, they must first be adjusted to a coaxial state. The distance the alignment system moves along the axis is: DISX= ; In the above formula, La = ; In the above formula, Ld represents the distance Da is the distance the metal wire moves to maintain pressure during welding. Different values ​​are used for different specifications of metal, ranging from 2 to 10 mm.

[0047] After the alignment wires are installed, their axes may not be on the same center line, requiring them to be moved to the same center line. The method involves fixing the left side of the wire stationary and moving the right side of the wire, driven by a motor, to move it coaxially with the left side. The longitudinal movement distance is the average distance from a point on the center line of one side of the wire to the center line of the other side. After adjusting the left and right wires to be on the same axis, the alignment displacement is calculated using the alignment centroids of the left and right wires. The host computer of the alignment system sends the wire's movement speed, acceleration parameters, and welding displacement to the welding motion control board. Then, the host computer issues a start command to control the electric displacement slide to move, causing short-circuit contact and maintaining pressure on the wires. This results in a momentary short circuit and rapid heating and melting of the wires, achieving the welding connection between the two ends of the wires.

[0048] This embodiment also provides a method for aligning and welding fine metal wires based on binocular vision, including any kind of fine metal wire alignment and welding device; The welding method includes the following steps: The horizontal image acquisition camera 2 and the vertical image acquisition camera 3 in the image acquisition system acquire horizontal and vertical images of the clamp assembly 5 and the clamped metal wire 6 located on the first moving platform 7 and the second moving platform 8, respectively. The edge images of the wire 6 located on the first moving platform 7 in the horizontal image and the edge images of the wire 6 in the vertical image are extracted respectively; the edge images of the wire 6 on the second moving platform 8 in the horizontal image and the edge images of the wire 6 in the vertical image are also extracted respectively. The method for obtaining edge images is as follows: First, the image is segmented. The metal wire appears as a black stripe against a bright background. Pixel grayscale statistics are used to calculate the proportion of pixels at each grayscale level. Since the image's grayscale range is 0-255 levels, the number of pixels at each grayscale level is stored in an array. The values ​​in the grayscale array are summed from smallest to largest. The grayscale segmentation threshold is calculated based on the summation ratio. Pixels with values ​​less than the segmentation threshold are designated as active pixels with a brightness value of 255, while pixels with values ​​greater than the threshold are designated as inactive pixels with a brightness value of 0. The grayscale value of the metal wire is 255. After image segmentation, a connected component scanning algorithm is used to detect the features of the bright metal wire. This algorithm checks whether any pixel in the image is connected to its neighboring pixels from left to right and from top to bottom. This embodiment uses the 8-connectivity rule, which checks whether the current pixel is active with the pixels above, below, left, right, top left, bottom left, top right, and bottom right. If it is active, it is assigned the same label as the pixel below it. After connected component scanning, the metal wires can be marked with an coded image, meaning that pixels belonging to the same segment of the metal wire each have a code. After obtaining the coded image, boundary contour tracking is performed on the coded image to calculate four features of the metal wire object image: length, width, boundary contour pixels, and center position.

[0049] The axial characteristics of the wire, including the direction of the central axis and the intercept, are calculated using the boundary profile from the four features mentioned above. The calculation process for the axial characteristics of the wire during alignment is as follows: First, the detection area is set as a mask template to extract the effective wire outline.

[0050] Then, using the contour center as the local reference center, and following the set detection direction, from the outside to the inside, the pixel positions where the gradient change of the edge is greater than a certain threshold are detected. At this pixel position, the detection is re-performed using the changed scale. Only when the pixel gradient change under both scales is greater than a certain threshold is this pixel confirmed as a candidate edge point set. The 16 pixels in the neighborhood of the edge pixel are selected as the input for sub-pixel edge calculation, and the coordinates of the sub-pixel edge points are calculated using the spline curve method.

[0051] The spatial distance between the welding positions of the two metal wires 6 to be welded includes the inclination angle, horizontal distance and vertical distance between the two metal wires 6 to be welded. The calculation of the inclination angle and distance has been explained in the above embodiments and will not be explained in detail here.

[0052] The spatial distance between the welding positions of the two metal wires 6 to be welded is obtained by using the edge images of the metal wires 6 on the first moving platform 7 and the second moving platform 8. The moving positions of the first moving platform 7 and the second moving platform 8 are adjusted by using the spatial distance between the welding positions of the two metal wires 6 to be welded; after the first moving platform 7 and the second moving platform 8 are adjusted, the two metal wires 6 to be welded are energized for welding.

[0053] As can be seen from this embodiment, the technical solution provided in this embodiment can image in two directions in space. The design of the electric servo device moves the metal wire to a specific position, and after the center docking, a short-circuit contact is made. A current with a large current density flows through the short-circuit contact part, melting the metal wire and welding it together.

[0054] The welding equipment is an opto-mechatronics system, including a set of binocular image sensors. The system's spatial imaging design incorporates a telecentric lens optical path, ensuring that deviations in the distance between the metal wires do not affect dimensional calculations. The system acquires contour images of the object. To obtain clear images, an LED strip light source mounted behind the metal wire illuminates the object. Then, a contour positioning algorithm detects the object's position, and spatial photogrammetry is used to calculate the actual positions of the alloy metal wire and the stainless steel rod to be welded, determining their displacement difference.

[0055] The displacement difference of the metal wire pair includes the height difference, the XY horizontal direction difference, and the attitude angle difference. Then, the actual position difference data in multiple directions is sent to different motor (stepper motor) controllers. The motor (stepper motor) controllers make the center axis of the alloy metal wire to be welded and the stainless steel wire rod aligned by rotation, XY plane movement and height adjustment, that is, move to the ready welding position and adjust the attitude to a state suitable for welding.

[0056] The motion controller uses the high-performance 32-bit STM32F407IET6 microcontroller with a Cortex-M4 core as its core. The STM32F407IET6 microcontroller implements motion planning and electronic signal output for multi-axis motors (stepper motors). The microcontroller's timer TIM8 serves as the PWM pulse output generator for motor control. TIM8 has four channels outputting PWM pulse signals, each channel being used to control one stepper motor (displacement slide). These four channels can control the movement of four displacement slides. The host computer calculates the movement speed of the metal wire, configures the acceleration and acceleration time, and transmits this information via the RS-485 communication interface. The motion controller then calculates the speed distribution table for the entire motion process and sets the PWM reference frequency of the TIM8 timer according to the motion distribution table. The PWM reference frequency is directly proportional to the rotational speed of the motor (stepper motor); changing the reference frequency changes the rotational speed.

[0057] Image processing employed contour tracking to locate the end face of the bimetallic object. The image processing steps were as follows: First, the image was segmented. The metal wire appeared as a black stripe against a bright background. Pixel grayscale values ​​were automatically calculated to determine the proportion of pixels at each grayscale level, and the image was segmented based on these proportions. Pixels with a grayscale value less than the segmentation threshold were designated as active pixels with a brightness value of 255, while pixels with a grayscale value greater than the threshold were designated as inactive pixels with a brightness value of 0. After image segmentation, a connected component scanning algorithm was used to detect the metal wire image. After connected component scanning, the metal wire could be identified using a coded image; pixels belonging to the same segment of the wire each had a coded value. After obtaining the coded image, boundary contour tracking was performed to calculate four features: length, width, boundary contour, and center position of the metal wire image. The axial features of the metal wire, including the direction and intercept of the central axis, were calculated using the boundary contour feature.

[0058] The calculation process for the axial features of the metal wire during alignment is as follows: First, the detection area is set as a mask template to extract the effective metal wire contour. Then, using the contour center as a local reference center, pixels with gradient changes greater than a certain threshold are detected from the outside to the inside according to the set detection direction. At these pixel locations, the detection is repeated using a different scale. Only when the pixel gradient changes at both scales are greater than a certain threshold is this pixel confirmed as a candidate edge point set. Sixteen pixels in the neighborhood of each edge pixel are selected as input for sub-pixel edge calculation, and the spline curve method is used to calculate the sub-pixel edge coordinates. Each metal wire segment has two edges, upper and lower. Along the edge direction, the sub-pixel edge coordinates of each edge pixel are calculated sequentially. The edge coordinates of each edge direction are combined into a two-dimensional point set, and the least squares method is used to fit the linear equation of each edge direction of the metal wire.

[0059] In the process of calculating the tilt angle of the metal wire, edge detection inevitably leads to misidentification, and erroneous data will be generated in the coordinate data acquisition. This application uses a quadratic regression iteration method to clean the data points and filter out invalid data points.

[0060] The intersection of the central axis of the metal wire and the outline of the metal wire is used as a reference point for alignment. There are two alignment reference points in an alignment image. The alignment deviation is calculated using the alignment reference points and output to the motion control card. The host computer issues a start command to control the displacement slide and complete the collision welding of the metal wire.

[0061] The above embodiments are merely illustrative examples of the present invention and do not constitute a limitation on the scope of protection of the present invention. Any designs that are the same as or similar to the present invention are within the scope of protection of the present invention.

Claims

1. A fine metal wire alignment welding device based on binocular vision, characterized in that, include: Cross-shaped fixed frame (1); The image acquisition system includes a horizontal image acquisition camera (2) and a vertical image acquisition camera (3) fixed on a cross-shaped frame (1). The motion alignment system includes a second moving platform (8) and a rotating platform (9) fixed on a fixed base plate (4), and a first moving platform (7) fixedly connected to the rotating platform (9). The clamp assembly (5) is used to clamp the metal wire (6) to be welded. There are two clamp assemblies (5), which are respectively fixed on the first moving platform (7) and the second moving platform (8); and the ends of the two clamp assemblies (5) are respectively electrically connected to the positive and negative poles of the welding power source. The control system receives images of the metal wires (6) to be welded, which are mounted on two clamping assemblies (5) and acquires the spatial distance and directional angle between the two metal wires (6) to be welded using the acquired images. Based on the acquired spatial distance, the control system controls the first moving platform (7), the second moving platform (8), and the rotating platform (9) to move and complete the alignment of the two metal wires (6) to be welded. After the two metal wires (6) to be welded are aligned, the control system controls the welding power supply to provide short-circuit current to the two clamping assemblies (5) and uses the short-circuit current to weld the two metal wires (6).

2. The fine metal wire alignment welding device based on binocular vision as described in claim 1, characterized in that, The cross-shaped fixing frame (1) includes a first cross-shaped fixing frame (101) and a second cross-shaped fixing frame (102); the horizontal image acquisition camera (2) is fixed on the first frame (101) and is used to acquire a top view image of the metal wire (6) to be welded; the vertical image acquisition camera (3) is fixed on the second cross-shaped fixing frame (102) and is used to acquire a front view of the metal wire (6) to be welded; the lens segments of the horizontal image acquisition camera (2) and the vertical image acquisition camera (3) are respectively connected to a telecentric lens (103).

3. The fine metal wire alignment welding device based on binocular vision according to claim 2, characterized in that, The first moving platform (7) includes a first lifting platform (701) fixedly connected to the rotating platform (9). The upper end of the first lifting platform (701) is fixedly connected to a front-back moving platform (702). The upper end of the front-back moving platform (702) is fixedly connected to a first left-right moving platform (703). A clamping assembly (5) is fixedly connected to the first left-right moving platform (703). Before the metal wire (6) is welded, the control system controls the rotating platform (9), the first lifting platform (701), the front-back moving platform (702) and the first left-right moving platform (703) to move, so that the metal wire (6) to be welded held by the clamping assembly (5) on the first moving platform (7) is connected to the metal wire (6) to be welded held by the clamping assembly (5) on the second moving platform (8).

4. The fine metal wire alignment welding device based on binocular vision according to claim 1 or 3, characterized in that, The second moving platform (8) includes a fixed pad (801) fixedly connected to the fixed base plate (4), a second lifting platform (802) fixedly connected to the fixed pad (801), a second left and right moving platform (803) fixedly connected to the second lifting platform (802), and a clamping assembly (5) fixedly connected to the second left and right moving platform (803). Before the metal wire (6) is welded, the control system controls the second lifting platform (802) and the second left and right moving platform (803) to move, so that the metal wire (6) to be welded held by the clamping assembly (5) on the second moving platform (8) is connected to the metal wire (6) to be welded held by the clamping assembly (5) on the first moving platform (7).

5. The fine metal wire alignment welding device based on binocular vision according to claim 2, characterized in that, The second rack (102) is equipped with a fill light (104), and the fill light (104) is located directly in front of the vertical image acquisition camera (3).

6. The fine metal wire alignment welding device based on binocular vision according to claim 1, characterized in that, The control system receives images of the two metal wires (6) to be welded captured by the horizontal image acquisition camera (2) and the vertical image acquisition camera (3), and extracts the edge images of the two metal wires (6) in the images. It then uses the edge images of the two metal wires (6) to obtain the spatial distance between the welding parts of the two metal wires (6). The control system uses the spatial distance between the welding parts of the two metal wires (6) to control the motion trajectory of the first moving platform (7), the second moving platform (8), and the rotating motion table (9).

7. The fine metal wire alignment welding device based on binocular vision according to claim 1, characterized in that, The clamp assembly (5) includes a clamp base (501) fixedly connected to the first moving platform (7), the clamp base (501) having a groove (502) for placing a metal wire (6), and a pressure plate (503) fixedly connected to the base (501), the end of the pressure plate (503) connected to the base (501) having a protrusion (504) extending into the groove (502).

8. A method for aligning and welding fine metal wires based on binocular vision, characterized in that, Includes any one of the fine metal wire alignment welding devices according to claims 1-7; The welding method includes the following steps: The horizontal image acquisition camera (2) and the vertical image acquisition camera (3) in the image acquisition system are used to acquire horizontal and vertical images of the clamp assembly (5) and the clamped metal wire (6) located on the first moving platform (7) and the second moving platform (8), respectively. The edge images of the wire (6) located on the first moving platform (7) in the horizontal image and the edge images of the wire (6) in the vertical image are extracted respectively; the edge images of the wire (6) on the second moving platform (8) in the horizontal image and the edge images of the wire (6) in the vertical image are extracted respectively. The spatial distance between the welding positions of the two metal wires (6) to be welded is obtained by using the edge images of the metal wires (6) on the first moving platform (7) and the second moving platform (8); The rotation angle of the rotating platform (9) is adjusted by the difference in tilt angle between the two metal wires (6) to be welded in the space distance between their welding positions, and the moving positions of the first moving platform (7) and the second moving platform (8) are adjusted. After the first moving platform (7) and the second moving platform (8) are adjusted, the two metal wires (6) to be welded are energized for welding.

9. The method for aligning and welding fine metal wires based on binocular vision according to claim 8, characterized in that, The spatial distance between the welding positions of the two metal wires (6) to be welded includes the inclination angle, horizontal distance and vertical distance between the two metal wires (6) to be welded.