A new solar tracker is designed and tested. The solar tracker is an all-weather solar machine aiming at the sun automatically with high precision. An embedded CPU is used as the control unit, calculating the position of the sun according to geography. Two light intensity detecting chips are used; one of them is to measure the ambient light intensity while the other is to check whether the tracker is directed to the sun well. The result of the first chip determines whether the second chip will be put into use. In this way it is guaranteed that the tracker operates well either with sufficient ambient light or not. Two step motors are used to drive the solar energy collector. The solar tracker has been produced and tested, showing satisfying tracking effect.