An electromechanical focus sensing technique for isolated point or small spot images is described. The technique is a mechanization of the Foucault knife-edge test, and it works with either laser or white light. The focus sensor provides an output voltage vs. focus discriminant which is linear in the vicinity of the best focus and monotonic over a wide range, making it suitable as a sensor for servo focus control applications. The focus sensor uses a chopping wheel at the optical focus and a field lens and bicell photodetector behind the focus. The relative phase of the zero-crossings of the AC-coupled bicell signals is detected electronically to obtain the voltage vs. focus discriminant. Two electronic detection algorithms are described and discriminants obtained with than in a typical implementation of the technique are presented. Also described are two techniques that have been used to compensate the detector signals for rapid fluctuations in the source intensity, if the fluctuations are rapid enough to interfere with the phase detection process. This focus sensing technique is sensitive primarily to focus, but some sensitivity to certain other wave-front ahprrations also exists. These sensitivities have been computed for two particular cases, the resolved spot source (with a geometrical analysis) and the unresolved point source (with a diffraction analysis). These results are tabulated for the Zernike aberrations up to m = n = 8.