Solar energy is rapidly advancing as an important means of renewable energy resource. More energy is produced by tracking the solar panel to remain aligned to the sun at a right angle to the rays of light. This paper describes in detail the design and construction of a prototype for solar tracking system with two degrees of freedom, which detects the sunlight using photocells. The control circuit for the solar tracker is based on a PIC16F84A microcontroller (MCU). This is programmed to detect the sunlight through the photocells and then actuate the motor to position the solar panel where it can receive maximum sunlight.