Dissemination of IT for the Promotion of Materials Science (DoITPoMS)

DoITPoMS Teaching & Learning Packages Atomic Force Microscopy Atomic Force Microscopy (all content)

Atomic Force Microscopy (all content)

Note: DoITPoMS Teaching and Learning Packages are intended to be used interactively at a computer! This print-friendly version of the TLP is provided for convenience, but does not display all the content of the TLP. For example, any video clips and answers to questions are missing. The formatting (page breaks, etc) of the printed version is unpredictable and highly dependent on your browser.


Main pages

Additional pages


On completion of this TLP you should:

  • Understand the basic principles of atomic force microscopy (AFM), including the different modes it can be used in.
  • Understand how AFM can be used in materials science.
  • Be aware of some of the problems that can be encountered, and how to overcome them.

Before you start

You should have a basic understanding of the behaviour of  piezoelectric materials to understand how the piezo-scanner works in AFM.


Atomic force microscopy (AFM) is part of the family of techniques known as scanning probe microscopy, and has proved itself extremely valuable and versatile as an investigative tool. The AFM invented by Gert Binnig and others in the mid 1980s differed in many ways from today’s instruments, but its basic principles remain the same. Binnig had already received the Nobel Prize in Physics for his creation of the scanning tunnelling microscope (STM), and the first AFMs in fact relied on an integrated STM tip. But the AFM had a major advantage over STM; it could be used for insulating as well as conducting samples.

Over the years, AFM has already had a significant impact in many disciplines, from surface science to biological and medical research. Because of its ability to image samples on an atomic scale, it has been vital to the advance of nanotechnology.

Image of surface of a thin film of GaN

This AFM image shows the surface of a thin film of GaN. The surface morphology is dominated by terraces and steps. The step heights are approximately 0.25 nm, corresponding to one layer of gallium and nitrogen atoms. This illustrates the ability of AFM to measure very small height changes on surfaces.

a topographic AFM image of a collagen fibril

The figure above is a topographic AFM image of a collagen fibril. The fibril is the striped structure running diagonally across the middle of the image. The periodicity of the narrow stripes or bands seen in the image is 64 nm. AFM can be used to image biological samples such as collagen without requiring a conductive coating to be added. It is even possible to take images of live cells in a fluid environment

In simple terms, the atomic force microscope works by scanning a sharp probe over the surface of a sample in a raster pattern. By monitoring the movement of the probe, a 3-D image of the surface can be constructed. Below is a schematic diagram of an AFM.

Tip Surface Interaction

When the tip is brought close to the sample, a number of forces may operate. Typically the forces contributing most to the movement of an AFM cantilever are the coulombic and van der Waals interactions.

  • Coulombic interaction: This strong, short range repulsive force arises from electrostatic repulsion by the electron clouds of the tip and sample. This repulsion increases as the separation decreases.
  • Van der Waals interactions: These are longer range attractive forces, which may be felt at separations of up to 10 nm or more. They arise due to temporary fluctuating dipoles.

The combination of these interactions results in a force-distance curve similar to that below:

Graph of force against distance

Plot of force against distance

As the tip is brought towards the sample, van der Waals forces cause attraction. As the tip gets closer to the sample this attraction increases. However at small separations the repulsive coulombic forces become dominant. The repulsive force causes the cantilever to bend as the tip is brought closer to the surface.

There are other interactions besides coulombic and van der Waals forces which can have an effect. When AFM is performed in ambient air, the sample and tip may be coated with a thin layer of fluid (mainly water). When the tip comes close to the surface, capillary forces can arise between the tip and surface. These effects are summarised in the animation below.

It is also possible to detect other forces using the AFM, such as magnetic forces to map the magnetic domains of a sample.

Modes of Operation

AFM has three differing modes of operation. These are contact mode, tapping mode and non-contact mode.

Contact mode

In contact mode the tip contacts the surface through the adsorbed fluid layer on the sample surface. The detector monitors the changing cantilever deflection and the force is calculated using Hooke’s law:

F = − k x     (F = force, k = spring constant, x = cantilever deflection)

The feedback circuit adjusts the probe height to try and maintain a constant force and deflection on the cantilever. This is known as the deflection setpoint.

Tapping mode

In tapping mode the cantilever oscillates at or slightly below its resonant frequency. The amplitude of oscillation typically ranges from 20 nm to 100 nm. The tip lightly “taps” on the sample surface during scanning, contacting the surface at the bottom of its swing.

Because the forces on the tip change as the tip-surface separation changes, the resonant frequency of the cantilever is dependent on this separation.

\[\omega = \omega_0 \sqrt{ 1 - \frac{1}{k} \frac{\mathrm{d}F}{\mathrm{d}z} }\]

The oscillation is also damped when the tip is closer to the surface. Hence changes in the oscillation amplitude can be used to measure the distance between the tip and the surface. The feedback circuit adjusts the probe height to try and maintain a constant amplitude of oscillation i.e. the amplitude setpoint.

Non-contact mode

In non-contact mode the cantilever oscillates near the surface of the sample, but does not contact it. The oscillation is at slightly above the resonant frequency. Van der Waals and other long-range forces decrease the resonant frequency just above the surface. This decrease in resonant frequency causes the amplitude of oscillation to decrease.

In ambient conditions the adsorbed fluid layer is often significantly thicker than the region where van der Waals forces are significant. So the probe is either out of range of the van der Waals forces it attempts to measure, or becomes trapped in the fluid layer. Therefore non-contact mode AFM works best under ultra-high vacuum conditions.

Comparison of modes

Contact Mode
  • High scan speeds
  • Rough samples with extreme changes in vertical topography can sometimes be scanned more easily
  • Lateral (shear) forces may distort features in the image
  • In ambient conditions may get strong capillary forces due to adsorbed fluid layer
  • Combination of lateral and strong normal forces reduce resolution and mean that the tip may damage the sample, or vice versa
Tapping Mode
  • Lateral forces almost eliminated
  • Higher lateral resolution on most samples
  • Lower forces so less damage to soft samples or tips
  • Slower scan speed than in contact mode
Non-contact Mode
  • Both normal and lateral forces are minimised, so good for measurement of very soft samples
  • Can get atomic resolution in a UHV environment
  • In ambient conditions the adsorbed fluid layer may be too thick for effective measurements
  • Slower scan speed than tapping and contact modes to avoid contacting the adsorbed fluid layer

The Scanner

The scanner moves the probe over the sample (or the sample under the probe) and must be able to control the position extremely accurately. In most AFMs piezoelectric materials are used to achieve this. These change dimensions with an applied voltage. The diagram below shows a typical scanner arrangement, with a hollow tube of piezoelectric material and the controlling electrodes attached to the surface.

Diagram of a typical piezo scanner cut into two parts

Diagram of a typical piezo scanner (cut into two parts). Separate pairs of electrodes control movement in the x, y and z directions

Tip and Cantilever

The cantilever is a long beam with a tip located at its apex. In most AFMs the motion of the tip is detected by reflecting a laser off the back surface of the cantilever.


The tip is generally pyramidal or tetrahedral in shape, and usually made from silicon or silicon nitride. Silicon can be doped and made conductive, allowing a tip-sample bias to be applied for making electrical measurements. Silicon nitride tips are not conducting.

The geometry of the tip greatly affects the lateral resolution of the AFM, since the tip-sample interaction area depends on the tip radius. The radius of the apex of a new tapping mode tip is around 5–15 nm, but this increases quickly with wear. In general the sharper the tip, the higher the resolution of the AFM image.


For contact mode AFM the cantilever needs to deflect easily without damaging the sample surface or tip. Therefore it should have a low spring constant, this is achieved by making it thin (0.3–2 μm). It also needs a high resonant frequency to avoid vibrational instability, so is typically short (100–200 μm). V-shaped cantilevers are often used for contact mode as these can provide low resistance to vertical deflection, whilst resisting lateral torsion.

Optical microscopy image of a triangular cantilever

Optical microscopy image of a triangular cantilever

For tapping mode AFM a high spring constant is required to reduce noise and instabilities. Rectangular cantilevers are often used for tapping mode.

Optical microscopy image of a rectangular cantilever

Optical microscopy image of a rectangular cantilever

Detection of cantilever deflection

There are a number of ways to detect the deflection of the cantilever in an AFM. The most common method is using a laser beam. A diode laser is focused onto the back reflective surface of the cantilever, and reflects onto a photodetector. This is position sensitive, and usually has four sectors. The vertical deflection of the cantilever is determined by the difference in light intensity measured by the upper and lower sectors. It is also possible to measure the lateral deflection of the cantilever by the difference between the left and right sectors of the photodetector; this technique is known as lateral force microscopy (LFM).

Diagram showing how the deflection of the cantilever is measured

How the deflection of the cantilever is measured


When the tip contacts the surface directly the tip and/or surface may be damaged. If the tip is blunted or damaged, then the imaging capability of the AFM is reduced. Soft surfaces (e.g. on biological samples) can also be easily damaged.

In almost all operating modes, a feedback circuit is connected to the deflection sensor and attempts to keep the tip–sample interaction constant by controlling the tip–sample distance. This protects both the tip and the sample. Either the cantilever deflection (in static mode) or oscillation amplitude (in dynamic mode) is monitored by the feedback circuit, which attempts to keep this at a setpoint value by adjusting the z height of the probe. The height of the probe is what is recorded to produce a topographic image.

In practice however feedback is never perfect, and there is always some delay between measuring a change from the setpoint and restoring it by adjusting the scanning height. In tapping mode for example this can be measured by the difference between the instantaneous amplitude of oscillation and the amplitude setpoint. This is known as the amplitude error signal, and highlights changes in surface height.

Topography map Amplitude error
Graph of the topography through a slice of the acquired image Graph of the amplitude error through a slice of the acquired image
Example images showing the relationship between topography and amplitude error signal. The two line plots demonstrate a slice through the acquired image.

The feedback system is affected by three main parameters:

  • Setpoint – this is the value of the deflection or amplitude that the feedback circuit attempts to maintain. This is usually set such that the force on the cantilever is small, but the probe remains engaged with the surface.
  • Feedback gains – the higher these are set, the faster the feedback system will react. However if the gains are too high then the feedback circuit can become unstable and oscillate, causing high frequency noise in the image.
  • Scan rate – scanning the probe over the surface more slowly gives the feedback circuit more time to react and results in better tracking, but this increases the time needed to acquire an image.


Scanner Related Artefacts

There are a number of problems and artefacts that can arise during atomic force microscopy. This page and the following pages will discuss some of them, and how they can be overcome.


The piezoelectric’s response to an applied voltage is not linear. This gives rise to hysteresis. Since the scanner makes more movement per volt at the beginning of a scan line than at the end, this can cause artefacts in the images, especially at large scan sizes. This is overcome by using a non-linear voltage waveform calculated during a calibration procedure.

Example of a voltage waveform calibrated to overcome hysteresis

Example of a voltage waveform calibrated to overcome hysteresis

Scanner creep

If the applied voltage suddenly changes e.g. to move the scanning position, then the piezo-scanner’s response is not all at once. It moves the majority of the distance quickly, then the last part of the movement is slower. If this is done during scanning, then the slow movement will cause distortion. This is known as creep.

When a change in x-offset is applied, features are distorted in the x-direction

When a change in x-offset is applied, features are distorted in the x-direction

When a change in y-offset is applied, features are distorted in the y-direction

When a change in y-offset is applied, features are distorted in the y-direction

Image showing effect of abrupt change in scan size

The scan size is changed abruptly, and features are distorted

Bow and tilt

Because of the construction of the piezo-scanner, the tip does not move in a perfectly flat plane. Instead its movement is in a parabolic arc, as shown in the image below. This causes the artefact known as scanner bow. Also the scanner and sample planes may not be perfectly parallel, this is known as tilt. Both of these artefacts can be removed by using post-processing software.

Diagram of scanner bow

Diagram of scanner bow

Tip Related Artefacts

For densely packed features the tip size can cause errors in determining the heights and the sizes of the “islands” or the overall appearance of the surface. Sidewall angles of the tip can also lead to inaccurate lateral resolution measurements for high aspect ratio features.

The tip may pick up loose debris from the sample surface. This may be reduced by cleaning the sample with compressed air or N2 before use. Or the tip can be damaged during scanning, which degrades the images. This may be blunting of the tip, as shown in the SEM image below:

SEM image of bluneted tip

Below is an example of an image taken with a severely damaged tip. The shape due to tip damage appears several times over the image, effectively the sample is imaging the tip rather than the other way round.

Sample imaged with sharp tip The same sample imaged using a severely damaged tip
Sample imaged with sharp tip
The same sample imaged using a severely damaged tip

One easy way to check for tip artefacts is to rotate the sample (not just the scanning direction) by 90 degrees. This is demonstrated in the following animation:

Other Artefacts

Feedback related

The feedback is supposed to keep the tip-sample interaction at a fixed setpoint by adjusting the z height of the probe, as discussed earlier. However if the scan speed across the sample is fast, then the feedback may not be able to react quickly enough and tracking is poor. This can be seen by comparing the trace and retrace (forward and backward direction) for a single line in the scan. The following image shows the height and amplitude trace (white) and retrace (yellow) when tracking is good. The height trace and retrace are almost identical, and the amplitude retrace is a mirror image of the trace because it is in the opposite direction.

Image of trace and retrace

When tracking is poor, the trace and retrace of height no longer overlap. Blurred images result. This can happen because the gains are set too low, or the scan speed is too high.

Image showing poor tracking

The images below are examples of poor tracking

Amplitude error

With sharp slopes, poor tracking may result in overshoot giving rise to “comet tails” in the image. The following images show indium aluminium nitride with small balls of indium on the surface. On the left the gains are set high enough for the scan rate, and tracking is good. On the right the gains are too low for the scan rate, and the tracking is poor. This results in overshooting off the edges of the indium dots, appearing in the image as comet tails. This can also be seen as the trace and retrace not overlapping.

Good tracking
Poor tracking, resulting in “comet tails

However if the gains are set too high, then the feedback circuit can begin to oscillate. This causes high frequency noise.

Amplitude error image for a scan with the gains set too high

Amplitude error image for a scan with the gains set too high

The precise values used for feedback gains will vary between instruments. A good rule of thumb is to increase the gain until excess noise begins to appear, and then reduce it slightly to get good tracking with low noise.


AFMs are very sensitive to external mechanical vibrations, which generally show up as horizontal bands in the image.

Evidence of external vibrations

Evidence of external vibrations in an amplitude error image

These vibrations may be transmitted through the floor, for example from footsteps or the use of a lift. These can be minimised by the use of a vibrational isolation table, and locating the AFM on a ground floor or below.

Acoustic noise such as people talking can also cause image artefacts, as can drafts of air. An acoustic hood can be used to minimise the effects of both of these.

Acoustic hood open

Acoustic hood closed


Atomic force microscopy may be used to image the micro- and nano-scale morphology of a wide range of samples, including both conductive and insulating materials, and both soft and hard materials. Successful imaging requires optimisation of the feedback circuit which controls the cantilever height, and an understanding of the artefacts which may arise due to the nature of the instrument and any noise sources in its immediate environment. Despite these issues, atomic force microscopy is a powerful tool in the emerging discipline of nanotechnology.


Note: This animation requires Adobe Flash Player 8 and later, which can be downloaded here.

Quick questions

You should be able to answer these questions without too much difficulty after studying this TLP. If not, then you should go through it again!

  1. Which operating mode allows for the fastest scanning speeds?

    a Contact mode
    b Tapping mode
    c Non-contact mode

Deeper questions

The following questions require some thought and reaching the answer may require you to think beyond the contents of this TLP.

  1. If high frequency noise is seen in an image, what should be done?

    a Increase the feedback gains
    b Decrease the feedback gains
    c Change the tip
    d Recalibrate the AFM



Going further


  • Meyer, Hug and Bennewitz, Scanning Probe Microscopy: The Lab on a Tip, Springer, 2003


Lateral Force Microscopy

Academic consultant: Rachel Oliver (University of Cambridge)
Content development: Amy Li, Pete Coombe
Photography and video: Brian Barber
Web development: David Brook

DoITPoMS is funded by the UK Centre for Materials Education and the Department of Materials Science and Metallurgy, University of Cambridge