Power factor losses represent a significant factor of power losses in both industrial and domestic units. Various methods have been devised earlier to tackle this problem. This paper aims to present an indigenous technique and method which could be used for static power factor correction. It is demonstrated in this work that phase difference between voltage and current can be determined using zero crossing detectors, opto-couplers, EXOR gate and some basic function of Arduino microcontroller. The RMS value of AC signal has been obtained by sampling precisely rectifying AC signal sing super diodes. Voltage and current transformers have been used for transforming load voltage and current respectively to bring them in desired working range of microcontroller. AUTOMATIC POWER FACTOR CORRECTION UNIT