Power factor is a measurement of how efficiently a facility uses electrical energy. A high power factor means that electrical capacity is being utilized effectively, while a low power factor indicates poor utilization of electric power. However, this is not to be confused with energy efficiency or conservation that applies only to energy. Improving the efficiency of electrical equipment reduces energy consumption, but does not necessarily improve the power factor. The paper presents a microcontroller power factor compensation for wind energy generator. The main aspects of the power factor compensation with capacitors are discussed and the microcontroller solution is presented.