# Introduction ow Power Factor in the power distribution system induces the energy crisis in the supply voltage. Most of industrial electric loads have a low power factor not transcending from 0.8 and thus impartsto the distribution losses [1][2][3][4]. There are different methods of power factor correction follow through with large lagging or non-liner loads [1]. One of the impendent is to use a variable fixed capacitor as reactive power compensating circuit also inductor brings reactive power to compensate the current for leading power factor [5][6]. This approach is more reliable because it implies the count of leading and lagging current in the power factor with very precise step setting in term of calculating the phase angle in power factor correction schemes [7]. Microcontroller manipulates its algorithm to measure the needed reactive power (VAR) that will necessitate to castigated the power factor of incoming load either the effect of the load on power factor is leading or lagging. # II. Block Diagram with Description Microcontroller base automatic controlling of power factor with load monitoring is shown in Fig. 1, the principal element in the circuit is PIC Microcontroller (18F452)manipulate with 11MHz crystal in this scheme. The first step is about the initializing and ensuring the circuit, the microcontroller pins(AN0 and AN1) read the analog-to-digital converter (ADC) on real time basis. Microcontroller waits till the voltage and current signals yielded from the zero crossing detector circuit, provided to Microcontroller input pins (RC1 and RC2) which is fundamentally the capture module of the Microcontroller. The following algorithm which is specially for automatically measuring the desired value of capacitor includes these steps. ? V rms and I rms is read by the Microcontroller using ADC ports. ? Power Factor is measured by the Microcontroller from manipulating of capture module for V and I signals. ? Real Power is measure by using formula P=I rms ×V rms ×cos? ? For angle detection by taking the Cos Inverse of phi (?) and getting the angle theta (??). ? Set the Phi2 as a Reference Value equal to 0.9.and taking the cos Inverse of 0.9 getting reference theta (??1). # Simulation Results Automatic Controlling of power factor is completely tested on Software Proteus in which Simulation result are based on the leading or lagging power factor of the load. Simulations Results are based on include the purely resistive load and some case of inductive load. # Case 1 When resistive load is ON, there is no lagging in current and voltage signals and are in phase as shown in Fig. 5. In this case the power factor would be 0.9 as the referenced value, so there is no insertion of capacitors When Small Inductive Load is ON, there is phase delay in between current and voltage signals. Microcontroller senses the delay produced by the load, and according to the delay, it inserts the desired value of capacitor to improve the power factor of the system. When an large inductive is ON, there is large phase delay in between current and voltage signals. Microcontroller senses the delay produced by the load, and according to the delay, it inserts the desired value of capacitor to improve the power factor of the system. # Hardware Results Main prototype model of the hardware is shown in Fig. 9. The current and voltage signals are taken from the main AC line by using Current and Potential Transformers. These signals are then pass form the zero cross detector IC (ZCD I and ZCD V) that converts both current and voltage waveform in square-wave that will further given to microcontroller to detect the zero crossing/delay between both the signals at the same time instant by using a bridge rectifier for both current and voltage square waves is then converted to a digital signal, so then the microcontroller performs its further necessary task i.e., checking of what RMS value for voltage and current that will use in the algorithm of microcontroller to select the capacitor for the desired value for the load and check/monitor continuously which load is operated on the basis of current consumed by the load. Results of leading or lagging power factor need Capacitor or inductor value to regain its original situation, and these results were shown on the LCD. # Case 1 When resistive load is ON, as shown in Fig. 10: there is no phase delay between current and voltage signals and they are in phase. In this case the power factor would be 0.9 as referenced value, so there is no insertion of capacitors, as shown in Fig 10. # Conclusion This project is an attempt to design and implement the automatic power factor controlling system using PIC Microcontroller (18F452). PIC Microcontroller senses the power factor by continuously monitoring the load of the system, and then according to the lagging behavior of power factor due to load it performs the control action through a proper algorithm by switching capacitor bank through different relays and improves the power factor of the load. This project gives more reliable and user friendly power factor controlling system by continuously monitoring the load of the system. ![The current and voltage signal are acquired from the main AC line (L) by using Current Transformer and Potential Transformer in analysis of the power factor. These acquired signals are then pass on to the zero crossing detector IC(ZCD I & ZCD V) individually that transposed both current and voltage waveforms to square-wave to make perceivable to the Microcontroller to observe the zero crossing of current and voltage at the same time instant. Bridge Rectifier for both current and voltage signals transposes the analog signal to the digital signal. Microcontroller insure the RMS value for voltage and current used in its algorithm to select the capacitor or inductor of desired value for the load to mount the power factor and monitors the behavior of the enduring load on the basis of current depleted by the load. In case of leading or lagging power factor Microcontroller send out the signal to switching unit (relay) that will switch on the in demand value of capacitor or inductor. The tasks executed by the Microcontroller and their results i.e., leading or lagging behavior of power factor, inset values of necessitate capacitor or inductor and monitoring the behavior of the enduring load are shown in Liquid Crystal Display (LCD).](image-2.png "") 12![Fig. 1 : Block Diagram of Automatic Controlling of Power Factor (ACPF)](image-3.png "Fig. 1 :Fig. 2 :") 3![Fig. 3 : Zero crossing detector circuit output III. Microcontroller Scheme and Algorithm Microcontroller pretends as brain of the Automatic Microcontroller-Based Controlling of Single Phase Power Factor using Capacitor Banks with Load Monitoring circuit. For the analysis of voltage and current signals Microcontroller ensure the phase delay between the voltage and current square-wavesyielded by the zero crossing detector IC, using the Microcontroller capture module ccp1(for voltage ZC) and ccp2(for current ZC) and observe the rising edge of the square-waves of both the signals at same time instant. The time lag evaluated by the Microcontroller is in terms of power factor of the enduring load. After the evaluation of power factor of the load the RMS value of current and voltage signals is read by the Microcontroller. The cadenced power factor included with current and voltage signals values are also mounted in the algorithm of the Microcontroller which automatically select the in demand value of capacitor or inductor to amend the power factor of the load. The instructions of the Microcontroller monitors the behavior of the enduring load on the basis of current depleted by the load and the results were shown on LCD. Underneath flow chart explain the way of manipulation for the cadenced power factor and monitoring of the load.](image-4.png "Fig. 3 :") 4![Fig. 4 : Flow Chart of intended ACPF Microcontroller does not execute any insuring of power factor if both the voltage and current square-wave are provided to capture module of the Microcontroller's pin. Microcontroller ensures the square wave of both voltage and current signals and checks the rising edge of both the signals either it is a voltage signal or current signal. If the current and voltage are in phase then there is no execution by the Microcontroller. If voltage signal leads the current signal, the behavior of load is inductive and Microcontroller measures the power factor of the load and ensures the in demand necessitate value of the capacitor to counterbalance the power factor of enduring load. If the current signal leads the voltage signal, then the behavior of the load is capacitive and Microcontroller measures the power factor of the load and manipulates its algorithm tomount the in demand necessitate value of the inductor to counterbalance the power factor of the enduring load.The intended algorithm of Microcontroller used pins of port C (RC1 and RC2) as capture module and (RA0 and RA1) as analog ports, to detect the voltage and current RMS value at real time instant.](image-5.png "Fig. 4 :") 5![Fig. 5 : Simulation results with resistive load](image-6.png "Fig. 5 :") 6![Fig. 6 : Simulation results with low inductive load Case 3](image-7.png "Fig. 6 :") 7![Fig. 7 : Simulation results with increased inductive load Case 4When Both Resistive and inductive Load is ON, there is large phase delay in between current and voltage signals. Microcontroller senses the delay produced by the load, and according to the delay, it inserts the desired value of capacitor to improve the power factor of the system](image-8.png "Fig. 7 :") 9![Fig. 9 : Hardware Prototype Whole system may be divided into three stages. First stage is concern with the step down arrangement of incoming voltage and current signals into the PIC level voltage (e.g. 5V). Here we have to use the step down arrangement like step down transformer; as shown in figure 9. Second stage is concerned with zero crossing level detection by using an IC (IC # LM358) of both the coming signals. This is done by Voltage signal can be acquired by using Opto-coupler (IC # 4N25) at the output of Potential Transformer for detection. Current signal can be acquired by using Current Transformer connected at main line. In third stage block diagram represents the Automatic Microcontroller base power factor control with continuously load monitoring of the system as shown in Fig. main part of this circuit is microcontroller 18F452 using with crystal of 11MHz.The current and voltage signals are taken from the main AC line by using Current and Potential Transformers. These signals are then pass form the zero cross detector IC (ZCD I and ZCD V) that converts both current and voltage waveform in square-wave that will further given to microcontroller to detect the zero crossing/delay between both the signals at the same time instant by using a bridge rectifier for both current and voltage square waves is then converted to a digital signal, so then the microcontroller performs its further necessary task i.e., checking of what RMS value for voltage and current that will use in the algorithm of microcontroller to select the capacitor for the desired value for the load and check/monitor continuously which load is operated on the basis of current consumed by the load. Results of leading or lagging power factor need Capacitor or inductor value to regain its original situation, and these results were shown on the LCD.](image-9.png "Fig. 9 :") 10![Fig. 10](image-10.png "Fig. 10") 11![Fig. 11](image-11.png "Fig. 11") 12![Fig. 12The load monitoring of resistive load by microcontroller is shown on LCD in Fig.13](image-12.png "Fig. 12 The") 13![Fig. 13](image-13.png "Fig. 13") ![in an inductive load of 0.5hp motor is ON, as shown in there is phase delay in between current and voltage signals, as shown in Fig 14:Microcontroller senses the delay produced by the load, and according to the delay, it inserts the desired value of capacitor to improve the power factor of the system.](image-14.png "") 14![Fig. 14](image-15.png "Fig. 14") 15![Fig. 15The load monitoring of 0.5HP load is shown](image-16.png "Fig. 15 The") 16![Fig. 16 According to the phase delay in signals, microcontroller takes the intelligent decision and adds the desired value of capacitor as shown in Fig 17.](image-17.png "Fig. 16 According") 17![Fig. 17](image-18.png "Fig. 17") ![When the desired value of the capacitors added the required reactive power to the system, the current and voltage waveforms are somehow in phase, as shown in Fig18.](image-19.png "") 18![Fig. 18](image-20.png "Fig. 18") 3![Fig. 19](image-21.png "Fig. 19 Case 3") 20![Fig. 20The load monitoring of 1Hp load is shown in Fig:21](image-22.png "Fig. 20 The") 21![Fig. 21 According to the phase delay in signals, microcontroller takes the intelligent decision and adds the desired value of capacitor as shown in Fig 22.](image-23.png "Fig. 21") 4![Fig. 22](image-24.png "Fig. 22 Case 4") 23![Fig. 23 According to the phase delay in signals, microcontroller takes the intelligent decision and adds the desired value of capacitor as shown in Fig 24.](image-25.png "Fig. 23 According") 24![Fig. 24 When the desired value of the capacitors added the required reactive power to the system, the current and voltage waveforms are somehow in phase, as shown in Fig 25.](image-26.png "Fig. 24 When") 25![Fig. 25 The load monitoring of resistive and inductive loads are shown in Fig 26.](image-27.png "Fig. 25 The") ![Fig. 26](image-28.png "") © 2012 Global Journals Inc. (US) Design and Implementation of Automatic Microcontroller-Based Controlling Of Single Phase PowerFactor Using Capacitor Banks with Load Monitoring * Fundamentals of Electric Circuit CKAlexander MN OSadiku United States of America 2000 McGraw-Hill Companies, Inc * Electric Machinery and Power System Fundamentals JCStephen 1999 McGraw-Hill Companies, Inc United State of America * Power System Analysis JohnJGrainger WilliamDStevenson 1994 McGraw-Hill New York * Power System Harmonics" 2nd JosArrillaga NevilleRWatson 2003 John Wiley * Reactive Power Control in Electric System JEMiller 1982 Wiley New York * Electrical Power Systems Quality" 1st CRoger MarkFDugan HWayneMcgranaghan Beaty 1996 McGraw Hill New York * A Conceptual Design of Microcontroller-Based Power Factor Corrector Circuit BCKok CUttraphan HHGoh 2009 pursued in practical applications