Southern Algeria is the favorite field of solar energy in general and photovoltaics in particular. More energy is produced by tracking the solar panel to remain aligned to the sun at a right angle to light rays [1]. This paper describes a smart prototype for solar tracking system based on a PIC16F877A microcontroller and an extremal servo-control. Because the sun does not dramatically change its vertical position during the day, this system is designed with one degree of freedom to detect the sunlight using a photovoltaic cell. Driven by a smart algorithm, the PIC16F877A microcontroller is programmed to detect sunlight through photovoltaic cells by moving the photovoltaic panel to the optimum position with maximum sunlight.