Dual endstop on z axis not working

Basic Information:

Printer Model: Anycubic Vyper
MCU / Printerboard: STM32F103
klippy.log and config: klippyLogs.zip (14.4 KB)

Describe your issue:

*I have a dual z axis with dual end stops (Vyper) and running klipper for quite a while yet. Recently I just noticed that Z homing makes noise when homing and the z-homing is not finish correctly. It could be seen that during homing one stepper stops first and the other stepper continues until end stop is reached. This is normal operation. Though when the retraction (10mm) happens, then the 2 steppers do not lift up parallel, but one gets a offset. And it makes some strange stepper noise".
It looks like the stepper difference while homing is added back again when retraction happens.
If I change the printer.cfg to one end stop (still dual z steppers) then homing works fine. No noise from the steppers. Though the missbalance between z and z1 are not compensated.
From the debug logging I could not find any indicators. Thus I added a print statement in the “stepper.py:note_homing_end” function to see where the mcu position of the stepper is located.
Here the print outs for multiple z-home operations (with one end stop, reaction_dist: 0.0 - just one endstop move each time)

Blockquote
(‘Stepper:’, ‘stepper_z’, ‘StepperCPUPos:’, -3752)
(‘Stepper:’, ‘stepper_z1’, ‘StepperCPUPos:’, -3752)
(‘Stepper:’, ‘stepper_z’, ‘StepperCPUPos:’, -3752)
(‘Stepper:’, ‘stepper_z1’, ‘StepperCPUPos:’, -3752)
(‘Stepper:’, ‘stepper_z’, ‘StepperCPUPos:’, -3751)
(‘Stepper:’, ‘stepper_z1’, ‘StepperCPUPos:’, -3751)
(‘Stepper:’, ‘stepper_z’, ‘StepperCPUPos:’, -3751)
(‘Stepper:’, ‘stepper_z1’, ‘StepperCPUPos:’, -3751)
(‘Stepper:’, ‘stepper_z’, ‘StepperCPUPos:’, -3751)
(‘Stepper:’, ‘stepper_z1’, ‘StepperCPUPos:’, -3751)
(‘Stepper:’, ‘stepper_z’, ‘StepperCPUPos:’, -3751)
(‘Stepper:’, ‘stepper_z1’, ‘StepperCPUPos:’, -3751)

The homing is pretty repeatable.

If I do the same with 2 end stops enabled, the picture looks quite different:

Blockquote
(‘Stepper:’, ‘stepper_z’, ‘StepperCPUPos:’, -4260)
(‘Stepper:’, ‘stepper_z1’, ‘StepperCPUPos:’, -3056)
(‘Stepper:’, ‘stepper_z’, ‘StepperCPUPos:’, -4298)
(‘Stepper:’, ‘stepper_z1’, ‘StepperCPUPos:’, -2312)
(‘Stepper:’, ‘stepper_z’, ‘StepperCPUPos:’, -4302)
(‘Stepper:’, ‘stepper_z1’, ‘StepperCPUPos:’, -1589)
(‘Stepper:’, ‘stepper_z’, ‘StepperCPUPos:’, -4305)
(‘Stepper:’, ‘stepper_z1’, ‘StepperCPUPos:’, -872)
(‘Stepper:’, ‘stepper_z’, ‘StepperCPUPos:’, -4305)
(‘Stepper:’, ‘stepper_z1’, ‘StepperCPUPos:’, -172)
(‘Stepper:’, ‘stepper_z’, ‘StepperCPUPos:’, -4308)
(‘Stepper:’, ‘stepper_z1’, ‘StepperCPUPos:’, 483)

It looks like the 2nd stepper is adding and error each time of homing. I feel that this is the difference between the 2 endstops that should be compensated.
I tried some time to find some hint in the code where the 2nd stepper is not served correctly. Though didn’t manage to find the right spot in the code.

Not sure since I never used such a setup but defining homing_retract_dist = 0.0 on one Z but defaulting to 5mm on the second seems odd (hopefully Klipper is smarter than anyone who tries to do this)

Thanks for the fast reply. The homing_retract_dist = 0.0 I used to debug the problem faster. This setting is an allowed one and avoids the 2nd probe run (as the problem is already seen on the first home run path).
I meanwhile also changed the vref voltage of the board that specifies the driver current. Reducing from 1V (which seems to be too high), to the recommended 0.8V makes the problem even harder. With this setting the steppers do not really get properly to the end stop. Looks like the torgue is too small. In the first place I was sure this is a SW problem. Meanwhile it might also point to a HW problem. Though when homing is done, the Z moves work solid and without any unregular nose. Thus there must be something special to drive the steppers for the homeing sequence.

Is this really needed for the Vyper:

[multi_pin my_enable_pin]
pins = !PC14, !PC15

Can’t find any additional reference to it.
And doesn’t the Vyper have TMC drivers?

On my i3 Mega the Z drivers get 1.2 A but also have TR8x2 spindles though the new3 gantry is lighter than the original.

And dual endstop works like a charm when properly set.

As @Sineos already pointed you towards homing_retract_dist try it with 0.0.
But at first check the mechanical parts and lube the spindles.

This was just a try out to combine the enable pins, as to me it looked like the steppers lost torque during homeing. This experiment wasn’t successful. Thus I removed the multi pin enable, but missed to remove the multipin definition in the config file.
As you stated, it’s not used and thus do not harm.

Overall I didn’t mention. The original Vyper firmware, the z leveling worked as expected. No noise on the steppers when z-leveling retrieved.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.