Auto bed leveling with z limit switch

Does anyone have a printer that uses bl touch or similar level probe but also has a z limit safety switch which is used to protect from bed crashes in the event that the probe doesn’t deploy? I am trying to figure out if this is possible Google search suggests it has been asked many times but I have not found a definitive answer or how to go about it I did think of having it set as a kill pin input but it would likely trigger on the first layer. Someone suggested just linking it in circuit with the bl-touch input but that would only protect during probing and would I think cause a crash as soon as the print actually started. Ideally a kill pin is needed that is only activate during leveling I think or something that if triggered during leveling will cause a error/abort warning and stop the leveling process.

You have to decide what sensor (switch/BLtouch) does the Z homing. You can not have both.
I have a dual Z axes printer and home with two micro switches.
I use the BLtouch only to create the bed mesh.

1 Like

That actually sounds like a very good idea! I have dual z motors but I am not sure how many input pins I have spare on this old board that I am currently using I would need one more input to do that. Where did you get the cfg for this section or did you create it yourself?

I was thinking about that a long while ago. But, never tried it.

Just put an z limit safety switch in series connection to your bl touch signal. Theoretical, I think that can work.

But!!! There is not much room!

Good luck, hcet1

1 Like

Series or parallel? If it’s series, then the input line will only trip if both sensors are active (switches closed). If in parallel, then it will trip if either sensor is active, which is what I think you want.

Regardless, I’m not sure how Klipper will handle unexpected triggered inputs from the BL Touch device that it has been programmed to work with. It may ignore the triggered input, it may throw an error or it may work.

1 Like

I agree, it’s not stupid proofed. Anybody who’ll try this attempt will have to play with the setup.

1 Like

The problem is that you need to be able to distinguish between contact from the BLTouch and the limit switch. Assuming that the BLTouch output is low when a contact has been made then this can be done by connecting the output of the BLTouch and the limit switch to the same pin, effectively forming a negative logic wired-OR signal: If either BLTouch or Zmin are contacted there will be a signal.

At this point, you need to determine if the signal came from the BLTouch or Zmin. This can be done by the common contact of the Zmin switch connected not to ground, but to a spare pin which is held at ground potential - perhaps call it SigRef. When a signal has been received the pin is taken high: If the common signal stays low then the BLTouch has made contact; but if it goes high then Zmin has been triggered before the BLTouch.

This will probably need a macro written to switch the SigRef output from Lo to Hi and flag an error if Zmin is triggered. It would be better if the states of the SigRef were GND and high impedance, but I don’t think that is presently available on Klipper. Note that you will also need a resistor (4K7) in series with the SigRef to avoid a short if both are trigered at the same time.

I use a method somewhat similar to this one of my printers, except that I have an under-bed pressure sensor serving for Zmin.

1 Like

No problem at all:

The limit/end switch is only active during (Z) homing.
So bed mesh with the BLtouch is no problem.

1 Like

I think it’s just about avoiding

Stop the printer before the nozzle crashes into the bed, if there is a bltouch faiiure.

As I read the scenario in your earlier post, the Zmin is triggered before the nozzle contacts the bed, but after the BLTouch should have operated. The gap is quite small - as you showed in your diagram.

The problems with these small gaps is why I actually detect nozzle contact. You can see my method at https://www.youtube.com/watch?v=DQXM4nrcsr4&t=102s This also has advantages in telling me if the nozzle is clean.

1 Like

No. The Zmin should be triggered after the bltouch sensor probe failed and crashed into the bed by the switch!

Oh yes, thats why I said

1 Like

Hello,

Maybe I’m just being dumb, but couldn’t you just wire the switch so it acts like a “tripwire” of sorts? So when it doesn’t deploy and the z axis hits the switch, the motor power is cut or redirected? That would of course put the printer into shutdown, but if your probe doesn’t deploy you will have to restart anyways so what would it matter?

If you want to do it with software, when the switch is triggered you could just have a motor stop command run (I don’t know how to do this but I know it can be done).

Best Regards,
Blake

1 Like

I have interpreted the Zmin switch as described in this thread as being more a fail detect switch for BLTouch deployment than a true Z datum.

1 Like

Don’t you trust your setup?

You may attach the Z end switch to the reset button.

When the BLtouch fails to deploy regularly, you should think about to fix that instead of a workaround.

2 Likes

I don’t use a BLTouch, but responded as I thought that I may be able to contribute some useful insights to the OPs problem.

On trusting my printer, I have a policy of “Trust but Verify”. A signal verifying that a desired action had been accomplished, such as BLTouch deployed, may avoid a damaged bed surface.

1 Like

So how do you verify the Zmin switch is working?

As some point you have to trust your hardware and if it isn’t working, fix it or replace it.

2 Likes

Indeed, at some point, you have to trust, but a simultaneous failure of a sensor to deploy, and the deployment sensor failing is unlikely. For myself, I prefer to have a reasonable level of monitoring of sensors.

I don’t know anything about the BLTouch, but if I were designing it then there would be an output to signal that the pin had successfully been extended when requested. It may do so; as I say, I don’t know the BLTouch.

1 Like

A BLtouch gives an error when it can not deploy, for example if the Z-Axis is too low.

https://www.klipper3d.org/BLTouch.html

1 Like

The OP asked,

Does anyone have a printer that uses bl touch or similar level probe but also has a z limit safety switch which is used to protect from bed crashes in the event that the probe doesn’t deploy?"

I have to assume that there wouldn’t be a problem with the BLTouch. On the other hand, he also says “similar level probe”, where a verification may be useful.

1 Like
  • The Z-axis only accepts one single sensor for homing.
  • There is no way to use a safety switch.
  • The only way is to completely rewrite the homing code deep within Klipper. That would also lever out the accuracy of the homing procedure.

That is the reason no one responded to the question of the OP

2 Likes