I used an optical Z=0 switch in my printer. The part I used was pulled from an Epson inkjet printer, but most of these opto interruptors are about the same. The open collector of the phototransistor is used to pull the signal line low. Here's how I connected it to the Smoothieboard:
This particular opto interruptor does not have any indicator LED to show when the light beam has been interrupted. When zeroing the Z axis I monitor the endstop status using the LCD panel. If you don't have an LCD panel you can use the M119 command via a host computer.
Ultra MegaMax Dominator 3D printer: [
drmrehorst.blogspot.com]