Bed levelling using 2 independent Z motors



  • I’m thinking of adding the bed levelling using multiple independent Z motors to my i3 style printer
    I’ve looked at https://duet3d.com/wiki/Bed_levelling_using_multiple_independent_Z_motors and have a couple of questions…

    Q1:
    As I’m only using one extruder can I plug the Z into an unused stepper driver and use M584 to assign the motors? (Rather than get an expansion board)

    If so Q2:
    Is my following code correct?

    File config.g:

    [[language]]
    M584 X0 Y1 Z2:4    ; two Z motors connected to driver outputs 2 and 4 (E1)
    M671 X-15:215 Y100:100 S0.5  ; leadscrews  left & right (Middle of the bed in the Y axis)
    
    ```File bed.g (I’m using IR sensor so no need for the Probe code?):
    
    

    [[language]]
    G28 ; home
    G30 P0 X20 Y100 Z-99999 ; probe near a leadscrew
    G30 P2 X180 Y100 Z-99999 S3 ; probe near a leadscrew and calibrate 2 motors

    I assume I still run the mesh leveling as part of my starting gcode when I slice a print?
    Thanks in advance


  • Q1: Yes, just plug the 2nd stepper into any unused driver. Making sure you assign that driver to the Z axis, just like you have done in your config file. I cannot comment on others, but on Duet WiFi, make sure you put the jumpers back on the 2nd Z port.

    Q2: Your config file is correct, however, your bed.g isn't. Since you are using 2 lead screws, your S# should be S2.

    After you fix the bed, run G32, which will level the Z axis like you want. Run it again, and see if the difference gets bigger. If it does, you need to switch your M671 locations. So instead of X-15:215 put X215:-15 and swap the Y also.

    Q3: I run M32 in my homez and homeall Z sections. Do this before setting the home location, that way the adjustment doesn't affect your Z home location.



  • Thanks - Great shout re the Jumpers (I'd have forgotten to do that)


  • administrators

    Q2: in your M584 command you should also specify E3 otherwise drive 4 will also be an extruder drive.

    In your bed.g file, as well as using S2 not S3 on the second G30 command, you need P1 not P2.

    After doing leadscrew adjustment, it's a good idea to move the head over the centre of the bed at a few mm height and do a plain G30 command, to re-establish the Z=0 position at the centre of the bed. You can do this in the bed.g file.



  • Even with only two leadscrew, the bed leveling works well. I don't bother with the mesh bed compensation anymore. Just stick the following codes in the start gcode of the slicer and the first layer come out almost perfect every time.

    G28 ; home all
    G30 P0 X0 Y240 Z-99999 ; probe near left leadscrew
    G30 P1 X540 Y240 Z-99999 S2 ; probe near right leadscrew and calibrate 2 motors
    G28 Z ; home Z

    Now I am just waiting for the delivery of the third lead screw to make it even better.



  • Thanks for the help - Its appears to be working well
    I'll always be limited by 2 leadscrews on a i3. But so far it looks like an improvement to my set up
    The X-axis appears parallel to the bed and shouldn't require manual intervention when things move (Usually due to human error)



  • I'm not sure about the other config on how to address the second Z motor and set all the parameters.
    Can I do Znnn:nnn ? Or do I need to use an other char?

    ; Drives
    M584 X0 Y1 Z2:4 E3 P3                     ; two Z motors connected to driver outputs 2 and 4 (E1)
    M569 P0 S0                                         ; X Drive  goes forwards
    M569 P1 S1                                         ; Y Drive  goes forwards
    M569 P2 S0                                         ; Z Drive  goes backwards
    M569 P3 S0                                         ; E1 Drive goes forwards
    
    M350 X16 Y16 Z16:16 E16 I1                             ; Configure microstepping with interpolation
    M92 X101 Y101 Z400:400 E837                            ; Set steps per mm
    M566 X4000 Y4000 Z100:100 E120                         ; Set maximum instantaneous speed changes (mm/min)
    M203 X12000 Y12000 Z100:100 E2400                      ; Set maximum speeds (mm/min)
    M201 X500 Y500 Z100:100 E250                           ; Set accelerations (mm/s^2)
    M906 X1000 Y1000 Z1000:1000 E800 I30                     ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30                                                ; Set idle timeout
    


  • @toon said in Bed levelling using 2 independent Z motors:

    I'm not sure about the other config on how to address the second Z motor and set all the parameters.
    Can I do Znnn:nnn ? Or do I need to use an other char?

    You only need to define which motors belong to your Z axis in M584. For everything else there is only one (logical) Z axis, so no need to duplicate anything.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.