3D printing automatic leveling method based on acceleration sensor collision detection

By combining acceleration sensors and neuroscience time discount factors with temperature change adjustment, automatic leveling of 3D printing is achieved, solving the problems of high cost, low precision and slow response of leveling modules in existing technologies, improving leveling accuracy and adaptability, and avoiding printing failures.

CN120620645APending Publication Date: 2025-09-12王少萌
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510833921.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing 3D printing automatic leveling modules have problems such as complex debugging, high cost, limited accuracy and slow response speed.

Method used

An acceleration sensor is used for collision detection. The collision between the print head and the print bed is monitored in real time through the acceleration sensor. The discount rate is adjusted by combining the neuroscience time discount factor and temperature changes. The collision detection threshold and leveling parameters are dynamically adjusted, and automatic leveling is performed using the Klipper firmware module.

Benefits of technology

It achieves low-cost automatic leveling without the need for additional hardware modification, improves leveling accuracy and response speed, enhances adaptability to local deformation of the hot bed, reduces manual intervention, and avoids printing failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120620645A_ABST
    Figure CN120620645A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of 3D printing leveling, and particularly discloses a 3D printing automatic leveling method based on acceleration sensor collision detection. According to the method, an acceleration sensor shared with a resonance compensation module on an effector is multiplexed, the motion state of a printing head is monitored in real time, collision data is collected, when collision is detected, interruption is triggered, a timestamp, position coordinates and an acceleration value are recorded, a discount factor mechanism is introduced, the discount rate is dynamically adjusted according to the temperature change of a hot bed, and weights are calculated in different regions; and setting a forgetting door mechanism to filter abnormal data, performing weighted average on historical collision data to obtain a printing bed height estimation value, dynamically adjusting a collision detection threshold and a leveling parameter according to the value, and finally executing collision detection and leveling by Klipper firmware. According to the method, through software and hardware cooperation and a self-adaptive mechanism, the problem of local deformation of the hot bed is effectively solved, the 3D printing leveling precision and efficiency are improved, and the method is suitable for various printing scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of 3D printing leveling, and in particular relates to a 3D printing automatic leveling method based on acceleration sensor collision detection. Background Art

[0002] Leveling the print bed is a crucial step in the 3D printing process. An uneven print bed can lead to inconsistent distances between the print head and the print bed, which can affect print quality and even cause print failure. Traditional leveling methods typically rely on dedicated leveling modules or probes. For example, mechanical probe leveling (such as BLTOUCH) involves physically contacting the print bed, triggering a switch signal, and measuring the Z-axis position at the moment of contact. Alternatively, inductive sensors use electromagnetic induction to detect the distance of metal print beds (such as aluminum-based heated beds) for non-contact measurement. However, these leveling modules are only suitable for metal surfaces and have a limited range of applications. Capacitive sensors detect the distance to the print bed through changes in capacitance, but these leveling modules are sensitive to material and require multiple calibrations. Piezoelectric sensors, on the other hand, detect changes in pressure when the nozzle contacts the bed and are commonly used for nozzle contact leveling. These leveling modules detect the distance between the print head and the print bed through physical contact or capacitive sensing and adjust the print bed's level accordingly.

[0003] However, the above-mentioned leveling methods generally have the following problems:

[0004] 1. High cost: Dedicated leveling modules or probes increase hardware costs, which is a considerable burden, especially for low-cost 3D printers.

[0005] 2. High complexity: The installation and debugging process of the dedicated leveling module is complicated (especially the BLTOUCH module), which increases the difficulty of use for users.

[0006] 3. Limited accuracy: Traditional leveling methods rely on physical contact or capacitive sensing, which are easily affected by environmental factors, resulting in low leveling accuracy.

[0007] 4. Slow response speed: The traditional leveling method requires multiple tests and adjustments, which is time-consuming and affects printing efficiency. Summary of the Invention

[0008] Aiming at the defects and problems of the current 3D printing automatic leveling module, such as complex debugging, high cost, low precision and slow response speed, the present invention provides a 3D printing automatic leveling method based on acceleration sensor collision detection.

[0009] A 3D printing automatic leveling method based on acceleration sensor collision detection includes the following steps:

[0010] S1. Configure the acceleration sensor shared with the resonance compensation module on the effector, and perform initial calibration to obtain the acceleration reference value a when the print head moves without load. base ;

[0011] S2. When the leveling function is called, the movement state of the print head is monitored in real time through the acceleration sensor, and the collision generated when the print head contacts the print bed is detected in real time;

[0012] S3. When a collision is detected, the acceleration sensor triggers a register interrupt. The Klipper firmware reads the interrupt and simulates the probe trigger function, stopping the print head movement and recording the timestamp, position coordinates, and acceleration value of the current collision event.

[0013] S4. Establish a historical collision data ring buffer to store the timestamps and Z-axis position information of the most recent N collision events;

[0014] S5. Based on the neuroscience time discount factor mechanism, the exponential decay weight of historical collision data is calculated according to the time distance.

[0015]

[0016] Where: λ is the discount rate parameter, which is dynamically adjusted according to the change of print bed temperature; t current is the current timestamp, t i is the timestamp of the ith collision event; (t current -t i ) represents the time interval between the current moment and the historical collision event;

[0017] S6. Use the weight to perform weighted averaging on the Z-axis position of the historical collision data to obtain a weighted estimated value z of the print bed height. weighted ,

[0018]

[0019] S7. Dynamically adjust the collision detection threshold of the acceleration sensor and the print bed leveling parameters according to the weighted estimated value of the print bed height. The threshold adjustment formula is:

[0020] a th =a base ·(1+β·mean(w i ·Δa i ))

[0021] Where: a th is the collision detection threshold after dynamic adjustment; a base is the initial acceleration trigger reference value; β is the adjustment coefficient, constant; Δa i is the difference between the acceleration value of the i-th collision and the basic threshold, Δa i=a i -a base , a i is the measured acceleration at the time of the i-th collision;

[0022] The update formula of leveling parameters according to time decay is:

[0023] Δh(t)=Δh(t0)·e -λ·Δt +Δh new ·(1-e -λ·Δt )

[0024] Where: Δh(t) is the leveling compensation of the print bed at the current time t, which is used to adjust the level of the print bed; Δh(t0) represents the leveling compensation recorded at the historical time point t0; Δt is the time interval between the current time t and the historical time t0, and Δh new The leveling compensation amount calculated based on the latest collision data;

[0025] The S8 and Klipper firmware modules perform collision detection based on the calculated collision detection threshold, read and simulate the probe trigger function, and perform leveling based on the calculated leveling parameters.

[0026] In the above-mentioned 3D printing automatic leveling method based on acceleration sensor collision detection, the acceleration sensor is a three-axis acceleration sensor.

[0027] The above-mentioned 3D printing automatic leveling method based on acceleration sensor collision detection also includes an abnormal collision forgetting mechanism. When an abnormal collision is detected, the forgetting gate is triggered.

[0028]

[0029] Where: m is a coefficient with a value of 0.1-0.4; τ is the forgetting time window.

[0030] In the above-mentioned 3D printing automatic leveling method based on acceleration sensor collision detection, the discount rate λ is adjusted according to the change of the hot bed temperature in step S5. Specifically, the discount rate λ is calculated based on the temperature sensor data of different areas.

[0031]

[0032] Where: region is the regional dynamic discount rate, λ0 is the basic discount rate, γ is the temperature sensitivity coefficient, a dimensionless constant with a value range of 0.01-0.1; It is the absolute value of the temperature change rate of the local area of ​​the print bed.

[0033] In the above-mentioned 3D printing automatic leveling method based on acceleration sensor collision detection, the temperature sensors are installed at the hot bed support points, the hot bed geometric center and the edge symmetrical points.

[0034] Compared with the prior art, the present invention has the following beneficial effects:

[0035] 1. The present invention utilizes existing accelerometers to replace expensive dedicated leveling modules to achieve automatic leveling of 3D printing. This reuse of resonance-compensated accelerometers eliminates the need for additional dedicated leveling modules, hardware modifications to effectors, and modifications to the Klipper leveling module algorithm, effectively saving costs. Furthermore, the highly sensitive and fast-response accelerometers used can quickly detect minor collisions when the print head contacts the print bed, immediately triggering register interrupts and reducing errors.

[0036] 2. The present invention introduces a time discount factor to calculate the exponential decay weight, weights historical collision data, and gives greater weight to recent collision data. This can more realistically reflect the recent situation of the hot bed, strike a balance between response speed and stability, and improve adaptability to dynamic changes in the bed surface. The 3D printing leveling system is upgraded to an intelligent decision-making model that integrates historical experience with real-time data. Without increasing hardware costs, the leveling accuracy and dynamic adaptability can be significantly improved, the number of manual interventions can be reduced, and printing failures caused by improper leveling due to unskilled operation can be avoided.

[0037] 3. The present invention can adjust the discount rate through temperature changes to adapt to different scenarios, calculate the discount rate independently by region, drive real-time adjustment through the temperature change rate, respond to the differentiated temperature of the edge and center of the hot bed, and effectively adapt to the problem of local deformation difference of the hot bed; by calibrating the hot beds of different sizes / different materials of γ-alkali dissolution, it adapts to the temperature changes of hot beds of different materials and solves the dynamic leveling problem of thermal deformation scenarios; at the same time, the forget gate mechanism set can quickly forget abnormal collision data and improve the anti-interference ability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 This is a flow chart of automatic leveling based on an acceleration sensor according to the present invention. DETAILED DESCRIPTION

[0039] To address the shortcomings and problems of existing 3D printing automatic leveling modules, such as complex debugging, high cost, poor precision, and slow response speed, the present invention provides a 3D printing automatic leveling method based on collision detection using an acceleration sensor. The present invention is further described below with reference to the accompanying drawings and specific embodiments.

[0040] Example 1: This example provides a 3D printing automatic leveling method based on acceleration sensor collision detection, such as Figure 1 As shown, the method mainly includes the following steps:

[0041] S1. Configure the acceleration sensor shared with the resonance compensation module on the effector, and perform initial calibration to obtain the acceleration reference value a when the print head moves without load. base ;

[0042] S2. When the leveling function is called, the movement state of the print head is monitored in real time through the acceleration sensor, and the collision generated when the print head contacts the print bed is detected in real time;

[0043] S3. When a collision is detected, the acceleration sensor triggers a register interrupt. The Klipper firmware reads the interrupt and simulates the probe trigger function, stopping the print head movement and recording the timestamp, position coordinates, and acceleration value of the current collision event.

[0044] S4. Establish a historical collision data ring buffer to store the timestamps and Z-axis position information of the most recent N collision events;

[0045] S5. Based on the neuroscience time discount factor mechanism, the exponential decay weight of historical collision data is calculated according to the time distance.

[0046]

[0047] Where: λ is the discount rate parameter, which is dynamically adjusted according to the temperature change rate of the printing bed; t current is the current timestamp, t i is the timestamp of the ith collision event; (t current -t i ) represents the time interval between the current moment and the historical collision event.

[0048] In order to adapt to the problem of local deformation differences of the heated bed, this embodiment dynamically adjusts the discount rate λ by region. Specifically, temperature sensors are set at the heated bed support points, the heated bed geometric center, and the edge symmetrical points. The discount rate λ is calculated based on the temperature sensor data in different regions.

[0049]

[0050] Where: region is the regional dynamic discount rate, λ0 is the basic discount rate, γ is the temperature sensitivity coefficient, a dimensionless constant with a value range of 0.01-0.1; It is the absolute value of the temperature change rate of the local area of ​​the print bed.

[0051] In order to avoid the influence of abnormal data on detection, this embodiment also sets a forget gate trigger mechanism. When an abnormal collision is detected, the abnormal collision forget gate is triggered.

[0052]

[0053] Where: m is the coefficient, m = 0.3*(1-exp(-0.5*collision_interval)), the shorter the collision interval, the smaller m; τ is the forgetting time window, for example 5 minutes.

[0054] S6. Use the weight to perform weighted averaging on the Z-axis position of the historical collision data to obtain a weighted estimated value z of the print bed height. weighted ,

[0055]

[0056] S7. Dynamically adjust the collision detection threshold of the acceleration sensor and the print bed leveling parameters according to the weighted estimated value of the print bed height. The threshold adjustment formula is:

[0057] a th =a base ·(1+β·mean(w i ·Δa i ))

[0058] Where: a th is the collision detection threshold after dynamic adjustment; a base is the initial acceleration trigger reference value; β is the adjustment coefficient, constant; Δa i is the difference between the acceleration value of the i-th collision and the basic threshold, Δa i =a i -a base , a i is the measured acceleration at the time of the i-th collision;

[0059] The update formula of leveling parameters according to time decay is:

[0060] Δh(t)=Δh(t0)·e -λ·Δt +Δh new ·(1-e -λ·Δt )

[0061] Where: Δh(t) is the leveling compensation of the print bed at the current time t, which is used to adjust the level of the print bed; Δh(t0) represents the leveling compensation recorded at the historical time point t0; Δt is the time interval between the current time t and the historical time t0, and Δh new The leveling compensation amount calculated based on the latest collision data;

[0062] The S8 and Klipper firmware modules perform collision detection based on the calculated collision detection threshold, read and simulate the probe trigger function, and perform leveling based on the calculated leveling parameters.

[0063] This invention utilizes existing accelerometers instead of costly dedicated leveling modules to achieve automatic leveling in 3D printing. This reuses resonance-compensated accelerometers, eliminating the need for additional dedicated leveling modules, hardware modifications to effectors, or modifications to the Klipper leveling module algorithm, effectively saving costs. Furthermore, the highly sensitive and fast-response accelerometers used can quickly detect minor collisions when the print head contacts the print bed, immediately triggering register interrupts and reducing errors. The invention also incorporates a time discount factor to calculate exponentially decaying weights, weighting historical collision data with a higher weight for recent collisions. This allows for a more accurate reflection of the hot bed's recent conditions, achieving a balance between response speed and stability, and improving adaptability to dynamic changes in the bed surface. This upgrades the 3D printing leveling system to an intelligent decision-making model that integrates historical experience with real-time data. This significantly improves leveling accuracy and dynamic adaptability without increasing hardware costs, reducing manual intervention and avoiding print failures caused by improper leveling due to unskilled operation. The present invention adjusts the discount rate through temperature changes to adapt to different scenarios, calculates the discount rate independently by region, drives real-time adjustment through the temperature change rate, responds differentially to the temperature at the edge and center of the hot bed, and can effectively adapt to the problem of local deformation difference of the hot bed; by calibrating the hot beds of different sizes / different materials with γ-alkali dissolution, it adapts to the temperature changes of hot beds of different materials and solves the dynamic leveling problem of thermal deformation scenarios; at the same time, the forget gate mechanism set up can quickly forget abnormal collision data and improve the system's anti-interference ability.

[0064] The above description is only a preferred embodiment of the present invention and does not limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A 3D printing automatic leveling method based on acceleration sensor collision detection, characterized by: The following steps are involved: S1. Configure the acceleration sensor shared with the resonance compensation module on the effector, and perform initial calibration to obtain the acceleration reference value a when the print head moves without load. base ; S2. When the leveling function is called, the movement state of the print head is monitored in real time through the acceleration sensor, and the collision generated when the print head contacts the print bed is detected in real time; S3. When a collision is detected, the acceleration sensor triggers a register interrupt. The Klipper firmware reads the interrupt and simulates the probe trigger function, stopping the print head movement and recording the timestamp, position coordinates and acceleration value of the current collision event. S4. Establish a historical collision data ring buffer to store the timestamps and Z-axis position information of the most recent N collision events; S5. Based on the neuroscience time discount factor mechanism, the exponential decay weight of historical collision data is calculated according to the time distance. Where: λ is the discount rate parameter, which is dynamically adjusted according to the change of print bed temperature; t current is the current timestamp, t i is the timestamp of the i-th collision event; (t current -t i ) represents the time interval between the current moment and the historical collision event; S6. Use the weight to perform weighted averaging on the Z-axis position of the historical collision data to obtain a weighted estimated value z of the print bed height. weighted , S7. Dynamically adjust the collision detection threshold of the acceleration sensor and the print bed leveling parameters according to the weighted estimated value of the print bed height. The threshold adjustment formula is: a th =a base ·(1+β·mean(w i ·Da i )) Where: a th is the collision detection threshold after dynamic adjustment; a base is the initial acceleration trigger reference value; β is the adjustment coefficient, constant; Δa i is the difference between the acceleration value of the i-th collision and the basic threshold, Δa i =a i -a base , a i is the measured acceleration at the time of the i-th collision; The update formula of leveling parameters according to time decay is: Δh(t)=Δh(t0)·e -λ·Δt +Δh new ·(1-e -λ·Δt ) Where: Δh(t) is the leveling compensation of the print bed at the current time t, which is used to adjust the level of the print bed; Δh(t0) represents the leveling compensation recorded at the historical time point t0; Δt is the time interval between the current time t and the historical time t0, and Δh new The leveling compensation amount calculated based on the latest collision data; The S8 and Klipper firmware modules perform collision detection based on the calculated collision detection threshold, read and simulate the probe trigger function, and perform leveling based on the calculated leveling parameters.

2. The 3D printing automatic leveling method based on acceleration sensor collision detection according to claim 1, characterized in that: The acceleration sensor is a three-axis acceleration sensor.

3. The 3D printing automatic leveling method based on acceleration sensor collision detection according to claim 1, characterized in that: It also includes an abnormal collision forgetting mechanism. When an abnormal collision is detected, the forgetting gate is triggered. Where: m is the coefficient, m = 0.3*(1-exp(-0.5*collision_interval)), the shorter the collision interval, the smaller m; τ is the forgetting time window.

4. The 3D printing automatic leveling method based on acceleration sensor collision detection according to claim 1, characterized in that: In step S5, the discount rate λ is adjusted according to the temperature change of the hot bed. Specifically, the discount rate λ is calculated based on the temperature sensor data of different areas. Where: region is the regional dynamic discount rate, λ0 is the basic discount rate, γ is the temperature sensitivity coefficient, a dimensionless constant with a value range of 0.01-0.1; It is the absolute value of the temperature change rate of the local area of ​​the print bed.

5. The 3D printing automatic leveling method based on acceleration sensor collision detection according to claim 4, characterized in that: The temperature sensors are installed at the support points of the heated bed, the geometric center of the heated bed and the symmetrical points on the edge.