Welding gun self-adaptive swing adjusting system and method
The adaptive oscillation adjustment system for the welding torch, driven by a laser displacement sensor and an STM32 microcontroller, solves the problems of poor weld flatness and misalignment, achieving efficient and stable welding quality and efficiency, and is suitable for automated welding of complex welds.
Patent Information
- Application Number
- CN202511355786.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2025-12-12
AI Technical Summary
Existing welding technologies struggle to effectively address issues such as workpiece machining errors and insufficient assembly precision, resulting in poor weld flatness, large gaps, and misaligned edges, leading to poor welding quality and low efficiency. Furthermore, automated systems have limited adaptability to dynamic weld defects, requiring manual intervention for adjustment.
A laser displacement sensor is used to detect the geometric information of the weld seam. Combined with a dynamic threshold model and a point-by-point comparison method based on linear interpolation, the weld seam is accurately tracked and adjusted through an adaptive oscillation adjustment system for the welding torch. The system integrates a detection module, a control module, an execution module, a human-machine interaction module, and a storage module. An STM32 microcontroller and a stepper motor are used to drive the oscillation of the welding torch.
It improves welding quality and efficiency, reduces manual intervention, can adapt to complex welds, reduces costs, and works stably in strong light environments, making it suitable for splicing thin plates and large workpieces.
Smart Images

Figure CN121104255A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of welding automation technology, and relates to an adaptive oscillation adjustment system and method for a welding torch. Background Technology
[0002] In the field of industrial welding, especially in scenarios such as railway open wagon maintenance and large steel structure splicing, welding quality directly affects the structural strength and service life of the workpiece. With the increasing automation level in manufacturing, welding operations are gradually shifting from manual operation to automated systems, and precise control of the welding torch is a core element in ensuring welding quality. Currently, automated welding equipment is widely used in various industrial production processes. By driving the welding torch movement through preset programs, it can improve welding efficiency and consistency to a certain extent, and is particularly suitable for welding regular weld seams in mass production.
[0003] However, welding operations still face numerous technical challenges in actual production and use. On the one hand, due to workpiece processing errors and insufficient assembly precision, welds often suffer from defects such as poor flatness, large gap fluctuations, and misalignment, leading to problems like arc extinction and poor fusion during welding. Especially in thin-plate welding, misalignment can cause serious defects such as burn-through or incomplete penetration. On the other hand, while traditional manual welding can adapt to complex welds through manual adjustments, it suffers from poor quality stability, high labor intensity, and low efficiency, making it difficult to meet the precision and capacity requirements of modern production. Furthermore, existing automated welding systems have limited adaptability to dynamic weld defects; when weld conditions exceed preset parameter ranges, manual intervention is required, further restricting production efficiency.
[0004] After reviewing relevant materials, the technology disclosed in "An Adaptive Adjustment System and Method for Vertical Welding Seam Tracking in Vertical Welding" uses a current sensor to detect the welding current signal and combines it with a correlation model between the welding torch tilt angle and the current to adjust the angle between the welding torch and the plate in real time to improve the molten pool flow problem in vertical welding. The advantage of this technology is that it can indirectly reflect the welding state through electrical signals and has a relatively fast adjustment response speed; however, the disadvantage is that the current signal is easily affected by factors such as arc fluctuations and material differences, making it difficult to accurately correspond to geometric defects of the weld (such as uneven edges, excessive gaps), and it is only applicable to tilt angle adjustment, unable to solve the dynamic adaptation problem of welding torch swing amplitude; such systems track the trajectory by contacting the weld edge with a mechanical probe, such as the guide wheel tracking mechanism used in some gantry welding equipment. Its advantages are simple structure, low cost, and suitability for mass production of regular welds; however, the disadvantages are that mechanical contact can easily wear down the workpiece surface, poor adaptability to complex welds with large gaps and severe edge misalignment, and the tracking accuracy is easily affected by mechanical vibration.
[0005] The method involves acquiring weld seam images using a CCD camera or laser vision sensor, then using image processing algorithms to identify the weld seam position and drive the welding torch to adjust. Its advantages are that it can directly obtain the geometric information of the weld seam and has high tracking accuracy. However, its disadvantages are that the vision system is susceptible to interference from welding arc light and fumes, has insufficient stability in strong light environments, and the image processing algorithms are complex, requiring high hardware computing power and costing a lot.
[0006] A comprehensive analysis of existing technologies reveals that current-sensing methods struggle to accurately match weld geometric defects, mechanical tracking systems have limited adaptability, and visual sensing technologies are constrained by environmental interference and cost. Therefore, this invention directly acquires weld geometric information using a laser displacement sensor. Combined with a dynamic threshold model based on the initial distance to the plate material and process parameters, it drives the welding torch to oscillate in real time to adapt to gap and misalignment defects. Furthermore, a point-by-point comparison method enables full-quadrant weld tracking, ultimately solving the welding quality and efficiency problems associated with complex welds in actual production. Summary of the Invention
[0007] This invention provides a welding torch adaptive oscillation adjustment system and method to solve the problems of poor welding quality, low efficiency, and excessive manual intervention caused by poor weld flatness, large gaps, and misalignment during the welding process. By realizing adaptive oscillation adjustment of the welding torch and precise weld tracking, the welding quality and efficiency are improved and manual intervention is reduced.
[0008] To solve the above problems, the technical solution adopted by the invention is as follows: An adaptive oscillation adjustment system for a welding torch includes: The detection module is used to detect the unevenness information of the weld. The control module is used to receive the unevenness information transmitted by the detection module, and determine whether to issue a control signal based on the unevenness information and a preset threshold. The preset threshold is determined based on the vertical distance from the initial welding point of the replaced plate to the detection module and the fluctuation range of the process requirements. An execution module is used to receive the control signal and drive the welding gun to oscillate according to the control signal to achieve fusion between the base material and the new plate. The human-computer interaction module is used to enable users to operate the system and display system information; The power supply module provides power to the detection module, control module, execution module, and human-machine interaction module. The storage module stores information detected by the detection module and relevant data during system operation. The control module further controls the welding torch to move along the weld seam trajectory using a weld seam tracking algorithm. This algorithm is based on linear interpolation, employs a point-by-point comparison method, and determines the next movement direction of the welding torch using a deviation function. The deviation function is... In the first quadrant, when At that time, the welding torch was aimed at... Directional movement; when At that time, the welding torch was aimed at... Directional movement; for linear interpolation in the four quadrants, , use , The feed direction is determined by the sign of the coordinate value; during the interpolation process, the total number of steps is calculated, and the total number of steps is reduced by one after each feed until the total number of steps drops to zero, at which point the interpolation stops.
[0009] A welding torch adaptive oscillation adjustment method includes the following steps: S01: Initialize all modules in the system, including the detection module, control module, execution module, human-computer interaction module, storage module, and communication module; S02: Set the relevant parameters required for system operation, including communication parameters, interrupt grouping and priority parameters, and memory address parameters; S03: The unevenness information of the weld is detected by the detection module. The control module establishes communication with the detection module, receives the unevenness information transmitted by the detection module, and displays the unevenness information on the human-machine interaction module and stores it in the storage module. S04: The control module determines whether the welding torch oscillation needs to be adjusted based on the unevenness information and the preset threshold. If so, the control module sends a control signal to the execution module, and the execution module drives the welding torch to oscillate in order to achieve the fusion of the base material and the new plate. If not, the detection and communication continue. S05: During the welding process, the control module controls the welding torch to move along the weld seam trajectory through a weld seam tracking algorithm. This algorithm is based on the principle of linear interpolation, employs a point-by-point comparison method, and determines the next movement direction of the welding torch through a deviation function. The deviation function is... In the first quadrant, when At that time, the welding torch was aimed at... Directional movement; when At that time, the welding torch was aimed at... Directional movement; for linear interpolation in the four quadrants, , use , The feed direction is determined by the sign of the coordinate value; during the interpolation process, the total number of steps is calculated, and the total number of steps is reduced by one after each feed until the total number of steps drops to zero, at which point the interpolation stops.
[0010] The principle and advantages of this solution are as follows: The system uses a laser displacement sensor as the detection module, directly acquiring weld unevenness information based on the triangulation measurement principle. This data is transmitted to the STM32 control module via RS485 communication. The control module retrieves historical data from the storage module and, combined with preset thresholds, determines whether weld adjustment is needed. If adjustment is required, the control module sends pulse signals to the stepper motor execution module, driving the welding torch to oscillate in both forward and reverse directions, ensuring full fusion between the base material and the new plate. Simultaneously, the control module tracks the weld using a point-by-point comparison method based on linear interpolation, utilizing a deviation function... Determine the direction of the welding torch movement and pass through all quadrants. , The feed direction is determined by replacing the coordinate values and combining them with the symbols, and precise trajectory control is achieved by decreasing the total number of steps.
[0011] Compared to existing technologies, using laser displacement sensors to directly acquire weld geometry information, compared to traditional current sensors that rely on welding current to indirectly infer weld conditions, avoids interference from arc fluctuations and material differences in electrical signals. This improves detection accuracy to the 20-micron level, enabling precise identification of geometric defects such as misalignment and large gaps. Furthermore, the threshold is determined based on the initial distance of the plate material and the range of process fluctuations, rather than fixed empirical values. This allows for adaptation to different plate material replacement scenarios; for example, when replacing plates of different thicknesses during open-top vehicle maintenance, the threshold range can be automatically adapted without recalibration. Thirdly, the tracking algorithm is highly adaptable. Trajectory control is achieved through a full-quadrant point-by-point comparison method. Compared to mechanical tracking systems, such as guide wheel tracking mechanisms, this eliminates wear on the workpiece surface caused by mechanical contact and can adapt to complex weld paths, solving the problem of insufficient adaptability to gaps and misalignments in traditional mechanical tracking.
[0012] Regarding welding quality, the adaptive oscillation of the welding torch effectively solves the problem of poor fusion caused by misalignment. For example, even when the misalignment reaches ±3mm, the weld formation qualification rate can still be improved through oscillation adjustment. In terms of efficiency improvement, the combination of dynamic threshold judgment and precise tracking algorithm reduces the number of manual interventions and shortens the welding time of a single weld. Regarding the scope of application, the anti-arc interference characteristics of laser detection make it stable in scenarios such as thin plate welding and large workpiece splicing, while existing visual sensing technologies are prone to failure in strong arc light environments. In addition, the modular design of the system facilitates maintenance and reduces costs compared to complex multi-degree-of-freedom mechanical tracking systems.
[0013] Furthermore, the detection module is a laser displacement sensor monitoring module. The laser displacement sensor is based on the triangulation measurement principle and uses a specific wavelength of red semiconductor laser. It transmits data to the control module via RS485 communication. From the detection principle perspective, the triangulation measurement principle can accurately calculate the distance between the weld surface and the sensor through laser reflection, directly obtaining the geometric parameters of the weld unevenness. Compared to indirect detection methods, such as inferring from physical quantities like current, the detection results... The results are more intuitive and reliable, directly reflecting the actual shape of the weld. The specific wavelength of the red semiconductor laser can effectively avoid the interference of the arc light during the welding process, ensuring stable data acquisition even in strong light welding environments. This solves the problem that ordinary light sources are easily affected by ambient light interference, leading to a decrease in detection accuracy. The RS485 communication method has the characteristics of strong anti-interference ability, long transmission distance (which can meet the long-distance deployment requirements of sensors and control modules in large welding equipment), and support for multi-device networking. It can ensure that the detection data is stably and accurately transmitted to the control module in complex industrial environments, providing a reliable data foundation for subsequent threshold judgment and welding torch adjustment, thereby improving the response speed and control accuracy of the entire system.
[0014] Furthermore, the control module is an STM32 microcontroller, specifically the STM32F103ZET6. This microcontroller operates at a maximum frequency of 72MHz and has 512KB of flash memory, enabling efficient execution of weld seam tracking algorithms, such as point-by-point comparison based on linear interpolation and complex logic judgment programs, meeting the system's real-time requirements. It features multiple timer functions, accurately outputting pulse signals to drive the stepper motor, achieving precise control of the welding torch's swing angle and speed, ensuring accurate adjustment. Simultaneously, this model supports RS485 communication, enabling stable transmission of detection data with the laser displacement sensor. Its rich I / O interfaces facilitate easy connection to human-machine interface modules, storage modules, etc., simplifying system hardware design. Moreover, the STM32F103ZET6 offers high cost-effectiveness and low power consumption, ensuring high system performance while helping to control overall costs, adapting to the actual application needs of industrial welding equipment, and providing reliable core control support for the stable and efficient implementation of adaptive welding torch swing adjustment.
[0015] Furthermore, the execution module includes a stepper motor module, which includes a stepper motor and a driver. The stepper motor receives pulse signals from the control module through the driver, thereby driving the welding torch to swing. The stepper motor is a 57 series planetary geared stepper motor, and the driver is an MD-4 two-phase DC driver. The step angle of the 57 series planetary geared stepper motor is 1.8°. With the planetary gear structure, the output torque can be further improved, with a maximum torque of 3 N•m. It can accurately respond to the pulse signals sent by the control module, realize fine adjustment of the welding torch swing angle and speed, and meet the fusion requirements under different weld gaps and misalignment amounts. The MD-4 two-phase DC driver, as an adapter component, can stably receive control signals from the STM32 microcontroller. By adjusting the number of pulses, frequency, and power-on sequence, it can precisely control the forward and reverse rotation and start and stop of the motor, ensuring the stability and reliability of the welding torch's oscillation. Working together, the two can drive the welding torch to oscillate stably through the high torque output of the stepper motor, while the driver's signal processing capability can reduce pulse signal interference and prevent the welding torch from jamming or deviating. Especially when dealing with complex welds such as uneven edges and gap fluctuations, it can achieve uniform fusion of the base material and the new plate through precise oscillation control, providing a reliable execution guarantee for the system's adaptive adjustment function.
[0016] Furthermore, the human-machine interaction module includes a button input module and an LCD display module. The button input module is used to start, stop, and reset the system. The LCD display module is used to display data from the communication between the detection module and the control module, as well as read and write data from the storage module, in real time. The button input module can control the core functions of the system through simple button operations, without the need for complex programming or settings, thus lowering the barrier to entry for operators. Especially in the complex environment of industrial welding sites, it can quickly respond to operational needs. In terms of information transparency, the various data presented in real time by the LCD display module allows operators to intuitively grasp weld detection information, system operating status, and data storage, facilitating timely detection and intervention of anomalies. For example, when the detection data exceeds a preset threshold, the operator can quickly determine whether auxiliary adjustments are needed through the displayed information. The combination of the two forms an efficient human-machine interaction mechanism, which not only ensures the convenience of system operation but also realizes the visualization of the operating status, helping to improve the usability and reliability of the system and reduce welding problems caused by operational errors or untimely information.
[0017] Furthermore, in step S04, when the welding torch oscillation needs to be adjusted, the stepper motor in the execution module drives the welding torch to oscillate via forward and reverse rotation. The dwell time of the welding torch at the highest point of the oscillation is controlled by a delay function according to process requirements. The forward and reverse rotation of the stepper motor can drive the welding torch to form a symmetrical oscillation on both sides of the weld, ensuring that areas with misaligned edges or large gaps can be heated evenly, avoiding local incomplete fusion or over-fusion. By controlling the dwell time of the welding torch at the highest point of the oscillation through the delay function, the molten pool formation time can be precisely adjusted according to different welding process requirements, such as different plate thicknesses and welding materials. For example, the dwell time can be extended when welding thick plates to ensure penetration, while the dwell time can be shortened when welding thin plates to prevent burn-through, making the fusion of the base material and the new plate more in line with process standards. This adjustment method, which combines mechanical action and program control, not only achieves the flexibility of the welding torch oscillation but also ensures the stability of welding parameters through precise time control. It effectively solves the problem of welding quality fluctuations caused by complex weld morphology and improves the system's adaptability to different welding conditions.
[0018] Furthermore, in step S04, the control module and the detection module transmit data via RS485 communication. The communication parameters include a binary transmission code, an 8-bit data length, a 1-bit stop bit, no parity bit, and a baud rate of 115200. The high baud rate of 115200 enables rapid transmission of detection data, ensuring that the control module can promptly acquire weld unevenness information, providing a time guarantee for real-time judgment and adjustment of the welding torch oscillation, especially suitable for scenarios where the weld state changes dynamically during welding. The combination of the binary transmission code and the 8-bit data length allows for direct transmission of raw detection data, reducing accuracy loss during data conversion and ensuring information integrity. The 1-bit stop bit and the absence of a parity bit simplify the communication protocol while ensuring the stability of data transmission in industrial environments, avoiding transmission delays caused by complex verification mechanisms. Simultaneously, RS485 itself has strong anti-interference capabilities, enabling stable operation in the electromagnetic environment of the welding site, ensuring the accuracy and timeliness of data interaction between the control module and the detection module, and laying a reliable data transmission foundation for the system's adaptive adjustment function.
[0019] Furthermore, in step S04, the specific method for determining the weld flatness based on the set threshold includes the following steps: S041: The laser displacement sensor continuously samples the initial welding point of the replaced plate multiple times, removes the maximum and minimum values, and takes the average value as the reference distance. ; S042: Plate thickness according to welding process requirements Set stratification coefficient , , where: when hour, , ;when hour, , ;when hour, , ; S043: Based on reference distance Calculate the initial threshold interval and lower threshold using the stratification coefficient. Upper limit threshold ; S044: The laser displacement sensor continuously acquires data from the weld area at a preset frequency. Each preset number of data points forms a detection window. After removing outliers within the window, the average of the remaining data is calculated. ; S045: Calculate the trend coefficient using the average of three adjacent windows. , ,in (i) represents the current window average. (i-1) (i-2) is the average value of the first two windows; S046: Retrieve qualified weld data of the same type of plate welded in the past 24 hours from the storage module and calculate its distance fluctuation standard deviation. According to the trend coefficient Generate real-time correction factor :when hour, ;when hour, ;when hour, ,and ; S047: Update the real-time threshold range and real-time lower limit threshold based on the correction factor α. Real-time upper limit threshold ; S048: Average value of the current window With real-time threshold range In comparison, if ∈ If the weld flatness is deemed to meet the requirements; < or >Tᵤ', initiate a secondary inspection of 3 consecutive windows. If all 3 windows do not meet the requirements, the weld flatness is determined to be non-compliant. S049: After each welding operation, the reference distance of the qualified weld should be recorded. Stratification coefficient and Correction factor The data is stored in the storage module as initial reference data for the next welding of the same type. From the perspective of benchmark setting, S041 obtains the benchmark distance by averaging multiple samples after removing extreme values. This avoids the impact of single measurement errors on the threshold, laying a precise foundation for subsequent judgments; S042 sets a layering coefficient based on the plate thickness, allowing the threshold range to adapt to the process requirements of different plate thicknesses. For example, a smaller coefficient is used for welding thick plates to strictly control flatness, while a wider coefficient is used for thin plates to avoid over-adjustment; S043 calculates the initial threshold based on the reference distance and layering coefficient, realizing the correlation between the threshold and the actual welding scenario; S044 uses the 3σ criterion to remove outliers, ensuring the validity of the detection data, while the window average calculation smooths out instantaneous fluctuations, making the judgment more stable; S045-S047 use trend coefficients... and real-time correction factor The dynamic adjustment of the threshold range allows for proactive responses to changes in weld smoothness trends. For example, when fluctuations show an increasing trend, the threshold is automatically widened to avoid misjudgments, while the threshold is tightened during convergence to improve accuracy. The secondary detection mechanism in S048 reduces misjudgments caused by instantaneous interference, improving the reliability of the judgment. S049 uses qualified data storage as a reference, enabling the system to have self-learning capabilities; as usage increases, the threshold setting becomes increasingly aligned with actual working conditions. The entire process achieves comprehensive optimization from static benchmarks to dynamic correction, from single-test detection to trend prediction, and from independent judgment to historical learning. Compared to fixed threshold judgments, it can more accurately adapt to complex weld changes, effectively reducing unnecessary adjustments or adjustment lags caused by misjudgments, and significantly improving the system's accuracy and adaptability in judging defects such as uneven edges and gap fluctuations. Attached Figure Description
[0020] Figure 1 This is a flowchart of the present invention; Figure 2 This is a flowchart of the method of the present invention; Figure 3 Hardware block diagram of the automatic adjustment device for welding torch oscillation; Figure 4 This is a block diagram of the main program module for the automatic adjustment device for welding torch oscillation. Figure 5 Flowchart of the main program module for the automatic adjustment device for welding torch oscillation; Figure 6 Schematic diagram of linear interpolation principle for weld seam tracking; Figure 7 A flowchart for linear interpolation process for weld seam tracking; Figure 8 Flowchart for linear interpolation for weld seam tracking. Detailed Implementation
[0021] Example 1, as Figure 1-2 As shown, a welding torch adaptive oscillation adjustment system includes: The detection module is used to detect the unevenness information of the weld. The control module is used to receive the unevenness information transmitted by the detection module, and determine whether to issue a control signal based on the unevenness information and a preset threshold. The preset threshold is determined based on the vertical distance from the initial welding point of the replaced plate to the detection module and the fluctuation range of the process requirements. An execution module is used to receive the control signal and drive the welding gun to oscillate according to the control signal to achieve fusion between the base material and the new plate. The human-computer interaction module is used to enable users to operate the system and display system information; The power supply module provides power to the detection module, control module, execution module, and human-machine interaction module. The storage module stores information detected by the detection module and relevant data during system operation. The control module further controls the welding torch to move along the weld seam trajectory using a weld seam tracking algorithm. This algorithm is based on linear interpolation, employs a point-by-point comparison method, and determines the next movement direction of the welding torch using a deviation function. The deviation function is... In the first quadrant, when At that time, the welding torch was aimed at... Directional movement; when At that time, the welding torch was aimed at... Directional movement; for linear interpolation in the four quadrants, , use , The feed direction is determined by the sign of the coordinate value; during the interpolation process, the total number of steps is calculated, and the total number of steps is reduced by one after each feed until the total number of steps drops to zero, at which point the interpolation stops.
[0022] An adaptive oscillation adjustment method for a welding torch based on an adaptive oscillation adjustment system includes the following steps: S01: Initialize all modules in the system, including the detection module, control module, execution module, human-computer interaction module, storage module, and communication module; S02: Set the relevant parameters required for system operation, including communication parameters, interrupt grouping and priority parameters, and memory address parameters; S03: The unevenness information of the weld is detected by the detection module. The control module establishes communication with the detection module, receives the unevenness information transmitted by the detection module, and displays the unevenness information on the human-machine interaction module and stores it in the storage module. S04: The control module determines whether the welding torch oscillation needs to be adjusted based on the unevenness information and the preset threshold. If so, the control module sends a control signal to the execution module, and the execution module drives the welding torch to oscillate in order to achieve the fusion of the base material and the new plate. If not, the detection and communication continue. S05: During the welding process, the control module controls the welding torch to move along the weld seam trajectory through a weld seam tracking algorithm. This algorithm is based on the principle of linear interpolation, employs a point-by-point comparison method, and determines the next movement direction of the welding torch through a deviation function. The deviation function is... In the first quadrant, when At that time, the welding torch was aimed at... Directional movement; when At that time, the welding torch was aimed at... Directional movement; for linear interpolation in the four quadrants, , use , The feed direction is determined by the sign of the coordinate value; during the interpolation process, the total number of steps is calculated, and the total number of steps is reduced by one after each feed until the total number of steps drops to zero, at which point the interpolation stops.
[0023] The system uses a laser displacement sensor as the detection module, directly acquiring weld unevenness information based on the triangulation measurement principle. This data is transmitted to the STM32 control module via RS485 communication. The control module retrieves historical data from the storage module and, combined with preset thresholds, determines whether weld adjustment is needed. If adjustment is required, the control module sends pulse signals to the stepper motor execution module, driving the welding torch to oscillate in both forward and reverse directions, ensuring full fusion between the base material and the new plate. Simultaneously, the control module tracks the weld using a point-by-point comparison method based on linear interpolation, utilizing a deviation function... Determine the direction of the welding torch movement and pass through all quadrants. , The feed direction is determined by replacing the coordinate values and combining them with the symbols, and precise trajectory control is achieved by decreasing the total number of steps.
[0024] The laser displacement sensor directly acquires weld geometry information. Compared to traditional current sensors, such as those that rely on welding current to indirectly infer weld condition, this method avoids interference from arc fluctuations and material differences in the electrical signal, improving detection accuracy to the 20-micron level. It can accurately identify geometric defects such as misalignment and large gaps. The threshold is determined based on the initial distance of the plate material and the range of process fluctuations, rather than a fixed empirical value. This allows for adaptation to different plate material replacement scenarios. For example, when replacing plates of different thicknesses during open-top vehicle maintenance, the threshold range can be automatically adapted without recalibration. Thirdly, the tracking algorithm is adaptable. The trajectory control is achieved through a full-quadrant point-by-point comparison method. Compared to mechanical tracking systems, such as guide wheel tracking mechanisms, this method eliminates the wear on the workpiece surface caused by mechanical contact and can adapt to complex weld paths, solving the problem of insufficient adaptability of traditional mechanical tracking to gaps and misalignments.
[0025] Regarding welding quality, the adaptive oscillation of the welding torch effectively solves the problem of poor fusion caused by misalignment. For example, even when the misalignment reaches ±3mm, the weld formation qualification rate can still be improved through oscillation adjustment. In terms of efficiency improvement, the combination of dynamic threshold judgment and precise tracking algorithm reduces the number of manual interventions and shortens the welding time of a single weld. Regarding the scope of application, the anti-arc interference characteristics of laser detection make it stable in scenarios such as thin plate welding and large workpiece splicing, while existing visual sensing technologies are prone to failure in strong arc light environments. In addition, the modular design of the system facilitates maintenance and reduces costs compared to complex multi-degree-of-freedom mechanical tracking systems.
[0026] The detection module is a laser displacement sensor monitoring module. The laser displacement sensor is based on the triangulation measurement principle and uses a specific wavelength of red semiconductor laser. It transmits data to the control module via RS485 communication. From the detection principle perspective, the triangulation measurement principle can accurately calculate the distance between the weld surface and the sensor through laser reflection, directly obtaining the geometric parameters of weld unevenness. Compared to indirect detection methods, such as inference from physical quantities like current, the detection results are more accurate. Intuitive and reliable, it can directly reflect the actual shape of the weld; the specific wavelength of red semiconductor laser can effectively avoid the interference of arc light during the welding process, ensuring stable data acquisition even in strong light welding environments, solving the problem that ordinary light sources are easily affected by ambient light interference, leading to a decrease in detection accuracy; while the RS485 communication method has the characteristics of strong anti-interference ability, long transmission distance (which can meet the long-distance deployment requirements of sensors and control modules in large welding equipment), and support for multi-device networking, which can ensure that the detection data is stably and accurately transmitted to the control module in complex industrial environments, providing a reliable data foundation for subsequent threshold judgment and welding torch adjustment, thereby improving the response speed and control accuracy of the entire system.
[0027] The control module is an STM32 microcontroller, specifically the STM32F103ZET6. This microcontroller operates at a maximum frequency of 72MHz and has 512KB of flash memory, enabling efficient execution of weld seam tracking algorithms, such as point-by-point comparison based on linear interpolation and complex logic judgment programs, meeting the system's real-time requirements. It features multiple timer functions, accurately outputting pulse signals to drive the stepper motor, achieving precise control of the welding torch's oscillation angle and speed, ensuring accurate adjustment. Furthermore, this model supports RS485 communication, enabling stable transmission of detection data with the laser displacement sensor. Its rich I / O interfaces allow for easy connection to human-machine interface modules, storage modules, etc., simplifying system hardware design. In addition, the STM32F103ZET6 offers high cost-effectiveness and low power consumption, ensuring high system performance while helping to control overall costs, adapting to the actual application needs of industrial welding equipment, and providing reliable core control support for the stable and efficient implementation of adaptive welding torch oscillation adjustment.
[0028] The execution module includes a stepper motor module, which comprises a stepper motor and a driver. The stepper motor receives pulse signals from the control module via the driver, thereby driving the welding torch to oscillate. The stepper motor is a 57 series planetary geared stepper motor, and the driver is an MD-4 two-phase DC driver. The 57 series planetary geared stepper motor has a step angle of 1.8°, and with the planetary gear structure, the output torque can be further improved, with a maximum torque of 3 N•m. It can accurately respond to the pulse signals from the control module, realizing fine adjustment of the welding torch oscillation angle and speed to meet the fusion requirements under different weld gaps and misalignments. -4 Two-phase DC driver, as an adapter component, can stably receive control signals from the STM32 microcontroller. By adjusting the number of pulses, frequency, and power-on sequence, it can precisely control the forward and reverse rotation and start and stop of the motor, ensuring the stability and reliability of the welding torch's oscillation. The two work together to drive the welding torch to oscillate stably through the high torque output of the stepper motor, and reduce pulse signal interference with the signal processing capability of the driver, avoiding jamming or deviation of the welding torch. Especially when dealing with complex welds such as uneven edges and gap fluctuations, it can achieve uniform fusion of the base material and the new plate through precise oscillation control, providing a reliable execution guarantee for the system's adaptive adjustment function.
[0029] The human-machine interface module includes a button input module and an LCD display module. The button input module is used to start, stop, and reset the system. The LCD display module is used to display data from the communication between the detection module and the control module, as well as read and write data from the storage module in real time. The button input module allows for control of the system's core functions through simple button operations, eliminating the need for complex programming or settings, thus lowering the barrier to entry for operators. This is especially beneficial in the complex environment of industrial welding sites, enabling rapid response to operational needs. In terms of information transparency, the LCD display module presents various data in real time, allowing operators to intuitively grasp weld inspection information, system operating status, and data storage, facilitating timely detection and intervention of anomalies. For example, when the detection data exceeds a preset threshold, operators can quickly determine whether auxiliary adjustments are needed based on the displayed information. The combination of these two components forms an efficient human-machine interaction mechanism, ensuring both the convenience of system operation and the visualization of operating status. This helps improve the system's usability and reliability, reducing welding problems caused by operational errors or untimely information.
[0030] In step S04, when the welding torch oscillation needs to be adjusted, the stepper motor in the execution module drives the welding torch to oscillate via forward and reverse rotation. The dwell time of the welding torch at the highest point of the oscillation is controlled by a delay function according to process requirements. The forward and reverse rotation of the stepper motor can drive the welding torch to form a symmetrical oscillation on both sides of the weld, ensuring that areas with misaligned edges or large gaps can be heated evenly, avoiding local incomplete fusion or over-fusion. By controlling the dwell time of the welding torch at the highest point of the oscillation through the delay function, the molten pool formation time can be precisely adjusted according to different welding process requirements, such as different plate thicknesses and welding materials. For example, the dwell time can be extended when welding thick plates to ensure penetration, while the dwell time can be shortened when welding thin plates to prevent burn-through, making the fusion of the base material and the new plate more in line with process standards. This adjustment method, which combines mechanical action and program control, not only achieves the flexibility of the welding torch oscillation but also ensures the stability of welding parameters through precise time control. It effectively solves the problem of welding quality fluctuations caused by complex weld morphology and improves the system's adaptability to different welding conditions.
[0031] In step S04, the control module and the detection module transmit data via RS485 communication. The communication parameters include a binary transmission code, an 8-bit data length, a 1-bit stop bit, no parity bit, and a baud rate of 115200. The high baud rate of 115200 enables rapid transmission of detection data, ensuring that the control module can promptly obtain weld unevenness information, providing a time guarantee for real-time judgment and adjustment of the welding torch oscillation, especially suitable for scenarios where the weld state changes dynamically during welding. The combination of the binary transmission code and the 8-bit data length allows for direct transmission of raw detection data, reducing accuracy loss during data conversion and ensuring information integrity. The 1-bit stop bit and the absence of a parity bit simplify the communication protocol while ensuring the stability of data transmission in industrial environments, avoiding transmission delays caused by complex verification mechanisms. Furthermore, RS485 itself has strong anti-interference capabilities, enabling stable operation in the electromagnetic environment of the welding site, ensuring the accuracy and timeliness of data interaction between the control module and the detection module, and laying a reliable data transmission foundation for the system's adaptive adjustment function.
[0032] In step S04, the specific method for determining the weld flatness based on the set threshold includes the following steps: S041: The laser displacement sensor continuously samples the initial welding point of the replaced plate multiple times, removes the maximum and minimum values, and takes the average value as the reference distance. ; S042: Plate thickness according to welding process requirements Set stratification coefficient , , where: when hour, , ;when hour, , ;when hour, , ; S043: Based on reference distance Calculate the initial threshold interval and lower threshold using the stratification coefficient. Upper limit threshold ; S044: The laser displacement sensor continuously acquires data from the weld area at a preset frequency. Each preset number of data points forms a detection window. After removing outliers within the window, the average of the remaining data is calculated. ; S045: Calculate the trend coefficient using the average of three adjacent windows. , ,in (i) represents the current window average. (i-1) (i-2) is the average value of the first two windows; S046: Retrieve qualified weld data of the same type of plate welded in the past 24 hours from the storage module and calculate its distance fluctuation standard deviation. According to the trend coefficient Generate real-time correction factor :when hour, ;when hour, ;when hour, ,and ; S047: Update the real-time threshold range and real-time lower limit threshold based on the correction factor α. Real-time upper limit threshold ; S048: Average value of the current window With real-time threshold range In comparison, if ∈ If the weld flatness is deemed to meet the requirements; < or >Tᵤ', initiate a secondary inspection of 3 consecutive windows. If all 3 windows do not meet the requirements, the weld flatness is determined to be non-compliant. S049: After each welding operation, the reference distance of the qualified weld should be recorded. Stratification coefficient and Correction factor The data is stored in the storage module as initial reference data for the next welding of the same type. From the perspective of benchmark setting, S041 obtains the benchmark distance by averaging multiple samples after removing extreme values. This avoids the impact of single measurement errors on the threshold, laying a precise foundation for subsequent judgments; S042 sets a layering coefficient based on the plate thickness, allowing the threshold range to adapt to the process requirements of different plate thicknesses. For example, a smaller coefficient is used for welding thick plates to strictly control flatness, while a wider coefficient is used for thin plates to avoid over-adjustment; S043 calculates the initial threshold based on the reference distance and layering coefficient, realizing the correlation between the threshold and the actual welding scenario; S044 uses the 3σ criterion to remove outliers, ensuring the validity of the detection data, while the window average calculation smooths out instantaneous fluctuations, making the judgment more stable; S045-S047 use trend coefficients... and real-time correction factor The dynamic adjustment of the threshold range allows for proactive responses to changes in weld smoothness trends. For example, when fluctuations show an increasing trend, the threshold is automatically widened to avoid misjudgments, while the threshold is tightened during convergence to improve accuracy. The secondary detection mechanism in S048 reduces misjudgments caused by instantaneous interference, improving the reliability of the judgment. S049 uses qualified data storage as a reference, enabling the system to have self-learning capabilities; as usage increases, the threshold setting becomes increasingly aligned with actual working conditions. The entire process achieves comprehensive optimization from static benchmarks to dynamic correction, from single-test detection to trend prediction, and from independent judgment to historical learning. Compared to fixed threshold judgments, it can more accurately adapt to complex weld changes, effectively reducing unnecessary adjustments or adjustment lags caused by misjudgments, and significantly improving the system's accuracy and adaptability in judging defects such as uneven edges and gap fluctuations.
[0033] Example 2 like Figure 1-8 As shown, the welding torch adaptive oscillation adjustment system and method disclosed in this invention are applicable to welding operations with poor weld flatness, large gaps, and misalignment issues in scenarios such as railway open wagon maintenance and large steel structure splicing. The system achieves adaptive oscillation adjustment of the welding torch and precise weld tracking through a closed-loop control logic of "detection-judgment-execution-tracking." The specific architecture is as follows: (I) Hardware Components The detection module employs a laser displacement sensor, specifically the German-made OptoNCDT1320. Based on the triangulation measurement principle, it emits a 655nm red semiconductor laser, effectively avoiding interference from welding arc light. The sensor has a detection range of 100±50mm at the center position, a repeatability of 20μm, and a linear error ≤±0.1%. It connects to the control module via an RS485 communication interface, supporting stable data transmission in industrial environments.
[0034] The control module uses an STM32F103ZET6 microcontroller as its core controller. It operates at 72MHz and has 512KB of built-in flash memory and 64KB of RAM, sufficient to handle complex algorithms. This microcontroller connects to the execution module via a GPIO interface, communicates with the detection module via a USART2 interface (converted to RS485 signals by a MAX485 chip), drives the human-machine interface module via an FSMC interface, and controls the stepper motor by outputting PWM pulse signals through a TIM8 timer.
[0035] The execution module consists of a 57-series planetary geared stepper motor (model 57BYG250H) and an MD-4 two-phase DC driver. The stepper motor has a step angle of 1.8°, a reduction ratio of 5:1, and a maximum output torque of 3 N•m. It is connected to the welding torch clamp via a coupling and can drive the welding torch to oscillate within a range of ±30°. The driver receives pulse signals (pulse frequency range 100-5000Hz) from the control module, supports forward and reverse rotation control and offline function, ensuring the accuracy of the welding torch's movement.
[0036] Human-computer interaction module Key input module: Includes 3 mechanical keys (KEY0, KEY1, WK_UP), which are connected to the PE4, PE3, and PA0 pins of STM32 respectively, and are used to realize system start, stop and zeroing operations. Key scanning adopts 10ms delay debouncing processing.
[0037] LCD display module: It adopts a 2.4-inch TFT-LCD display screen (resolution 320×240), which is connected to the control module through the FSMC interface. The refresh rate is ≥30Hz. It can display laser detection data (distance value, flatness deviation), system status (running / standby) and storage module read and write information in real time.
[0038] Auxiliary module Power module: Input AC220V, output three sets of regulated power supplies: DC24V / 5A, DC12V / 2A, and DC5V / 3A, which power the stepper motor driver, laser sensor, control module, and display screen respectively, and have overcurrent and overvoltage protection functions.
[0039] Storage module: The STM32 uses the built-in FLASH memory (capacity 512KB) to simulate EEPROM, which is used to store detection data, threshold parameters and historical welding records, with a write cycle of ≥100,000 times.
[0040] (II) Software Architecture The system software adopts a modular design, mainly including an initialization module, a data acquisition module, a threshold judgment module, a motor drive module, a weld seam tracking module, and a human-computer interaction module.
[0041] II. System Workflow (I) Initialization Phase After the system is powered on, the control module automatically performs initialization operations: Serial port initialization: Configure USART2 baud rate to 115200bps, data bits 8 bits, stop bits 1 bit, no parity, and enable receive interrupt.
[0042] Timer initialization: Configure TIM8 to single pulse mode, prescaler coefficient 71, and automatic reload value is set according to motor speed, such as 143 for 500Hz pulse.
[0043] GPIO initialization: Configure the pins connected to the button and motor driver to input / output mode. In the initial state, the enable pin of the motor driver is low (offline state).
[0044] FSMC initialization: Configure the NOR Flash controller to asynchronous mode, set the address setup time to 2 HCLK cycles, the data setup time to 8 HCLK cycles, and drive the LCD display to initialize.
[0045] Storage module initialization: Unlock STM32FLASH, check the storage sector status, and write the default threshold parameters if it is the first boot.
[0046] (II) Parameter Setting Stage Configure the following parameters using the key input module: Communication parameters: Fixed to RS485 transmission code binary, consistent with the laser sensor.
[0047] Interrupt priority: Set the USART2 receive interrupt priority. Preemption priority 1 and sub-priority 0 are higher than timer interrupts. Preemption priority 2 and sub-priority 0 ensure data real-time performance.
[0048] Storage address: Set the starting address of the detection data storage to 0x08070000. Each storage operation occupies 32 bytes and includes information such as timestamp, distance value, and threshold.
[0049] Process parameters: Preset the layering coefficient according to the thickness of the board. , ,like hour, , It is displayed on an LCD screen and supports modification.
[0050] (III) Detection and Communication Phase The control module sends commands (0x010x030x000x000x000x020xC40x0B) via RS485. After the laser sensor responds, it returns hexadecimal distance data (such as 0x000x000x7A0x12, which corresponds to a distance value of 30226μm).
[0051] After parsing the data, the control module displays the real-time distance value (in mm, with 3 decimal places) on the screen using the LCD_ShowNum() function, and simultaneously calls the STMFLASH_Write() function to write the data to the storage module, storing it once every 100ms.
[0052] If communication times out and no data is received within 500ms, the LCD screen will display "Communication Failure" and the red indicator light will illuminate, and the system will enter standby mode.
[0053] (iv) Judgment and Adjustment Stage After the reference distance calibration (S041) system is started, the laser sensor continuously samples the initial welding point 10 times with a sampling interval of 50ms to obtain the data set [D1,D2,...,D10]. After removing the maximum and minimum values, the average value D0 = (D3+...+D8) / 6 is calculated as the reference distance.
[0054] The initial threshold calculation calls the preset layering coefficient based on the plate thickness δ: when hour, ,
[0055] when hour, ,
[0056] when hour, ,
[0057] Dynamic data processing The laser sensor collects data at a frequency of 100Hz, with each detection window consisting of 5 data points. Outliers are removed using the 3σ criterion, meaning data deviating from the window mean by more than three standard deviations are discarded. The window mean is then calculated. .
[0058] Calculate the average of three consecutive windows. , , To obtain the trend coefficient .
[0059] Retrieve qualified data (at least 50 sets) of the same type of board material from the past 24 hours in the storage module and calculate the standard deviation of the distance fluctuation. Generate correction factor : like ,
[0060] like ,
[0061] like , (and ) Real-time threshold update .
[0062] Flatness judgment and execution like If the result is deemed satisfactory, the system will maintain the current state and continue testing.
[0063] like or The system initiates a second test in three consecutive windows. If all tests fail, the control module sends a pulse signal to the driver. Call the Turn_Forward(500,1000,DIR_CW) function to drive the motor to rotate forward 500 pulses (corresponding to a swing angle of 15°), and use the delay_ms(200) function to control the dwell time at the highest point.
[0064] Calling the Turn_Back(500,1000) function drives the motor to reverse 500 pulses back to the initial position, completing one oscillation cycle.
[0065] After welding is completed, the D0 of the qualified weld will be... , , The parameters are written to the storage module as an initial reference for the next weld of the same type.
[0066] (v) Weld tracking stage The control module tracks the weld seam trajectory using a point-by-point comparison method. The specific process is as follows: Linear interpolation parameter settings: Determine the endpoint coordinates based on the teaching point. Calculate the total number of steps. (Unit pulse).
[0067] Deviation function calculation: using the deviation function ,in( , () indicates the current welding torch position.
[0068] Feed direction determination: In the first quadrant, if ,Towards Directional feed 1 pulse; if Feed 1 pulse in the +Y direction.
[0069] Other quadrants pass , Replace the original coordinates and adjust the feed direction according to the coordinate signs, such as in the second quadrant. Time Directional feed.
[0070] Endpoint determination: For each feed pulse, the total step size N is decreased by 1, until... Stop interpolation and complete trajectory tracking.
[0071] Example 3 like Figure 1-8 As shown, the hardware design of the automatic adjustment device for welding torch oscillation. The overall architecture of this system mainly includes an STM32 microcontroller, a laser displacement sensor monitoring module, an LCD screen, a key input module, a power supply module, and a stepper motor module. The STM32F103ZET6 serves as the core control chip, responsible for data processing and control signal transmission. The laser displacement sensor monitoring module collects information on weld unevenness and transmits the data to the microcontroller. The LCD screen displays real-time communication data between the sensor and the microcontroller, as well as read / write data from the storage module, providing a human-machine interface. The key input module controls the device's start, stop, and zeroing operations. The power supply module provides stable power to all components. The stepper motor module acts as the actuator, driving the welding torch to oscillate under the control of the microcontroller.
[0072] The core chip used is the STM32F103ZET6, which features high performance, cost-effectiveness, excellent real-time performance, low development cost, and low power consumption. It operates at a maximum frequency of 72MHz, has 512KB of flash program memory, multiple timer functions, can send pulse signals to drive stepper motors, and supports RS232 / 485 communication, meeting the device's requirements for rapid response and stable operation in complex welding environments.
[0073] The power module provides a regulated DC power supply with an input voltage of 20V, taking into account the voltage requirements of each component. The power input range of the STM32 microcontroller is DC6-24V, while the LCD screen requires an external power supply due to its high power consumption. The input voltage of the laser displacement sensor is DC12-24V±10%, and the input voltage of the stepper motor driver is DC12-48V±10%. This power supply can meet the voltage requirements of each device well.
[0074] The button input module implements control functions through three buttons: KEY0, KEY1, and WK_UP. KEY0 and KEY1 control start and stop respectively, while WK_UP is used to return to the zero position. These buttons are connected to PE4, PE3, and PA0 respectively, and control commands are sent to the microcontroller by detecting the button status.
[0075] The TFT-LCD liquid crystal display module uses a thin-film transistor liquid crystal display and connects to the microcontroller via the FSMC interface. The FSMC is initialized and configured, and the connection to the TFT-LCD module is completed, setting relevant timing parameters. The TFT-LCD module is initialized, including clock initialization, GPIO initialization, and FSMC initialization, enabling the FSMC and LCD driver. By calling relevant functions such as LCD_ShowNum() and LCD_ShowString(), data from the laser displacement sensor, height data measured by the sensor, and relevant data read / write from the flash memory are displayed on the LCD screen.
[0076] Considering the requirements for a small oscillation angle and speed of the welding torch, a stepper motor was selected for the stepper motor module. Based on factors such as load accuracy, torque, and inertia matching, a 57 series planetary geared stepper motor was chosen. This motor is a two-phase motor with a step angle of 1.8°, a moment of inertia of 0.0043, a load-to-motor moment of inertia ratio of 23.3, and a maximum torque of 3 N•m, which meets the welding process requirements. The stepper motor is controlled by a microcontroller sending pulse signals to the driver. This solution uses an MD-4 two-phase DC driver. By setting the number of pulses, frequency, and power-on sequence, the rotation direction, angle, and speed of the stepper motor are controlled, thereby achieving the oscillation of the welding torch.
[0077] The infrared monitoring module uses a laser displacement sensor as the detection mechanism. Based on the triangulation measurement principle, it utilizes a specific wavelength (655nm) red semiconductor laser to avoid interference from welding arc light. The sensor has a detection range of 100±50mm at the center position, a repeatability of 20 micrometers, good linearity, and low temperature sensitivity. Data transmission with the microcontroller is achieved via RS485 communication. Communication parameters are set, such as binary transmission code, 8-bit data length, 1-bit stop bit, no parity bit, and a baud rate of 115200, ensuring the accuracy and stability of data transmission.
[0078] Implementation process of main control software for automatic adjustment device for welding torch oscillation The execution flow of the welding torch oscillation automatic adjustment system is as follows: After the main program of the welding torch oscillation automatic adjustment device starts, it will initialize each module in sequence. The initialization process includes serial port initialization (uart_init()), button initialization (KEY_Init()), driver initialization (Driver_Init()), clock initialization (TIM8_OPM_RCR_Init()), and RS485 communication initialization (RS485_Init()).
[0079] Next, the necessary parameters will be set, including filling the rs485buf[6] array of the transmit area, configuring the NVIC interrupt group and priority (NVIC_PriorityGroupConfig()), and initializing the values of variables such as ReadAddress and WriteAddress.
[0080] The KEY_Scan() function is called to detect whether a key has been pressed. If a key press is detected, subsequent steps are executed; otherwise, the detection continues.
[0081] Pressing the button indicates that the STM32 has successfully sent data to the sensor to establish communication. Subsequently, the pre-configured transmitter array is sent to the sensor via the RS485_Send_Data() function, and the monitoring data returned by the sensor is received via the RS485_Receive_Data() function. This data is displayed on the LCD screen and stored using the STMFLASH_Write() function.
[0082] The stored data is read using the `STMFLASH_Read()` function and processed accordingly. The processing primarily relies on a set threshold, which is related to the distance between the sensor and the workpiece. Since the decision to oscillate the welding torch depends on the weld flatness, the threshold is set based on the vertical distance from the initial welding point of the replaced sheet metal to the sensor. A certain fluctuation range is set according to process requirements to determine a height range. If the average value of the collected data is within this range, no oscillation of the welding torch is needed; the torch will directly perform welding from the weld centerline. If the average value is outside this range, it indicates poor weld flatness, requiring torch oscillation to achieve better fusion between the base material and the new sheet metal. Real-time monitoring by the sensor enables torch oscillation.
[0083] The processed data determines whether the welding torch needs to oscillate. If oscillation is required, the STM32 sends a PWM pulse signal to the stepper motor driver, primarily executed through two positioning functions: `Turn_Forward()` sets the torch's oscillation angle and speed, while `Turn_Back()` returns the torch to its initial position. The dwell time of the torch at the highest point of the oscillation is controlled by the delay function `delay_ms()` according to process requirements. If oscillation is not required, communication with the sensor continues for data transmission and reception.
[0084] Self-adjusting weld seam tracking process The implementation process for single-quadrant processing is as follows: Deviation determination: First, use the deviation function. This is used to determine the position of the weld point relative to the weld path.
[0085] Coordinate feed: Moves the welding torch one step in the direction that reduces the error.
[0086] Deviation calculation: Upon reaching the next weld point, the deviation function is used again to re-determine the positional relationship between the weld point and the weld path. Direction, application Implementing a recursive algorithm using a deviation function Similarly, in The recursive algorithm in the direction is .
[0087] Endpoint determination: The system determines the endpoint by sending... and After the coordinate pulse is sent, the destination is determined. and This function determines whether the welding torch has reached its endpoint. If it hasn't, interpolation continues, and the new deviation between the X and Y coordinates is calculated. and If the final deviation value is less than or equal to the minimum pulse equivalent, the welding torch has reached the endpoint, and interpolation stops. Only data calculation is required during interpolation; the sign preceding the data is used to determine the feed direction.
[0088] In the multi-quadrant processing stage, use The alternative is to process the data and then only calculate the number of feed steps. The feed direction of the four quadrants is determined by the sign of the coordinate values. The endpoint coordinates are initialized as the total step size. Regardless of the feed direction, only the feed direction needs to be determined based on the data sign. Then the total step size is decremented by one until the total step size reaches zero, indicating that the endpoint has been reached.
[0089] The number of pulses is calculated based on the position reached by the welding torch. During interpolation, the total number of steps required is first calculated. Then, regardless of whether the feed is along the X-axis or Y-axis, or whether it is forward or reverse feed, the total number of steps is decremented by one for each feed. When the total number of steps reaches zero, it indicates that the endpoint has been reached, and interpolation stops. Finally, in the CNC intelligent gantry welding system, G-code based on the principle of point-by-point comparison interpolation is written to implement the teach-and-playback function.
[0090] The above are merely embodiments of the present invention. Commonly known structures and characteristics of the solutions are not described in detail here. Those skilled in the art are aware of all common technical knowledge in the field prior to the application date or priority date, are aware of all existing technologies in that field, and have the ability to apply conventional experimental methods prior to that date. Those skilled in the art can, under the guidance of this application, improve and implement this solution in combination with their own capabilities. Some typical known structures or methods should not be obstacles for those skilled in the art to implement this application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the structure of the present invention. These should also be considered within the scope of protection of the present invention, and will not affect the effectiveness of the implementation of the present invention or the practicality of the patent. The scope of protection claimed in this application should be determined by the content of the claims, and the description of specific embodiments in the specification can be used to interpret the content of the claims.
Claims
1. A welding gun adaptive swing adjustment system, characterized by, The application relates to a welding seam unevenness detection and control system, which comprises the following modules: a detection module for detecting the unevenness information of a welding seam; a control module for receiving the unevenness information transmitted by the detection module and judging whether to send a control signal according to the unevenness information and a preset threshold value, wherein the preset threshold value is determined based on the vertical distance from the initial welding point of the replaced plate to the detection module and the fluctuation range required by the process; an execution module for receiving the control signal and driving the welding torch to swing according to the control signal so as to realize the fusion of the base material and the new plate; a man-machine interaction module for realizing the operation of the system by a user and displaying the system information; a power module for providing power support for the detection module, the control module, the execution module and the man-machine interaction module; A storage module is configured to store information detected by the detection module and related data in a system operation process; wherein the control module is further configured to control the welding gun to move along a welding seam track by a welding seam tracking algorithm, the welding seam tracking algorithm is based on a straight line interpolation principle, adopts a point-by-point comparison method, and judges a moving direction of the welding gun at next step by a deviation function, the deviation function is When in the first quadrant, , the welding gun moves in a direction; when , the welding gun moves in a direction; for straight line interpolation of the four quadrants, , are replaced by , , and a feeding direction is determined according to a symbol of a coordinate value. During the interpolation process, the total step number is calculated, the total step number is reduced by one after each feeding, and the interpolation is stopped until the total step number is reduced to zero.
2. The welding gun adaptive swing adjustment system of claim 1, wherein, The detection module is a laser displacement sensor monitoring module, the laser displacement sensor is based on the principle of triangulation measurement, adopts a specific wavelength of red semiconductor laser, and performs data transmission with the control module through an RS485 communication mode.
3. The welding gun adaptive swing adjustment system of claim 1, wherein, The control module is an STM32 single-chip microcomputer with the model of STM32F103ZET6.
4. The welding gun adaptive swing adjustment system of claim 1, wherein, The execution module comprises a stepping motor module, the stepping motor module comprises a stepping motor and a driver, the stepping motor receives the pulse signal sent by the control module through the driver, and then drives the welding torch to swing, the stepping motor is a 57 series planetary reduction stepping motor, and the driver is an MD-4 two-phase direct current driver.
5. The welding gun adaptive swing adjustment system of claim 1, wherein, The man-machine interaction module comprises a key input module and a liquid crystal display module, the key input module is used for realizing the start, stop and zero reset operations of the system, and the liquid crystal display module is used for displaying the data communicated between the detection module and the control module and the read-write data of the storage module in real time.
6. The welding gun adaptive swing adjustment system of claim 5, wherein, The liquid crystal display module is a thin film transistor liquid crystal display which is connected with the control module through an FSMC interface.
7. A method of adaptive swing adjustment of a welding torch, characterized by, The application further discloses a welding seam unevenness detection and control method, which comprises the following steps: S01: initializing each module in the system, including the initialization of the detection module, the control module, the execution module, the man-machine interaction module, the storage module and the communication module; S02: setting the related parameters required by the system, including the communication parameters, the interruption grouping and priority parameters and the storage address parameters; S03: detecting the unevenness information of the welding seam through the detection module, establishing the communication between the control module and the detection module, receiving the unevenness information transmitted by the detection module, displaying the unevenness information on the man-machine interaction module and storing the unevenness information into the storage module; S04: judging whether the welding torch needs to be adjusted according to the unevenness information and the preset threshold value, if yes, sending the control signal to the execution module by the control module, driving the welding torch to swing by the execution module so as to realize the fusion of the base material and the new plate, and if not, continuing the detection and communication; S05: In the welding process, the control module controls the welding gun to move along the welding seam track through a welding seam tracking algorithm, the welding seam tracking algorithm is based on a straight line interpolation principle, adopts a point-by-point comparison method, and judges a moving direction of the welding gun at next step through a deviation function, the deviation function is When in the first quadrant, the welding gun moves in a direction of When , the welding gun moves in a direction of For straight line interpolation of the four quadrants, , are replaced by , and a feeding direction is determined according to a symbol of a coordinate value. During the interpolation process, the total step number is calculated, the total step number is reduced by one after each feeding, and the interpolation is stopped until the total step number is reduced to zero.
8. The method of adaptive swing adjustment of a welding torch of claim 7, wherein, In the S04, when the welding gun swing needs to be adjusted, the step motor in the execution module drives the welding gun to swing through forward rotation and reverse rotation, and the residence time of the welding gun at the highest swing point is controlled by a delay function according to process requirements.
9. The method of adaptive swing adjustment of a welding torch of claim 7 wherein, In the S04, the control module and the detection module transmit data through an RS485 communication mode, the communication parameters include a transmission code of binary, a data length of 8 bits, a stop bit of 1 bit, no parity check bit, and a baud rate of 115200.
10. The method of adaptive swing adjustment of a welding torch of claim 7 wherein, In the judging and adjusting step, the specific method for judging the weld flatness according to the set threshold value includes the following steps: S041: The laser displacement sensor continuously samples the initial welding point of the replaced plate multiple times, and the average value after removing the maximum and minimum values is taken as the reference distance ; S042: Plate thickness according to welding process requirements Set the layering coefficient , wherein when , , when , , when , , ; S043: based on the reference distance and the hierarchical coefficient calculates an initial threshold interval, a lower threshold , an upper threshold ; S044: The laser displacement sensor continuously collects the data of the weld area at a preset frequency, and each preset number of data forms a detection window, and the After removing the abnormal values in the window according to the criterion, the average value of the remaining data is calculated ; S045: Trend coefficient is calculated by average of 3 adjacent windows , where (i) is the current window average, (i-1), (i-2) are the previous two window averages; S046: Call the qualified weld data of the same type of plate welding in the past 24 hours in the storage module, and calculate the distance fluctuation standard deviation , according to the trend coefficient Generate real-time correction factor : when , ; when , ; when , , and ; S047: updating the real-time threshold interval according to the correction factor a, real-time lower threshold , real-time upper threshold ; S048: compare the current window average value with the real-time threshold interval and the real-time threshold interval , if ∈ , it is determined that the weld flatness meets the requirements; if < or >Tᵤ', start the secondary detection of the next 3 windows, if the 3 windows do not meet the requirements, it is determined that the weld flatness does not meet the requirements; S049: after each welding is completed, the reference distance of the qualified weld this time , layering coefficient and , correction factor is stored to the storage module as the initial reference data for the next same type welding.
Citation Information
Cited By
Method for dynamically adjusting swing width of all-position MAG welding robot
CN121339614A
A full-position MAG welding robot swing width dynamic adjustment method
CN121339614B
Swing control method based on molten pool oscillation multi-feature fusion and related equipment
CN121348782A