Although there are many types of detectors for leveling the build stage of a 3D printer one, the method developed by Njål Brekke which is detailed at http://www.thingiverse.com/thing:707392 has the potential to be amongst the most accurate and robust as well as potentially the cheapest. This design attempts to improve the sensitivity of the Piezo disk sensors.
A PDF file in the Thing Files includes a description of the method along with design and constructional details, and a schematic and gerber file for the amplifier. This file was revised on 23rd April 2016 with additional details and appendix
There is a short video at https://www.youtube.com/watch?v=Oj4e-An6z5s
Update: Added a parallel mechanism with a nut recess - not requiring a brass insert. ParallelMechN.stl added 9th March