The scanning force microscope function is similar to a surface profilometer. The AFM display the sample surface by mechanically scanning it with a very fine head. This is similar to setting up a topographic map of the sample surface.
The AFM head, whose radius typically lies in the area of 10nm, is attached to a bending beam. This beam is deflected by a Piezo grid unit. The deflection is proportional to the bearing strength between the AFM head and the sample. Cantilever deflection and position are measured using a laser beam which is reflected to a photodiode from the cantilever. In the simplest mode, what is called contact mode, the spring deflection and, consequentially, the head bearing strength on the sample is maintained throughout the closed loop. The deflection signal and the z-position of the piezo are shown as functions of the x and y position on the image. Different modes (contact mode, non-contact mode, tapping mode, Kelvin probe mode) enable high-resolution surface imaging and 3D diagrams.
Scanning tunneling microscope
Schröttner H. : Die Elektronenmikroskopie in der Materialforschung / Electron Microscopy in Materials Research.