Try with nothing connected, could be your endstop.wires are shorting