Because of the quickly growing demand to handle micro- and nanostructures, micro- and nanorobotics has become an active field of research in the last years. One major problem of this new technology is how to build a sensor system that can control the robot motion within the required accuracy. For the micro and nano domain we specified an accuracy of one micron and ten nanometers respectively. We employ light-optical and Scanning Electron microscopes as they have the advantage that the robot and the target objects can be observed and positioned within a larger field of view. This renders nearly real-time processing possible. The strong requirements for accuracy and reliability demand a thorough sensor calibration. We propose a versatile photogrammetric approach for three dimensional calibration of both microscope types. We begin with a critical review of existing macroscopic and microscopic sensor models. Then we establish an algorithm using multi stereo geometry. This framework not only provides a highly accurate estimate of the mapping function from work space to image space, but also compensates image distortions caused by the lens system and the frame-grabber. The mapping function is further analyzed with respect to accuracy and determinability and non-significant parameters are eliminated. Numerical results based on simulated data are discussed.