Nowadays, atomic force microscopy is an advanced technique which aims to image a sample through the use of a probe, or tip, with a radius of about 20 nm. Due to requirement of ultra-high resolution of the surface imaging, the appropriate setup of the device is as important as the precision probe scan. In this paper, we present a self-designed tapping mode atomic force microscope (AFM) system. This system has been demonstrated to have the following characteristics and advantages. The first is the detection sensor, and we use the compact disk/digital versatile disk (CD/DVD) pick-up-head (PUH) to measure the deflection of the probe that is more compact and cheap than the traditional sensor. Besides this advantage, the AFM's cantilever is wider than the CD/DVD PUH's laser spot so that the laser energy will not be leaked to the reflective sample to cause sensing errors due to optical interference. The second is the piezoelectric stage, where we apply the voltage compensation to modify the hysteresis phenomenon so as to reduce the imaging distortion. Concerning this point, two AFM images are taken experimentally: One is without voltage compensation whereas the other is with the compensation. At the end, the effectiveness of the compensator has been clearly shown. The last one is the control mechanism, which applies the adaptive sliding mode control technique aiming to gain higher precision positioning in the scanning process. In this control approach, on-line gain-tuning of the controller has been successfully achieved. Finally, the experimental results provided have demonstrated appealing performance of our proposed system.