Sensorless homing not working with Duet 3 mini
-
I am not able to get sensorless homing working with a duet 3 mini running firmware 3.5 rc2. I have looked and cannot see where it is going wrong and have tried numerous settings to no avail. Not sure if I should go back to an older version of the firmware. Hopefully I am missing something really stupid. My main config is below followed by my homex file. Many thanks
; Configuration file for RepRapFirmware on Duet 3 Mini 5+ Ethernet ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.5.0-rc.2+3 on Mon Jan 15 2024 12:53:36 GMT+0000 (Greenwich Mean Time) ; General M550 P"MK3" ; set hostname ; Network M552 S1 ; configure Ethernet adapter M552 P0.0.0.0 S1 ; enable network and acquire dynamic address via DHCP M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Smart Drivers M569 P0.0 S1 D2 ; driver 0.0 goes forwards (X axis) M569 P0.1 S0 D2 ; driver 0.1 goes forwards (Y axis) M569 P0.2 S1 D2 ; driver 0.2 goes forwards (Z axis) M569 P0.3 S1 D2 ; driver 0.3 goes forwards (extruder 0) M569 P0.4 S1 D2 ; driver 0.4 goes forwards (Z axis) ; Motor Idle Current Reduction M906 I30 ; set motor current idle factor M84 S30 ; set motor current idle timeout ; Axes M584 X0.0 Y0.1 Z0.2:0.4 ; set axis mapping M350 X16 Y16 Z16 I1 ; configure microstepping with interpolation M906 X800 Y800 Z800 ; set axis driver currents M92 X100 Y100 Z400 ; configure steps per mm M208 X0:250 Y0:210 Z0:210 ; set minimum and maximum axis limits M566 X900 Y900 Z12 ; set maximum instantaneous speed changes (mm/min) M203 X10000 Y10000 Z180 ; set maximum speeds (mm/min) M201 X500 Y500 Z20 ; set accelerations (mm/s^2) ; Extruders M584 E0.3 ; set extruder mapping M350 E16 I1 ; configure microstepping with interpolation M906 E400 ; set extruder driver currents M92 E140 ; configure steps per mm M566 E120 ; set maximum instantaneous speed changes (mm/min) M203 E3600 ; set maximum speeds (mm/min) M201 E250 ; set accelerations (mm/s^2) ; Kinematics M669 K0 ; configure Cartesian kinematics ; Endstops M574 X1 S3 ; configure X axis endstop M574 Y1 S3 ; configure Y axis endstop M574 Z1 S2 ; configure Z axis endstop ; Probes M558 K0 P5 C"io2.in" H5 F120 T6000 ; configure digital probe via slot #0 M308 S2 P"temp2" A"Pinda V2" Y"thermistor" T100000 B3950 ; added from CNC kitch G31 P500 X0 Y0 Z1 ; set Z probe trigger value, offset and trigger height ;Stall detection ;M915 X Y R0 F0 M915 X Y S1 F0 H200 R4700 ; xand y axes ; Mesh Bed Compensation M557 X25:225 Y25:185 S50:50 ; define grid for mesh bed compensation ; Sensors M308 S0 P"temp0" Y"thermistor" A"Heated Bed" T100000 B4725 C7.06e-8 ; configure sensor #0 M308 S1 P"temp1" Y"thermistor" A"Nozzle" T100000 B4725 C7.06e-8 ; configure sensor #1 ; Heaters M950 H0 C"out0" T0 ; create heater #0 M143 H0 P0 T0 C0 S120 A0 ; configure heater monitor #0 for heater #0 M307 H0 R2.43 D5.5 E1.35 K0.56 B0 ; configure model of heater #0 M950 H1 C"out1" T1 ; create heater #1 M143 H1 P0 T1 C0 S285 A0 ; configure heater monitor #0 for heater #1 M307 H1 R2.43 D5.5 E1.35 K0.56 B0 ; configure model of heater #1 ; Heated beds M140 P0 H0 ; configure heated bed #0 ; Fans M950 F0 C"out3" ; create fan #0 M106 P0 S0 L0 X1 B0.1 ; configure fan #0 M950 F1 C"out4" ; create fan #1 M106 P1 S0 B0.1 H1 T45 ; configure fan #1 ; Tools M563 P0 D0 H1 F0 ; create tool #0 M568 P0 R0 S0 ; set initial tool #0 active and standby temperatures to 0C ; Miscellaneous T0 ; select first tool
; homex.g ; called to home the x axis G91 ; use relative positioning M400 M913 X30 ; drop motor currents to 25% M201 X1000 Y1000 G1 H2 X0.5 Y-0.5 F10000 ; energise motors to ensure they are not stall M400 ; make sure everything has stopped before we change the motor currents M569 P0 V0 ; force to stealth chop M915 H200 X Y S1 R0 F0 ; set X and Y to sensitivity 3, do nothing when stall, unfiltered G1 H2 Z3 F5000 ; lift Z 3mm G1 H1 X-300 F4200 ; move left 400mm, stopping at the endstop G1 H1 X100 F2000 ; move away from end G1 H2 Z-3 F1200 ; lower Z G90 ; back to absolute positioning M400 ; make sure everything has stopped before we reset the motor currents M913 X100 Y100 ; motor currents back to 100%
-
Anyone know why stallguard doesn't initiate with duet 3 mini. Changing the sensitivity doesn't work, it is just not responsive. It clatters no matter what. I can get it working on a Duet 2 board without any hiccup at all with a super light touch as well. It doesnt appear to be firmware related as I rolled back to 4.6..
-
@jer1001 It looks like your stepper drivers may not be in stealthchop mode. Stall detection on TMC2209 drivers (which are used on the mini) only works when the drivers are in stealthchop mode. You have:
M569 P0 V0 ; force to stealth chop
But from the documentation:
Vnnn (firmware 2.02 and later) tpwmthrs parameter for those stepper driver chips that support it. This is the interval in clock cycles between 1/256 microsteps below which the drivers will switch from stealthChop to to spreadCycle mode. Only applies when the driver is configured in stealthChop mode. Typical value are from 100 (high speed) to 4000 (low speed). Send M569 P# (where # is the driver number) with no additional parameters to see how this translates into mm/sec.
Your config.g has:
M569 P0.0 S1 D2 ; driver 0.0 goes forwards (X axis) M569 P0.1 S0 D2 ; driver 0.1 goes forwards (Y axis) M569 P0.2 S1 D2 ; driver 0.2 goes forwards (Z axis) M569 P0.3 S1 D2 ; driver 0.3 goes forwards (extruder 0) M569 P0.4 S1 D2 ; driver 0.4 goes forwards (Z axis)
So it looks like the drivers will be in spreadcycle mode. You need to switch to stealthchop for homing. I'd suggest adding D3 to the M569 in your homing files. You may need to switch back to spreadcycle at the end of the home operation (assuming you want to use spreadcycle for printing). I'd also suggest that you move this command to the start of your homing file so that the driver is in stealthchop mode when you do the motor current change and energise operations. .
-
@gloomyandy I owe you for that one, many thanks indeed. It is homing on this, will revert at end of homing to spreadcycle. Thanks again
; homex.g ; called to home the X axis ; ; generated by RepRapFirmware Configuration Tool v3.5.0-rc.2+3 on Mon Jan 15 2024 12:53:37 GMT+0000 (Greenwich Mean Time) M569 P0 D3 V0 M915 H200 X Y S3 R0 F0 ; set sensorless homing ; lift Z G91 ; relative positioning G1 H2 Z5 ; move Z relative to current position to avoid dragging nozzle over the bed G90 ; absolute positioning ; home X G1 H1 X-300 F3000 ; coarse home in the -X direction G1 H2 X20 F1500 ; move back 5mm ;G1 H1 X{-var.maxTravel} F300 ; fine home in the -X direction ;G1 H2 Z-5 F6000 ; lower Z again