The piezo’s frequency is first scanned. When it passes through the cantilever’s "resonant frequency" the cantilever’s bending is maximized (also maximizing the laser’s movement). This frequency is carefully recorded along with the amplitude and phase of the laser’s oscillation.
When the sample is reintroduced, the tripod is then lowered only until there is a barely detectable shift in this resonance. This shift can occur BEFORE the cantilever tip actually touches the sample! For instance, as the swinging tip nears the sample it can interact via "Van der Waals attraction."
The feedback circuit is then set to lower the tripod ONLY until it senses this very first weak disturbance in the cantilever’s resonance. The result is a "non-contact mode" of AFM operation where the tip never quite touches the sample (in a classic atom to atom sense) This mode is ideal for rough and/or easily damaged samples!