Advertisement
Advanced Time: 4–6 weeks Electrical Engineering

Power Factor Correction System

Design an automatic power factor correction system using a switched capacitor bank and microcontroller.

Power FactorCapacitor BankAPFCReactive PowerPLCPower Quality
DifficultyAdvanced
Duration4–6 weeks
Components10 items
Steps8 steps

Introduction

Design an automatic power factor correction system using a switched capacitor bank and microcontroller. This comprehensive guide covers everything from design through implementation, testing, and deployment.

Theory & Background

Power factor (PF) = Real Power (kW) / Apparent Power (kVA). Inductive loads like motors draw reactive power (kVAR) from the grid, increasing current without doing useful work. Capacitors supply reactive power locally, reducing reactive current from the supply. The goal is PF > 0.95. Reactive power (Q) needed = P × tan(acos(PF_current)) - P × tan(acos(PF_target)).

Advertisement

Components & Requirements

10 components required for this project.

#ComponentPurposeQty
1Arduino Mega 2560Main controller for APFC logicx1
2ZMPT101B Voltage SensorMains voltage sensingx1
3ACS712 Current Sensor (30A)Load current sensingx1
425µF/440VAC Capacitor (Power)Capacitor bank stagesx4
525A Contactor with 230V CoilSwitching capacitor stagesx4
6LCD 20×4 with I2CPF display and system statusx1
7Zero-Crossing Detector CircuitSynchronizing capacitor switchingx1
83-Pole MCB (16A)Capacitor bank protectionx4
9Current Transformer (100:5A)High-current measurementx1
1024V DC Power SupplyControl circuit powerx1

Step-by-Step Implementation

Follow these 8 steps carefully.

1
Understanding Power Factor and Reactive Power

Power factor (PF) = Real Power (kW) / Apparent Power (kVA). Inductive loads like motors draw reactive power (kVAR) from the grid, increasing current without doing useful work. Capacitors supply reactive power locally, reducing reactive current from the supply. The goal is PF > 0.95. Reactive power (Q) needed = P × tan(acos(PF_current)) - P × tan(acos(PF_target)).

2
Zero-Crossing Detection Circuit

Build a zero-crossing detector using an optocoupler (MOC3041) and a 33kΩ current-limiting resistor across the mains. The output pulses at every zero crossing of the AC waveform (100 pulses/second at 50Hz). Connect this to an Arduino interrupt pin. This is critical — capacitors must be switched at or near zero-crossing to prevent destructive switching transients.

3
Phase Angle Measurement

Using the zero-crossing of voltage as reference, measure the time delay until the current zero-crossing. Phase angle φ = (time_delay / 20ms) × 360°. Power factor = cos(φ). Sample both V and I zero-crossings simultaneously for accurate measurement. Filter readings over 10 consecutive cycles to reject noise. Display both leading/lagging indication and PF magnitude.

4
Capacitor Bank Sizing

For a 10kW motor load at 0.7 PF, reactive power needed: Q = 10 × tan(acos(0.7)) = 10.2 kVAR. To correct to 0.95 PF: Q_cap = 10 × (tan(acos(0.7)) - tan(acos(0.95))) = 10.2 - 3.3 = 6.9 kVAR. Design in 4 binary-weighted stages: 1, 2, 4, 4 kVAR (providing 0–11 kVAR in 1 kVAR steps). Capacitor rating: C = Q / (2π × f × V²). For 1 kVAR at 230V 50Hz: C = 60µF.

5
Contactor Control Logic

Map required kVAR correction to binary capacitor bank stage combinations. Implement a hysteresis band (target PF ± 0.03) to prevent hunting. Add minimum switching interval (30 seconds) to prevent contactor wear. Switch capacitors ON only at zero-crossing to minimize transients. Implement anti-hunting logic using a dead band and time delay. Track contactor operation count for maintenance scheduling.

6
Protection Features

Implement overcurrent protection: if load current exceeds 1.1× rated, shed all capacitors immediately. Over-voltage protection: if supply voltage exceeds 250V, disconnect all capacitors (risk of dielectric failure). Under-voltage: below 190V, disconnect (risk of contactor coil failure). Temperature protection using NTC thermistor in the capacitor cabinet — disconnect above 55°C.

7
LCD Display and Logging

Display real-time: PF, V, I, kW, kVAR, kVA, and active capacitor stages. Show target vs actual PF with trend arrow. Log PF improvement data to EEPROM every hour — track efficiency gains over time. Calculate and display monthly kVAR-hour savings compared to uncorrected baseline. Show reactive power demand charge savings at your utility's penalty rate.

8
Testing and Commissioning

Connect the APFC panel to a motor test load. Record baseline PF (should be 0.65–0.75 for typical induction motors). Start with all capacitors off, then enable APFC. Verify PF rises to 0.95–0.98 within 2–3 switching cycles. Monitor for hunting behavior. Measure supply current before and after — expect 25–35% current reduction at the same load, validating reactive power compensation.

Code & Implementation

Core code for apfc_controller.ino:

apfc_controller.ino C/C++
// Automatic Power Factor Correction Controller #define ZC_V_PIN   2    #define ZC_I_PIN   3    #define CAP_STAGE1 8 #define CAP_STAGE2 9 #define CAP_STAGE3 10 #define CAP_STAGE4 11  volatile unsigned long v_zc_time = 0; volatile unsigned long i_zc_time = 0; float phase_angle_deg = 0; float power_factor    = 1.0; byte active_stages    = 0;   void v_interrupt() { v_zc_time = micros(); } void i_interrupt() { i_zc_time = micros(); }  void setup() {   Serial.begin(9600);   attachInterrupt(digitalPinToInterrupt(ZC_V_PIN), v_interrupt, RISING);   attachInterrupt(digitalPinToInterrupt(ZC_I_PIN), i_interrupt, RISING);   pinMode(CAP_STAGE1, OUTPUT); pinMode(CAP_STAGE2, OUTPUT);   pinMode(CAP_STAGE3, OUTPUT); pinMode(CAP_STAGE4, OUTPUT); }  void updatePF() {   long dt = (long)(i_zc_time - v_zc_time);   if (dt < 0 || dt > 10000) return;    phase_angle_deg = (dt / 20000.0) * 360.0;   power_factor = cos(radians(phase_angle_deg)); }  void adjustCapacitors() {   static unsigned long lastSwitch = 0;   if (millis() - lastSwitch < 30000) return;     if (power_factor < 0.92) {          if (active_stages < 0x0F) { active_stages++; lastSwitch = millis(); }   } else if (power_factor > 0.98) {          if (active_stages > 0) { active_stages--; lastSwitch = millis(); }   }      digitalWrite(CAP_STAGE1, active_stages & 0x01);   digitalWrite(CAP_STAGE2, active_stages & 0x02);   digitalWrite(CAP_STAGE3, active_stages & 0x04);   digitalWrite(CAP_STAGE4, active_stages & 0x08); }  void loop() {   updatePF();   adjustCapacitors();   Serial.printf("PF: %.3f  Angle: %.1f  Stages: %d\\n", power_factor, phase_angle_deg, active_stages);   delay(1000); }

Testing & Troubleshooting

Test Power Factor Correction System by verifying each subsystem individually before full integration.

!
Troubleshooting Tips

Verify power voltages, check ground connections, use serial monitor for debug.

Real-World Applications

*Industrial motor plant energy optimization
*Commercial building power management
*Manufacturing facility cost reduction
*Hospital power quality improvement
*Data center PUE improvement
*Utility substation reactive power compensation
*Agricultural pump station efficiency
*Shopping mall electrical system optimization

Extensions & Next Steps

  • Add harmonic filter stages for non-linear load compensation
  • Implement dynamic PFC for rapidly varying loads
  • Add thyristor-based switching for faster response
  • Integrate with SCADA system for plant-wide monitoring
  • Add a power quality analyzer to log harmonics and flicker

Interactive Playground

Coming Soon

An interactive simulator will be available here — simulate circuits and run code in-browser without hardware.

Frequently Asked Questions

Why does my electricity bill decrease after installing PFC?
Many utility companies bill large consumers on kVA (apparent power) rather than kW (real power). Low power factor means high kVA for the same kW, resulting in higher bills. Even for residential consumers billed on kWh, poor PF increases current draw, causing higher I²R losses in wiring within the premises. PFC reduces these losses and prevents power factor penalty charges that many commercial utilities impose.
Can I use the same capacitors designed for AC power factor correction with DC circuits?
No. Power factor correction capacitors are specifically designed for AC operation — they are non-polarized, rated for continuous AC voltage, low ESR, and have self-healing properties for transient overvoltages. Standard electrolytic capacitors rated for DC will fail immediately or explosively when connected to AC mains. Always use capacitors specifically rated for AC power factor correction (marked with VAC ratings).
What is capacitor hunting and how do I prevent it?
Hunting occurs when the APFC repeatedly switches capacitors in and out rapidly as PF oscillates around the target value. It causes contactor wear and can create voltage transients. Prevention: implement a hysteresis dead band (e.g., switch ON below PF 0.92, switch OFF above PF 0.98), enforce a minimum 30-second interval between switching operations, and use averaging over multiple measurement cycles to smooth PF readings.
What happens if I over-correct and the power factor becomes leading?
Over-correction causes the load to appear capacitive (leading PF). This can cause motor speed fluctuations, increased voltage at the point of connection (potentially damaging equipment), and in some grid configurations, may actually increase your utility penalty charges. Always target PF 0.95–0.98 rather than 1.0, leaving a small inductive component as a safety margin.
How often do power factor correction capacitors need replacement?
High-quality AC power capacitors have a design life of 100,000 hours (approximately 11 years of continuous operation). They degrade through dielectric aging and electrolyte evaporation. Signs of failure include swollen or leaking capacitor bodies, reduced capacitance (measurable with a capacitance meter), increased temperature during operation, and declining PF correction effectiveness. Test capacitance annually and replace any unit below 80% of rated value.
Advertisement