Dual Z Motors on Bigbox - Sanity Check



  • Hello,

    Before I try and change my config files to use 2 independently driven Z motors, can you give my proposed config files a once over. I have read https://duet3d.com/wiki/Bed_levelling_using_multiple_independent_Z_motors and it makes note of M584 and M671 which is all fine and i think I understand that (hence sanity check below config.g) but what about M569 and M906 (motor direction and voltages)? Do these need to be defined for the new driver or is that taken care of by M584?

    Is the below all I need to do (forget the bed.g for now, that seems strait forward) or do i need to add another line for M569 and M906?
    I have connected the second Z motor to Duex_5 port labelled E3 HOT.

    [c]; General preferences
    M111 S0 ; Debugging off
    G21 ; Work in millimetres
    G90 ; Send absolute coordinates…
    M83 ; ...but relative extruder moves
    M555 P2 ; Set firmware compatibility to look like Marlin

    ; Network
    M550 PBigBoxIdex ; Set machine name
    M540 P0x60:0x01:0x94:0x0C:0x54:0x28 ; set MAC address
    M552 P0.0.0.0 S1 ; Enable network and acquire dynamic address via DHCP
    ;M554 P172.16.0.1 ; Set gateway

    ; Drives
    M569 P0 S1 ; Drive 0 goes forwards (Z)
    M569 P1 S1 ; Drive 1 goes forwards (Y)
    M569 P2 S1 ; Drive 2 goes forwards (X)
    M569 P3 S1 ; Drive 3 goes forwards (U)
    M569 P4 S0 ; Drive 4 goes backwards (E0)
    M569 P5 S0 ; Drive 5 goes backwards (E1)

    ; Configure U axes, Dual Z Motors and Lead Screw Locations
    M584 X0 Y1 Z2:6 U3 E4:5
    M671 X-35:335 Y100:100 S0.5

    ; Movement
    M906 X680 Y900 Z1200 U680 E1200 I60 ; Set motor currents (mA) and motor idle factor in per cent (tweaked for motor temps)
    M201 X400 Y400 Z100 U400 E10000:10000 ; Set accelerations (mm/s^2)
    M203 X9000 Y9000 Z360 U9000 E3000:3000 ; Set maximum speeds (mm/min)
    M566 X480 Y480 Z24 U480 E300:300 ; Set maximum instantaneous speed changes (mm/min)
    M84 S30 ; Set idle timeout

    ; Stepping

    ; @ 16 Microsteps with Intterpolation
    M350 X16 Y16 Z16 U16 E16:16 I1 ; Configure microstepping without interpolation
    M92 X80 Y180 Z400 U80 E828:833 ; Set steps per mm

    ; Set limits 1 Normal 1 Mirrored Titan
    M208 X-13 Y-30 Z0.98 U40 S1 ; Set axis minima
    M208 X270 Y200 Z300 U323 S0 ; Set axis maxima

    ; Endstops
    M574 X1 Y1 Z1.2 U2 S1 ; Define active high microswitches
    M558 P1 X0 Y0 Z1 U0 H3 F200 T3000 ; Set Z probe type to unmodulated, the axes for which it is used and the probe + travel speeds (IR Probe)

    ; Offsets (Z offset seems to be greater the positive number the closer the nozzle to the bed)
    ;G31 X-11 Y60 Z1.5 ; Set Z probe trigger value, offset and trigger height (IR Probe) before pei bed
    G31 X-11 Y60 Z3.30 ; Set Z probe trigger value, offset and trigger height (IR Probe)

    ; Heaters
    M143 H0 S320 ; Set maximum heater temperature to 320C
    M143 H1 S320 ; Set maximum heater temperature to 320C
    M307 H0 A141.0 C620.4 D0.7 B0
    M307 H1 A333.3 C181.3 D6.7 B0
    M305 P0 T100000 B4388 C0.0000000000000000 R4700 L0 H30 ; Set thermistor + ADC parameters for heater 0
    M305 P1 X200 ; Set thermistor + ADC parameters for heater 1 and remap it to channel 200
    M305 P2 X201 ; Set thermistor + ADC parameters for heater 2 and remap it to channel 201

    M307 H3 A-1 C-1 D-1 ;
    M307 H4 A-1 C-1 D-1 ;
    M307 H5 A-1 C-1 D-1 ;
    M307 H6 A-1 C-1 D-1 ;
    M307 H7 A-1 C-1 D-1 ;

    M143 S320 ; Set maximum heater temperature to 320C

    ; Fans
    M106 P0 S0 I0 F10 H-1 B0.25 L30 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off (Print fan left)
    M106 P3 S1 I0 F10 H1 T40 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned on (Hotend fan left)
    M106 P2 S1 I0 F10 H2 T40 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on (Hotend fan right)
    M106 P1 S0 I0 F10 H-1 B0.25 L30 ; Set fan 3 value, PWM signal inversion and frequency. Thermostatic control is turned off (Print fan right)
    ;M106 P6 S0.5 I0 F5 ; Set fan 6 value, PWM signal inversion and frequency. (Cover fan)
    M106 P7 S1 I0 ; LEDs

    ; Grid
    ;M557 X10:260 Y10:195 S20
    M557 X10:260 Y10:195 S32

    ; Tools

    ; Printing tools
    ; Define tool 0
    M563 P0 D0 H1 X0 F0
    G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
    G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C
    M572 D0 S0.01 ; set pressure advance coefficient

    ; Define tool 1
    M563 P1 D1 H2 X3 F1
    G10 P1 U0.4 Y0.6 Z0 ; Set tool 1 axis offsets (Z0.8 for 8mm Nozel) - Y Value Greater for closer to Y0 - U Value Greater Closer to U0
    G10 P1 R0 S0 ; Set initial tool 1 active and standby temperatures to 0C
    M572 D1 S0.01 ; set pressure advance coefficient
    [/c]



  • Andyvirus,

    wouldn't you want the two Z motor to actually not operate independently? How would you create a levelling bed with just 2 point adjustment?

    Stephen



  • the bed is on 4 rods, the z motors are center left and right of the bed (Bed is 300x200, lead screws are adjacent to X150 Y100 either side of the bed). It would level left to right. Yes front to back would still need manual adjustment if that went out of alignment but for me that rarely happens, what does happen is i wipe the bed down and if the motors have no holding current one side goes marginally out. This would fix this.

    tested the above and it works a treat. never had the left and right side in such perfect alignment 🙂

    My question about M569 and M906 (motor direction and voltages) is my only real question now… it seems to work fine but just want confirmation. Also speed and steps M201 and M203 and I guess M566? Do i need to reference the aditional driver at all and if so, how. If not, please could i have confirmation as i dont want Z1 all set correctly and Z2 out of step speed, voltage etc wise.


  • administrators

    M569 commands apply to individual motor drivers. If there is no M569 command for a driver, it defaults to forward motion and standard timing. So I guess the way you have wired the motor, forward motion is correct.

    Your M906 command should come after the M584 command, then the Z current parameter will be applied to both Z motors. Your M201/203/566 etc. commands need to take account of the U axis you created, but not additional Z motors.

    HTH David



  • Thanks! So far all working great. Quieter Z movements too as an unexpected side effect. Happy customer 🙂


  • administrators

    @andyvirus:

    Thanks! So far all working great. Quieter Z movements too as an unexpected side effect. Happy customer 🙂

    I'm glad you're happy. You might care to share your experience on the E3D BigBox forum, because I don't think I've read of anyone else driving the two Z motors in a BigBox independently.



  • Well, I've had that for some months now 😉 Thanks to your help David 😄 But with the help of two extra endstops at Z max.

    Andyvirus, what fw are you on? I just upgraded to 1.19.2 today and have not looked at the new multi Z leveling yet.

    You can read abut my setup with 1.18.1 and two endstops here: https://forum.e3d-online.com/index.php?threads/bigbox-dual-optical-z-max-endstops.2675/

    I also hope to test dual Z leveling soon with the IR probe.



  • Hi DC42, will do! Just upgraded to a MGN12 Rail for IDEX so will bring it up there too.
    I have just found an odd issue with G32 though that you might be able to help with:

    In my bed.g i have:

    [c]G30 P0 X20 Y100 Z-99999 ; probe near a leadscrew was x32
    G30 P1 X270 Y100 Z-99999 S2 ; probe near a leadscrew and calibrate 2 motors[/c]

    and in config.g: [c]G31 X-33 Y-5 Z0.58 ; Set Z probe trigger value, offset and trigger height (IR Probe)[/c]

    It seems that on the first probe it takes into account the z prob offset i set in G31 (Z-33) - Great
    On the second probe it tries to move to 33mm more to the right than is possible. For now i have set the second probe (right) to 237 to compensate.

    Maybe I am using G31 wrong but seems to work perfectly in G29 (respects limits minima and maxima).
    I have an IR sensor on X carriage which is 33mm to the left of the nozel (now, was at rear 60mm Y).

    Hi Strips, I am on 1.19.2. I will take a look at what you have done!


  • administrators

    You should only put G30 XY coordinates in bed.g that the probe (not the nozzle) can reach.

    With an X offset of -33 in the G31 command, the head will be moved to the X offset you want to probe minus the -33mm; in other words to the X you asked to probe plus 33mm. So when you asked it to probe at X=270mm, it tried to move the head to X=303mm.



  • @dc42:

    You should only put G30 XY coordinates in bed.g that the probe (not the nozzle) can reach.

    With an X offset of -33 in the G31 command, the head will be moved to the X offset you want to probe minus the -33mm; in other words to the X you asked to probe plus 33mm. So when you asked it to probe at X=270mm, it tried to move the head to X=303mm.

    Ok makes sense. Probe not Nozzle. Got it. Thats what i was mistaking. Thanks!



  • @dc42:

    @andyvirus:

    Thanks! So far all working great. Quieter Z movements too as an unexpected side effect. Happy customer 🙂

    I'm glad you're happy. You might care to share your experience on the E3D BigBox forum, because I don't think I've read of anyone else driving the two Z motors in a BigBox independently.

    Done. Quoted you post on the E3D BigBox forum anouncing the leveling fearture using 2 or more motors.



  • How well does the true leveling work? I have a bed with 3x linear MGN12 rails in a triangle driven by 3x 1204 ballscrews. I’m afraid of movement when it’s powered down and then binding before it gets to auto level. Is this a true problem or should I just give it a go? Need a deux5 card to make it happen so don’t want to dive in just to fail ^^


  • administrators

    You can configure a maximum amount of individual leadscrew adjustment to apply in the M671 S parameter, to avoid binding. No adjustment will be performed if the adjustment to any leadscrew would exceed that limit.

    You can test how well it would work before you buy a DueX by using the manual bed levelling assistant, which uses the same code. See https://duet3d.com/wiki/Using_the_manual_bed_levelling_assistant.


 

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