3 Lead Screw Bed Correction (Idiot Check ;-) )



  • Hi All,

    Finally migrated the works machine from Duet 0.6 to Duet Ethernet with Duex5 and a Panel Due. One of the main objectives for this was to enable the three lead screw control in order to automate the set up procedure.

    I've rewired and commissioned the new electronics and checked that my machine coordinates put the head in logical positions in relation to the bed. In addition I've following the steps on the following link to try and get the correction working.

    Have I missed anything obvious? When I view the height map I see an upward slope on the front to the back of the machine?

    https://duet3d.dozuki.com/Wiki/Bed_levelling_using_multiple_independent_Z_motors#How_it_works

    Firmware: 2.0(RTOS)RC1 (2018-05-02b1)
    Web Interface: 1.21.1-RC1
    Machine: 300x300 spauda thingverse
    https://www.thingiverse.com/thing:1001065
    (Modified with third lead screw, relocated original screws, and front of elevator additional wheel guides for the z-axis)

    Critical bits in the config:
    M667 S1 ; Select CoreXY mode
    M208 X0 Y-5.0 Z-10 S1 ; Set axis minima
    M208 X325 Y300 Z299 S0 ; Set axis maxima
    M584 X0 Y1 Z2:5:6 E3 ; Driver 0 controls the X motor, 1 controls Y, 2 and 3 control Z motors, 4 and 5 control E motors.
    M671 X150:-52:352 Y442:50:50 S1 ; Z leadscrews are at (150,441), (-51,50) and (351,50). Max correction 1mm
    M574 X1 Y2 Z2 S1 ; Define active high microswitches
    M558 P4 X0 Y0 Z0 H10 I0 F500 T6000 ; Use switch on E0 for z probing. Not used for homing. Normally closed (I1 = NO).
    G31 X-24.7 Y4 Z20.445 ; sets offset for probe.
    M556 S74.5 X0 Y-0.5 Z-0.5 ; Set orthogonal axis compensation parameters
    M557 X0:297.3 Y2:284 S29.73:28.2 ; Define mesh grid

    My bed.g
    ; Probe the bed near lead screws.
    G30 P0 X150 Y300 H0 Z-99999 ; probe near a leadscrew
    G30 P1 X0 Y50 H0 Z-99999 ; probe near a leadscrew
    G30 P2 X300 Y50 H0 Z-99999 S3 ; probe near a leadscrew and calibrate 3 motors
    G1 X150 Y150 F2000

    My INIT Macro
    M98 P"/sys/homeall.g"
    M98 P"/macros/RunScrewSet"
    M98 P"/macros/BedProbe"

    /macros/RunScrewSet
    G29 S1 P"0:/sys/zeroheightmap.csv" ; Removed bed probe correction.
    G32
    G29 S1 P"0:/sys/heightmap.csv" ; Reloads bed probe correction.

    /macros/BedProbe
    G29 S1 P"0:/sys/zeroheightmap.csv"
    M557 X0:297.3 Y2:284 S29.73:28.2 ; Define mesh grid.
    G1 Z30 F3000 ; Move hot end.
    M98 P"/macros/Centre"
    G29 S0 P"0:/sys/heightmap.csv" ; Run bed probe.
    G1 Z30 F3000 ; Move hot end.
    M98 P"/macros/Centre"

    Notes:
    The centre macro just moves the head to the centre of the build area.
    The zeroheightmap.csv just loads a zeroed out height map. I was concerned that M561 would wipe the orthogonal correction as well as the height map. I guess a better approach may be to use M561 then reload the configuration file at the end.


  • administrators

    M561 and G29 S2 do not affect orthogonal axis correction.

    You may need to run G31 more than once to get the bed sufficiently level, because the mathematical model used assumes perfect gimballed joints between the leadscrews and the bed.



  • @dc42 Thanks for the hints. So does M561 and loading a zeroed height map achieve the same thing?

    You mean run repeated G32? Is there any way to recall the offset settings currently being used, or is it a nudge and forget sort of correction? I understand if it is the latter as in theory this is correcting for an arbitrary loss in position when the motors aren't being driven.



  • Added two more G32 calls to my bed screw calculation and got the following result:

    Maximum deviations: -0.097 / 0.070 mm
    Mean error: -0.003 mm
    RMS error: 0.040 mm

    Happy with that for no faffing about! 🙂


 

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