Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to have a dedicated Z Switch pin instead of just using the Probe Pin? #133

Open
SomeSpaceNerd opened this issue Jan 6, 2024 · 10 comments

Comments

@SomeSpaceNerd
Copy link

I have Klipper on an Anycubic Kobra 2 Neo, and its stock Auto Z-Offset has a little switch on the end of the bed. The stock firmware first probes the middle of the bed, and then goes over to the dedicated switch to get the Z offset. Is there a way to do that with this plugin?

@AJolly
Copy link

AJolly commented Feb 2, 2024

We'd have to figure out the pins. The virtual z-endstop is giving me all sorts of issues on this machine. It's extremely unreliable:
image

@SomeSpaceNerd
Copy link
Author

That’s a lot of Deviation, I noticed that a lot on the stock firmware Z offset display but not much with klipper. As for the pin I believe it’s PA8, but I don’t see any way to do it regardless with this plugin.

@AJolly
Copy link

AJolly commented Feb 4, 2024

Button is PA10 figured that out today. haven't figured out which ones for the filament run out sensor.

@SomeSpaceNerd
Copy link
Author

Now that we know the switch pin is PA10, is there a way to get the auto Z offset function working using both the probe and button?

@AJolly
Copy link

AJolly commented Feb 4, 2024

If I'm understanding the requirements right for this project, we need:

  1. A z endstop where the tip of the nozzle drives on a switch (like the standard Voron V1/V2 enstop). It does not work with the virtual pin of the probe as an endstop! - We now know the pin pin PA10, nozzle dives and pushes the button to activate the switch.

I need to figure out the rest of the config to get klipper to properly use this as the z-endstop. Right now the klipper configs are using the same as marlin - using the induction sensor.

Poking around the marlin configs, it looks like the correct position to test at is -
#define NOZZLE_X 60 //calibration module x pos
#define NOZZLE_Y 240 //calibration module y pos

  1. A magnetic switch based probe at the print head - instead of the standard inductive probe (e.g. this one from Annex, or the popular drop in replacement KlickyProbe with many mounting options)
    This would need to be added to the kobra2 neo, since right now it uses a crappy induction sensor.
    I need to go learn this and figure otu what we'd need to do.

TLDR: It's possible to get both auto z-offset and this project working, just have to spend some time figuring it all out.

@AJolly
Copy link

AJolly commented Feb 4, 2024

This works for me for using the button as the endstop.

[stepper_z]
step_pin: PB0
dir_pin: !PB1
enable_pin: !PA15
microsteps: 16
rotation_distance: 8
position_min: 0
position_max: 220
homing_speed: 2
second_homing_speed: 1
endstop_pin: ^PA0

[safe_z_home]
home_xy_position: 56,238.5
speed: 250
z_hop: 10
z_hop_speed: 15

@D3ltorohd
Copy link

This works for me for using the button as the endstop.

[stepper_z] step_pin: PB0 dir_pin: !PB1 enable_pin: !PA15 microsteps: 16 rotation_distance: 8 position_min: 0 position_max: 220 homing_speed: 2 second_homing_speed: 1 endstop_pin: ^PA0

[safe_z_home] home_xy_position: 56,238.5 speed: 250 z_hop: 10 z_hop_speed: 15

When i try this in printer.cfg this message comes.

image

Is this only working, when i install the plugin ? And when it works, this is the auto z offset function like in the original FW ? So i did not have to do this manual with an paper ?

@Neuroplant
Copy link

Hi,
So am I right that it is not possible to make this work without additional hardware?
Don't get me wrong, but if your printer is equipped with a Z-probe, it does not have a (redundant) Z-endstop.
If you add a Z-probe yourself, you usually reuse the pin of the (then no longer needed) Z-endstop.
Does anyone use this add-on? Do you always need three pins? Or how is this solved on other printers?

Neuroplant

@TitusLabs
Copy link
Member

I don't know anything about your printer. But what @AJolly has written seems plausible 👍

You need a z-enstop pin for the nozzle and the magnetic switch probe (not used as virtual z endstop).

@TitusLabs
Copy link
Member

@D3ltorohd you need to set a position_endstop value in your stepper_z section 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants