The main task of sunsensor is to convert solar energy into electrical measurement which informs in which direction with respect to the sensor is the Sun. Design described in this paper is based on Position Sensitive Detector (PSD), which is a photodiode that converts incident light energy into electrical current. In this case a two-dimensional PSD is used, since the purpose is to measure three-dimensional angles basing on a single PSD detector. This paper focuses on principle of operation of the sunsensor based on PSD (Position Sensitive Detector), calculation of required parameters for components, their selection and characterization of the working device. Design, testing system and the results of testing of manufactured unit are presented in the second part of the paper.