---
title: "Atomic Force Microscope Interactive Lab | Sandbox Physics"
description: "Does a scanned bump reveal the surface, the tip shape or a feedback error? An AFM image records how the scanner moves to hold a chosen force signal."
canonical_url: "https://sandboxphysics.com/labs/atomic-force-microscope/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/atomic-force-microscope/"
last_modified: "2026-11-04"
---

IN28 · Follow a surface through force

# Atomic Force Microscope

**Does a scanned bump reveal the surface, the tip shape or a feedback error?** An AFM image records how the scanner moves to hold a chosen force signal. A finite tip broadens narrow features, indentation lowers the apparent surface, and slow feedback leaves a tracking error. Known standards and scans at different speeds help separate these effects.

Acquire split-detector counts, raster commands and force curves, then reconstruct apparent height from calibrated feedback records.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

### What made the bump wider?

Drag the probe to shift the scan path. Recalibrate after changing the tip, force setpoint or operating mode.

Apparent height span **$0\,\mathrm{nm}$**

Deflection tracking RMS **$0\,\mathrm{nm}$**

Calibrated stiffness **$0.05\,\mathrm{N}\,\mathrm{m}^{-1}$**

Withheld step error **$0\,\mathrm{nm}$**

Operation Feedback bandwidth $B/\mathrm{Hz}$ $40$ Commanded line rate $f_{\mathrm{line}}/\mathrm{Hz}$ $10$ Known tip radius $R/\mathrm{nm}$ $20$ Scan-path centre $y_c/\mathrm{nm}$ $0$ Repulsive force setpoint $F_{\mathrm{set}}/\mathrm{nN}$ $2$

Specimen, direction and acquisition

Actual step height $h/\mathrm{nm}$ $20$ Actual reduced modulus $E^*/\mathrm{GPa}$ $1$ Scan rotation $\theta/{}^{\circ}$ $0$ Nanometre display gain $G$ $100$ Acquisition seed $n$ $2801$ Photon counting noise

Actual specimen controls generate the interaction; the inverse receives counts and commands. Changing display gain preserves the physical observations. Cyclic force operates at a fixed 400 hertz, with finite contact duty and bandwidth limits.

Model assumptions

A quasi-static rectangular Euler beam carries a finite spherical-apex/conical tip over a step and Gaussian domes. Geometric dilation is a forward interaction envelope, not a measured image. Repulsive Hertz contact is local, elastic, nonadhesive and valid for indentation below one tenth of tip radius; quantitative force curves use a flat patch. Contact feedback controls deflection. A separate off-resonance cyclic-force teaching mode controls measured peak deflection at 400 hertz; it is not resonant amplitude-modulation AFM. Its validity requires low drive/free-mode frequency ratio and supported contact duty, with independent inertial comparisons. Adhesion, snap-in, friction, plasticity, viscoelasticity, hydrodynamics, higher beam modes and scanner hysteresis are omitted. The optical lever uses specular reflection from the same 128-facet static beam surface and a finite split Gaussian photodetector. Recorded photon counts use Poisson or high-count rounded-Gaussian sampling with separate seeds. Rigid deflection standards, a known reference cantilever and plane/step scans calibrate the detector, stiffness and scanner; separate optical, force and step checks are withheld. Image pixels average retained feedback commands only. Apparent height retains indentation, finite-tip broadening and tracking error. Force-curve modulus is conditional on known radius and fixed observed calibration; its local fit error omits calibration, tip, constitutive and model uncertainty. Clocked commands/counts, definitions and configurations remain exportable. Nanometre geometry and bending are amplified; optical paths and tip height are schematic, and selected cyclic records are replayed slowly. These display transformations do not change physical optical counts or inference.

### A retained feedback scan

Calibration, force inference and retained records

Withheld deflection error $\delta d/\mathrm{nm}$ **$0$**

Withheld force relative error $\delta F/F$ **$0$**

Calibrated scanner scale $s_z$ **$0$**

Conditional reduced modulus $E^*/\mathrm{GPa}$ **$0$**

Approach/retract relative difference $\delta E^*/E^*$ **$0$**

Observed contact duty $D$ **$0$**

Independent specimen reference

The retained feedback row is compared with a separate model specimen and finite-tip envelope. Neither reference supplies image pixels or fitted material values.

Independent raw calibration and measurement acquisitions

| Acquisition | Frames | Photoelectrons | Seed |
| --- | --- | --- | --- |

Immutable retained scans

| Record | Mode | Calibration | Supported image |
| --- | --- | --- | --- |

Rigid known deflections calibrate the nonlinear split-detector signal. A reference cantilever calibrates stiffness; known plane and step scans calibrate height. Separate deflection, force and step checks are withheld. A force curve fits reduced modulus and an unknown contact origin from measured commands and deflection, conditional on the known tip radius.

Apparent height includes indentation and feedback lag. The local Hertz regression error treats the force axis as exact and omits calibration/count correlations, radius, stiffness-standard and material-model uncertainty. It applies to the flat nonadhesive patch; sharp-edge geometry and real adhesion require a richer model. CSV and JSON retain full commands, counted detector frames, clocks, definitions, seeds and hardware. CSV alone replays the inverse.

For lateral stick–slip measured with a probe, see [single-contact AFM friction](https://sandboxphysics.com/labs/afm-stick-slip-friction/).

Physics tutorial

## A height image made by a force-control loop

**Background** A sharp tip pushes against the sample and bends a spring-like cantilever. A reflected laser beam converts its slope into a shift on a split photodetector.

**Why it matters** The scanner must move vertically to hold a force signal steady. Its recorded movement depends on the sample, tip and ability of the loop to follow changes.

Start with the essentials

- **Focus question**: Does a scanned bump reveal the surface, the tip shape or a feedback error?
- **One-sentence intuition**: Calibrate the detector and scanner with known standards, then compare acquired height with the simultaneously recorded deflection error.

### Core mathematical model

#### Repulsive elastic contact on a flat patch

$$
F=kq=\frac{4}{3}E^*\sqrt{R}\,\delta^{3/2}
$$

Upward deflection $q$ is positive; repulsive load is $F$. The known-radius spherical apex uses reduced modulus $E^*$ and indentation $\delta$. The Hertz approximation assumes elastic nonadhesive contact and shallow indentation relative to $R$.

#### The counted optical-lever signal

$$
u=\frac{C_+-C_-}{C_++C_-}
$$

Dark-corrected photoelectron counts from the two detector halves are $C_+$ and $C_-$. Independent known deflections calibrate this nonlinear imbalance; the displayed gain does not enter the physical counts.

#### The sampled integral controller

$$
z_{n+1}=z_n+g(q_{\mathrm{obs},n}-q_{\mathrm{set}})
$$

The scanner command $z$ increases upward. Excess observed deflection raises the head and reduces the load. Gain $g$ depends on bandwidth and update period. In cyclic-force mode the observation is the measured peak within one off-resonance cycle.

#### Finite-tip geometry before force detection

$$
h_{\mathrm{tip}}(x,y)=\max_{a,b}\left[h_s(a,b)-t(a-x,b-y)\right]
$$

The undeformed specimen is $h_s$ and the tip height above its apex is $t$. This forward geometric envelope determines where contact begins. Image pixels are generated separately from the retained scanner commands.

### Common difficulties

#### The image does not directly give the sharp surface

**Typical misconception** A perfectly calibrated height signal removes the tip shape and all feedback error.

**Better mental model** Calibration fixes the scale. Finite-tip contact, indentation and tracking still change the relationship between the recorded movement and the undeformed surface.

#### One low drive frequency is not a complete dynamic guarantee

**Typical misconception** Operating below the free resonance automatically makes every contact quasi-static.

**Better mental model** A brief contact can change force much faster than the drive period. This mode restricts contact duty and compares its supported settings with a separate inertial contact calculation.

### Run the experiment

1. 01

   #### Follow a bump

   Keep a scan and switch between acquired height and command/deflection plots.

   **What to observe:** The same recorded scan produces both channels. Where the scanner falls behind, the deflection error grows.

2. 02

   #### Change the tip

   Choose a blunt tip or change radius, then acquire matching standards.

   **What to observe:** A wider tip touches a feature with its side before the apex reaches it, broadening the apparent feature.

3. 03

   #### Outrun the loop

   Lower bandwidth or increase line rate, then compare the measured image with the separate specimen reference.

   **What to observe:** Lag reduces the apparent height of narrow features and shifts their edges. Slower scans approach the finite-tip profile.

4. 04

   #### Measure a force curve

   Open approach/retract data and calibration details. Try the softer-surface or cyclic-force preset.

   **What to observe:** A flat-patch Hertz fit estimates reduced modulus conditional on the known radius and observed calibration. Cyclic force uses peak deflection at low frequency; the force curves themselves are acquired with the drive off.

Physical conclusion

An AFM height map is a calibrated feedback record. Finite-tip geometry, indentation and tracking lag remain part of its interpretation.

## Related experiments and articles

How physics instruments measure · Reading path

### How physics instruments measure

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **Why an AFM makes a bump look wider**](https://sandboxphysics.com/stories/instruments/atomic-force-microscope/)

Fields & matter · Starter path

## From a field to an electron microscope

Map an electric field and steer a charged particle. Then find the electron's wavelength and use electron beams to see a crystal and a surface.

[Start here → **Make an Electric Field Visible** Move the probe around a dipole and check that the field always points downhill on the potential landscape. Observe · 8 min](https://sandboxphysics.com/labs/electric-field/)

1. [1 Make an Electric Field Visible](https://sandboxphysics.com/labs/electric-field/)
2. [2 A Charge Bending through Fields](https://sandboxphysics.com/labs/charged-particle/)
3. [3 Electron Wavelength & Voltage](https://sandboxphysics.com/labs/electron-wavelength/)
4. [4 Electron Diffraction & Reciprocal Space](https://sandboxphysics.com/labs/electron-diffraction/)
5. [5 TEM Bright Field, Dark Field & SAED](https://sandboxphysics.com/labs/tem-mode-selector/)
6. [6 SEM Secondary-Electron Topography](https://sandboxphysics.com/labs/sem-topography/)

[View the full path →](https://sandboxphysics.com/topics/fields-and-matter/#starter-path)
