Stall detection tweeking from 2.05 to 3.3.0 RC3
-
S3 is for motor stall, but that only belongs in the M574 command. Homing moves when using stall detection are still H1.
Can you post your config.g as well?
-
@phaedrux said in Stall detection tweeking from 2.05 to 3.3.0 RC3:
M574
yea shure
config.g
; Configuration file for Duet WiFi (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Mon Jun 14 2021 19:09:40 GMT+0200 (Mitteleuropäische Sommerzeit) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"D-Bot" ; set printer name M669 K1 ; select CoreXY mode M671 X-21.4:356.4 Y165:165 S5 P1.5 ; leadscrews at left (connected to Z) and right (connected to E1) of X axis ; Network ;M551 P"Duet" ; set password M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0 S1 ; physical drive 0 goes forwards M569 P1 S1 ; physical drive 1 goes forwards M569 P2 S1 ; physical drive 2 goes forwards M569 P3 S1 ; physical drive 3 goes forwards M584 X0 Y1 Z2 E3 ; set drive mapping M350 X256 Y256 Z256 I0 ; configure microstepping without interpolation M350 E16 I1 ; configure microstepping with interpolation M92 X78.43 Y78.43 Z398.00 E492.45 ; set steps per mm M566 X900.00 Y900.00 Z12.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X6000.00 Y6000.00 Z180.00 E1200.00 ; set maximum speeds (mm/min) M201 X500.00 Y20.00 Z250.00 E250.00 ; set accelerations (mm/s^2) M906 X1200 Y1200 Z1200 E1200 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X335 Y191 Z350 S0 ; set axis maxima ; Stall Detection M915 X Y S10 F0 R0 ; Endstops M574 Z1 S0 ; Define active low and unused microswitches M574 X3 Y3 S3 ; Define Endstops for Stall Detection ;Filament Run Out Sensor M591 D0 P2 C3 E6.0 ; Tool 0 Extruder 0 ; Heaters M308 S0 P"bedtemp" Y"thermistor" T100000 B4700 ; configure sensor 0 as thermistor on pin bedtemp M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0 M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M308 S1 P"e0temp" Y"thermistor" T100000 B4680 ; configure sensor 1 as thermistor on pin e0temp M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S280 ; set temperature limit for heater 1 to 280C ; Z-Probe M950 S0 C"exp.heater3" ; create servo pin 0 for BLTouch M558 P9 C"^zprobe.in" H5 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds G31 P600 X-30 Y0 Z1.6 ; (P25 before) ; set Z probe trigger value, offset and trigger height M557 X30:304 Y20:191 S40 ; define mesh grid ; Nozzle + Filament M404 N2.85 D0.400 ; Fans M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency M106 P0 C"PartCooling" S0 H-1 ; set fan 0 name and value. Thermostatic control is turned off M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency M106 P1 C"Heatsink" S1 H1 T45 ; set fan 1 name and value. Thermostatic control is turned on M950 F2 C"fan1" Q500 ; create fan 2 on pin fan1 and set its frequency M106 P2 C"AlwaysOn" S1 H-1 ; set fan 2 name and value. Thermostatic control is turned on ; Tools M563 P0 S"e3D V6" D0 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C ; Custom settings are not defined ; Miscellaneous T0 ; select first tool M80 ; Turn On Power Supply
change S3 to H1 on the homex
; This File is just for testing the "stall detection" Feature. ; It might need to be adjusted to get it to work with you're Printer/s ; Sensorless Homing test file for RepRapFirmware on D-Bot ; M915 X S3 F0 R1 ; More about M915 and how to set it up you can find here: ; https://duet3d.com/wiki/G-code#M915:_Configure_motor_stall_detection ; Lift Z relative to current position G91 G1 Z10 F6000 H1 G90 ; Setup Stall Detection on CoreXY for Xmin Xmax M400 ; make sure everything has stopped before we make changes ; M574 X3 Y3 S3 ; set endstops to use motor stall M913 X30 Y30 ; reduce motor current to 50% to prevent belts slipping G91 ; use relative positioning G1 H1 X-500 F4000 ; move the X to max until it detects the min Point G92 X0 ; set X min Point ;G1 S2 X30 ; move X away from min Point M400 ; wait untill X is done G1 H1 X500 F4000 ; move the Y to min until it detects the min Point ;G1 S2 X-30 ; move X away from max Point M208 ; shows the way that has been traveled G90 ; back to absolute positioning M400 ; make sure everything has stopped before we reset the motor currents M913 X100 Y100 Z100 ; motor currents back to normal ; M574 X1 Y2 Z1 S0 ; set endstops back to normal (is maybe different than you're normal) G1 H1 X150 ; Lift Z relative to current position G91 G1 Z-10 F6000 H1 G90
btw. those {1} are not actualy in the code might be a Bug with this Forum.
Output in Console:
G28 X
Error: Homing failed
It dosen't want to move Z even. -
@as-3d-druck said in Stall detection tweeking from 2.05 to 3.3.0 RC3:
M574 X3 Y3 S3
X3 Y3 is not valid. It must be either 1 or 2. 1 is low end of travel, 2 is high end of travel. S3 is correct though for stall detection.
https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M574_RepRapFirmware_Num_3
-
@as-3d-druck said in Stall detection tweeking from 2.05 to 3.3.0 RC3:
; Lift Z relative to current position G91 G1 Z-10 F6000 H1 G90
The Z moves are the only place where H2 is correct. H1 means seek the endstop. H2 means move the motor regardless if it's homed or not.
-
@phaedrux said in Stall detection tweeking from 2.05 to 3.3.0 RC3:
X3 Y3 is not valid. It must be either 1 or 2. 1 is low end of travel, 2 is high end of travel. S3 is correct though for stall detection.
https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M574_RepRapFirmware_Num_3fixed that
; Endstops M574 Z1 S0 ; Define active low and unused microswitches M574 X1 S3 ; Define Endstops for Stall Detection //Before X3 Y3 M574 Y1 S3 ; Define Endstops for Stall Detection //Before X3 Y3
-
@phaedrux said in Stall detection tweeking from 2.05 to 3.3.0 RC3:
The Z moves are the only place where H2 is correct. H1 means seek the endstop. H2 means move the motor regardless if it's homed or not.
I tryed this for now with no moving Axis.
M400 M913 X50 Y50 ; drop motor current to 50% M400 G91; relative positioning G1 H2 Z10 F12000 ; lift Z relative to current position G1 H1 X-400 F6000 ; move quickly to X axis endstop and stop there (first pass) G1 H2 X5 F12000 ; go back a few mm G1 H1 X-320.5 F4000 ; move slowly to X axis endstop once more (second pass) G1 H2 Z-10 F6000 ; lower Z again G90 ; absolute positioning M400 G1 X150 ; moves X to the Middle M913 X100 Y100 ; return current to 100% M400
-
@as-3d-druck said in Stall detection tweeking from 2.05 to 3.3.0 RC3:
G1 H2 X5 F12000 ; go back a few mm
Should probably remove the H2 from that one.
-
@as-3d-druck said in Stall detection tweeking from 2.05 to 3.3.0 RC3:
I tryed this for now with no moving Axis.
Meaning nothing moved?
-
Okay i got it now kind off.
My Problem was i got in my config before (2.05) steps M92 and after that M350 for interpolation on those steps etc. but in this config as you can see before i got it the other way around.
So i changed that and now i got movment back.The only thing that i try to fix is now why it runs to the set direction is on the End and still tackles it a few times and than sets back to the middle as intended.
I currently try to change the sensitivity but still not great.
M915 X Y S6 F0 R1//EDITE:
Got it now on 4 and it seems to work -
@as-3d-druck said in Stall detection tweeking from 2.05 to 3.3.0 RC3:
The only thing that i try to fix is now why it runs to the set direction is on the End and still tackles it a few times and than sets back to the middle as intended.
I'm not sure what that means.
But sounds like you got it working now?
-
@phaedrux said in Stall detection tweeking from 2.05 to 3.3.0 RC3:
But sounds like you got it working now?
Yes, i can provide my new Home X and Y File + Config if someone wants to look at it. (Troubleshooting etc.)
homex.g
M913 X50 Y50 ; drop motor current to 50% M400 G91 ; relative positioning G1 H2 Z10 F12000 ; lift Z relative to current position G1 H1 X-500 F5000 ; move quickly to X axis endstop and stop there (first pass) ;G1 H2 X20 F12000 ; go back a few mm ;G1 H1 X-500 F5000 ; move slowly to X axis endstop once more (second pass) G1 H2 Z-10 F6000 ; lower Z again G90 ; absolute positioning M400 G1 X150 ; moves X to the Middle M913 X100 Y100 ; return current to 100%
homey.g
M913 X50 Y50 ; drop motor current to 50% M400 G91 ; relative positioning G1 H2 Z10 F12000 ; lift Z relative to current position G1 H1 Y-500 F5000 ; move quickly to X axis endstop and stop there (first pass) ;G1 H2 Y20 F12000 ; go back a few mm ;G1 H1 Y-500 F5000 ; move slowly to X axis endstop once more (second pass) G1 H2 Z-10 F6000 ; lower Z again G90 ; absolute positioning M400 G1 X150 Y120 ; moves X to the Middle M913 X100 Y100 ; return current to 100%
config.g
; Configuration file for Duet WiFi (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Mon Jun 14 2021 19:09:40 GMT+0200 (Mitteleuropäische Sommerzeit) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"D-Bot" ; set printer name M669 K1 ; select CoreXY mode M671 X-21.4:356.4 Y165:165 S20 P1.5 ; leadscrews at left (connected to Z) and right (connected to E1) of X axis ; Network ;M551 P"Duet" ; set password M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0 S1 ; physical drive 0 goes forwards M569 P1 S1 ; physical drive 1 goes forwards M569 P2 S1 ; physical drive 2 goes forwards M569 P3 S1 ; physical drive 3 goes forwards M569 P4 S1 ; physical drive 4 goes forwards M584 X0 Y1 Z2:4 E3 ; set drive mapping (2 Z Motors = 2 & 4) M92 X79.40 Y79.40 Z397.20 E492.45 ; set steps per mm //X&&Y 78.43 M350 X128 Y128 Z128 I0 ; configure microstepping without interpolation M350 E64 I1 ; configure microstepping with interpolation M566 X900 Y900 Z12 E120 ; set maximum instantaneous speed changes (mm/min) M203 X6000 Y6000 Z500 E1500 ; set maximum speeds (mm/min) M201 X3500 Y3500 Z300 E2500 ; set accelerations (mm/s^2) M906 X1200 Y1200 Z1200 E1200 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X335 Y191 Z350 S0 ; set axis maxima ; Stall Detection M915 X Y S12 F0 R1 ; S=Sensitivity (higher=less sensetive)//started at 10//; F=Filtering; R=Action ; Endstops ;M574 Z1 S0 ; Define active low and unused microswitches M574 X1 S3 ; Define Endstops for Stall Detection //Before X3 Y3 M574 Y1 S3 ; Define Endstops for Stall Detection //Before X3 Y3 ;Filament Run Out Sensor M591 D0 P2 C3 E6.0 ; Tool 0 Extruder 0 ; Heaters M308 S0 P"bedtemp" Y"thermistor" T100000 B4700 ; configure sensor 0 as thermistor on pin bedtemp M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0 M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M308 S1 P"e0temp" Y"thermistor" T100000 B4680 ; configure sensor 1 as thermistor on pin e0temp M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S280 ; set temperature limit for heater 1 to 280C ; Z-Probe M950 S0 C"exp.heater3" ; create servo pin 0 for BLTouch M558 P9 C"^zprobe.in" H5 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds G31 P600 X-30 Y0 Z1.6 ; (P25 before) ; set Z probe trigger value, offset and trigger height M557 X30:304 Y20:191 S40 ; define mesh grid ; Nozzle + Filament M404 N2.85 D0.400 ; Fans M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency M106 P0 C"PartCooling" S0 H-1 ; set fan 0 name and value. Thermostatic control is turned off M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency M106 P1 C"Heatsink" S1 H1 T45 ; set fan 1 name and value. Thermostatic control is turned on M950 F2 C"fan1" Q500 ; create fan 2 on pin fan1 and set its frequency M106 P2 C"AlwaysOn" S1 H-1 ; set fan 2 name and value. Thermostatic control is turned on ; Tools M563 P0 S"e3D V6" D0 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C ; Custom settings are not defined ; Miscellaneous T0 ; select first tool M80 ; Turn On Power Supply
I just reduced the current by 50% and commented out the 2. attempt to home X or Y and tryed differen Sensitivitys and here we go.
-
Those look good. Thanks for sharing them.