The low-cost LEGO AFM is designed to work in the contact mode, and the tip will be in contact with the sample during the scanning process. The LEGO AFM contains a sample stage that moves in x and y direction, a cantilever holder that moves in z direction, a laser and a photo detector to readout the deformation of the cantilever and a control system based on Arduino.http://www.instructables.com/id/A-Low-Cost-Atomic-Force-Microscope/
A large scale model AFM that demonstrates many of the principles of AFM can be found here:http://mcise.uri.edu/park/MNEL/legoafm/
Another model AFM with slightly higher resolution can be found here:http://www.schaefer-tec.com/en/schweiz/products/scanning-probe-microscopy/lego-afm.html
Scanneling Tunneling Microscopy (STM) is another scanning probe technique that uses the quantum tunneling effect, a small flow of current when a tip is brought close to a conducting surface. This current is highly dependant on the distance of the probe from the sample. It can therefore use this current to map the height of a surface. Due to the electronic readout it is actually more straightforward to build than and AFM system.