Detect Z Probe Malfunction and Automatic Z Height Calibration



  • Overview of Issue

    Occasionally the BLTouch does not trigger and the nozzle rams into the bed, throwing the bed out of tram, denting the bed surface and dragging the nozzle across it.

    Typically this is resolved by clearing the alarm or physically extending and retracting the probe, but of course, this is after the nozzle has already damaged the bed. This doesn't happen often but enough that it's left scars across the bed surface.

    Possible Solution

    What if an endstop switch was mounted outside the bed area and orientated so the z probe could activate it? My thought is that conditional gcode could be used to stop the print if the endstop switch was activated before the z probe was triggered. This seems possible as long as the endstop switch tension is higher than the z probe sensitivity. Meaning if the BLTouch probe would retract when touching the switch before the switch triggered.

    This could catch the rare but frustrating occurrence where the probe didn't deploy properly since the endstop triggered first because the z probe wasn't deployed and couldn't be triggered. What do you think? Seems like this should work.

    Z Height Calibration

    Wondering if this endstop could also be used to perform automatic z height calibration? A shelf at the switch's trigger height could be made. The nozzle would first come down and trigger the endstop, setting Z 0, then the z probe come down and touch the shelf and the difference between the two could be used to calibrate the z probe. What do you think? Seems like this would be possible with conditional gcode and would be an easy way to recalibrate after a nozzle change!



  • Why is it failing? In particular, is it in "alarm" state from a slight overmovement on a prior probe?

    Usually, retractprobe.g is the single statement M280 P0 S90. Try adding M280 P0 S160 as the first statement. This resets error states, and is harmless if the probe is not errored at that moment.



  • Thanks @Danal, the deploy probe macro already has the alarm clear command. What I’ve noticed is the BLTouch is in error state at printer power on and the clear alarm command does not resolve the issue. The worst part of this is the print continues and the nozzle digs into the bed even though the probing failed. From what I saw in another post is that according to Phaedrux there is no way to prevent this since the BLTouch is open loop.

    What I’m attempting to do is make the z probe a closed loop system where the print can only continue if the probe is operational. This would cover scenarios where the probe malfunctions or is disconnected. On printers where the probe is used to home z, this seems like a good failsafe.

    Also I think the auto Z offset would be very beneficial. Handy for nozzle changes or if an adjustment is made to the hotend but would be extremely useful for tool changers or multi extruder systems.



  • Sounds great. I'm not quite getting how the offset between the switch and the probe tells you how far the nozzle is screwed into the heat block... but it is not really important if I get that.



  • @Danal what I’m thinking is if the nozzle comes down and touches the endstop, it will set Z0 at that height, then if the probe is deployed and touches a shelf that is at the same height as the switch’s trigger height, the difference between the two would be the probe offset. This would calculate the distance between the nozzle and probe for every print or every power on of the printer so the probe z offset would always be accurate. If you changed a nozzle or something on the hotend, the offset would automatically be updated so the nozzle doesn’t crash into the bed.


Log in to reply