top of page

; - 3D Chameleon Mk4 Tool T{next_extruder} -

;begin switch from extruder {previous_extruder} to extruder #{next_extruder}

M117 Unloading Tool T[previous_extruder]

M83 ; turn relative distances for the extruder

; unload extruder {previous_extruder}

G92 E0

; go to holding position to unload the stock extruder


; if this is the first load, then don't unload

G91 ; move to relative mode


; load extruder #{next_extruder}

M117 Loading Tool T{next_extruder}

{if previous_extruder>-1}

; back out the filament for cutting

G0 E-20 F500 ; retract a bit, adjust this to tune waste

; <<<< insert mechanical cutter code here! >>>>

;<<< Start Of Tip Shaping- Remove If No Cutter! >>>

M109 R180; cool down to prevent swelling

M302 S0 ; enable cold extrusion

M106 S255

G0 E20 F1500 ;

G0 E-5 F500 ;

M109 R165; cool down to prevent swelling

G0 E5 F1500 ;

G0 E-1 F500 ;

M109 R155; cool down to prevent swelling

G0 E1 F1500 ;

G0 E-25 F500 ;

M109 R150; cool down to prevent swelling

G0 E24 F1500 ; last tip dip with cold tip

G0 E-24 ; last tip dip with cold tip

M109 R180; ok... go back up in temp so we can move the extruder

G0 E-80 F500 ; back out of the extruder

G92 E0

M104 S[temperature];

;<<< End Of Tip Shaping >>>

; we skipped to here if it was extruder -1


{if previous_extruder>-1}

; retract it back out of the extruder


G0 E-30 F2000 ; <<<---- if mechanical cutter, change to a positive value of at least 5mm

G92 E0

; ok - out of extruder - press button to remove it all the way

G91 ; move to relative mode


; we skipped to here if it was extruder -1


; press the button to select the new extruder


{if next_extruder==0}

G4 P500 ; dwell for .5 seconds - adjust this to match your machines single pulse time


{if next_extruder==1}

G4 P1000 ; dwell for 1.0 seconds - adjust this to match your machines two pulse time


{if next_extruder==2}

G4 P1500 ; dwell for 1.5 seconds - adjust this to match your machines three pulse time


{if next_extruder==3}

G4 P2000 ; dwell for 2.0 seconds - adjust this to match your machines four pulse time



G4 P2000 ; wait for cutter to work

; ok command selected - back out filament if needed after cut

{if previous_extruder>-1}




G92 E0

G90 ; move back to absolute mode

M83 ; but make sure the extruder stays in relative

; reload filament all the way into extruder


M83 ; turn relative distances for the extruder

M302 S180 ; prevent cold extrusion

M117 3D Chameleon Tool T{next_extruder}

Mk4 GCode Generator

Button Axis (X, Y or Z)

Button Location (mm)

Extruder to Hotend (mm)

Mk4 Theory of Operation

Once generated, copy and paste this code into your slicer's Tool Change GCode block.

The Mk4 Firmware uses a new method to allow color changing with a single button press to select a color, and then up to two additional buttons presses to move the filament. The 3D Chameleon is used in conjunction with your stock extruder, and allows for the Y adapter to be placed any distance from the hotend. This is the most flexible installation as it allows both an infinite number of 3DChameleons to be used, but also allows them to be placed anywhere away from the printer.

The first button press works by timing (with vibration feedback every .5 seconds) to allow you to "count" the command.

Filament changing always works the same in any mode.  To select an extruder, simply press the button for a total time of .5 seconds per extruder number. (For example, to select Extruder 3, multiply 3 times .5 seconds = 1.5 seconds.)  So, pressing the button for .5 seconds selects the first extruder, 1 second selects the second extruder, 1.5 seconds selects the 3rd extruder and 2 seconds selects the 4th extruder.  


To actually move the filament once a color is selected, the 3DChamelon needs an additional button press for some number of seconds, where that number is 1" (or 2.5cm) per second, to unload the previous filament... and a third button press to load the filament, one second for each 1" of movement required to load it into the extruder.  For example, to unload extruder 1 (T0) by 15 inches and load extruder 4 (T3) by 16 inches, you should press for 2 seconds, let off, then press for 15 seconds to unload extruder 1 (T0), and finally press for 16 seconds to load extruder 4 (T3).  (Note: On the very first filament load after homing, becuase the extruder isn't already loaded, the unloading button press is not needed and is skipped.  The tool change gcode automatically handles that starting condition.) 

While the button is pressed, each half of a second, the selector motor will vibrate, indicating the pointer to the next command.

The commands are as follows.

1st Pulse - Unload current and load T0 (or Extruder 1)
2nd Pulse - Unload current and load T1 (or Extruder 2) 
3rd Pulse - Unload current and load T2 (or Extruder 3)
4th Pulse - Unload current and load T3 (or Extruder 4)

5th Pulse - Home and load T0 - can be used in Start GCode to load the first filament
6th Pulse - Unload current and Home - can be used in the End GCode to unload the last used filament
7th Pulse - Home Only (no filament movements)


8th Pulse - Move to "Next" Filament

9th Pulse - Move to "Random" Filament

No additional commands are supported.  The Mk4 also supports the Auto 3DClippy servo filament cutter and will automatically be initiated if it is present.  In addition, and optional OLED display can be plugged into the main board to display the current status of the 3DChameleon.

Note: At this time, the Mk4 only supports PrusaSlicer and it's various forks.  PrusaSlicer is the only slicer that is continuously updated to include fantastic features for multi-material and multi-color users. See below for the Theory of Operations.

Backout Distance in Seconds

bottom of page