Built to order

Digital Power Factor Meter using Arduino and Zero Crossing Detector

This project builds a digital power factor meter from an Arduino Uno and two zero-crossing detector circuits that measure the phase angle between voltage and current and show power factor (cos φ) on a 16x2 LCD. A potential transformer steps the mains voltage down, an ACS712 sensor measures load current, and the Arduino times the gap between the two zero-crossing pulses to compute the phase angle. The meter shows live power factor, RMS voltage and RMS current for resistive, inductive, capacitive loads. Suitable for B.E./B.Tech final-year projects in Electrical Engineering.

Chat on WhatsApp — get a quotation

Electrical ACS712 Hall-effect current sensor (DC side)Arduino IDE16x2 LCD displayArduino Uno · ATmega328PEmbedded C firmwareBreadboard prototypingPC817 optocoupler zero-crossing detectorStep-down potential transformerHardware
Digital Power Factor Meter using Arduino and Zero Crossing Detector — project thumbnail preview
More project photos (2)

The problem

A digital power factor meter using Arduino and a zero-crossing detector measures how efficiently an AC load uses power. Power factor is the cosine of the phase angle (φ) between the supply voltage and the load current, and it falls below 1.0 for inductive or capacitive loads. Utilities penalise low power factor because the same useful power then draws more current and more losses from the network, yet most college labs teach the concept with a phasor diagram and no instrument that shows the reading move. An analogue power factor meter is expensive and rarely available in a teaching lab, so students never watch the value change when a choke is switched in. This project closes that gap with a digital meter built around an Arduino Uno: two zero-crossing detector channels capture the instants at which voltage and current cross zero, the Arduino measures the time between them, and the phase angle and power factor appear live on an LCD.

SYSTEM FLOW

5 components 4 connections

Live flow
Drag to explore
100%
powerAC Mains 230 V

Voltage and current feed the measurement channels.

Follow the working sequence

How it works

The digital power factor meter works by timing the gap between two events: the instant the AC voltage crosses zero and the instant the AC current crosses zero. A step-down potential transformer reduces the 230 V mains voltage to 12 V AC, and an ACS712 Hall-effect sensor produces a voltage proportional to the load current; each signal feeds its own PC817 optocoupler zero-crossing detector, which outputs a sharp digital pulse at every crossing. The Arduino Uno captures both pulses on hardware interrupts and records the time delay between the voltage pulse and the current pulse. Because one full mains cycle at 50 Hz lasts 20 ms, that delay converts directly into a phase angle (φ = 360 × 50 × Δt), and power factor follows as cos φ. The same Arduino samples the scaled voltage and the ACS712 output through its 10-bit ADC to compute RMS voltage and RMS current, and all three values appear on the 16x2 LCD.

  1. The 230 V mains supply is stepped down by the potential transformer to 12 V AC for the voltage channel, keeping the Arduino side isolated from the mains.
  2. The load current passes through the ACS712 sensor, whose output voltage rises and falls with the instantaneous current (185 mV/A on the 5 A variant, datasheet value).
  3. Each channel's zero-crossing detector converts its AC signal into a sharp digital pulse at every zero crossing, using a PC817 optocoupler for isolation.
  4. The Arduino captures the voltage and current pulses on two hardware interrupts and measures the time delay (Δt) between them.
  5. Firmware converts the delay into a phase angle (φ = 360 × 50 × Δt at 50 Hz) and computes power factor as cos φ, then averages successive readings to steady the display.
  6. RMS voltage and RMS current are computed from ADC samples and shown on the 16x2 LCD beside the power factor, with a leading/lagging indicator.

Tech stack:

  • Arduino Uno (ATmega328P)
  • Arduino IDE (C/C++)
  • ACS712 Hall-effect current sensor
  • PC817 optocoupler zero-crossing detector
  • 16x2 character LCD
  • Step-down potential transformer (230 V to 12 V)
  • Breadboard and jumper wiring
  • Resistive · inductive · capacitive test loads
Parameter Value
Controller Arduino Uno, ATmega328P at 16 MHz (datasheet value)
Voltage sensing Step-down potential transformer, 230 V to 12 V AC (design value)
Current sensor ACS712-05B Hall-effect sensor, 185 mV/A sensitivity (datasheet value)
Zero-crossing detection 2 channels, PC817 optocoupler based (component count)
ADC 10-bit, 5 V reference (datasheet value)
Mains frequency 50 Hz (design value)
Display 16x2 character LCD
Measured quantities Power factor (cos φ), RMS voltage in V, RMS current in A
Display update Approximately 1 reading per second (design target)
Load current range Up to 5 A with the ACS712-05B variant (datasheet value)
Supply 5 V DC for the Arduino and sensor stage (design value)

Project features

The digital power factor meter's strongest capabilities are its dual zero-crossing detection, its direct phase-angle timing, and its live LCD readout of power factor, voltage and current. Two optocoupler-based zero-crossing detector channels — one for voltage, one for current — produce clean digital pulses at every zero crossing, so the Arduino never has to sample the mains waveform directly. The firmware captures both pulses with hardware interrupts, measures the time delay between them, converts that delay into a phase angle and then into power factor as cos φ, and smooths the result with averaging so the display stays steady. The 16x2 LCD shows power factor together with RMS voltage and RMS current in one view, and a leading/lagging indicator tells the student whether the load is capacitive or inductive. Builder note: near the crossing point the raw comparator output chatters on mains noise, so each channel uses hysteresis and the firmware rejects pulses shorter than a noise threshold.

  • [Dual zero-crossing detection] Two PC817 optocoupler channels produce a clean digital pulse at every zero crossing of voltage and current, so the Arduino measures timing instead of sampling the mains waveform directly.
  • [Phase-angle timing and cos φ computation] The firmware captures both pulses on hardware interrupts, measures the delay between them, converts it to a phase angle and computes power factor as cos φ.
  • [Live LCD readout] The 16x2 LCD shows power factor together with RMS voltage and RMS current, updated approximately once per second (design target).
  • [RMS voltage and current measurement] The scaled transformer output and the ACS712 sensor output are sampled by the Arduino 10-bit ADC to compute RMS voltage and RMS current.
  • [Leading/lagging indication] The display marks whether the current leads or lags the voltage, so capacitive and inductive loads are distinguishable at a glance.
  • [Noise-tolerant zero-crossing stage] Hysteresis on each detector channel and firmware rejection of short spurious pulses keep the timing stable near the crossing point, where raw comparator outputs chatter on mains noise.
  • [Interchangeable test loads] Resistive, inductive (choke/fan) and capacitive test loads can be connected through the sensor so the meter's behaviour across load types can be demonstrated.

Optional add-on (not part of the base build): automatic capacitor-bank switching with a relay for power factor correction. Future scope: data logging of power factor over time.

What is included

  • Working hardware prototype (Arduino, zero-crossing detector boards, ACS712 sensor, LCD, transformer, test loads)
  • Complete Arduino firmware (C/C++ source with comments)
  • Circuit diagram and wiring documentation
  • Component list with part numbers
  • Calibration and demonstration procedure (resistive, inductive and capacitive loads)
  • Project report PDF, abstract PDF and PPT presentation
  • Viva Q&A preparation document (power factor theory, zero-crossing timing, cos φ)

Limitations & prerequisites

  • No measured accuracy figure is claimed; the report documents a buyer-run comparison against a reference meter instead.
  • Designed for 50 Hz sinusoidal mains; distorted or harmonic-rich waveforms reduce zero-crossing timing accuracy.
  • The 5 A ACS712 variant limits load current to 5 A (datasheet value); larger loads need the 20 A or 30 A variant (100 mV/A or 66 mV/A, datasheet values).
  • Power factor readings are least stable near 1.0 at very small load currents, where the ACS712 output swing is only a few mV.
  • The prototype is a teaching instrument, not a certified energy meter, and the mains side must be handled under teacher supervision.
  • Display updates approximately once per second (design target); the meter does not capture fast transients.

Frequently Asked Questions

How does the meter actually measure power factor?

It measures the time delay between the voltage zero crossing and the current zero crossing, converts that delay into a phase angle, and takes the cosine of the angle as the power factor. Two optocoupler detector channels produce one digital pulse per crossing, the Arduino captures both pulses on hardware interrupts, and the firmware computes φ = 360 × 50 × Δt at 50 Hz, then PF = cos φ. A resistive load gives near-zero delay and PF near 1.0, while an inductive load delays the current and lowers the reading.

How is this different from a digital LC meter?

A digital LC meter measures capacitance and inductance by timing the oscillation frequency of an LC tank circuit, while this meter measures AC power factor (cos φ) by timing the phase angle between voltage and current. The two instruments measure different quantities with different principles: resonance frequency versus zero-crossing phase timing. This project contains no LC tank and performs no resonance measurement. Students who need component values should pick the LC meter; students who need power-system measurement should pick this one.

Which controller and sensors are used?

An Arduino Uno (ATmega328P, 16 MHz, datasheet value) runs the firmware. Voltage comes from a 230 V to 12 V step-down potential transformer, current from an ACS712 Hall-effect sensor (185 mV/A on the 5 A variant, datasheet value), and the two zero-crossing channels use PC817 optocouplers for isolation. Results appear on a 16x2 LCD. The 10-bit ADC samples the scaled voltage and sensor output for the RMS values.

Is it safe to connect to 230 V mains?

The low-voltage electronics never touch the mains directly: the transformer isolates the voltage channel and the PC817 optocouplers isolate both zero-crossing channels, so the Arduino, sensor stage and LCD sit on the safe side of the isolation barrier. The mains terminals themselves still carry 230 V and must be wired, insulated and switched on only under teacher supervision. The build guide includes a mains-safety checklist and the prototype must be inspected before first power-up.

Can it be extended to automatic power factor correction?

Yes, as an optional add-on: a relay-switched capacitor bank driven from the Arduino can switch capacitors in when the measured power factor falls below a set threshold and switch them out when it recovers. The base build only measures and displays power factor; the correction stage is not included and would be quoted separately as a customization. Data logging of power factor over time is another listed future-scope item.

Is this project suitable for a final-year project?

Yes — for Electrical Engineering and related programs. It demonstrates AC power theory, phase-angle measurement, optocoupler isolation, interrupt-driven timing and embedded firmware in one working instrument, and the viva discussion can centre on why the reading changes across resistive, inductive and capacitive loads. The report, PPT and viva Q&A cover the theory and the calibration procedure.

Components & software requirements
  • Arduino Uno (ATmega328P)
  • Arduino IDE (C/C++)
  • ACS712 Hall-effect current sensor
  • PC817 optocoupler zero-crossing detector
  • 16x2 character LCD
  • Step-down potential transformer (230 V to 12 V)
  • Breadboard and jumper wiring
  • Resistive · inductive · capacitive test loads
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.

Get a quotation