1 Optical switch OPB829 (PHCT203 or similar)
2 Screws 3x8 (Self-tapping)
2 Neodymium cube de 3x3x3mm N35
1 Paper clip (1mm diameter)
1 Spring 20mm x 8 to 10mm ID (internal diameter) and soft tension
Glue the neodymium cube (Sphere or ball would also work) in the housing of the horizontal rod (StemH.stl), and another at the upper end of the vertical rod (StemV.stl).
At the lower end of the vertical rod, use a piece of 20mm paper clip so that the piece does not deform with the heat of the bed. +/- 10mm are out.
The Wall.stl & Strap.stl pieces were created for the model of my printer http://forums.reprap.org/read.php?397,297740 then you may have to redo them to yours.
And Gcode Start in your slicer must have:
G1 Z15 F500; security high
G28 X0 Y0; home X Y axis
G1 X215 F6000; probe down (For my printer! You must find the right distance for your printer)
G28 Z0; home all axis
Do not use the G28 or G29 of the LCD menu or from computer host because accidents can happen in the probe or in the printer frame
To use them, you need to modify data in ultralcd.cpp file with values to lower the probe before the home.
You can use the same Start Gcode put up to modify the ultralcd.cpp file.
Some lines Start Gcode can be configured directly in firmware.
We managed to make it all work here, this is something that will be easy for you.
Optical switch circuit.