Auto leveling with two independent Z steppers?



  • My printer has two Z steppers that are connected together to the Z driver. I would like to change it to have two independent Z drives and automatic leveling between them as described here: https://duet3d.dozuki.com/Wiki/Bed_levelling_using_multiple_independent_Z_motors#Section_Example_for_2_motors

    My question is regarding the M671 command. Currently I have this and use it for manual leveling of the 4 screws:

    M671 X29:29:269:269  Y279:39:39:279 P0.7      ; positions of adjustment screws
    

    However, the procedure in the link says to replace it with this:

    M671 X-20:220 Y0:0 S0.5 ; leadscrews at left (connected to Z) and right (connected to E1) of X axis
    

    Can I still perform manual leveling of the 4 screws while having automatic leveling of the two Z steppers? (trying to avoid complex workarounds)



  • @zapta said in Auto leveling with two independent Z steppers?:

    Can I still perform manual leveling of the 4 screws while having automatic leveling of the two Z steppers? (trying to avoid complex workarounds)

    Sure and you should do that. The auto level of the z takes care that z is parallel to the bed. So you do not need to adjust that. So it is not realy a "bed leveling" more a "Z leveling".

    Cheers, Chriss


  • Moderator

    More specifically, you should be able to define the M671 as needed right before using it. So if you are going to do the tilt correction, issue the M671 for the lead screw positions, then when you are going to do the 4 point adjustments, give it the M671 for that. Keep in mind that when you're changing the tilt of the bed you're also altering the Z0 point, so you should re-establish that afterwards.



  • @Chriss, I am using 'leveling' as 'parallel to the X/Y plane.'.

    The automatic leveling using the two Z steppers still doesn't guarantee 'leveling' and may require manual tweaking the 4 bed screws. My question is how to do that?



  • Thanks @Phaedrux. I see, I don't need to restore any specific M671, just set it before I do auto-z or manual screws leveling. That's simple enough.

    As for Z0 point, I plan to do manual leveling rarely and do auto dual Z leveling and print footprint mesh before every print so I presume this will take care of the Z0 (my config.g is already config for the height difference between the nozzle and bltouch triggering point).


  • Moderator

    That's my understanding anyway. M671 doesn't do anything in particular other than inform the position of the adjustment points. But I could be wrong, so test and report back.



  • Ok, I will give it a try and report. Thanks.

    Will do it in steps. Already split the Z into two drivers. Next will do the two points leveling.



  • @zapta

    I use this on a few of my dual Z machines. here is my G code for one of my chiron's

    M584 X0 Y1 Z2:4 E3 ; Custom drive mapping

    M671 X-40:440 Y206:206 S2 ; Lead screw positions at right and left of the X axis

    I have that in the "drives" section of my config.g

    That works in conjunction with my bed.g file which is executed by G32 Which I set in motion by means of a macro entitled "all in one leveling" it first levels the X gantry ( I do it twice to reduce the amount of error correction) then I have it probe the bed by calling G29 that uses the info from my M557 Command


    contents on my bed.g

    ; bed.g
    ; called to perform automatic bed compensation via G32

    M561 ; Clear any bed transform
    G28 ; Home All
    G30 P0 X15 Y206 Z-99999 ; Probe near a lead screw, half way along the Y axis (1st motor)
    G30 P1 X400 Y206 Z-99999 S2 ; Probe near a lead screw and calibrate 2 motors (2nd motor)
    G30 P0 X15 Y206 Z-99999 ; Probe near a lead screw, half way along the Y axis (1st motor)
    G30 P1 X400 Y206 Z-99999 S2 ; Probe near a lead screw and calibrate 2 motors (2nd motor)
    G1 H0 X20 Y61 F7000 ; Move the head to the front left corner
    G29 ; Carry out mesh leveling


    M557 X12:420 Y10:460 S30 ; define mesh grid



  • @CaLviNx, that's very useful. Do you also perform once in a while manual leveling of the 4 bed's screws? If so, do you use a different M671 and a simpler homing?

    My thinking is that the manual leveling of the 4 screws probably calls for a simpler homing that doesn't level the Z screws.

    BTW, you may want to look at another thread here regarding an auto generated M557 that covers the print area of the current print. It's faster this way and is not distracted by measurements outside of the print area.



  • @zapta

    I used to, but I have since removed the adjusters and made my beds all solidly mounted as there is no need for them to be adjustable. When I did do that I did the full sequence to level the gantry then I just used to use the console to run a G29. I had 5 macro's in a "manual leveling" folder, with 5 other macro's entitled point-1, point-2, point-3, point-4, and "nozzle to the centre of the bed" points 1 to 4 all placed the nozzle above the bed screw adjuster.

    I do still have the "nozzle to the centre" macro so I can check and adjust the clearance between the nozzle and the bed and that allows me to then test the probe dive height if I have messed about with the nozzle or the hot end.

    Then contents of one of my nozzle 1 to 4 macro's


    ; Nozzle Position 1

    G1 Z5 F2000 ; raise the nozzle
    G1 X17 Y55 S2 F2000 ; put the nozzle to position 1
    G1 Z0 F2000 ; lower the nozzle


    ; Place the Nozzle at the centre of the bed

    G1 Z5 F2000 ; raise the nozzle
    G1 X207 Y270 S2 F2000 ; put the nozzle to the centre of the bed
    G1 Z0 F2000 ; lower the nozzle


    And the command to carry out a test dive to get the probe's trigger height for the G31 command in the config.g

    G30 S-1

    Im happy enough with my M557 commands, and my setup's in general.

    The setups I have, I have had on all my machines for years and they do not need any tweaking, my only issue I have ever had was when I gave an iteration of RRF3 firmware a shot, that turned out to be a very bad idea as RRF3 seems very buggy, so for the moment I will stay with RRF2 until such time that I feel RRF3 is mature enough.



  • @CaLviNx said in Auto leveling with two independent Z steppers?:

    I used to, but I have since removed the adjusters and made my beds all solidly mounted as there is no need for them to be adjustable.

    I like this idea. I may do the same. Not actually removing the screws but secure them with a counter nut and forget about them.

    I switched recently to a per print partial auto mesh and now to auto leveling of the two independent Z steppers and between them things seems to be very consistent.



  • @Phaedrux, everything seems to work as advertised. Thanks.

    A suggestions regarding the online documentation of dual Z leveling, for your consideration.

    1. Mention that the E1 drive may need need to be defined (e.g. in case the common Z drive is set as reversed direction).

    2. Mention that things such as stepper current settings are applied automatically to both drives. It's not obvious, I think it's not the case with the E drives.

    3. Have an example or a note regarding a macro to level the mechanical screws and how to handle the conflicting M671.

    4. Add a note regarding the auto level tolerance. (the default 0.5mm was too small for me).

    Thanks for your help.



  • @zapta said in Auto leveling with two independent Z steppers?:

    @Phaedrux, everything seems to work as advertised. Thanks.

    A suggestions regarding the online documentation of dual Z leveling, for your consideration.

    1. Mention that the E1 drive may need need to be defined (e.g. in case the common Z drive is set as reversed direction).

    2. Mention that things such as stepper current settings are applied automatically to both drives. It's not obvious, I think it's not the case with the E drives.

    3. Have an example or a note regarding a macro to level the mechanical screws and how to handle the conflicting M671.

    4. Add a note regarding the auto level tolerance. (the default 0.5mm was too small for me).

    Thanks for your help.

    Re #4 that is a bit of a yes and no scenario, I agree that initially that tolerance is somewhat low, but if the bed is stable and "level" already then you will find that 0.5mm is fine. But you can change the tolerance until you get things set up and running properly.



  • @CaLviNx, currently I have it set to 1.0 and I consider increasing it.

    The printer may gain Z difference, e.g. if I happen to press the bed while it's off.

    Is it possible to apply stall detection to the Z leveling such that instead of breaking something the printer will stop and complain?


  • Moderator

    @zapta said in Auto leveling with two independent Z steppers?:

    Is it possible to apply stall detection to the Z leveling such that instead of breaking something the printer will stop and complain?

    Reduce the motor current such that it stalls when blocked.



  • @Phaedrux said in Auto leveling with two independent Z steppers?:

    @zapta said in Auto leveling with two independent Z steppers?:

    Is it possible to apply stall detection to the Z leveling such that instead of breaking something the printer will stop and complain?

    Reduce the motor current such that it stalls when blocked.

    When you do that, ensure your Z travel speed between points is not too fast.
    Took me a while to work out the reason why I couldn't get consistent results was because the stepper was skipping steps when it tried to raise too quickly at the reduced current.



  • @Phaedrux said in Auto leveling with two independent Z steppers?:

    Reduce the motor current such that it stalls when blocked.

    That's a good idea. Thanks.



  • @OwenD said in Auto leveling with two independent Z steppers?:

    When you do that, ensure your Z travel speed between points is not too fast.

    What speed setting governs the Z adjustment? That is, that is, after the last sampling point, when the adjustment is done?



  • @zapta said in Auto leveling with two independent Z steppers?:

    @OwenD said in Auto leveling with two independent Z steppers?:

    When you do that, ensure your Z travel speed between points is not too fast.

    What speed setting governs the Z adjustment? That is, that is, after the last sampling point, when the adjustment is done?

    M558 F & T parameters, but probably limited by M203
    Not near my machine and can't remember which I ended up using to limit it in bed.g



  • I just did the same but I am pretty sure I do something wrong.

    My printer is not probing ans using the whole bed after I made the change.
    I have a blv cube.

    My config:

    M574 Z1 S2 ; Set endstops controlled by probe
    M307 H1 A370.4 C105.6 D6.2 B0 ; Set PID for hotend values
    M307 H0 A81.6 C189.1 D4.2 B0 ; Set PID for heated bed values
    M558 P5 H5 A20 F300 T9000 I0 R0.5 ; Set Z probe type mini ir sensor
    G31 P500 X-2 Y-16.4 Z0.715 ; Set Z probe trigger value, offset and trigger height
    M557 X30:270 Y30:270 S40 ; Define mesh grid
    M584 X0 Y1 Z2:4 E3 ; two Z motors connected to driver outputs Z and E1
    M671 X52:310 Y116:116 S1.5 ; leadscrews at left (connected to Z) and right (connected to E1) of X axis
    M208 X30:270 Y0:270 ; X carriage moves from -5 to 205, Y bed goes from 0 to 200

    My bed.g file

    ; bed.g
    ; called to perform automatic bed compensation via G32
    ;
    ; generated by RepRapFirmware Configuration Tool on Tue Oct 09 2018 13:27:56 GMT+0300
    M561 ; Clear any bed transform
    G28 ; Home All
    G30 P0 X52 Y106 Z-99999 ; Probe near a lead screw, half way along the Y axis (1st motor)
    G30 P1 X310 Y106 Z-99999 S2 ; Probe near a lead screw and calibrate 2 motors (2nd motor)
    G30 P0 X52 Y106 Z-99999 ; Probe near a lead screw, half way along the Y axis (1st motor)
    G30 P1 X310 Y106 Z-99999 S2 ; Probe near a lead screw and calibrate 2 motors (2nd motor)
    G28 ; Home All
    G29 ; Carry out mesh leveling

    What am I doing wrong here?


Log in to reply