Summary
Replaces the mechanical switch Z endstop - This endstop is super critical to get good bed adhesion. I feel that the original mechanical switch one was not as repeatable as this optical one is.
You can find the optical switch on Ebay, search for "Slot Type Optical Coupling" they are around $1.5 each. The pinout is usually printed on the back, DO is the digital out which you connect to the original switch signal lead, AO is analog out that you can leave unconnected. I bent the header pins straight up so I could get it closer to the top plate, they were at 90deg.
The makergear M2 (at least my version) had an LED indicator mounted next to the switch, this LED had its Cathode (-) to one side of the switch (connect this lead to DO), and its Anode (+) side connected to an extra wire that just goes back to VCC on the PCB(connect this lead to + on optical switch). The common ground from the switch and LED is then connected to the optical switch GND. - Yours could be wired differently though - check with a multimeter before hooking up.
Optical endstop - must recompile Marlin firmware to invert the Z end stop sensor signal - or invert the signal with a NOT gate if you don't like recompiling things..
For Marlin firmware the relevant setting is:
"const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop."
For best results use this along with my constant nut tension device:
http://www.thingiverse.com/thing:973075/
Youtube video covering my various Makergear M2 Mods:
https://youtu.be/jD6ZTcCd0j8
Model Source
