; A30M 330x330x400mm config file for dc42 Duet wifi firmware ; JanTec.nl 31-10-2020 for reprap V3.0 orig hedaend with Geeetech 2 extruder direct drive and single nozzle mixing hotend ; Prologue and comms section----------------------------------------------------------------------------------------------------------------------- M111 S0 ; Debug off M550 PA30M Duet2wifi ; Machine name (can be anything you like) M551 Preprap ; Machine password M552 S1 ; WIFI ON ;*** If you have more than one Duet on your network, they must all have different MAC addresses, so change the last digits------------------------ M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xDC ; MAC Address ;*** Adjust the IP address and gateway in the following 2 lines to suit your network------------------------- M552 P0.0.0.0 ; IP address (0.0.0.0 = use DHCP) M554 P192.168.178.1 ; Gateway M553 P255.255.255.0 ; Netmask M555 P2 ; Set output to look like Marlin M575 P1 B57600 S1 ; Comms parameters for PanelDue ; Axis to driver mapping ------------------------------------------------------------------------------------ M584 X0 Y1 Z2:4 E3:5 ; two Z motors connected to driver outputs Z and E1 M671 X-20:350 Y160:160 S0.5 ; leadscrews at left (connected to Z) and right (connected to E1) of X axis M208 X5:330 Y12:330 ; X carriage moves from 5 to 335, Y bed goes from 10 to 320 M569 P0 S0 ; Drive 0 | X stepper M569 P1 S1 ; Drive 1 | Y Stepper M569 P2 S1 ; Drive 2 | Z1 Stepper M569 P3 S1 ; Drive 3 | Extruder T0 M569 P4 S1 ; Drive 4 | Z2 stepper M569 P5 S0 ; Drive 5 | Extruder T1 is the 1st of the 5 ports on the Duet2wifi's expansion board ;M569 P6 S1 ; Drive 6 | Extruder T2 ;M569 P7 S1 ; Drive 7 | Extruder T3 ;M569 P8 S1 ; Drive 8 | Extruder T4 ;M569 P9 S1 ; Drive 9 | Extruder T5 ; Axis and motor configuration ------------------------------------------------------------------------------ M350 X16 Y16 E16 I1 ; Set 16x microstepping with interpolation not possible for expansion board M906 X900 Y900 Z900:900 E900:900 I0.6 ; Set motor currents (mA) and increase idle current to 60% M201 X800 Y800 Z100 E1000:1000 ; Accelerations (mm/s^2) M203 X15000 Y15000 Z360 E3600:3600 ; Maximum speeds (mm/min) M566 X600 Y600 Z30 E20:20 ; Maximum jerk speeds mm/minute M208 Z420 ; Set axis maxima (adjust to suit your machine) M208 Z0 S1 ; set axis minimum (adjust to make X=0 and Y=0 the edge of the bed) M92 X80 Y80 Z400 ; Set axis steps/mm M92 E420:108 ; Set extruder steps per mm was E140 and 36 (2nd no microstepping) before switching to the Bondtech duals dd M574 X1 S1 P"!xstop" ; X min active high endstop switch M574 Y1 S1 P"!ystop" ; Y min active high endstop switch M574 E0 S1 P"!e0stop" ; E0 active high endstop for filament detection (2 switches in series for both extruders connected to 1 input "e0stop") M574 Z1 S1 P"zstop+e1stop" ; DOUBLE Z endstops: configure active-high endstops for low end on Z via pins zstop and e1stop G21 ; Work in millimetres G90 ; Send absolute coordinates... M83 ; ...but relative extruder moves ; Z probe section-------------------------------------------------------------------------------------------- ;M558 P9 C"^zprobe.in" H5 F120 T3000 ; BLTouch connected to Z probe IN pin, this is the setting for 1x probing with average tolerance, is a lot faster! ;M558 P9 C"^zprobe.in" H5 R0.2 A5 B1 F120 T3000 S0.08 ; BLTouch connected to Z probe IN pin S should be 0.03, raise for more tolerance, this is much slower but more accurate! ;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PROBE SETTINGS OVERVIEW XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX M558 P9 C"^zprobe.in" F5000 H10 T10000 ;M558 P9 C"^zprobe.in" F60 H10 I0 R1 T10000 A1 S0.05 B0 ;P nnn Z probe type =9 for BLtouch ;C New parameter C specifies the input pin and the optional modulation pin. This parameter is mandatory, except for probe type 0 ;(manual probing) and 10 (Z motor stall detection). ;! Invert the input by prefixing the input pin (C parameter) with ! character, when using an NPN output inductive or capacitive sensor or ;using an NO switch (not recommended, use a NC switch instead). ;^ The pullup resistor on the Z probe input is disabled by default. Enable it by prefixing the input pin (C parameter) with the ^ character. ;Enable pullup resistor with ^ if using Duet 2, running RRF3, using the Z probe input pin, and the probe type is a switch or BLTouch. ;Z probe types 4, 6 and 7 are no longer supported. Instead, use type 5 (filtered digital) or 8 (unfiltered digital) and use the C parameter to specify the input. ;Note, if your Z probe is connected to the Z endstop input, in RRF 3.0 on Duet 2 boards only (not in RRF 3.01 and later, and not in RRF 3.0 on Duet 3), ;that input is by default pre-assigned to be used by the Z endstop, so you must free it up first. ;Only one Type 2 probe can be configured, and if using Duet 3 + expansion or tool boards, it must be connected to the Duet 3 main board. ;F nnn Feed rate (i.e. probing speed, mm/min) ;H nnn Dive height (mm). When using mesh bed compensation or running G30 commands with specified XY coordinates (for example from the bed.g file), ;the firmware moves the Z probe to this height above where it expects the bed to be before commencing probing. The maximum depth of probing from ;this position is twice the dive height. A large dive height will tolerate a very uneven bed or poor calibration. ;A small dive height will make probing faster, because the Z probe has less distance to travel before reaching the bed. Default value if omitted is 5mm. ;I nnn Invert (I1) or do not invert (I0, default) the Z probe reading (RepRapFirmware 1.16 and later) ;R nnn Z probe recovery time before the probing move is started , default zero (seconds) (RepRapFirmware 1.17 and later). ;This is to allow the probe to settle after executing a travel move to the coordinates to probe. ;T nnn Travel speed to and between probe points (mm/min) ;A nnn Maximum number of times to probe each point, default 1. Maximum, as of 2.03, is 31. Setting M558 A parameter to anything >31 set it to 0 instead of to 31 ;S nnn Tolerance when probing multiple times, default 0.03mm ;B n If 1, turn off all heaters while probing, default (B0) leaves heaters on. (RepRapFirmware 1.21 and later) ;C n Endstop input number when the probe type is P4, default 3 (RepRapFirmware 2.02/1.23 and later) ;All of the above for RepRapFirmware 2.x relates to RepRapFirmware 3, except the following: ;K New optional parameter K selects the Z probe number. If there is no K parameter then the current Z probe number is used. ;The current Z probe number is 0 at startup. You can ignore this parameter if you have only one Z probe. ;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ;M307 H3 A-1 C-1 D-1 M950 S0 C"exp.heater3" ; create servo/gpio 0 on heater 3 pin on expansion connector M280 P0 S10 ; send deploy control signal to BLTouch through servo/gpio 0 M280 P0 S90 ; and retract probe signal to BLTouch through servo/gpio 0 ; for the single nozzle dual extruder headend; G31 P125 X0 Y-35 Z1.4 ; 1.5 was previous setting. P is trigger value; 25-255. X and Y position versus nozzle, Z=trigger height versus nozzle. Higher Z value = lower nozzle!! G31 P125 X29 Y0 Z1.4 ; 1.5 was previous setting. P is trigger value; 25-255. X and Y position versus nozzle, Z=trigger height versus nozzle. Higher Z value = lower nozzle!! ; Note that, when enabled bed mesh in f.i. homeall.g with G29 S1 right after G30, this has an effect on the presented Z-setting here! ; Heater and thermistor section------------------------------------------------------------------------------ M308 S0 P"bed_temp" Y"thermistor" T100000 B3950 ; define bed temperature sensor 0 M308 S1 P"spi.cs1" Y"rtd-max31865" ; for PT100: Create sensor number 1 as a PT100 sensor, use outer 2 pins. ;M308 S2 P"spi.cs2" Y"rtd-max31865" ; for PT100: Create sensor number 2 as a PT100 sensor, use outer 2 pins. M308 S2 P"e1_temp" Y"thermistor" T100000 B3950 ; define hotend2 temperature sensor 2 M950 H0 C"bed_heat" T0 ; heater 0 uses the bed_heat pin, PWM frequency 100Hz, sensor 0 M950 H1 C"e0_heat" T1 ; heater 1 uses the "e0_heat" pin output and sensor 1 input (in this script connected to an SPI extension board with one PT100) M950 H2 C"e1_heat" T2 ; heater 2 uses the "e1_heat" pin and sensor 2 M140 H0 ; the bed heater is heater 0, will be a bang-bang setup unless a PID is done M307 H0 A133.5 C553.3 D1.1 S1.00 V23.9 B0 ; PID settings for bed and heater 0, will be overwritten in config-override.g M307 H1 A340.0 C140.0 D5.5 S1.00 V0.0 B0 ; PID settings for extruder 0 and heater 1, will be overwritten in config-override.g M570 S35000 ; Increase to allow extra heating time if needed ; Fans----------------------------------------------------------------------------------------------- M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency M106 P0 S0 H-1 ; set fan 0 value. This is for the 2 tool fans. Thermostatic control is turned off since they will be regulated in the Slicer's print settings M950 F1 C"fan1" Q500 ; create fan 1 for the cooling block with ptfe tube on pin fan2 and set its frequency M106 P1 S0.8 H1 T45 ; set fan 1 value. S is PWM 0-1 or 1-255. Thermostatic control is turned on for heATER 1 M950 F2 C"fan2" Q500 ; create fan 2 for the Duet board fan on pin fan2 and set its frequency M106 P2 S0.4 H0 T50 ; set fan 2 value. S is PWM 0-1 or 1-255. Thermostatic control is turned on for heATER 0 (bed) ; Tool definition section for a single nozzle hotend with 1 heater and 1 shared NTC sensor and 2 extruders ---------------------------------------------------------------------- M563 P0 D0 H1 ; define tool 0 with left extruder D0 and 1 nozzle H1 for a mixing extruder G10 P0 S0 R0 X0 Y0 ; set tool 0 temperatures and offsets ;M568 P0 S1 ; Enable mixing for tool 0 ;M567 P0 E0.95:0.05 ; Set mixing ratios for tool 0 (95%,5%) M563 P1 D1 H2 ; define tool 1 with right extruder D1 and 1 nozzle H1 for a mixing extruder G10 P1 S0 R0 X18 Y0 ; set tool 1 temperatures and offsets ;M568 P1 S1 ; Enable mixing for tool 0 ;M567 P1 E0.05:0.95 ; Set mixing ratios for tool 0 (5%,95%) ;M563 P2 D0:1 H1 ; Define tool 2 (P2) to use all two extruders (D0:1) and heater 1 ;G10 P2 S0 R0 X0 Y0 ; set tool 1 temperatures and offsets ;M568 P2 S1 ; Enable mixing for tool 2 ;M567 P2 E0.4:0.5 ; Set mixing ratio for tool 2 these should add up to 1 ;M563 P3 D0:1 H1 ; Define tool 3 (P3) to use all three extruders (D0:1:2) and heater 1 ;G10 P3 S0 R0 X0 Y0 ; set tool 3 temperatures and offsets ;M568 P3 S1 ; Enable mixing for tool 3 ;M567 P3 E0.9:0.1 ; Set mixing ratio for tool 2 these should add up to 1 ;M563 P4 D0:1 H1 ; Define tool 4 (P4) to use all three extruders (D0:1:2) and heater 1 ;G10 P4 S0 R0 X0 Y0 ; set tool temperatures and offsets ;M568 P4 S1 ; Enable mixing for tool 4 ;M567 P4 E0.1:0.9 ; Set mixing ratio for tool 4 these should add up to 1 ;M563 S1 ; add 1 to every tool number for slicer compatibility M207 S1 F3000 ;set firmware retraction. S is the amount in mm. F is the Feed rate mm/min (divide by /60 to get mm/sec). ;Optionally one could also have R (additional length on unretract) and Z (additional Z lift in mm) ; Filament monitoring -------------------------------------------------------------------------------------- M591 D0 P2 C"e0_stop" S1 ; filament monitors (serial, NC between pin 1 and 3) connected to e0_stop ;Mesh grid for bed probing----------------------------------------------------------------------------------- M557 X30:350 Y30:361 S60 ; probe from X=10 to 330, Y=30 to 330mm with a mesh spacing of 74mm ; Epilogue--------------------------------------------------------------------------------------------------- ;*** If you are using axis compensation, put the figures in the following command ;M556 S78 X0 Y0 Z0 ; Axis compensation here M501 ; execute config_override.g T0:1:2:3: ; select first tool (or extruder)