3D printer control method and 3D printer
By using position sensors in a 3D printer to monitor the actual movement of the printing material in real time and perform feedback control, the problem of insufficient extrusion caused by slippage between the printing material and the extrusion wheel is solved, and the accuracy and quality of 3D printing is improved.
Patent Information
- Application Number
- CN202510099839.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-04-11
AI Technical Summary
In the existing 3D printing technology, the printing material and the extrusion wheel are prone to slip, resulting in insufficient extrusion and reduced printing accuracy and quality.
By introducing position sensors into the 3D printer, the actual movement of the printing material is monitored in real time, and the rotation speed of the driving motor is controlled based on the difference between the theoretical movement and the actual movement, ensuring that the actual supply of the printing material reaches the required amount.
It effectively avoids the problem of insufficient supply of printing materials and improves the three-dimensional accuracy and quality of 3D printing.
Smart Images

Figure CN119795552A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of 3D printing, and in particular to a 3D printer control method and a 3D printer. Background Art
[0002] 3D printer, also known as three-dimensional printer, stereo printer, is a kind of rapid prototyping process equipment, usually realized by printing materials with digital technology. 3D printers are often used to make models or parts in the fields of mold manufacturing, industrial design, etc. In recent years, 3D printing technology has great application prospects in jewelry, footwear, industrial design, architecture, engineering and construction (AEC), automobile, aerospace, dental and medical industries, education, geographic information systems, civil engineering and other fields.
[0003] In 3D printing technology, Fused Deposition Modeling (FDM) is a widely used technology that heats solid printing materials to a molten state, extrudes the molten materials through an extruder, and prints them layer by layer. In the existing 3D printing process, the printing material is extruded to the hot end component through an extrusion wheel. However, the printing material and the extrusion wheel are prone to slippage, resulting in insufficient extrusion. The actual supply of printing materials is lower than the amount of materials required for the 3D printing task, resulting in reduced printing accuracy and quality. Summary of the invention
[0004] Based on this, it is necessary to provide a 3D printer control method and a 3D printer to address the problems in the above-mentioned background technology, which can at least avoid insufficient supply of printing materials and improve the three-dimensional accuracy and quality of 3D printing.
[0005] To achieve the above-mentioned purpose and other related purposes, one aspect of the present application provides a 3D printer control method, wherein the 3D printer comprises at least an extrusion wheel, a drive motor and a position sensor, wherein the drive motor is used to drive the extrusion wheel to rotate, and the extrusion wheel rotates to drive the printing material to move, and the position sensor is used to monitor the movement amount of the printing material, and the control method comprises: obtaining a motor signal of the drive motor, and obtaining a theoretical movement amount of the printing material based on the motor signal; obtaining a sensor signal of the position sensor, and obtaining an actual movement amount of the printing material based on the sensor signal; obtaining a feedback compensation speed of the drive motor based on the difference between the theoretical movement amount and the actual movement amount; and feedback-controlling the rotation speed of the drive motor based on the feedback compensation speed.
[0006] In one embodiment, obtaining the feedback compensation speed of the drive motor based on the difference between the theoretical movement amount and the actual movement amount includes: when the difference between the theoretical movement amount and the actual movement amount is less than or equal to a threshold value, the feedback compensation speed is zero; when the difference between the theoretical movement amount and the actual movement amount is greater than the threshold value, the feedback compensation speed is determined based on the difference and the compensation parameter.
[0007] In one embodiment, a motor signal of a driving motor is obtained, and obtaining a theoretical movement amount of the printing material based on the motor signal includes: obtaining a pulse signal and a rotation direction of the driving motor; obtaining a rotation angle of the driving motor based on the pulse signal and the rotation direction; obtaining a rotation arc length of an extrusion wheel based on the rotation angle of the driving motor, and taking the rotation arc length of the extrusion wheel as the theoretical movement amount of the printing material.
[0008] In one embodiment, the 3D printer further comprises a follower wheel, and the movement of the printing material drives the follower wheel to rotate.
[0009] In one embodiment, obtaining a sensing signal of a position sensor, and obtaining the actual movement amount of the printing material based on the sensing signal includes: obtaining the rotation angle of the follower wheel or the rotation speed of the follower wheel; obtaining the rotation arc length of the follower wheel based on the rotation angle of the follower wheel or the rotation speed of the follower wheel, and taking the rotation arc length of the follower wheel as the actual movement amount of the printing material.
[0010] In one embodiment, a magnet is provided on the follower wheel and the position sensor includes a magnetic angle sensor, which obtains the starting angular position and real-time angular position of the follower wheel, and obtains the rotation angle of the follower wheel based on the starting angular position and real-time angular position of the magnet.
[0011] In one embodiment, the follower wheel includes a grating wheel and the position sensor includes a grating sensor. A plurality of gratings are arranged on the surface of the grating wheel. The grating sensor obtains the alternation time of the light signal and obtains the rotation speed of the follower wheel based on the number of gratings and the alternation time of the light signal.
[0012] In one embodiment, the 3D printer control method further includes: establishing a model based on the difference between the theoretical movement amount and the actual movement amount and the feedback compensation speed; and solving the model using a linear quadratic Gaussian control algorithm to obtain compensation parameters.
[0013] In one embodiment, the 3D printer control method further includes: acquiring an initial extrusion speed and an initial compensation speed; and controlling an initial rotation speed of the drive motor based on the initial extrusion speed and the initial compensation speed.
[0014] On the other hand, the present invention provides a 3D printer, including: an extrusion wheel, which rotates to drive the printing material to move; a drive motor, which is used to drive the extrusion wheel to rotate; a position sensor, which is connected to the drive motor and the position sensor, and is used to monitor the movement of the printing material; and a processor, which is used to execute any of the above 3D printer control methods.
[0015] In one embodiment, the 3D printer further comprises: a follower wheel, and the movement of the printing material drives the follower wheel to rotate.
[0016] In one embodiment, a magnet is disposed on the follower wheel and the position sensor includes a magnetic angle sensor connected to the processor, and the magnetic angle sensor obtains the starting angular position and the real-time angular position of the follower wheel.
[0017] In one embodiment, the follower wheel includes a grating wheel and the position sensor includes a grating sensor connected to the processor. A plurality of gratings are arranged on the surface of the grating wheel, and the grating sensor acquires the alternating time of the light signal.
[0018] A third aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the 3D printer control method described in any one of the above is implemented.
[0019] A fourth aspect of the present invention provides a computer program product, comprising a computer program, wherein the computer program implements any one of the above 3D printer control methods when executed by a processor.
[0020] According to the 3D printer control method and 3D printer provided by the present invention, the actual movement amount of the printing material is obtained through a position sensor, and then the rotation speed of the driving motor is controlled according to the error feedback between the theoretical movement amount and the actual movement amount, so as to reduce the error between the theoretical extrusion amount and the actual extrusion amount of the printing material, avoid insufficient supply of printing materials, and improve the three-dimensional accuracy and quality of 3D printing. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to better describe and illustrate the embodiments and / or examples of those applications disclosed herein, reference may be made to one or more drawings. The additional details or examples used to describe the drawings should not be considered as limiting the scope of any of the disclosed applications, the embodiments and / or examples currently described, and the best modes of these applications currently understood.
[0022] Figure 1A A front view of a 3D printer structure provided in one embodiment;
[0023] Figure 1B is a side view of a 3D printer structure provided in one embodiment;
[0024] Figure 2A A front view of another 3D printer structure provided in an embodiment;
[0025] Figure 2B is a schematic diagram of light passing through a grating wheel provided in an embodiment;
[0026] Figure 2C is a schematic diagram of a grating wheel blocking light provided in an embodiment;
[0027] Figure 3is a flow chart of a 3D printer control method provided in one embodiment;
[0028] Figure 4 A flowchart of a 3D printer provided in one embodiment;
[0029] Figure 5 Schematic diagram of a calibration algorithm for a driving motor speed provided in an embodiment.
[0030] Description of reference numerals:
[0031] 110, extrusion wheel; 111, driving wheel; 112, driven wheel; 120, anti-jamming mechanism; 121, swing bracket; 122, tension spring; 200, position sensor; 210, follower wheel; 211, first follower wheel; 212, second follower wheel; 213, grating wheel; 214, third follower wheel; 220, magnet; 300, printing material. DETAILED DESCRIPTION
[0032] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present application are given in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.
[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0034] The purpose of the terms used herein is only to describe specific embodiments and is not intended to be limiting of the present application. When used herein, the singular forms "one", "an" and "said / the" are also intended to include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "consisting of" and / or "comprising", when used in this specification, determine the presence of the features, integers, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, parts and / or groups. When used herein, the term "and / or" includes any and all combinations of the relevant listed items.
[0035] It should be noted that the illustrations provided in this embodiment only illustrate the basic concept of the present application in a schematic manner. Although the illustrations only show components related to the present application and are not drawn according to the number, shape and size of components in actual implementation, the type, quantity and proportion of each component in actual implementation may be changed arbitrarily, and the component layout type may also be more complicated.
[0036] In the existing 3D printing process, the extrusion wheel extrudes the printing material to the hot end assembly. When the extrusion speed is greater than the melting speed of the printing material in the hot end assembly, the resistance at the end of the printing material becomes greater. When the resistance is greater than the friction between the extrusion wheel and the printing material, the printing material and the extrusion wheel slip. Since the feed amount of the printing material in the prior art is calculated based on the rotation of the extrusion wheel, the slip causes the calculated feed amount of the printing material to be greater than the actual feed amount, that is, the actual feed amount of the printing material is insufficient, and the 3D printing task cannot be completed, resulting in reduced printing accuracy and quality.
[0037] In view of the above problems, the present invention provides a 3D printer control method, referring to Figure 1A and Figure 2A As shown, the 3D printer at least includes an extrusion wheel 110, a drive motor (not shown) and a position sensor 200, wherein the drive motor is used to drive the extrusion wheel 110 to rotate, the extrusion wheel 110 rotates to drive the printing material 300 to move, and the position sensor 200 is used to monitor the movement amount of the printing material 300, referring to Figure 3 As shown, the control method includes:
[0038] Step S301: acquiring a motor signal of a driving motor, and obtaining a theoretical movement amount of a printing material based on the motor signal;
[0039] Step S302: acquiring a sensing signal of a position sensor, and obtaining an actual movement amount of the printing material based on the sensing signal;
[0040] Step S303: obtaining a feedback compensation speed of the driving motor based on the difference between the theoretical movement amount and the actual movement amount;
[0041] Step S304: Controlling the rotation speed of the drive motor based on the feedback compensation speed feedback.
[0042] In one embodiment, referring to Figure 1A and Figure 2A As shown, the extrusion wheel 110 includes two extrusion wheels meshed with each other, and the printing material 300 is clamped by the two extrusion wheels. Generally, the two extrusion wheels include a driving wheel 111 and a driven wheel 112, and the driving wheel 111 is driven to rotate by a driving motor (not shown). When the driving wheel 111 rotates, the driven wheel 112 meshed with the driving wheel 111 is driven to rotate, and the rotation of the driving wheel 111 and the driven wheel 112 drives the printing material 300 to move.
[0043] In one embodiment, referring to Figure 1A and Figure 2A As shown, in order to prevent the drive motor from stalling when the extrusion of the printing material is blocked, the 3D printer further includes an anti-stall mechanism 120, which includes a swing bracket 121 and a tension spring 122. The driven wheel 112 and the tension spring 122 are respectively arranged at both ends of the swing bracket 121. When the printing material moves normally, the tension spring 122 applies pressure from the side to clamp the printing material, and the swing bracket 121 drives the driving wheel 111 to engage with the driven wheel 112; when the movement of the printing material is blocked, the printing material and the extrusion wheel slip, and the printing material bends at the meshing point of the two extrusion wheels, pushing the driven wheel 112 away, and the swing bracket 121 and the tension spring 122 are used to separate the meshing of the driving wheel 111 and the driven wheel 112. At this time, the driving wheel 111 idles under the action of the driving motor, avoiding the problem of motor stalling.
[0044] In one embodiment, the 3D printer control method further includes: obtaining an initial extrusion speed and an initial compensation speed; and controlling an initial rotation speed of the drive motor based on the initial extrusion speed and the initial compensation speed. Figure 4 As shown, first create a 3D model, perform path planning, and slice to generate a 3D printing file (such as a G-code file), which includes motion instructions and extrusion parameters of the 3D printer. The motion instructions include the motion of the extrusion wheel, the hot end component, and other components. The extrusion parameters include the initial extrusion speed (i.e., the linear speed of the extrusion wheel) and the initial compensation speed, wherein the initial compensation speed is usually 0. The processor obtains the 3D printing file, starts the printing process according to the motion instructions, and controls the initial speed of the drive motor according to the initial extrusion speed and the initial compensation speed to ensure that the extrusion wheel rotates at the specified speed.
[0045] Next, step S301 is executed to obtain the motor signal of the driving motor, and obtain the theoretical movement amount of the printing material based on the motor signal. Further, obtaining the motor signal of the driving motor and obtaining the theoretical movement amount of the printing material based on the motor signal includes: obtaining the pulse signal and rotation direction of the driving motor; obtaining the rotation angle of the driving motor based on the pulse signal and the rotation direction; obtaining the rotation arc length of the driving motor based on the rotation angle of the driving motor, and taking the rotation arc length of the driving motor as the theoretical movement amount of the printing material, that is, the theoretical extrusion amount of the printing material.
[0046] In one embodiment, referring to Figure 1A and Figure 1BAs shown, the drive motor uses a stepper motor, and the signals of the drive motor include STP (Step) signal and DIR (Direction) signal. Each rising edge of the STP signal represents one step of the motor, so the STP signal is used to represent the number of pulses. The DIR signal specifies the direction of rotation. According to the number of pulses and the direction of rotation, the real-time angular position α of the drive motor is calculated nom (t):
[0047] (1)
[0048] Among them, α0 represents the starting angular position of the drive motor, MS represents the step value, and PPR mot It indicates the number of steps per revolution, DIR(n) indicates the direction of rotation, and N(t) indicates the number of real-time pulses.
[0049] Then according to the real-time angular position α nom The difference between (t) and the starting angle position α0, that is, the rotation angle of the drive motor, is used to calculate the rotation arc length of the extrusion wheel. The rotation arc length of the extrusion wheel is the theoretical movement amount E of the printing material. nom (t):
[0050] (2)
[0051] Among them, D mot Indicates the diameter of the extrusion wheel, α nmo (t) represents the real-time angular position of the drive motor; α0 represents the starting angular position of the drive motor.
[0052] When there is no slippage between the extrusion wheel and the printing material, the theoretical movement amount of the printing material is consistent with the actual movement amount; when there is slippage between the extrusion wheel and the printing material, the theoretical movement amount of the printing material is greater than the actual movement amount. Therefore, it is necessary to further obtain the actual movement amount of the printing material.
[0053] Execute step S302 to obtain a sensing signal from a position sensor, and obtain the actual movement amount of the printing material based on the sensing signal. Figures 1A to 2A As shown, the 3D printer further includes a follower wheel 210, and the movement of the printing material 300 drives the follower wheel 210 to rotate. Acquiring the sensing signal of the position sensor, and obtaining the actual movement amount of the printing material based on the sensing signal includes: obtaining the rotation angle of the follower wheel or the rotation speed of the follower wheel; obtaining the rotation arc length of the follower wheel based on the rotation angle of the follower wheel or the rotation speed of the follower wheel, and taking the rotation arc length of the follower wheel as the actual movement amount of the printing material, that is, the actual extrusion amount of the printing material.
[0054] In one embodiment, referring to Figure 1A and 1BAs shown, the follower wheel 210 is provided with a magnet 220 and the position sensor 200 is a magnetic angle sensor. The magnetic angle sensor obtains the starting angular position and real-time angular position of the follower wheel, and obtains the rotation angle of the follower wheel based on the starting angular position and real-time angular position of the magnet. Specifically, the follower wheel 210 includes a first follower wheel 211 and a second follower wheel 212 respectively arranged on both sides of the printing material 300. The first follower wheel 211 and the second follower wheel 212 do not have active power, but are driven to rotate by the movement of the printing material 300. Therefore, the rotation arc length of the follower wheel can be used to represent the actual movement amount of the printing material 300. A magnet 220 is installed at the rear of the first follower wheel 211. The first follower wheel 211 rotates in accordance with the magnet 220. The magnetic angle sensor monitors the rotation of the magnet 220 in real time, so the starting angular position and real-time angular position of the follower wheel are obtained, the rotation angle of the follower wheel is obtained, and then the rotation arc length of the follower wheel is obtained. The rotation arc length of the follower wheel is the actual movement amount E of the printing material. act (t):
[0055] (3)
[0056] Among them, D ctrl Indicates the diameter of the follower wheel, θ nom (t) represents the real-time angular position of the follower wheel; θ0 represents the starting angular position of the follower wheel.
[0057] In one embodiment, referring to FIG. 2A to FIG. 2C As shown, the follower wheel 210 includes a grating wheel 213 and the position sensor includes a grating sensor. A plurality of gratings are arranged on the surface of the grating wheel. The grating sensor obtains the alternating time of the light signal, and obtains the rotation speed of the follower wheel based on the number of gratings and the alternating time of the light signal. Specifically, the follower wheel 210 includes a grating wheel 213 and a third follower wheel 214 respectively arranged on both sides of the printing material 300. The grating wheel 213 and the third follower wheel 214 do not have active power, but are driven to rotate by the movement of the printing material 300. Therefore, the rotation arc length of the grating wheel 213 can be used to represent the actual movement amount of the printing material 300. The grating is composed of black and white areas on the surface of the grating wheel. The black area is used to absorb light, and the white area is used to reflect light. When N gratings are arranged on the surface of the grating wheel 213, the average interval angle of the grating is:
[0058] (4)
[0059] Wherein, N represents the number of gratings in the grating wheel.
[0060] When the grating wheel rotates, light passes through the grating or is blocked by the grating, and the grating sensor detects different light signals, generating different levels. Figure 2BIt shows the situation when the light passes through the grating and is received by the grating sensor. Figure 2C The situation when the light is blocked by the grating is shown. Based on the detected alternating frequency of high and low levels, the rotation speed of the grating wheel 213 can be calculated:
[0061] (5)
[0062] Wherein, △θ represents the average interval angle of the grating, and △t represents the average time of the light signal alternation.
[0063] Calculate the rotation arc length of the grating wheel, which is the actual movement amount E of the printing material. act (t):
[0064] (6)
[0065] Among them, RPM represents the speed of the grating wheel, D test Indicates the diameter of the grating wheel.
[0066] Next, step S303 is executed to obtain the feedback compensation speed of the drive motor based on the difference between the theoretical movement amount and the actual movement amount. Further, obtaining the feedback compensation speed of the drive motor based on the difference between the theoretical movement amount and the actual movement amount includes: when the difference between the theoretical movement amount and the actual movement amount is less than or equal to a threshold, the feedback compensation speed is zero; when the difference between the theoretical movement amount and the actual movement amount is greater than the threshold, the feedback compensation speed is determined based on the difference and the compensation parameter.
[0067] In one embodiment, the theoretical movement amount E obtained in step S301 is nom (t) and the actual movement amount E obtained in step S302 act The difference in (t) is the error err(t) = E nom (t) - E act (t). Compare the error err(t) with the set threshold. When the error err(t) is less than the threshold, the feedback compensation speed is 0; when the error err(t) is greater than the threshold, the feedback compensation speed is:
[0068] (7)
[0069] Where K represents the compensation parameter, x k Indicates real-time error.
[0070] In one embodiment, when speed compensation is required, a model is first established based on the difference between the theoretical movement amount and the actual movement amount and the feedback compensation speed; then the linear quadratic Gaussian control algorithm is used to solve the model to obtain compensation parameters.
[0071] Reference Figure 5 As shown, firstly, a 3D printing system model is established, including establishing a system state model, establishing performance indicators, and establishing a target control model according to the system state model and system performance.
[0072] Specifically, establishing the system state model includes establishing an LQR (Linear quadratic gaussian, linear quadratic Gaussian control algorithm) control system model:
[0073] (8)
[0074] Among them, x k Indicates t k The error at the time, x k+1 Indicates t k+1 The error in time, u k represents the feedback compensation speed, a represents the parameter of the system state evolving over time, b represents the parameter of the system state affected by the control input, and a and b are known constants.
[0075] Next, establish performance indicators:
[0076] (9)
[0077] Among them, q represents the state error parameter, r represents the control input parameter, and q and r are known constants.
[0078] The performance index is also called the cost function, which is a standard for measuring the control effect. In equation (9), the state error parameter q is used to weigh the degree of attention to the state error, and the control input parameter r is used to limit the amplitude of the control input. The goal of the control system is to minimize the performance index to minimize the influence of the error and the control input, and obtain the target control input u k .
[0079] Next, establish the target control model based on the system model and performance indicators:
[0080] (10)
[0081] Where K represents the compensation parameter, x k represents the real-time error, u k represents the feedback compensation speed, a represents the parameter of the system state evolving with time, b represents the parameter of the control input affecting the system state, q represents the state error parameter, r represents the control input parameter, and a, b, q, and r are known constants.
[0082] P is an unknown number (to be solved). The Algebraic Riccati Equation (ARE) is a nonlinear equation for target control, which is related to the target control of infinite time under discrete time. In infinite time control problems, the focus is on the values of some variables after a considerable amount of time, so the values of the control variables must be selected now so that the system operates in the target state in the future. The target value of the control variable at any time can be obtained using the solution of the Riccati equation and the observed value of the state variable at that time.
[0083] Next, the target control model is solved to obtain the compensation system K.
[0084] Specifically, first set the closed-loop recursive conditions according to the target control model:
[0085] (11)
[0086] Among them, P k Indicates t k The solution of the time equation, P k-1 Indicates t k+1 The solution of the time equation.
[0087] Then set the iteration termination condition according to the target control model:
[0088] (12)
[0089] where e=10 –10 , iteratively obtain the P value.
[0090] Next, according to the closed-loop recursive condition, iterative termination condition, and initial value assignment, the compensation parameter K value is obtained through iterative calculation. Specifically, the initial value of P is selected, and P1=q is set. According to the closed-loop recursive condition of equation (11), P2, P3, P4... are iteratively calculated. Determine whether the iterative termination condition of equation (12) is met. If the condition is met, end the loop; otherwise, continue the iterative calculation steps, and the P value at the end of the loop is the target P value. According to the control model and the target P value, calculate the compensation parameter K.
[0091] In one embodiment, the method for calculating the time-dependent evolution parameter a of the system state and the control input-induced influence parameter b of the system state includes: obtaining the theoretical movement amount E nom (t) and actual movement E act (t), manually adjust the drive motor to make E nom (t) = E act (t) feedback compensation speed u k Debugging is appropriate. Collect data from multiple time steps in the actual system, including the error x at each moment.k (Right now - ) and feedback compensation speed u k . Collect multiple sets of data points: , , , ..., where each group Corresponding to the change of state from time k to time k+1. Substitute each data point into the state equation , fit these data by the least squares method and calculate the values of a and b.
[0092] In one embodiment, in a system based on LQR control, it is very important to select appropriate calculated state error parameters q and control input parameters r, because they determine the trade-off between system control performance (such as response speed, accuracy, stability) and the size of control input (such as speed, acceleration, etc.). The purpose of adaptively selecting state error parameters q and control input parameters r is to dynamically adjust these parameters according to the actual performance of the system to achieve the target control effect. In this embodiment, the dynamic characteristics of the system are estimated by real-time data acquisition and using system identification methods to dynamically adjust the state error parameters q and control input parameters r:
[0093] (13)
[0094] Among them, λ1 and λ2 are adjustment gains, which determine the response speed of the system during the identification process and the flexibility of model adjustment. Specifically, λ1 and λ2 control the amplitude of the adjustment of the calculated state error parameter q and the control input parameter r.
[0095] Finally, step S304 is executed to control the speed of the drive motor based on the feedback compensation speed feedback. Specifically, according to the feedback compensation speed u k Correct the extrusion speed to:
[0096] (14)
[0097] Among them, v tk Indicates the current extrusion speed, u k Indicates the feedback compensation speed.
[0098] The present invention also provides a 3D printer, referring to Figure 1A and Figure 2A As shown, including:
[0099] The extrusion wheel 110 rotates to drive the printing material 300 to move;
[0100] A driving motor is used to drive the extrusion wheel to rotate;
[0101] A position sensor 200 for monitoring the movement of the printing material;
[0102] The processor is connected to the driving motor and the position sensor 200 and is used to execute the above 3D printer control method.
[0103] In one embodiment, referring to Figure 1A and Figure 2A As shown, the extrusion wheel 110 includes two extrusion wheels meshed with each other, and the printing material 300 is clamped by the two extrusion wheels. Generally, the two extrusion wheels include a driving wheel 111 and a driven wheel 112, and the driving wheel 111 is driven to rotate by a driving motor (not shown). When the driving wheel 111 rotates, the driven wheel 112 meshed with the driving wheel 111 is driven to rotate, and the rotation of the driving wheel 111 and the driven wheel 112 drives the printing material 300 to move.
[0104] In one embodiment, referring to Figure 1A and Figure 2A As shown, in order to prevent the drive motor from stalling when the extrusion of the printing material is blocked, the 3D printer further includes an anti-stall mechanism 120, which includes a swing bracket 121 and a tension spring 122. The driven wheel 112 and the tension spring 122 are respectively arranged at both ends of the swing bracket 121. When the printing material moves normally, the tension spring 122 applies pressure from the side to clamp the printing material, and the swing bracket 121 drives the driving wheel 111 to engage with the driven wheel 112; when the movement of the printing material is blocked, the printing material and the extrusion wheel slip, and the printing material bends at the meshing point of the two extrusion wheels, pushing the driven wheel 112 away, and the swing bracket 121 and the tension spring 122 are used to separate the meshing of the driving wheel 111 and the driven wheel 112. At this time, the driving wheel 111 idles under the action of the driving motor, avoiding the problem of motor stalling.
[0105] In one embodiment, referring to Figure 1A and 1BAs shown, the follower wheel 210 is provided with a magnet 220 and the position sensor 200 is a magnetic angle sensor connected to the processor, and the magnetic angle sensor obtains the starting angular position and real-time angular position of the follower wheel. Specifically, the follower wheel 210 includes a first follower wheel 211 and a second follower wheel 212 respectively arranged on both sides of the printing material 300. The first follower wheel 211 and the second follower wheel 212 do not have active power, but are driven to rotate by the movement of the printing material 300, so the actual movement of the printing material 300 can be represented by the rotation arc length of the follower wheel. The magnet 220 is installed at the rear of the first follower wheel 211, and the rotation of the first follower wheel 211 and the magnet 220 is consistent. The magnetic angle sensor monitors the rotation of the magnet 220 in real time, so the starting angular position and real-time angular position of the follower wheel are obtained, and the rotation angle of the follower wheel is obtained. Based on the rotation angle of the follower wheel, the rotation arc length of the follower wheel can be further obtained, and the rotation arc length of the follower wheel is the actual movement of the printing material.
[0106] In one embodiment, referring to FIG. 2A to FIG. 2C As shown, the follower wheel 210 includes a grating wheel 213 and the position sensor includes a grating sensor connected to the processor. A plurality of gratings are arranged on the surface of the grating wheel, and the grating sensor obtains the alternating time of the light signal. Specifically, the follower wheel 210 includes a grating wheel 213 and a third follower wheel 214 respectively arranged on both sides of the printing material 300. The grating wheel 213 and the third follower wheel 214 do not have active power, but are driven to rotate by the movement of the printing material 300. Therefore, the rotation arc length of the grating wheel 213 can be used to represent the actual movement of the printing material 300. The grating is composed of black and white areas on the surface of the grating wheel, the black area is used to absorb light, and the white area is used to reflect light. When the grating wheel rotates, the light passes through the grating or is blocked by the grating, and the grating sensor detects different light signals, generating different levels. According to the alternating frequency of the high and low levels detected, the rotation speed of the grating wheel 213 can be calculated, and then the rotation arc length of the grating wheel is calculated. The rotation arc length of the grating wheel is the actual movement of the printing material.
[0107] According to the 3D printer control method and 3D printer provided by the present invention, the actual movement amount of the printing material is obtained through a position sensor, and then the rotation speed of the driving motor is controlled according to the error feedback between the theoretical movement amount and the actual movement amount, so as to reduce the error between the theoretical extrusion amount and the actual extrusion amount of the printing material, avoid insufficient supply of printing materials, and improve the three-dimensional accuracy and quality of 3D printing.
[0108] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned 3D printer control method is implemented.
[0109] The present application also provides a computer program product, including a computer program, wherein the computer program implements the above-mentioned 3D printer control method when executed by a processor.
[0110] Please note that the above embodiments are for illustrative purposes only and are not intended to limit the present application.
[0111] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0112] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0113] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent application. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application.
Claims
1. A 3D printer control method, characterized in that: The 3D printer at least comprises an extrusion wheel, a driving motor and a position sensor, wherein the driving motor is used to drive the extrusion wheel to rotate, the extrusion wheel rotates to drive the printing material to move, and the position sensor is used to monitor the movement amount of the printing material. The method comprises: Acquiring a motor signal of the driving motor, and obtaining a theoretical movement amount of the printing material based on the motor signal; Acquire a sensing signal of the position sensor, and obtain an actual movement amount of the printing material based on the sensing signal; Obtaining a feedback compensation speed of the drive motor based on a difference between the theoretical movement amount and the actual movement amount; The rotational speed of the drive motor is controlled based on the feedback compensated speed feedback.
2. The 3D printer control method according to claim 1, characterized in that: The step of obtaining the feedback compensation speed of the drive motor based on the difference between the theoretical movement amount and the actual movement amount includes: When the difference between the theoretical movement amount and the actual movement amount is less than or equal to a threshold value, the feedback compensation speed is zero; When the difference between the theoretical movement amount and the actual movement amount is greater than a threshold, the feedback compensation speed is determined based on the difference and a compensation parameter.
3. The 3D printer control method according to claim 1, characterized in that: The step of acquiring the motor signal of the driving motor and obtaining the theoretical movement amount of the printing material based on the motor signal comprises: Obtaining a pulse signal and a rotation direction of the driving motor; Obtaining a rotation angle of the drive motor based on the pulse signal and the rotation direction; The rotation arc length of the extruding wheel is obtained based on the rotation angle of the driving motor, and the rotation arc length of the extruding wheel is used as the theoretical movement amount of the printing material.
4. The 3D printer control method according to claim 1, characterized in that: The 3D printer further comprises a follower wheel, and the movement of the printing material drives the follower wheel to rotate.
5. The 3D printer control method according to claim 4, characterized in that: The acquiring the sensing signal of the position sensor and obtaining the actual movement amount of the printing material based on the sensing signal comprises: Obtaining the rotation angle of the follower wheel or the rotation speed of the follower wheel; The rotation arc length of the follower wheel is obtained based on the rotation angle of the follower wheel or the rotation speed of the follower wheel, and the rotation arc length of the follower wheel is used as the actual movement amount of the printing material.
6. The 3D printer control method according to claim 5, characterized in that: The follower wheel is provided with a magnet and the position sensor includes a magnetic angle sensor, the magnetic angle sensor acquires the starting angular position and the real-time angular position of the follower wheel, and obtains the rotation angle of the follower wheel based on the starting angular position and the real-time angular position of the magnet.
7. The 3D printer control method according to claim 5, characterized in that: The follower wheel includes a grating wheel and the position sensor includes a grating sensor. A plurality of gratings are arranged on the surface of the grating wheel. The grating sensor acquires the alternation time of the light signal and obtains the rotation speed of the follower wheel based on the number of gratings and the alternation time of the light signal.
8. The 3D printer control method according to claim 2, characterized in that: Also includes: Establishing a model based on the difference between the theoretical movement amount and the actual movement amount and the feedback compensation speed; The model is solved using a linear quadratic Gaussian control algorithm to obtain the compensation parameters.
9. The 3D printer control method according to claim 1, characterized in that: The method further comprises: Get the initial extrusion speed and initial compensation speed; An initial rotation speed of the driving motor is controlled based on the initial extrusion speed and the initial compensation speed.
10. A 3D printer, characterized in that: include: An extrusion wheel, the extrusion wheel rotates to drive the printing material to move; A driving motor, used for driving the extruding wheel to rotate; A position sensor for monitoring the movement of the printing material; A processor is connected to the drive motor and the position sensor, and is used to execute the 3D printer control method according to any one of claims 1 to 9.
11. The 3D printer according to claim 10, characterized in that: Also includes: A follower wheel, wherein the movement of the printing material drives the follower wheel to rotate.
12. The 3D printer according to claim 11, characterized in that: The follower wheel is provided with a magnet and the position sensor comprises a magnetic angle sensor connected to the processor, and the magnetic angle sensor acquires the starting angular position and the real-time angular position of the follower wheel.
13. The 3D printer according to claim 11, characterized in that: The follower wheel includes a grating wheel and the position sensor includes a grating sensor connected to the processor. A plurality of gratings are arranged on the surface of the grating wheel, and the grating sensor acquires the alternating time of the light signal.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the 3D printer control method according to any one of claims 1 to 9 is implemented.
15. A computer program product, characterized in that The invention comprises a computer program, wherein when the computer program is executed by a processor, the 3D printer control method according to any one of claims 1 to 9 is implemented.