| With the rapid development of modern industry,people’s quality of life has been greatly improved,but also led to the global energy crisis and excessive pollution of the natural environment.Solar energy has been widely used as pollution-free renewable energy,but in most cases the utilization rate of solar energy is low.In order to improve its utilization,this paper designed a solar panel automatic tracking system.The system uses the STC89C52RC microcontroller as the core processor,and adopts the method of the combination of the photoelectric tracking mode and the sun angle tracking mode.When it is sunny day,the system runs the photoelectric tracking mode,by comparing the light intensity of the four photosensitive resistance acquisition to identify the direction,and then drive the stepper motor to adjust to achieve photoelectric tracking.When it is cloudy day,the system runs the sun angle tracking mode,by collecting the time information of the clock chip,and using the solar position algorithm to calculate the local altitude angle and azimuth angle,issued the corresponding instruction to drive the stepper motor to adjust to achieve the sun angle tracking.In this paper,the two tracking methods were tested separately.The test of photoelectric tracking mode is through the comparison of the fixed panel and the self-tracking panel to chase the light effect,found that self-tracking panel chasing light better.The test of sun angle tracking mode is to compare the calculated angle value with the theoretical angle value,and the error is not more than plus or minus 0.4°.The test results show that the solar panel automatic tracking system can adapt to the complex weather conditions,to achieve all-weather sun tracking. |