This paper presents an embedded mechatronic system that tracks sun for improving photovoltaic panel performance with low power consumption. The electronics part of this sun tracker consists of a DC motor driven by an ARM core microcontroller, and motor driving circuit with feedback sensors. Developed real-time control algorithm combines the open-loop and the closed-loop control methods to improve performance and reliability of the two-axis sun tracker. Energy gain issues are taken into account, which implies besides other issues, the sun is not continually tracked with the same exactitude, overconsumption by the motors. Experimental results of two-axis sun tracker are presented together with the fixed one.