Jump to content

Changing Filament color mid-print Ender 3 Pro

Go to solution Solved by GregValiant,

Recommended Posts

Posted · Changing Filament color mid-print Ender 3 Pro



I have an Ender 3 Pro and I've been trying to get it to pause mid-print so I can change the filament and create multi-colored prints. I've watched many tutorials online describing how to do this in Cura, but I've had no success. Most of the tutorials online say either to use a Filament change post processing script or a Pause at height script. I've tried the Filament change script and my printer just simply ignores it and continues printing. I suspect my printer does not recognize the gcode used to create the pause. With the Pause at height script it does indeed stop printing and go to the set position, but about 10 seconds later it continues printing. I've set the Disarm Timeout parameter to it's max (1800) but it still doesn't wait for me.


I have considered re-installing the firmware of my printer to better recognize these gcode commands, however I wish there was an easier way. I've attached my project file which includes a quick and easy print I was using for testing. Any ideas on how to troubleshoot?


project file.3mf

  • Link to post
    Share on other sites

    • Solution
    Posted · Changing Filament color mid-print Ender 3 Pro

    Some history...

    About 2 years ago Creality made a switch from regular LCD displays to TFT LCD displays.  When they did that the mainboard no longer talked correctly with the TFT video board.  All commands that send messages to the display quit working.  M0, M1, M117 and a couple of others were simply ignored during a print.  The "10 second delay" you are experiencing is because the PauseAtHeight script inserts an M109 temperature command right after the pause command.  It's the M109 "wait for temperature" that is the delay.  It really isn't pausing at all.


    Workaround #1 is to use the "(BQ) M25" command.  With some firmware it works OK...the print pauses and you select Resume on the LCD.  With other firmware (no way to tell because Creality never said anything) the print will pause but you have to select "Pause" on the LCD and then select Resume.  You will have to test to find out.


    When using the M25 command you may find the following necessary:

    In the "Gcode Before Pause" box in the PauseAtHeight settings but "M400".

    In the "Gcode" After Pause" box put "M117,M117,M117,M117,M117,M117" (six M117's separated by commas).  Some of the Creality firmwares are configured to pause after clearing the print buffer and that can cause problems with the Z not returning to the correct resume height.  Adding the six M117 fills the printer input buffer with commands that don't do anything but they do push the Z moves further down the Gcode so the M25 won't clear them.

    • Like 2
    Link to post
    Share on other sites

    Posted · Changing Filament color mid-print Ender 3 Pro

    Thanks Greg!


    That seemed to work pretty well. It moved off to the set position and the LCD displayed, "Print Paused." However, I did have a little trouble un-pausing it. I went into the ender 3 menu to select, "Resume Print" but it just said, "Pause Print" instead. I went ahead and "paused" it (even though it was already paused) and then after that I could Resume Print. Not a huge problem but still a little inconvenient. Once the print was resumed the printhead went back to printing but right before that it squirted 25mm of extra filament onto the print. I assume this was because I had set a retraction of 25mm before the pause and it was extruding the filament back even though I had already pushed it through manually. The easiest way to fix this problem would be to just have no retraction. But I need it to retract... right?


    Other than that it worked great! Thanks!


  • Link to post
    Share on other sites

    Posted · Changing Filament color mid-print Ender 3 Pro

    I handle the retractions by setting everything to "0" in Pause at Height.  After I shove enough of the new material through the nozzle to complete the color change, I do a 3mm hand retraction.  I get really good restarts like that.  It's still best if the restart is within support or infill but that just isn't always possible.


    Another thing that happened at Creality at that time was they ran out of mainboards for the Ender line.  They started throwing whatever mainboard they had into them so some Ender 5's and Ender 3's shipped with CR10 mainboards and firmware.  Not good.


    Since it's possible that your firmware has M0 enabled but won't talk to your LCD then upgrading/changing the mainboard firmware may not fix the problem.  I have no idea if the video system firmware can be changed but I have a gut feeling that the problem lies there.

  • Link to post
    Share on other sites

    Posted · Changing Filament color mid-print Ender 3 Pro

    I did that step and sometimes it works but NOT always...

    What's wrong on my code?


    G0 F300 X65.022 Y35.29 Z0.6
    G0 F9000 X65.1 Y35.228
    G0 X63.635 Y33.58
    G0 X64.531 Y32.684
    G0 X62.901 Y31.055
    G0 X61.066 Y29.568
    G0 X59.085 Y28.282
    G0 X56.981 Y27.209
    G0 X54.775 Y26.363
    G0 X52.493 Y25.751
    G0 X50.16 Y25.383
    G0 X47.802 Y25.258
    G0 X45.444 Y25.383
    G0 X43.11 Y25.751
    G0 X40.829 Y26.363
    G0 X38.623 Y27.209
    G0 X36.518 Y28.282
    G0 X34.538 Y29.568
    G0 X32.702 Y31.055
    G0 X31.349 Y32.408
    G0 X30.104 Y33.871
    G0 X32.565 Y35.861
    ;added code by post processing
    ;script: PauseAtHeight.py
    ;current layer: 4
    M83 ; switch to relative E values for any needed retraction
    G1 F300 Z1.6 ; move up a millimeter to get out of the way
    G1 F9000 X190 Y190
    G1 F300 Z15 ; too close to bed--move to at least 15mm
    M104 S0 ; standby temperature
    M25 ; Do the actual pause
    M109 S200 ; WAIT for resume temperature
    G1 F300 Z0.6
    G1 F9000 X32.565 Y35.861
    G1 F300 Z0.6 ; move back down to resume height
    G1 F1500 ; restore extrusion feedrate
    M82 ; switch back to absolute E values
    G92 E302.54289
    G1 F1500 E309.04289
    G1 F1522.8 X32.686 Y35.765 E309.04441
    G1 X32.812 Y35.805 E309.04571
    G1 F1546.4 X33.397 Y36.269 E309.05293
    G1 F1562.5 X33.458 Y36.357 E309.05396

  • Link to post
    Share on other sites

    Posted (edited) · Changing Filament color mid-print Ender 3 Pro

    I HATE when things are "not always".

    If "M0" doesn't work on your printer then using "M25" the way you have it is the next best option.  I don't see anything actually wrong with the code.


    You are using "M109" for the "resume temperature" command.  M109 can cause a 10 second delay even if the temperature is up to the set point.  Since your standby temperature is "0" and because of the M109, the printer may not actually be pausing.  It might just be taking a short break while waiting for the temperature to come back up.


    Unfortunately this is a firmware problem.  You will need to keep experimenting to find a combination that works with your specific printer.

    There have been certain Creality printers that (along with the "M0 doesn't work" problem) require that after pausing with M25 the user must select "Pause" on the LCD before selecting "Resume".  Even on those machines the M25 in the gcode does pause the print.


    I would make a couple of suggestions.  You need to confirm that the printer is actually pausing and that it isn't just the temperature command faking you out.  (it's part of that "not always" thing).


    Make sure the "Disarm Timeout" of the steppers is at least 1800 seconds.  You should see M84 S1800 in your gcode just before the pause command.

    Set the "standby temperature" to your printing temperature of the next material.

    Use M104 as the "resume temperature" command.


    Slice something small and do a pause at a low layer.  You can pull the filament out of the printer so you don't waste it.  Then print the new gcode and watch to see if it is actually pausing.  It should just sit there waiting patiently for a button click on the LCD.  If it is still sitting after about 10 minutes, then it paused.  If it just stops for a bit and resumes by itself then the M25 didn't really work.


    One of the oddities about "M0 doesn't work" is that other commands that send messages to the LCD don't work either.  That means your M117 buffer-fill lines could be a problem.  Use M105 instead.  It doesn't send a message to the LCD, it just asks the printer to report the current temperature.


    Edited by GregValiant
  • Link to post
    Share on other sites

    Posted · Changing Filament color mid-print Ender 3 Pro
    2 hours ago, GregValiant said:

    One of the oddities about "M0 doesn't work" is that other commands that send messages to the LCD don't work either.

    Not really an oddity. Just that Creality's firmware puts itself front and centre and covers the whole screen, even if you're printing over USB in which case it just stays on the menu screen.


    Definitely not something I'm a fan of, fortunately there's on OctoPrint plugin which displays what should be on the printer's screen (if the printer wasn't so arrogant as to keep the whole screen to itself) so if I'm watching the print progress (to see how long until the next filament change) I can see what I'm supposed to be doing.


    Although sometimes the low-tech approach is the best: get a sticky note, write down the order of colours you need, stick it next to the printer, and cross each one off when you change.

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
          • Like
        • 26 replies
    • Create New...