An auto-focus system based on the moire effect and a feedback control method is presented. First, a collimated laser beam passes through a focusing lens then falls incident on the surface of the sample. The deviation of the angle of the light reflected back is proportional to the defocus distance from the sample. The reflected light then passes through two spiral gratings, producing three types of moire pattern which can be observed and recorded by a linear CCD. The defocus distance can be derived from the spiral angle in the moire pattern. The results show that auto-focusing can be achieved by the moire method for glass and mirror samples in a cycle time of less than 0.1 s. (C) 2011 Elsevier Ltd. All rights reserved.