Some endstops are needed in a 3D printer , this opto Endstop for CNC 3D Printer RepRap Makerbot Prusa Mendel RAMPS is very accurate and reliable . When the light inside the sensor is blocked, Opto Endstop will immediately output the digital signal, and the LED will be on thus to remind you the working state of this sensor. For the installation, Makers made some useful suggestions such as
here.