Scale extruder motor current linearly with speed.

49% less heating when running at low speed and standstill, 4% more torque at maximum extrusion rate (15mm^3/s), 15% more torque in high speed movements (un/retractions).

StealthChop mode is used for low speeds (below 900mm/min)
spreadCycle is used above. Transition speed is well above maximum extrusion rate of 15mm^3/s (275mm/min) so mode transition is not expected to be visible on printed surface.

StealthChop is expected to improve printed surface quality (less artifacts).

Warning you can burn extruder motor if it is not the same impedance as original Prusa i3 Extruder stepper motor. There is no current feedback in low speed so lower impedance motor can be burned by over current.

Even there is no direct current feedback, there is no risk for original motor thermal runaway, as motor resistance increases with temperature, current decreases.

Standstill peak phase current is expected to be 500 mA and linearly increase with speed to 970 mA at 900mm/min where spreadCycle constant current regulation takes over and keeps peak current at 805 mA to maximum speed possible.

As motor heating increases with current squared, lowering low speed current from 700mA to 500mA decreases heating 49% in thate mode, where motor spends most of the time.
This commit is contained in:
Marek Bel 2020-08-25 03:32:54 +02:00
parent eb4cf1a77f
commit e82ba78768
3 changed files with 15 additions and 13 deletions

View File

@ -199,7 +199,7 @@ void tmc2130_init()
tmc2130_wr(axis, TMC2130_REG_TCOOLTHRS, 0); tmc2130_wr(axis, TMC2130_REG_TCOOLTHRS, 0);
tmc2130_wr(axis, TMC2130_REG_GCONF, TMC2130_GCONF_SILENT); tmc2130_wr(axis, TMC2130_REG_GCONF, TMC2130_GCONF_SILENT);
tmc2130_wr_PWMCONF(axis, tmc2130_pwm_ampl[axis], tmc2130_pwm_grad[axis], tmc2130_pwm_freq[axis], tmc2130_pwm_auto[axis], 0, 0); tmc2130_wr_PWMCONF(axis, tmc2130_pwm_ampl[axis], tmc2130_pwm_grad[axis], tmc2130_pwm_freq[axis], tmc2130_pwm_auto[axis], 0, 0);
tmc2130_wr_TPWMTHRS(axis, TMC2130_TPWMTHRS); tmc2130_wr_TPWMTHRS(axis, TMC2130_TPWMTHRS_E);
#endif //TMC2130_STEALTH_E #endif //TMC2130_STEALTH_E
} }

View File

@ -229,9 +229,9 @@
#define TMC2130_PWM_AUTO_Z 1 // PWMCONF #define TMC2130_PWM_AUTO_Z 1 // PWMCONF
#define TMC2130_PWM_FREQ_Z 2 // PWMCONF #define TMC2130_PWM_FREQ_Z 2 // PWMCONF
#define TMC2130_PWM_GRAD_E 4 // PWMCONF #define TMC2130_PWM_GRAD_E 84 // PWMCONF 730mA @ 375mm/min 970mA phase peak at feedrate 900mm/min
#define TMC2130_PWM_AMPL_E 240 // PWMCONF #define TMC2130_PWM_AMPL_E 43 // PWMCONF 500mA phase peak at feedrate 10 mm/min
#define TMC2130_PWM_AUTO_E 1 // PWMCONF #define TMC2130_PWM_AUTO_E 0 // PWMCONF
#define TMC2130_PWM_FREQ_E 2 // PWMCONF #define TMC2130_PWM_FREQ_E 2 // PWMCONF
#define TMC2130_TOFF_XYZ 3 // CHOPCONF // fchop = 27.778kHz #define TMC2130_TOFF_XYZ 3 // CHOPCONF // fchop = 27.778kHz
@ -239,7 +239,7 @@
//#define TMC2130_TOFF_E 4 // CHOPCONF // fchop = 21.429kHz //#define TMC2130_TOFF_E 4 // CHOPCONF // fchop = 21.429kHz
//#define TMC2130_TOFF_E 5 // CHOPCONF // fchop = 17.442kHz //#define TMC2130_TOFF_E 5 // CHOPCONF // fchop = 17.442kHz
//#define TMC2130_STEALTH_E // Extruder stealthChop mode #define TMC2130_STEALTH_E // Extruder stealthChop mode
//#define TMC2130_CNSTOFF_E // Extruder constant-off-time mode (similar to MK2) //#define TMC2130_CNSTOFF_E // Extruder constant-off-time mode (similar to MK2)
//#define TMC2130_PWM_DIV 683 // PWM frequency divider (1024, 683, 512, 410) //#define TMC2130_PWM_DIV 683 // PWM frequency divider (1024, 683, 512, 410)
@ -247,6 +247,7 @@
#define TMC2130_PWM_CLK (2 * TMC2130_FCLK / TMC2130_PWM_DIV) // PWM frequency (23.4kHz, 35.1kHz, 46.9kHz, 58.5kHz for 12MHz fclk) #define TMC2130_PWM_CLK (2 * TMC2130_FCLK / TMC2130_PWM_DIV) // PWM frequency (23.4kHz, 35.1kHz, 46.9kHz, 58.5kHz for 12MHz fclk)
#define TMC2130_TPWMTHRS 0 // TPWMTHRS - Sets the switching speed threshold based on TSTEP from stealthChop to spreadCycle mode #define TMC2130_TPWMTHRS 0 // TPWMTHRS - Sets the switching speed threshold based on TSTEP from stealthChop to spreadCycle mode
#define TMC2130_TPWMTHRS_E 403
#define TMC2130_THIGH 0 // THIGH - unused #define TMC2130_THIGH 0 // THIGH - unused
//#define TMC2130_TCOOLTHRS_X 450 // TCOOLTHRS - coolstep treshold //#define TMC2130_TCOOLTHRS_X 450 // TCOOLTHRS - coolstep treshold
@ -264,8 +265,8 @@
#define TMC2130_SG_THRS_HOME {3, 3, TMC2130_SG_THRS_Z, TMC2130_SG_THRS_E} #define TMC2130_SG_THRS_HOME {3, 3, TMC2130_SG_THRS_Z, TMC2130_SG_THRS_E}
//new settings is possible for vsense = 1, running current value > 31 set vsense to zero and shift both currents by 1 bit right (Z axis only) //new settings is possible for vsense = 1, running current value > 31 set vsense to zero and shift both currents by 1 bit right (Z axis only)
#define TMC2130_CURRENTS_H {16, 20, 35, 30} // default holding currents for all axes #define TMC2130_CURRENTS_H {16, 20, 35, 36} // default holding currents for all axes E 805 mA peak
#define TMC2130_CURRENTS_R {16, 20, 35, 30} // default running currents for all axes #define TMC2130_CURRENTS_R {16, 20, 35, 36} // default running currents for all axes E 805 mA peak
#define TMC2130_CURRENTS_R_HOME {8, 10, 20, 18} // homing running currents for all axes #define TMC2130_CURRENTS_R_HOME {8, 10, 20, 18} // homing running currents for all axes
#define TMC2130_STEALTH_Z #define TMC2130_STEALTH_Z

View File

@ -231,9 +231,9 @@
#define TMC2130_PWM_AUTO_Z 1 // PWMCONF #define TMC2130_PWM_AUTO_Z 1 // PWMCONF
#define TMC2130_PWM_FREQ_Z 2 // PWMCONF #define TMC2130_PWM_FREQ_Z 2 // PWMCONF
#define TMC2130_PWM_GRAD_E 4 // PWMCONF #define TMC2130_PWM_GRAD_E 84 // PWMCONF 730mA @ 375mm/min 970mA phase peak at feedrate 900mm/min
#define TMC2130_PWM_AMPL_E 240 // PWMCONF #define TMC2130_PWM_AMPL_E 43 // PWMCONF 500mA phase peak at feedrate 10 mm/min
#define TMC2130_PWM_AUTO_E 1 // PWMCONF #define TMC2130_PWM_AUTO_E 0 // PWMCONF
#define TMC2130_PWM_FREQ_E 2 // PWMCONF #define TMC2130_PWM_FREQ_E 2 // PWMCONF
#define TMC2130_TOFF_XYZ 3 // CHOPCONF // fchop = 27.778kHz #define TMC2130_TOFF_XYZ 3 // CHOPCONF // fchop = 27.778kHz
@ -241,7 +241,7 @@
//#define TMC2130_TOFF_E 4 // CHOPCONF // fchop = 21.429kHz //#define TMC2130_TOFF_E 4 // CHOPCONF // fchop = 21.429kHz
//#define TMC2130_TOFF_E 5 // CHOPCONF // fchop = 17.442kHz //#define TMC2130_TOFF_E 5 // CHOPCONF // fchop = 17.442kHz
//#define TMC2130_STEALTH_E // Extruder stealthChop mode #define TMC2130_STEALTH_E // Extruder stealthChop mode
//#define TMC2130_CNSTOFF_E // Extruder constant-off-time mode (similar to MK2) //#define TMC2130_CNSTOFF_E // Extruder constant-off-time mode (similar to MK2)
//#define TMC2130_PWM_DIV 683 // PWM frequency divider (1024, 683, 512, 410) //#define TMC2130_PWM_DIV 683 // PWM frequency divider (1024, 683, 512, 410)
@ -249,6 +249,7 @@
#define TMC2130_PWM_CLK (2 * TMC2130_FCLK / TMC2130_PWM_DIV) // PWM frequency (23.4kHz, 35.1kHz, 46.9kHz, 58.5kHz for 12MHz fclk) #define TMC2130_PWM_CLK (2 * TMC2130_FCLK / TMC2130_PWM_DIV) // PWM frequency (23.4kHz, 35.1kHz, 46.9kHz, 58.5kHz for 12MHz fclk)
#define TMC2130_TPWMTHRS 0 // TPWMTHRS - Sets the switching speed threshold based on TSTEP from stealthChop to spreadCycle mode #define TMC2130_TPWMTHRS 0 // TPWMTHRS - Sets the switching speed threshold based on TSTEP from stealthChop to spreadCycle mode
#define TMC2130_TPWMTHRS_E 403
#define TMC2130_THIGH 0 // THIGH - unused #define TMC2130_THIGH 0 // THIGH - unused
//#define TMC2130_TCOOLTHRS_X 450 // TCOOLTHRS - coolstep treshold //#define TMC2130_TCOOLTHRS_X 450 // TCOOLTHRS - coolstep treshold
@ -266,8 +267,8 @@
#define TMC2130_SG_THRS_HOME {3, 3, TMC2130_SG_THRS_Z, TMC2130_SG_THRS_E} #define TMC2130_SG_THRS_HOME {3, 3, TMC2130_SG_THRS_Z, TMC2130_SG_THRS_E}
//new settings is possible for vsense = 1, running current value > 31 set vsense to zero and shift both currents by 1 bit right (Z axis only) //new settings is possible for vsense = 1, running current value > 31 set vsense to zero and shift both currents by 1 bit right (Z axis only)
#define TMC2130_CURRENTS_H {16, 20, 35, 30} // default holding currents for all axes #define TMC2130_CURRENTS_H {16, 20, 35, 36} // default holding currents for all axes E 805 mA peak
#define TMC2130_CURRENTS_R {16, 20, 35, 30} // default running currents for all axes #define TMC2130_CURRENTS_R {16, 20, 35, 36} // default running currents for all axes E 805 mA peak
#define TMC2130_CURRENTS_R_HOME {8, 10, 20, 18} // homing running currents for all axes #define TMC2130_CURRENTS_R_HOME {8, 10, 20, 18} // homing running currents for all axes
#define TMC2130_STEALTH_Z #define TMC2130_STEALTH_Z