A compound biaxial sun tracking system is designed to improve the efficiency of solar panels for power generation. The difference between sensor signals can be judged by the system and the stepper motor can be controlled to drive solar panels to track the sun. At the same time, the system can calculate the elevation angle and azimuth of the sun to drive solar panels to the best location by given information in cloudy circumstances. The advantages of the two track methods are complementary in different situations, thus the efficiency of solar panels for power generation is increased. The battery maintenance is taken into consideration when solar panels do not work normally. The motion characteristics of the system are analyzed to verify the feasibility of the design.