Configuring mixing hot end on a tool changer
-
I have built a core xy tool changer that currently has 3 tools. The first two are standard nozzles however the third is a 2 in 1 out mixing nozzle. I have a few questions about how to configure it. I took the suggestions made in this post to define the mixing nozzle as 3 separate tools. (100% of one color, 100% of the second color and 50% of each). Since my printer is a tool changer I was wondering what is the best way to handle the tpre/tpost/tfree files since tools 2, 3 and 4 are all the same extruder setup. Is there an easy way for the firmware to recognize if the any of those three tools is needed to just pick up the mixing assembly? Is there some way to have like tool 2.0, 2.1, 2.2? (I do plan on adding even more tools later on as well) Secondly, I know in Marlin on the LCD you can set the mix ratio to change automatically over a set Z distance, does this functionality exist in RRF?
Here is my current config.g file
; Configuration file for RepRapFirmware on Duet 3 Main Board 6HC ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.5.0-rc.3 on Fri Mar 15 2024 11:41:50 GMT-0400 (Eastern Daylight Time) ; General M550 P"Duet 3" ; set hostname ; Accessories M575 P1 S0 B57600 ; configure PanelDue support ; Network M551 P"Knights24" ; set machine password M552 P0.0.0.0 S1 ; configure Ethernet adapter M586 P0 S1 ; configure HTTP ; Smart Drivers M569 P0.0 S1 D2 ; driver 0.0 goes forwards (X axis) M915 P0.0 S1 ; set StallGuard threshold M569 P0.1 S0 D2 ; driver 0.1 goes backwards (Y axis) M915 P0.1 S1 ; set StallGuard threshold M569 P0.2 S0 D2 ; driver 0.2 goes backwards (Z axis) M915 P0.2 S1 ; set StallGuard threshold M569 P0.3 S0 D2 ; driver 0.3 goes backwards (Z axis) M915 P0.3 S1 ; set StallGuard threshold M569 P0.4 S1 D2 ; driver 0.4 goes forwards (U axis) M915 P0.4 S3 ; set StallGuard threshold ; was 2 M569 P0.5 S1 D2 ; driver 0.5 goes forwards (extruder 0) M569 P1.0 S1 D2 ; driver 0.5 goes forwards (extruder 1) ; Motor Idle Current Reduction M906 I10 ; set motor current idle factor M84 S10 ; set motor current idle timeout ; Axes M584 X0.0 Y0.1 Z0.2:0.3 U0.4 ; set axis mapping M350 U16 I0 ; configure microstepping without interpolation M350 X16 Y16 Z16 I1 ; configure microstepping with interpolation M906 X900 Y900 Z900 U400 ; set axis driver currents M92 X160 Y160 Z400 U200 ; configure steps per mm M208 X0:265 Y0:325 Z0:300 U0:150 ; set minimum and maximum axis limits M566 X450 Y450 Z20 U2 ; set maximum instantaneous speed changes (mm/min) ; u was 30 M203 X9000 Y9000 Z180 U5000 ; set maximum speeds (mm/min) M201 X350 Y350 Z20 U500 ; set accelerations (mm/s^2) ; Extruders M584 E0.5:1.0:1.1:1.2; set extruder mapping M350 E16:16:16:16 I1 ; configure microstepping with interpolation M906 E1000:900:900:900 ; set extruder driver currents M92 E420:873.08:873.08:873.08 ; configure steps per mm M566 E120:120:120:120 ; set maximum instantaneous speed changes (mm/min) M203 E3600:3600:3600:3600 ; set maximum speeds (mm/min) M201 E250:250:250:250 ; set accelerations (mm/s^2) ; Kinematics M669 K1 ; configure CoreXY kinematics ; Probes M558 K0 P9 C"io4.in" H5 F120 T6000 ; configure BLTouch probe via slot #0 G31 P500 X4 Y-70 Z0.7 ; set Z probe trigger value, offset and trigger height ; p was 500 M950 S0 C"io4.out" ; create servo #0 for BLtouch ; Endstops M574 X1 S3 ; configure X axis endstop M574 Y1 S3 ; configure Y axis endstop M574 Z1 S2 ; configure Z axis endstop M574 U1 S3 ; configure U axis endstop ; Mesh Bed Compensation M557 X15:245 Y20:215 S40 ; probe from X=10 to 245, Y=10 to 245mm with a mesh spacing of 40mm ; Sensors M308 S0 P"temp0" Y"thermistor" A"Heated Bed" T100000 B4725 C7.06e-8 ; configure sensor #0 M308 S1 P"temp1" Y"thermistor" A"Hemera" T100000 B4725 C7.06e-8 ; configure sensor #1 M308 S2 P"1.temp0" Y"thermistor" A"Bowden" T100000 B4725 C7.06e-8 ; configure sensor #2 M308 S3 P"1.temp1" Y"thermistor" A"Mixing" T100000 B4725 C7.06e-8 ; configure sensor #3 M915 X Y S1 R3 F1 ; stall detection paramaters ; Heaters M950 H0 C"out0" T0 ; create heater #0 M143 H0 P0 T0 C0 S140 A0 ; configure heater monitor #0 for heater #0 M307 H0 R0.401 K0.333:0.000 D13.12 E1.35 S1.00 B0 ; configure model of heater #0 M950 H1 C"out1" T1 ; create heater #1 M143 H1 P0 T1 C0 S300 A0 ; configure heater monitor #0 for heater #1 M307 H1 R1.804 K0.293:0.000 D9.68 E1.35 S1.00 B0 V24.1; configure model of heater #1 M950 H2 C"1.out1" T2 ; create heater #2 M143 H2 P0 T2 C0 S285 A0 ; configure heater monitor #0 for heater #2 M307 H2 R2.138 K0.330:0.159 D5.61 E1.35 S1.00 B0 V24.4; configure model of heater #2 M950 H3 C"1.out2" T3 ; create heater #3 M143 H3 P0 T3 C0 S245 A0 ; configure heater monitor #0 for heater #3 M307 H3 R2.138 K0.330:0.159 D5.61 E1.35 S1.00 B0 V24.4; configure model of heater #3 ; Heated beds M140 P0 H0 ; configure heated bed #0 ; Fans M950 F0 C"out5" ; create fan #0 M106 P0 S0 L0 X1 B0.1 ; configure fan #0 M950 F1 C"out4" ; create fan #1 M106 P1 S0 B0.1 H1 T45 ; configure fan #1 M950 F2 C"1.out3"; create fan #2 M106 P2 S0 L0 X1 B0.1 X.4 ; configure fan #2 M950 F3 C"1.out4"; create fan #3 M106 P3 S0 B0.1 H2 T45 X1 ; configure fan #3 ;M950 F4 C"out7"; create fan #4 ;M106 P4 S0 L0 X1 B0.1 X.4 ; configure fan #4 M950 F5 C"1.out6"; create fan #5 M106 P5 S0 B0.1 H3 T45 X1 ; configure fan #5 ; Tools M563 P0 D0 H1 F0 S"Hemera"; create tool #0 G10 P0 Z-4.55 ; set custom offsets for tool #0 M568 P0 R0 S0 ; set initial tool #0 M563 P1 D1 H2 F2 S"Bowden"; create tool #1 M568 P1 R0 S0 ; set initial tool #1 M572 D1 S0.55 ; set presure advance for tool #1 ;M207 P1 S20 R20 F2400 ; set retraction paramaters for when tool is disabled M563 P2 D2:3 H3 S"Mixing1" ;F4; create tool #2 M568 P2 R0 S0 ; set initial tool #2 M572 D2:3 S0.55 ; set presure advance for tool #2 M567 P2 E1.0:0.0 ; set tool #2 mixing value M563 P3 D2:3 H3 S"Mixing2" ;F4; create tool #3 M568 P3 R0 S0 ; set initial tool #3 M567 P3 E0.0:1.0 ; set tool #3 mixing value M563 P4 D2:3 H3 S"Mixing3" ;F4; create tool #4 M568 P4 R0 S0 ; set initial tool #4 M567 P4 E0.5:0.5 ; set tool #4 mixing value
Thank you for your time
Sam -
Hi Sam,
Some thoughts I have on one method:
Have all tpre files that are defining the mixing extruder tool #s reference a master file that would perform pickup / dropoff. Have a conditional in the GC such that if the current tool is one of the ones that perform mixing, don't perform the above procedure....otherwise, just define as one mixing tool and then you don't need to worry about it. Then you would just need to send a mix ratio M567 command to change it as needed instead of a tool change.
-
@Garth_42 Thank you, I will try out your first idea.
Does the firmware or the DWC have a method to vary the mix ratio over a specified z distance like in Marlin?
-
@SamKudarauskas said in Configuring mixing hot end on a tool changer:
Does the firmware or the DWC have a method to vary the mix ratio over a specified z distance like in Marlin?
Can you describe this in more detail? What does it attempt to achieve? If it's simply altering the ratio in direct relation to the z height it would be possible using conditional gcode statements in the daemon.g file which executes continuously during a print.
https://docs.duet3d.com/en/User_manual/Tuning/Macros#daemong
-
-
No function exactly like that exists to automate a fade between extruders, though it could be achieved with daemon.g with a little work. Might be best to create a post in the gcode meta commands forum to seek guidance on how best to do it.
-
@SamKudarauskas I've quickly watched the Teaching Tech video. It looks like you have already set up the mixing extruder as a couple of different tools, with different mixing values. You should be able to create up to 50 tools (number P0 to P49). You can't use 2.0, 2.1 etc. and can't slowly shift between tools like Marlin does with it's 'virtual' tools, but you can change the current tool mix ratio while you print.
Secondly, I know in Marlin on the LCD you can set the mix ratio to change automatically over a set Z distance, does this functionality exist in RRF?
No, it's not built into the firmware, and with good reason; you may forget to turn it off! I think this is better handled by the slicer, then it is specific to that Gcode file. In most slicers, you can insert Gcode at each layer change, usually in the "Before layer change G-code" section of the slicer. You could use the built-in functions of the slicer to calculate the mix ratio, so it is exported with the G-code file, or you could call a macro for the firmware to do it, during the print.
For example, for the latter, add
M98 P"/macros/Mix_ratio_over_height.g"
to the "Before layer change G-code" section of the slicer.. Then create a macro something like this, and save it to your Macros folder on the SD card:; Mix_ratio_over_height.g ; changes tool mix ratio over height ; set up variables var mix_change_start = 0 ; layer height of start of mix change var mix_change_end = 50 ; layer height of end of mix change var mix_change_height = var.mix_change_end - var.mix_change_start var current_Z_height = move.axes[2].userPosition ; assumes axis 2 is Z axis var mix_ratio = 0 ; check if Z height is between mix_change_start and mix_change_end if move.axes[2].userPosition > var.mix_change_start & move.axes[2].userPosition <= var.mix_change_end ; if it is, calculate mix ratio set var.mix_ratio = ( var.current_Z_height - var.mix_change_start ) / var.mix_change_height M567 E{1-var.mix_ratio}:{var.mix_ratio} echo "Layer height:", var.current_Z_height M567
As each layer change, the macro will be called, and the extrusion ratio updated based on the layer height, and the range of heights set in the macro. You could probably add to it to set the start and end mixing values; at the moment it just goes from 1:0 to 0:1. Note that the macro above has not been tested with a real print, but does seem to give the correct mix ratio numbers. Hope that helps!
Ian
-
@SamKudarauskas said in Configuring mixing hot end on a tool changer:
@Phaedrux On the LCD of printers that run marlin there is an option for mixing hot ends to create a gradient at a specific z range. It can be seen in this teaching tech video at 9:45. I was wondering if this function existed in the DWC and if could also be done using gcode.
Thanks,
SamI used to do this years ago by post processing the gcode file using a little python script that I wrote. IIRC I could alter the mixing ratio either every layer, or every "n" layers and for a mixing hot end using up to 5 inputs. I could have a look and see if I can dig that script out if it's any use to you. It might need tweaking to suit a two input hot end.