Cold Pull G-Code and Explanation

Custom G-Code to conduct a cold-pull of your filament
12m
2× print file
0.20 mm
0.40 mm
2.00 g
12
52
0
693
updated April 21, 2024

Description

PDF

DISCLAIMER: Use at your own risk! Not responsible for damage to your printer or accessories!

 

Owning a Prusa Mini+, I have always been frustrated by partial and full nozzle clogs because you have to take the bowden tube off to do a cold pull.  So after some time I developed these custom G-Codes to do all that for me.  

There are two versions available: a quick pull (40mm pull-out) and a gradual pull, step by step pull with increasing temperature.  The gradual pull is great for bowden tube printers, as it gradually tensions the filament and heats up the nozzle, resulting in a “soft” release., however it may not pull all the filament and debris out.

The quick pull just yanks it out with no respect for your printer - use at your own risk!

I have found that 90°C nozzle temperature works the best for my printer, but I would recommend starting at a higher temperature and working your way down to 90°C to see what your extruder can handle.

Important: Always clean / cut off excess filament on the outside of your nozzle, otherwise it will break off inside the nozzle and it will not result in a clean cold-pull:

 

The Quick Cold Pull Code:

Here is the basic principal of operation:

  1. The printer waits until 50°C is reached (cool-down or heat up)
  2. Raise the temperature to 90°C (or whatever temperature you set)
  3. Pull back 40mm of filament
  4. Trigger the printer's unload filament function.

Please take time to understand the code and what it does.  I have commented most of the steps to help.

Setting the cold-pull temperature

This is the setting you need to edit to change the cold-pull temperature:

; + - - - - Set your cold-pull temperature here! - - - - +
; Now set the nozzle temperature.  S90 means 90°C. S120 means 120°C.  Adjust this value for your desired cold-pull temperature 
M109 S90 ; Wait until working nozzle temperature reached
; + - - - - - - - - - - - - - - - - - - - - - - - - - - +

Setting how much is pulled

Edit the extruder value to increase or decrease the amount of filament you want the extrude to pull during the cold-pull:

; Now do the pull.  Back off 40mm in one shot. May break the machine, use with caution.
G1 E-40 F5000 ; retract out of the hot zone completly now.

So change the -40 (meaning 40 mm pulled back out) to the desired distance you require.  

 

The Gradual Pull Code (For Bowden Systems)

Here is the basic operational principal:

  1. The printer waits until 50°C is reached (cool-down or heat up)
  2. Raise the temperature to 90°C (or whatever temperature you set)
  3. Pull out 3mm of the filament (will pre-tension the bowden tube)
  4. Heat up to 100°C
  5. Pull another 1 mm of filament
  6. Heat up to 110°C
  7. Pull another 1 mm of filament
  8. Heat up to 120°C
  9. Pull another 1 mm of filament
  10. Heat up to 140°C
  11. Pull another 1 mm of filament
  12. Heat up to 160°C
  13. Pull another 1 mm of filament
  14. Trigger the printer's Unload Filament function.

Setting the initial pull temperature

This is the setting you need to edit to change the initial pull temperature:

; + - - - - Set your starting cold-pull temperature here! - - - - +
; Now set the temperature.  S95 means 95°C.  Adjust this value for your desired starting temperature 
M109 S95 ; Wait until working temperature reached
G4 P5000 ; Pause for 5 seconds to ensure consistant temperature
; + - - - - - - - - - - - - - - - - - - - - - - - - - - +

So change the S95 (95°C) to whichever temperature you need.

Setting how much is pulled

Edit the extruder value to increase or decrease the amount of filament you want the extrude to pull during initial the pull:

; Now do the pull.  E-3 means retract by 3mm.
G1 E-3 F400 ; Pre-load the filament by retracting it 3mm

Edit the values for the remainder of the steps:


; + - - - - Set your step temperatures and extruder distances here! - - - - +
M109 S100  ; Wait until next temperature step is reached
G1 E-1.0 F400 ; Retract again
M109 S110  ; Wait until next temperature step is reached
G1 E-1.0 F400 ; Retract again
M109 S120  ; Wait until next temperature step is reached
G1 E-1.0 F400 ; Retract again
M109 S140  ; Wait until next temperature step is reached
G1 E-1.0 F400 ; Retract again
M109 S160  ; Wait until next temperature step is reached
G1 E-700 F1000 ; retract out of the hot zone completly now.
; + - - - - - - - - - - - - - - - - - - - - - - - - - - +

 

Thats it!

 

Tags



Model origin

The author marked this model as their own original creation.

License