syncronizing 2 z-steppers



  • hello,

    following https://duet3d.dozuki.com/Wiki/Bed_levelling_using_multiple_independent_Z_motors i did not succeed to height-synchronize 2 z-steppers. it seems strange to me that it seems to be not necessary to define a z-probe.

    after homing is done the nozzle moves to the first g30-defined probe point, rests there for short time, moves to the 2nd g30-defined probe point and a dialog

    "Manual bed probing
    Adjust height until the nozzle just touches the bed, then press OK"

    which seems to do nothing.

    my bed.g:

    G28 ; home
    M401 ; deploy Z probe (omit if using bltouch)
    G30 P0 X20 Y100 Z-99999 ; probe near a leadscrew, half way along Y axis
    G30 P1 X180 Y100 Z-99999 S2 ; probe near a leadscrew and calibrate 2 motors
    M402

    my setup:
    Board: Duet 3 MB6HC (MB6HC)
    DSF Version: 1.2.2.1
    Firmware: RepRapFirmware for Duet 3 MB6HC v0.6 or 1.0 3.0RC2 (2019-12-29b1)

    z-probe is dc42.

    what did i miss?



  • please provide your config.g if you don't use BLTouch you can remove m401 and M402



  • @spllg said in syncronizing 2 z-steppers:

    "Manual bed probing
    Adjust height until the nozzle just touches the bed, then press OK"

    Where have you defined your probe type? That would indicate you're using manual probing, but you say it's the IR probe.

    Please include your homing files as well.



  • config.g
    G90 ; send absolute coordinates...
    M83 ; ...but relative extruder moves
    M550 P"3dd" ; set printer name

    M669 K1 ; select CoreXY mode

    ; Drives
    ; D1 = constant off time, d2=spreadcycle, d3=stealthchop(2)
    M569 P0.0 S1 D2 ; physical drive 0.0 goes forwards ; XY - right
    M569 P0.1 S1 D2 ; physical drive 0.1 goes forwards ; XY - left
    M569 P0.2 S1 D2 ; physical drive 0.2 goes forwards ; Z - right
    2569 P0.3 S1 D2 ; physical drive 0.3 goes forwards ; Z - left
    M569 P0.4 S0 ; physical drive 0.3 goes forwards ; E0

    M584 X0.0 Y0.1 Z0.2:0.3 E0.4 ; set drive mapping
    M350 X16 Y16 Z16 E64 I1 ; configure microstepping with interpolation
    ;M350 X64 Y64 Z16 E64 I1 ; configure microstepping with interpolation

    M92 X200.00 Y200.00 Z400.00 E420.00 ; set steps per mm
    ;M92 X800.00 Y800.00 Z400.00 E420.00 ; set steps per mm

    M566 X900.00 Y900.00 Z12.00 E120.00 ; set maximum instantaneous speed changes (mm/min)
    M203 X15000.00 Y15000.00 Z3000.00 E3600.00 ; set maximum speeds (mm/min)

    M201 X500.00 Y500.00 Z25.00 E250.00 ; set accelerations (mm/s^2)
    M906 X800 Y800 Z400 E800 I30 ; set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; Axis Limits
    M208 X-26 Y0 Z0 S1 ; set axis minima
    M208 X270 Y270 Z340 S0 ; set axis maxima

    ; Endstops
    M574 X1 S1 P"io3.in" ; configure active-low endstop for low end on X via pin io3.in
    M574 Y1 S1 P"io4.in" ; configure active-low endstop for low end on Y via pin io4.in
    M574 Z1 S1 P"io5.in" ; configure active-low endstop for low end on Z via pin io5.in

    ; bed leveling
    M671 X50:150 Y150:150 S0.5 ; leadscrews at left (connected to p0.3) and right (connected to p0.2) of X axis

    ; ???
    ;M558 P1 C"io5.in" H5 F120 T6000 ; disable Z probe but set dive height, probe speed and travel speed

    ; Z-Probe ( https://duet3d.dozuki.com/Wiki/Gcode#Section_M558_Set_Z_probe_type )
    ;M558 P0 H5 F120 T6000 ; disable Z probe but set dive height, probe speed and travel speed
    ;M557 X15:215 Y15:195 S20 ; define mesh grid

    M308 S0 P"temp0" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin temp0
    M308 S1 P"temp1" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin temp1

    ; 2DO: fix and all below
    ; Heaters
    M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0
    M143 H0 S120 ; set temperature limit for heater 0 to 120C
    ;M307 H0 B0 S1.00 F10 ; enable pwm mode for the bed heater and set PWM limit pwm freq=10hz (hopefully)
    M140 H0 ; map heated bed to heater 0

    M950 H1 C"out1" T1 ; create nozzle heater output on out1 and map it to sensor 1
    M143 H1 S280 ; set temperature limit for heater 1 to 280C
    ;M307 H1 B0 S1.00 ; disable bang-bang mode for the nozzle heater and set PWM limit

    ; Fans
    M950 F0 C"out4" Q500 ; create fan 0 on pin out3 and set its frequency
    M106 P0 H-1 ; set fan 0 value. Thermostatic control is turned off
    ;M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
    M950 F1 C"out5" Q500 ; create fan 1 on pin out4 and set its frequency
    M106 P1 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
    ;M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on

    ; Tools
    M563 P0 D0 H1 F0 ; define tool 0
    G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets
    G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C

    ; Custom settings are not defined

    ; Miscellaneous
    M501 ; load saved parameters from non-volatile memory


    homall.g:

    ; prepare
    G91 ; relative positioning
    G1 Z2 F6000 H2 ; lift Z relative to current position

    ; home y
    G1 H1 Y-3500 F6000 ; move quickly to Y axis endstop and stop there (first pass)
    G1 Y2 F3000 ; go back a few mm
    G1 H1 Y-355 F100 ; move slowly to Y axis endstop once more (second pass)

    ; home x
    G1 H1 X-355 F6000 ; move quickly to Y axis endstop and stop there (first pass)
    G1 X2 F3000 ; go back a few mm
    G1 H1 X-355 F100 ; move slowly to Y axis endstop once more (second pass)
    G1 x+26 f4000

    ; home z
    G1 H1 Z-3500 F3000
    G1 H2 Z2 F1000
    G1 H1 Z-50 F100
    G1 H2 Z5 F1000
    G90 ; absolute positioning



  • your Z Probe is not defined you have comment out M557 M558
    in your config.g



  • @SIam

    uncomenting m558 leads to "m558: pin 'io.5' is not free.

    do i need m557 for just synching the z-steppers?



  • @spllg said in syncronizing 2 z-steppers:

    remove this line:

    M574 Z1 S1 P"io5.in" ; configure active-low endstop for low end on Z via pin io5.in

    and uncommend the M558 command

    ->do i need m557 for just synching the z-steppers?

    no its for mesh



  • @SIam removing m574 seems to disable z-homing - Error: Failed to enable endstops



  • q: would it be suitable to connect io5.in to io6.in and use io5.in as zstop and io6.in as z-probe?



  • @spllg said in syncronizing 2 z-steppers:

    2569 P0.3 S1 D2 ; physical drive 0.3 goes forwards ; Z - left

    that line is not correct.

    M308 S0 P"temp0" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin temp0
    M308 S1 P"temp1" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin temp1

    B4138 is the default and wrong for your thermistors.



  • @Veti said in syncronizing 2 z-steppers:

    B4138

    corrected - thanks for the hint, but apparently it does not solve my problem (but maybe others .



  • From my understanding. you are trying to say the the Z endstop and probe is io5.in and
    Do you have a z endstop and probe?

    if you have both then i think you need to use diffenrt pins and codes.

    I dont have the Duet 3
    so cant confirem but i dont think you can use the same pin for both Z endstop and Probe.



  • @SLKittie said in syncronizing 2 z-steppers:

    From my understanding. you are trying to say the the Z endstop and probe is io5.in and
    Do you have a z endstop and probe?

    i only have a probe and use it successfully for z-homing and want to use it as z-probe as well.

    if you have both then i think you need to use diffenrt pins and codes.

    I dont have the Duet 3
    so cant confirem but i dont think you can use the same pin for both Z endstop and Probe.

    that's what i'm afraid of. so, should i try to connect io5.in to io6.in and use io5.in as zstop and io6.in as z-probe? any opinions?



  • You may need to have a look at these websites as you dont have the configerastion for the probe set up. as there is no G31 command after your M558 to say where the prob is and how to activae it.

    https://duet3d.dozuki.com/Wiki/Setting_up_automatic_probing_of_the_print_bed

    https://duet3d.dozuki.com/Wiki/Connecting_a_Z_probe

    Just out of curiosity how do you code your Config.g?



  • @SLKittie said in syncronizing 2 z-steppers:

    You may need to have a look at these websites as you dont have the configerastion for the probe set up. as there is no G31 command after your M558 to say where the prob is and how to activae it.

    https://duet3d.dozuki.com/Wiki/Setting_up_automatic_probing_of_the_print_bed

    https://duet3d.dozuki.com/Wiki/Connecting_a_Z_probe

    thanks for the hints - going to read tomorrow (i find it hard to get started because i feel information is kind of scattered)

    Just out of curiosity how do you code your Config.g?

    initial version was generated by a reprap website (i have forgotten the url)..

    do i really need distinct z-endstop and z-probe? i cannot believe this.


  • administrators

    @spllg said in syncronizing 2 z-steppers:

    do i really need distinct z-endstop and z-probe? i cannot believe this.

    If you use the Z probe to home Z then you don't need a Z endstop. https://duet3d.dozuki.com/Wiki/ConfiguringRepRapFirmwareCartesianPrinter#Section_Homing_Z



  • @spllg said in syncronizing 2 z-steppers:

    do i really need distinct z-endstop and z-probe? i cannot believe this.

    I use a single microswitch, defined as a probe, to both home and auto-bed-level (three motors) and mesh probe a bed on a CoreXY.

    So, define a probe for Z, and don't define an endstop for Z, and it "just works".



  • I'm doing same thing, I did have to define Z-Probe in my config.g though. I'm having issue with 1 side dropping but I don't believe it is related to the issue you're having. Here is my config G and you can see Z-Probe settings

    ; Configuration file for Duet WiFi (firmware version 2.03)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.4 on Tue Dec 24 2019 07:12:07 GMT-0500 (Eastern Standard Time)

    ; General preferences
    G90 ; send absolute coordinates...
    M83 ; ...but relative extruder moves
    M550 P"Alex's Hypercube" ; set printer name

    M667 S1 ; select CoreXY mode

    ; Network
    M552 S1 ; enable network
    M586 P0 S1 ; enable HTTP
    M586 P1 S0 ; disable FTP
    M586 P2 S0 ; disable Telnet

    ; Drives
    M569 P0 S1 ; physical drive 0 goes forwards
    M569 P1 S1 ; physical drive 1 goes forwards
    M569 P2 S1 ; physical drive 2 goes forwards
    M569 P3 S0 ; physical drive 3 goes backwards
    M584 X0 Y1 Z2:4 E3 ; set drive mapping
    M671 X-30:330 Y156:156 S1.5 ; leadscrews at left and right
    M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation
    M92 X161 Y160 Z809 E819 ; set steps per mm
    M566 X900.00 Y900.00 Z12.00 E120.00 ; set maximum instantaneous speed changes (mm/min)
    M203 X18000.00 Y18000.00 Z300.00 E350 ; set maximum speeds (mm/min)
    M201 X3000.00 Y3000.00 Z100.00 E350 ; set accelerations (mm/s^2)
    M906 X1400 Y1400 Z1400 E1000 I30 ; set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; Axis Limits
    M208 X0 Y0 Z-5 S1 ; set axis minima
    M208 X280 Y280 Z370 S0 ; set axis maxima

    ; Endstops
    M574 X1 Y1 S1 ; set active high endstops
    M574 Z1 S2 ; set endstops controlled by probe
    M591 D0 P5 C3 R40:120 E3.0 S0 ; Duet3D laser sensor for extruder drive 0, connected to endstop input 3 (E0), tolerance 40 to 120%, 3mm comparison length, disabled

    ; Z-Probe
    M558 P1 XO YO H3 F200 T9000 B1 R0.1 A5 ; set Z probe type to modulated and the dive height + speeds
    G31 P500 X-27 Y0 Z1.650 ; set Z probe trigger value, offset and trigger height
    M557 X20:240 Y20:260 S220 ; define mesh grid

    ; Heaters
    M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit
    M305 P0 T100000 B4725 C7.06e-8 ; set thermistor + ADC parameters for heater 0
    M143 H0 S120 ; set temperature limit for heater 0 to 120C
    M307 H1 A390.9, C258.2, D5.4, S1 ; hot end thermister tuning
    M305 P1 T100000 B4725 R4700 ; set thermistor + ADC parameters for heater 1
    M143 H1 S280 ; set temperature limit for heater 1 to 280C

    ; Fans
    M106 P0 S0 I0 F500 H-1 ; set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P1 S1 I0 F500 H1 T45 ; set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
    M106 P2 S0.5 I0 F500 H1 T45 ; set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned on

    ; Tools
    M563 P0 D0 H1 F0 ; define tool 0
    G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets
    G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C

    ; Custom settings are not defined

    ; Miscellaneous
    M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss

    Here is my bed.g

    ; bed.g
    ; called to perform automatic bed compensation via G32
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.4 on Tue Dec 24 2019 07:12:06 GMT-0500 (Eastern Standard Time)
    M561 ; clear any bed transform
    G28 ;home
    G30 P0 X0 Y156 Z-99999 ; probe left leadscrew
    G30 P1 X260 Y156 Z-99999 S2 ; probe right leadscrew and calibrate 2 motors
    G29 ; run mesh bed leveling



  • @Danal this sounds interesting, do you have any pictures so I can get an idea of how to maybe adapt this to mine. I currently run a DC42 IR sensor and I think it may not be the most reliable and a BL touch has more wires and I already have a 22 pin connector full on my X carriage and don't have room to run the extra 2 for the BL Touch neatly so this may give me a better option.



  • I will get a pic... but the microswitch is just on the bottom of the carriage that grabs tools (this is a toolchanging printer).

    Definition statements for all endtstops and probes:

    ; Endstops and probes
    
    M574 X1 S1 P"io1.in"                    ; Set homing switch configuration X1 = low-end, S1 = active-high (NC)
    M574 Y1 S1 P"io2.in"                    ; Set homing switch configuration Y1 = low-end, S1 = active-high (NC)
    M574 U1 S1 P"io3.in"                    ; Set homing switch configuration U1 = low-end, S1 = active-high (NC)
    ;M574 Z1 S1 P"!io4.in"                   ; Set homing switch configuration Z1 = low-end,  S1 = active-high (NC).  This is used for tool probing, not actual Z height.
    
    M558 K0 P5 C"io4.in" H5 A5 T6000 S0.02   ; Z probe - Set the height of the bed when homing G28.  Combined with content of bed.g as invoked by G32, levels bed. Also used for Mesh. 
                                               ; P5 = Switch, NC
                                               ; C  = Input Connector
    					   ; Hn = dive height
    					   ;   A bigger dive height prevents a situation where the bed is out of alignment by more than the dive height
    					   ;   on any corner, which can crash the hot-end into the bed while moving the head in XY.
    					   ;   Probing speed and travel speed are similarly reduced in case the Z probe isn't connected properly (or
    					   ;   disconnects later after moving to a point) giving the user more time to stop.
                                               ; An = Number of times to probe each point. 
                                               ; Tnnn = Travel speed between probe points. 
                                               ; Snnn = Tolerance when probing multiple times. Two readings inside this window and we move on. 
    

Log in to reply