Protect hardware from autoleveling sensor malfunction - keep Z-min endstop 2 mm below print surface

Hello, everybody. 
There are occasional reports that sometimes inductive or capacitive sensors used for bed autoleveling are failing to trigger and nozzle crashes into glass/bed and stepmotors get damaged. 

Is it possible to connect the sensor to some digital pin other than Z-min and on the same time to keep Z-min endstop? Z-min endstop will be set 2 mm below the printing surface level. So if sensor fails than nozzle pushes the bed and Z-min endstop triggers and stops further move down of the nozzle. 

Does anybody have experience setting this? Could you share your hardware/firmware configuration? 
I'm now installing NPN NO capacitive sensor (LJC18A3-H-Z/BX) on Prusa I3 from Sunhokey with Repetier host & firmware, obviously. 

Thank you. 


  • You can do this in hardware if you make it that any of the 2 sensors trigger the z min signal. So if you have 2 switches normally open the first one closing triggers it. Firmware will do that only if z min pin is not z probe pin.
  • Did I understand you correct: 

    To have homing, bed auto leveling and protecton against sensor failure three different pins should be used, like this: 

    Z-max endstop is connected to Z-max pin and I am homing there. 
    Capacitive sensor is connected to Y-max pin (I don't use Y-max endstop) and will be used for bed auto leveling. 
    Z-min endstop is located 2 mm under the bed and is connected to Z-min pin. If bed auto level sensor fails than nozzle pushes the bed down and this endstop will be triggered and will stop further down movement of the nozzle. 

    Thank you. 

  • Yes, what you describe should work fine.
  • edited March 2017
    Liebe Kollegen, 

    everything works fine and Zmin stop located 2 mm below the print surface has already saved my hardware several times during my experiments with auto leveling. THANK YOU VERY MUCH! 

    If you don't mind I have one more question. The printbed is not perfectly flat. When entering Z_MAX_LENGTH into the Configuration.h should I use the smaller height (distance between Zmax where my home is and highest point of the bed) or the biggest height (distance between Zmax where my home is and lowest point of the bed)? In my case the height difference between highest and lowest points is 0.5 mm. Distance from Zmax (home) to highest point is 198 mm. So, should I input 198 or better 199 mm as Z_MAX_LENGTH? Does this choice influence anything?
  • Homing max and autoleveling needs
    #define ENDSTOP_Z_BACK_ON_HOME 2

    or less then 2 but the value must be more then your height difference in bed. That way we can correct z at top without triggering z max causing z to get wrong.
    G32 S2 will save correct z length. Since it moves up/down also at z max the distance is always the same (after calibration).
  • Thank you!
Sign In or Register to comment.