Getting an endstop switch to operate at the precise point that you want can be a hair tearing experience. Here is how I set up my Z-axis endstop on a Prusa i3 printer. The procedure should work with...