For several years already, I own a Creality Ender 3 V2 printer. I upgraded it with a few parts here and there, a built-in Raspberry Pi for Octoprint, stiffer bed leveling springs, built-in lights and so on. My main focus are technical parts, mostly designed myself in Fusion 360, so the majority of my prints are single color models and the occasional multi-color print by switching filaments at a fixed layer height. Recently, I finally wanted to try real multi-color printing with color changes in a layer.
The new box I need for my UNO game came in handy as a test subject. The model has a nice logo inlayed into the top lid and is inteded for multi-color printing. To get such a print to work, the slicer needs to be set up correctly. The trick is to tell the slicer that multiple extruders for multiple colors are available and in such a way that Octoprint understands what is meant.
A profile for manual multi-color printing in Cura
The default Ender 3 / Ender 3 V2 profile in Cura cannot be set up with multiple extruders. It is possible to edit the settings file but I prefer to set up a new custom printer (“Custom FFF printer” in Cura).
Most of the settings of this new printer can be copied over from the default Ender 3 / Ender 3 V2 profile. Just the number of extruders must be extended to the required number of colors, four in this case.
For reference, this is the default start and end g-code:
start g-code
1 2 3 4 5 6 7 8 9 10 11 |
; Ender 3 Custom Start G-code G92 E0 ; Reset Extruder G28 ; Home all axes G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line G92 E0 ; Reset Extruder G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish |
end g-code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
G91 ;Relative positioning G1 E-2 F2700 ;Retract a bit G1 E-2 Z0.2 F2400 ;Retract and raise Z G1 X5 Y5 F3000 ;Wipe out G1 Z10 ;Raise Z more G90 ;Absolute positioning ;G1 X0 Y{machine_depth} ;Present print M106 S0 ;Turn-off fan M104 S0 ;Turn-off hotend M140 S0 ;Turn-off bed M84 X Y E ;Disable all steppers but Z ; Script based on an original created by tjjfvi (https://github.com/tjjfvi) ; An up-to-date version of the tjjfvi's original script can be found ; here: https://csi.t6.fyi/ ; Note - This script will only work in Cura V4.2 and above! ; --- Global Settings ; layer_height = {layer_height} ; smooth_spiralized_contours = {smooth_spiralized_contours} ; magic_mesh_surface_mode = {magic_mesh_surface_mode} ; machine_extruder_count = {machine_extruder_count} ; --- Single Extruder Settings ; speed_z_hop = {speed_z_hop} ; retraction_amount = {retraction_amount} ; retraction_hop = {retraction_hop} ; retraction_hop_enabled = {retraction_hop_enabled} ; retraction_enable = {retraction_enable} ; retraction_speed = {retraction_speed} ; retraction_retract_speed = {retraction_retract_speed} ; retraction_prime_speed = {retraction_prime_speed} ; speed_travel = {speed_travel} |
My end g-code contains some commented lines that are required for Octolapse to work with Cura. The rest is just the default start and end codes.
The actual work is setting up the extruders. There are various postprocessing scripts out there to handle color changes but I want to keep it simple and just use custom g-code. Since the stock firmware on the Ender line of printers does not support the M600 filament change command, a combination of other commands must be used. At the moment, I don’t yet want to jump into compiling my own Marlin firmware with which new commands can be enabled.
The alternative to M600 can look like this:
1 2 3 4 5 6 7 8 9 10 |
;M600 E-30 L300 X10 Y10 ;M600 is not supported by default Ender3 Marlin G91 ;relative positioning G1 E-50.0 F2700 ; retract filament G1 Z50 ;raise Z G90 ;absolute positioning G1 X110 Y0 ; move to convenient location @pause ; tell Octoprint to pause for manual filament change |
The order of operation is the following:
- retract the filament by 50mm so it can be more easily pulled out
- move the print head up by 50mm to be far away from the print, not contaminate it with oozing filament and minimize the risk of touching the print during the filament change
- move the print head to the front center of the bed, so I don’t have to reach over the print to get to the extruder
- pause the print to manually change filaments
This script must be set as the end g-code for all configured extruders. The screenshot shows it for just the first extruder. (At this step, don’t forget to set the diameter to 1.75mm. Otherwise Cura won’t show the 1.75mm filament profiles.)
Multi-color slicing in Cura
With the profile set up, it is now only necessary to select a filament for each extruder and select which part of the model should be printed with which filament.
As with every new printer profile, a new print settings profile should be created or at least special care should be taken to check the default settings. For example, I want to keep the printer hot during the quick filament changes, so I needed to adjust “standby temperature” to 200°C but this setting was not shown with my standard “setting visibility” setting. Also note that such changes must be done for all extruders, not just the first one.
Printing
Octoprint will complain a bit when printing g-code produced in this way. Since the printer does not actually have multiple extruders, Octoprint complains that tools “T0”, “T1”, … do not exist. Just ignore that and it works fine otherwise.
At each color change, the hot end will move to the specified convenient location and Octoprint pauses the print. After manually changing filaments, just press “continue” in Octoprint and it will continue until the next color change or the end of the print.
Keep attention which color is next and check against the Cura preview what parts of the model are printed next. It is easy to loose track of which color was printed already and which color comes next. Also, the color sequence can be out of order to reduce the number of filament changes.
With this setup the prints turn out quite well and the logo for my box looks good even though I ran out of red and yellow filament and had to resort to blue.