Quote Originally Posted by m_c View Post
However, looking at the specs for those sensors, they are far from ideal, given detection distance is listed as 5mm +/- 10%.
A slot type sensor is far more accurate, such as Optical End / StartStop w. mounts- For CNC, Reprap and laserengraving machine | eBay
I was reading the massive thread over on cnczone about the DIY version of these and it depends how you use them as far as accuracy goes. Passing the sensing object very close across the sensor is preferable to bringing the object up to the sensor. That's 20% error in the specs is at a distance of 5mm from the sensing object. The closer the object is to the sensor the more accurate it is. At 1mm they're accurate to 0.05mm or better.

There's video here showing the repeatability of these cheap ebay proximity switches using a dial indicator.