Bltouch Bed compensation



  • Hello Guys,

    My BLTouch is now working as an expensive z end stop which is great progress for me, to top that I even got it working to the point where it goes through the probe points for the g32 command YEAH.

    However, during the g32 command, the probe goes to the first point and it triggers goes up then goes to the second point at which case it crashes into the bed.

    Please Help.

    [[language]]
    config.g
    ; Endstops
    M574 E0 S1 ; Set active low endstops
    M574 X1 Y1 S1 ; Set active low endstops
    ;M558 P0 X0 Y0 Z0 H5 F120 T6000 ; Set Z probe type to switch, the axes for which it is used and the dive height + speeds
    ;Mechanical Endstop;G31 P500 X0 Y0 Z2.5 ; Set Z probe trigger value, offset and trigger height
    M557 X0:150 Y0:170 S20 ; Define mesh grid
    ;BLtouch
    M307 H3 A-1 C-1 D-1 I1 ;Disable heater
    M558 P4 X0 Y0 E0 H20 F120 T1000 I1 ;Set Z probe type to switch, the axes for which it is used and the dive height + speeds
    G31 P50 X17 Y22.5 Z2
    
    ; bed.g
    ; Clear any bed transform
    M561
    ; Home all axes
    G28
    ; Probe the bed at 5 points
    M280 P3 S10 I1
    G30 P0 X25 Y25 H0 Z-99999
    G30 P1 X25 Y175 H0 Z-99999
    G30 P2 X155 Y175 H0 Z-99999
    G30 P3 X145 Y28 H0 Z-99999
    G30 P4 X50 Y120 H0 Z-99999 S
    M280 P3 S60 I1
    
    Deployprobe.g
    M280 P3 S10 I1
    
    Retractprobe.g
    M280 P3 S90 I1
    
    ; homeall.g
    G91                     ; relative positioning
    G1 Z5 F6000             ; lift Z relative to current position
    G1 S1 X-205 Y-205 F900 ; move quickly to X and Y axis endstops and stop there (first pass)
    G1 X5 Y5 F6000          ; go back a few mm
    G1 S1 X-205 Y-205 F360  ; move slowly to X and Y axis endstops once more (second pass)
    G92 X0 Y-26.1 
    G1 Y0
    M280 P3 S10 I1
    G1 S1 Z-185 F100     ; move Z down stopping at the endstop
    G90                     ; absolute positioning
    M280 P3 S60 I1
    G92 Z1.5                ; set new Z position
    
    ; homez.g
    G91               ; relative positioning
    M280 P3 S10 I1
    G1 Z5 F6000       ; lift Z relative to current position
    G1 Z-185 F100 S1 ; move Z down until the switch triggers
    M280 P3 S60 I1
    G92 Z2.5          ; set Z position to trigger height
    
    


  • one thing that i noticed. It should be deployprobe.g not Deployprobe.g and retractprobe.g not Retractprobe.g.



  • Also if you have the deploy and retract files named and set up correctly you can use M401 and M402.

    homeall.g

    [[language]]
    G91				; Relative Positioning
    G1 Z5 F6000			; Lower Z
    G1 S1 X-305 Y-305 F3000   	; course home X or Y
    G1 S1 X-305               	; course home X
    G1 S1 Y-305               	; course home Y
    G1 X4 Y4 F600             	; move away from the endstops
    G1 S1 X-10                	; fine home X
    G1 S1 Y-10                	; fine home Y
    T0 				;select tool	
    M280 P3 S160 I1			;release Z probe alarm
    G1 Z5 F200 			;lower bed
    G4 P500 			;wait for the bed to lower
    M401				;deploy the probe
    G30 				;calibrate Z-axis
    M402				;Retract Probe
    G90				;Absolute positioning
    G1 Z0 F100			;Move to Z 0
    
    

    homez.g

    [[language]]
    T0 			;select tool
    G91 			;relative coordinates	
    M280 P3 S160 I1		;release Z probe alarm
    G1 Z5 F200 		;lower bed
    G4 P500 		;wait for the bed to lower
    G90 			;absolute positioning
    G1 X0 Y0 F3000 		;move to 0,0
    M401			;deploy the probe
    G30 			;calibrate Z-axis
    M402			;Retract Probe
    
    


  • I will try get the g32 working now too. I have been trying to get this working as well.

    Update:
    My deploy and retract names were off before too. i had ".g file", never tried after i renamed. But it does work for me after correcting the names.



  • Please help guys.
    Ive been knocking my head against the wall in trying to get the bltouch working with all kinds of trials, errors and code change
    I also just upgraded the firmware from 1.18.1 to 1.2 to actually see if any changes are made-didn't make the difference.

    Other insights include:
    G29 has certain axis trying to pass the endstops (y axis for instance),
    when connecting to the probe connector the bltouch deploys but doesn't act like a z end stop i.e. when i touch the pin z axis continues moving down(using the Mode 5) The best example of this working is when bltouch is connected to my z endstop connector through mode 4…

    Please help guys, i really love the duet but some things that are more common such as probing seem to be complicated, i had the probing for the my basic anet A8 working without an issue and that was when i didnt know any better.


  • administrators

    Some suggestions:

    • don't use M280 commands explicitly to deploy and retract the probe anywhere except in deployprobe.g and retractprobe.g. if you need to deploy or retract the probe explicitly, use M401 and M402 instead. That way the firmware can track whether the probe is deployed or not.

    • probe deployment is handled automatically in firmware 1.19 and later. So you don't normally need to use M401 and M402 anyway, except perhaps in bed.g to deploy and retract the probe just once instead of at every probe point

    • in your homez.g file and Z homing section of homeall.g, use a G30 command not a G1 S1 Z command

    • if mode 5 isn't working, this suggests that the output voltage of the Z probe is too low

    • if it is trying to exceed the bounds of the Y axis, this suggests that your M208 settings for the Y axis are not correct.

    HTH David


 

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