Here we demonstrate that an astigmatic detection system (ADS), constructed with a modified digital-versatile-disk (DVD) optical head, can achieve real-time measurement of a linear displacement and two-dimensional (2D) tilt angles with a high sensitivity. An atomic force microscope (AFM), using our detection system to sense the deflection of microfabricated cantilevers, can resolve single atomic steps on graphite surfaces with a noise level less than 0.04 nm in topographic images. This astigmatic detection system can even detect mechanical resonances due to thermal vibrations of microfabricated cantilevers. The high sensitivity, small detecting size and high bandwidth of this detection system is suitable for dynamic characterization of elements in micromachined components. Further optimization of the system will promise many other applications in diverse technological fields.