Rappetor / Sovol-SV08-Mainline

Getting the Sovol SV08 onto mainline Klipper
GNU General Public License v3.0
105 stars 25 forks source link

Eddy homing runs head into carriage + fix (return to homing_override) #96

Open froh42 opened 1 day ago

froh42 commented 1 day ago

I installed an eddy probe on my SV08 and noticed that the homing sequence is different from the one with the traditional probe. And as it homes x first, leaves the head completely at max x and then homes y it runs the head into the carriage resulting in an evil klick and possible mechanical strange.

To fix this disabled the safe_z_home and in eddy.cfg and copied over the traditional homing_override from stock.cfg - and also disabled the G28 override macro that automatically calculates the z offset from the probe.

The rationale is - I do homing with the probe anyways, calculating a z offset from the same probe that homed ist a bit strange and also "slightly" discouraged in btt's eddy documentation (https://github.com/bigtreetech/Eddy/blob/master/README.md#extra-info)

I'll keep this running for a bit of time and if everything works out fine, I'll probably add a pull request with similar changes here. (Similar - if the sequence is identical, it belongs into something common, like sovol-macros.cfg, not two copies in stock.cfg and eddy.cfg)

excerpt from my eddy.cfg:


; [safe_z_home]
; home_xy_position: 172, 172
; z_hop: 10
; z_hop_speed: 25
; speed: 200

[homing_override]
gcode:
   {% if not 'Z' in params and not 'Y' in params and 'X' in params %}
     G28 X
     G0 X191 F3600
   {% elif not 'Z' in params and not 'X' in params and 'Y' in params %}
     G28 Y
     G0 Y165  F3600
   {% elif not 'Z' in params and 'X' in params and 'Y' in params %}
     G28 Y
     G0 Y165  F3600
     G4 P2000
     G28 X
     G0 X191  F3600
   {% elif 'Z' in params and not 'X' in params and not 'Y' in params %}
     G90
     G0 X191 Y165 F3600
     G28 Z
     G0  Z10 F600
   {% else %}
     G90
     G0 Z5 F300
     G28 Y
     G0 Y165  F3600
     G4 P2000
     G28 X
     G0 X191  F3600
     G90
     G0  X191 Y165 F3600
     G28 Z
     G0  Z10 F600
   {% endif %}
axes: xyz
set_position_z: 0

###############################Macros and related################################

; [gcode_macro G28]
; rename_existing: G28.1
; gcode:
;   G28.1 {rawparams}
;   {% if not rawparams or (rawparams and 'Z' in rawparams) %}
;     PROBE
;     SET_Z_FROM_PROBE
;   {% endif %}
Rappetor commented 1 day ago

I do use their z_offset macro's, they do say in their docs The Eddy should not need the use of a z-offset since it is calibrated to understand where z=0 is. Nevertheless, if you would like to use a z-offset then you should use the sample config file that includes z-offset functionality. and then explain how to set that z_offset. But they don't state if their scripts are being used in that z-offset info or not. I'm not sure if the z-offset is changed properly if you dont use their macro's for it (never tested it).

In my case at least I have always needed some z-offset adjustment, no matter how I set it up. And thought their script was always needed for this 😄

However, if you do want to use their z_offset macro's, I run the following (do with this info as you like):

  1. comment/remove the BTT Eddy G28 macro (don't need that anymore)
  2. comment/remove the [safe_z_home] in the eddy config (don't need that either)
  3. Use the following [homing_override] section:
    [homing_override]
    gcode:
    # Move 5 up, just in case (this is our safety zhop, this needs 'set_position_z: 0' below)
    G91 ; set relative positioning
    G0 Z5 F1000 ; 5 up zhop
    {% if not rawparams or 'Y' in rawparams %}
    {action_respond_info('Homing Y')}
    G28 Y
    G90 ; set absolute positioning
    G0 Y177.5 F6000 ; return to center
    M400 ; Wait for move to finish
    {% endif %}
    {% if not rawparams or 'X' in rawparams %}
    {action_respond_info('Homing X')}
    G28 X
    G90 ; set absolute positioning
    G0 X177.5 F6000 ; return to center
    M400 ; Wait for move to finish
    {% endif %}
    {% if not rawparams or 'Z' in rawparams %}
    {action_respond_info('Homing Z')}
    G90 ; set absolute positioning
    G0 X177.5 Y177.5 F6000 ; return to center
    G28 Z
    G91 ; set relative positioning
    G0 Z10 F1000 ; 10mm zhop before probe
    PROBE
    SET_Z_FROM_PROBE
    G0 Z5 F1000 ; 5mm up
    M400 ; Wait for move to finish
    {% endif %}
    G90 ; set absolute positioning
    axes: xyz
    set_position_z: 0 # This forces the z position to be at 0 when we start homing, so we can move the Z up before homing.

    And I have the following in my [stepper_z] printer.cfg:

    homing_speed: 5.0
    homing_retract_dist: 5.0
    homing_retract_speed: 15.0
    second_homing_speed: 5.0

As you can see, it does a z-hop before homing for safety (I guess 5mm is enough). And then does the homing. It doesn't do the elif which allows for normal G28 behaviour, like: G28 XY to home just X and Y (or everything when just calling G28) and makes it a bit shorter/simpler.

On the Z homing it moves to the center (one could add the probe offsets to the coordinates to be exact on center with the probe, doesn't seem to matter that much though). And it does the Z probing in multiple stages with a rather big z-hop in between. And position the nozzle 5mm above the printbed after it's done.

(btw, it calls for a PROBE command because BTT uses printer.probe.last_z_result in their SET_Z_FROM_PROBE macro, which apparently needs a PROBE beforehand.. 🤷 ).