In the field of Automated Optical Inspection (AOI), measuring the 3D profile of objects can be of paramount importance, enabling the measure of surface roughness, critical small or large scale dimensions in x, y and z, radius of curvature; all of which requiring a high level of accuracy and repeatability. This paper presents a depth from focus surface profile recovery approach using a tunable lens. Two prototype systems and calibrations steps are detailed, several focus measures are introduced and implemented. Experimental results shows the applicability of the approach to small scale depth measurements and surface reconstruction.