Filament loading with stall detection

  • Based on @dc42 idea here:

    I did the following filament loading macro that works for me:

    M302 P1				; enable cold extrusion
    M201 E1000			; reduce extruder acceleration
    M915 P3 S10 F0 R0		; set stall detection threshold
    M913 E100			; set extruder motor to reduced % current
    M83				; relative extrusion
    G1 S1 E800 F3600		; move fast 500mm of filament
    M913 E100			; set extruder motor to full current
    M302 P0				; disable cold extrusion
    G1 E50 F300			; extrude slowly 50mm of filament
    M98 Pset_accel.g		; restore acceleration values

    set_accel.g is used to set working accelerations for all axes after sensorless homing of X and Y. It has the following content:

    M201 X2000 Y2000 Z100 E9000		; Accelerations (mm/s^2)

  • Looks good, thanks for sharing!

    One question, when or where do you set the temperature? I see you disable cold extrusion and then extrude slowly?

  • administrators

    I'm glad you have found this feature useful.

    @sigxcpu said in Filament loading with stall detection:

    M913 E100 ; set extruder motor to reduced % current

    I see you are using full current (100%) when loading filament. That's OK if you have tuned the normal extruder motor current so that the motor stalls before the hobbed shaft grinds the filament. Otherwise, you should use reduced current during the loading move.

    Note, M913 does not wait for all moves to finish before it is executed, to allow it to be used in a power fail script. Therefore you should normally use M400 immediately before M913.

  • @dc42 : Ya, that was 50%, failed instantly, 60, 70... 100. Then I've realized that the problem is the same as I've had on X and Y: too much acceleration seen as stall. Didn't bother to put that back to a lower current because it works, but I've left the line there for others to tweak to their needs. On "M400", noted and added. Thanks!

    @timcurtis67: I usually handle temperatures manually. Hotend is in slic3r, bed manually. This macro is done for when your hotend is already at temperature. The M302 P0 there for slow extrusion without stall detection is just as a precaution if you forgot to heat the extruder.
    Maybe that part should also be under S1, I don't know. Put that on my printer today, based on a previous thread handled by @dc42.

Log in to reply