Learning to 3D print in multicolor

My wife is a "Dead Head", a follower of the Grateful Dead and, lately, Dead and Company.  Of course one of the first things I printed was something for her, a Grateful Dead Dancing Bear cookie cutter.  After a month of printing, I was looking for a meaningful project I could 3D print for her a custom Valentine's Day present when I came across a project by a user, dneujahr, on Printables with a 3D Grateful Dead Coaster.  He showed it printed using three colors, red, white and blue, but provided instructions for building it on a different machine than I have and those instructions didn't work on my Anycubic Kobra Max.  After three weeks I am finally able to consistently print a nice three color 3D rendering by programming my printer and have made as set of unique coasters for my (happy!) wife!

Starting out was very frustrating.  None of the Anycubic literature mentioned changing filaments, and a Google search quickly sent me into the bowels of Reddit looking for tips from other users (usually with other printers).  I made a monocolor test print to see what the print was supposed to look like.

After weeks of trial and error, I found a YouTube video saying to use the slicer software (I'm using Ultimaker's Cura) to scroll through and look at where the layers change, look in the gcode (see an excerpt of the gcode instructions in my earlier posting) to figure out the time at that layer, manually pause the printer and quickly swap the filaments.  Using his tips on quickly swapping filaments (by releasing a lever then pulling out the first filament while paused before pushing the new one in and hitting resume) I was able to make a two tone Stealie coaster:

Of course, this is painful to have to wait and manually pause, since you never know where the print head will end up and the new color will begin.  After an unanswered support inquiry to Anycubic (EDIT-their reply that they would be out for several days due to the Lunar New Year ended up in my Spam folder!), I plunged further into Reddit and other on-line forums.  Finally, I stumbled across some instructions related to generating gcode commands to Pause, and how to manually edit certain commands.  The slicer software I'm using, UltiMaker Cura version 5.6.0, has the ability to run some plugin scripts, including the Pause at Height script (available under Extensions/Post Processing/Modify G-Code on the Cura menu below) specifying the layer desired, then doing the quick filament swap while paused.  Cura allows you to put in a beep when pausing and retracts the print head a couple of centimeters to allow cleaning the nozzle when the new color starts extruding.

Cura instructions to Pause at Height at Layer 21

I entered one Pause at Height command to pause for the Red -> Blue change and another for the Blue -> White change, edited the gcode to give a 1000 ms beep then pause for 120 seconds.  I'm using a Mac, so used the text editor BBEdit (trial version through the App store); on Windows you could use Notepad++ (free; Google it); DO NOT USE MICROSOFT WORD or other "text editors" (like Windows Notepad or TextEdit on the Mac) because they introduce strange characters the printer may not like.  Here's a sample of the code added by the Pause at Height script (I entered the "CHANGE TO BLUE" in Cura's editor, which showed up on the line with the gcode command M117, which "Sets LCD Message"; it doesn't display on the Kobra Max's console or anything like that but it's useful as you're searching through 100,000 lines of code!).  Note-According to the dictionary of gcode commands on Marlin's site, the M0 is an unconditional stop so I had to manually add the timer (S120) in order for it to programmatically end; the M300 is the command to beep, so I set the duration to 1000ms (below) or 500ms for the layer repeats:

Using this approach, and setting a timer on my phone to be sure I'd be near the printer ~2 1/2 hours after the print started, I was able to generate tricolor 3D prints in about 3 1/2 hours (plus ~half an hour for cooling, removal, surface cleaning and filament swap before starting another).


Emboldened, I tried pushing my luck, using my Anycubic Kobra Max's large printer capacity to try to mass produce coasters to meet my Valentine's Day goal. 

Unfortunately, after this almost 8 hour print, many of these prints had areas of the blue missing or other imperfections, with the red showing through.  

I realized I needed to increase the thickness of the layers printed with blue.  Also, my. wife complained the white layer wasn't thick enough, looking "gray" because the blue was bleeding through from below.  After more time spent deep inside the bowels of Reddit I finally found an answer:  the Cura Pause at Height script includes an option to repeat a layer.  I modified the gcode and tried printing more, but ended up with a lot of prints where the printer just froze when starting the white or switching from red to blue.  After more trial and error, I recognized the pause and repeat layer might have a problem because the print head was cooling down while waiting, so I edited the gcode again to tell it to keep the print head warm while waiting.  This finally worked, and I've printed a full set of coasters for my wife like the one shown at the top of this page.  The trick was to repeat a blue layer and then later to repeat a white layer so the top layer didn't look "gray".  Here's a summary of my current workflow:

Change standby temp from 190 to 195 (“Wait for resume temp” = 195)


(gcode highlighted in the picture above)

Layer 21 @ 9116 sec

2 hr, 32 min

CHANGE TO BLUE

M104 S195; Standby temp

M0 S120


Layer 23 @ 9718 sec

2 hr 42 min

DO NOTHING (repeat BLUE LAYER)

M104 S195; Standby temp

M0 S60


Layer 25 @ 10236 sec

2 hr 50.6 min

CHANGE TO WHITE
M104 S195; Standby temp

M0 S120


Layer 33 @ 11866 sec

3 hr 18 min

DO NOTHING (repeat WHITE LAYER)

M104 S195; Standby temp

M0 S60


Total time (without pauses) estimated by Cura as 3 hrs 21 mins (clock time closer to 3:45 or 3:50 including pauses)


I changed the beep to 500 ms for the layer repeats and 1000 ms when I need to change filaments, but really it's just a matter of sitting by the printer when the 2 hr 30 minute timer goes off and waiting for the beep then coming back ~20 minutes later.  I only need to intervene at the Layer 21 CHANGE TO BLUE and Layer 25 CHANGE TO WHITE; the other 60 second pauses resume without any intervention (since I'm now keeping the standby temperature elevated).


If found with my Anycubic Kobra Max that the printer beeps a couple of times as soon as I pull the filament past the detector.  As long as I can quickly insert the new filament, pressing it ahead to extrude some of the old color and removing the extruded threads with forceps, I can get the new filament place within the two minute pause.  After two minutes, the printer beeps and retracts, waiting for me to finish inserting the new filament.  I have to clear the warning on the control screen, then press Resume on the screen for the print to start again.


I'm writing down all my detailed instructions and giving code examples because nothing I found on the Anycubic site nor the Ultimaker Cura site really showed how to print multicolor on the Ultimaker Kobra Max.  It can be done, with some patience.  I'm happy with the 3D results, and eager to find ways to expand this for custom rockets or other projects.  I recently saw a posting on Facebook of some adventurous soul who generated an 8-color print of the character, Carl from the movie Up!   I'm not sure I'm that ambitious but the bar is set pretty high.  Looking closely at his print on the left showing the "tree supports", it's clear he's printing a test column behind "Carl" and using that as a way to manually pause for filament changes when the print head is finished working on Carl.  Anyway, I hope this write-up helps someone.  Drop me an email or post a comment if you have questions.


Update:  The morning after I posted this, I saw an article dated Feb. 20, 2024 in The NY Times' Wirecutter section on the "3 Best 3D Printers" which includes a picture of a small printer with four print heads and the ability to automatically change colors!  The printer itself, a Bambu Lab A1 Mini, I pretty small (7" bed) and retails for $459.  The multicolor add-on "costs $200 in a bundle with the A1 Mini or $250 by itself. (Note, however, that it works only with the Bambu Lab A1 series of printers.)".  They add that "You can load up to four different filaments onto the AMS Lite, and if they’re Bambu Lab filaments, the printer automatically scans the RFID tags inside and recognizes the material; the Bambu Studio software also recognizes the material and lists it as an option for multicolor printing."  The total cost for a four print head (small) printers is $659 if purchased together, plus there may be an additional cost associated with using the vendor's RFID tagged filaments.  Still, if I were artistically inclined instead of just trying to build cool rockets I might consider going down this path in the future.  For now I'm happy with my Anycubic Kobra Max because it's got the capacity I need and I've figured out how to do custom stuff like printing these Stealie coasters for my wife and her friends.

Comments

Popular posts from this blog

3D printing a rocket no longer produced using OpenRocket

Resurrecting my X-15 with my scratch STRETCH X-15

Building my SpaceX BFR