COMPLETE BigBox dual optical Z max endstops

Discussion in 'Guides, Mods, and Upgrades' started by Stian Indal Haugseth, May 9, 2017.

  1. Stian Indal Haugseth

    Stian Indal Haugseth Well-Known Member

    Joined:
    Sep 11, 2015
    Messages:
    589
    Likes Received:
    100
    From the beginning I wanted the possibility to level the Z motors reliably. As I have kids on the curious side of life I think it's just a matter of time before they realize they can turn the Z couplers.

    With mesh bed leveling I tried to get this to work on Marlin and Repetier but I felt I kept hitting bugs. But it was more likely user error.

    I finally got this working perfectly with Duet Wifi and the help of David Crocker on their forums.

    I'll post my config and macros later when I'm home.

    The 3D parts I created are here: http://www.thingiverse.com/thing:2306211

    I used two PiBot optical slot switches as endstops: http://www.pibot.com/pibot-optical-endstop-rev16.html

    IMG_20170509_055829.jpg IMG_20170509_055851.jpg IMG_20170509_055929.jpg IMG_20170509_055953.jpg
     
    Chris Toast, Arcson, Alex9779 and 4 others like this.
  2. R Design

    R Design Well-Known Member

    Joined:
    Oct 7, 2015
    Messages:
    944
    Likes Received:
    190
    some vacation!
     
  3. Stian Indal Haugseth

    Stian Indal Haugseth Well-Known Member

    Joined:
    Sep 11, 2015
    Messages:
    589
    Likes Received:
    100
    How time flies and many other projects get in the way :)

    Sigh... thought to do it now but as the printer is printing and I can not access the Duet web. Had this issue a few times. Will see if I can access it when the print is finished to extract the macros and setup
     
  4. Stian Indal Haugseth

    Stian Indal Haugseth Well-Known Member

    Joined:
    Sep 11, 2015
    Messages:
    589
    Likes Received:
    100
    This config and macro works in fw 1.18 on Duet.

    It is worth to know that this might no longer be necessary in fw 1.19 because of support for multiple z-motor leveling by z probe. But I like to have the endstops there in place as a safeguard if I accidentally try to push the bed through the bottom.

    And I can use them before I do a manual adjustment of the bed before auto z leveling and auto mesh leveling once in a while.

    The remapping below is to map Z to stepper output 2 and 5. Then I also map U to 5 for whenever I want to move just the one. I might be able to rid my self of that and only define it in the macro.


    config.g:
    Code:
    ...
    
    ; Motor remapping for dual Z
    M584 X0 Y1 Z2:5 U5 E3:4
    
    ; Axis and motor configuration
    M569 P0 S0                ; X,  Drive 0 goes reverse
    M569 P1 S0                ; Y,  Drive 1 goes reverse
    M569 P2 S0                ; Z0, Drive 2 goes reverse
    M569 P3 S1                ; E0, Drive 3 goes reverse
    M569 P4 S1                ; E1, Drive 4 goes reverse
    M569 P5 S0                ; Z1, Drive 4 goes reverse
    
    M350 X16   Y16   Z16:16     U16   E16:16 I1    ; Set 16x microstepping with interpolation
    M92  X160  Y360  Z1600:1600 U1600 E400.8:400.8    ; SET AXIS STEPS/MM
    M906 X700  Y700  Z700:700   U700  E400:400 I60    ; Set motor currents (mA) and increase idle current to 60%
    M906 Y1100  ; temp current for debugging
    M201 X1000 Y500 Z500:500   U500  E1000        ; Accelerations (mm/s^2)
    M201 Y300     ; Temp acc for debugging
    M203 X6000 Y6000 Z720:720   U720  E3000:3000    ; Maximum speeds (mm/min)
    M203 Y3000 ; temp for debug
    M566 X600  Y600  Z30:30     U30   E120:120    ; (jerk) Maximum instant speed changes mm/minute
    M566 Y300     ; temp for debug
    M84   S30                                   ; Reduce current to all steppers after 300 seconds of inactivity on all axes.
    
    ; Endstops
    M574 X1 Y1 Z2 U2 S1            ; set endstop configuration (all endstops at high end, active high)
    
    ...
    
    z leveling macro:
    Code:
    G91                     ; relative mode
    M584 Z2                 ; split Z and U
    G1 Z330 U330 F3000 S1   ; move up to 330mm in the +Z direction, stopping if the homing switch is triggered
    G1 Z-4  U-4  F600  S2   ; move 4mm in the -Z direction
    G1 Z10  U10  F70   S1   ; move slowly 10mm in the +Z direction, stopping at the homing switch
    M584 Z2:5               ; join U to Z again
    G1 Z-10      F3000      ; move back again 10mm in the -Z direction
    G90                     ; back to absolute mode
    
     

Share This Page