Abstract: The scanning probe microscope applies a sum of an AC voltage (Uac) and a DC voltage (Udc) to its probe. The frequency of the AC voltage (Uac) substantially corresponds to the mechanical oscillation frequency of the probe, but its phase in respect to the mechanical oscillation varies periodically. The phase modulation has a frequency fmod. The microscope measures the frequency (f) or the amplitude (K) of a master signal (S) applied to the probe's actuator, or it measures the phase of the mechanical oscillation of the cantilever in respect to the master signal (S). The spectral component at frequency fmod of the measured signal is fed to a feedback loop controller, which strives to keep it zero by adjusting the DC voltage (Udc), thereby keeping the DC voltage at the contact voltage potential.