Endstops and limit switches are very useful for robotic applications. These allow motors/actuators to reproducibly reach a “home” or “start” position and keep from moving off-track.
Found a great optical endstop solution:
https://reprap.org/wiki/Gen7_Endstop_1.3.1
https://www.reprap-diy.com/gen7_endstop_1.3.1

