This document describes the design of a single-phase automatic power factor controller using a microcontroller. It aims to improve power factor automatically when it falls below a certain level. Low power factor results in losses in transmission lines and equipment. The system measures voltage and current using zero crossing detectors to calculate phase difference and power factor. When power factor drops below 0.95, the microcontroller activates capacitor banks to compensate for reactive power and improve power factor. Simulation results show the power factor is improved from 0.66 to 0.97 with the automatic power factor correction system.