You are on page 1of 3

The purpose of this article is to introduce a unique power factor meter based on

Arduino. Required components, code, and simulation of Arduino based power factor
meter are the key elements discussed. To verify our design and code, the assembly
is simulated in ISIS Proteus and results are presented at the end.
Contents [hide]
1 Introduction
1.1 Why to measure power factor
1.2 Advantage of proposed power factor meter
2 Schematic
3 Simulation results 1
3.1 Modifying Power factor meter for High Voltage applications
4 Simulation results 2
5 Code
Introduction

Two different types of powers are associated with electric power system. Active
power is cosumed by load while Reactive power energizes capacitive as well as
magnetic circuits. Reactive flows in system but it is not utilized. The utility
companies restrict the flow of reactive power to a certain value. To determine the
amount of reactive power, a quantity called power factor was introduced.
Power factor is defined in two different ways. One is related to the flow of power
in the system.
It is the ratio of the active power to the total power of the system.

Where as
Also power factor is defined as cosine of angle between the voltage and current.

Where F is the angle between voltage and current of the system.


Why to measure power factor
Utility companies direct the users to keep the power factor between certain limits.
All those users whose power factor exceeds those limits are penalized by utility
companies. Therefore it is very necessary for the utility companies as well as
users to measure the power factor correctly. Therefore the purpose of this article
is to design a low cost Arduino based power factor meter.
Advantage of proposed power factor meter

The biggest advantage of the suggested meter is its simplicity, least of external
components and readily available library for programming. To be used in low voltage
low power circuit, it can be used directly however in case of high voltage high
power circuits, external components like CTs and PTs should be added.
Another advantage of this design is its simplest programming. It does not involve
complicated algorithm and long firmware unlike other controller based power factor
meter. It uses readily available library available at
https://github.com/openenergymonitor/EmonLib . This library allows determination of
different electrical quantities which includes power factor.
Schematic
The following figure shows the schematic of Arduino based power factor meter which
is applicable to low voltage, low power circuits.
Arduino UNO R3
LCD 16bit
RS 232 for serial communication between Arduino and PC (Optional)
DC Supply.

Analogue inputs of Arduino requires positive voltage. Therefore DC offset voltage


of 2.5V is added to both signals. One signal is given to the A1 input and second
is given to the A2. To display power factor, 16 bit LCD is interfaced with Arduino.
It is also possible to display the power factor on PC.
Simulation results 1
The setup is tested by applying two signals of frequency of 50Hz. Since Arduino
analogue inputs require only positive voltage, therefore 2.5V DC is added with each
signal. A phase shift of 30? is given to one signal. The shift between input
signals is also shown by oscilloscope. The simulation result is shown.
The phase shift of 30 degrees can be seen from the oscilloscope output. It can be
calculated as follows:
1square = 2ms
Time difference between both signals = 1.7ms (a bit less than one square)
In terms of angle (degrees) =
Theoretically the power factor should be
It can be seen from the figure that Arduino gives output of 0.85 or 85% which is
considerable accurate.
Modifying Power factor meter for High Voltage applications
Since Arduino UNO is an AVR based microcontroller so it cannot be used with high
voltage and power. Therefore some additional circuitry must be added to step down
the high voltages and currents to the level compatible with Arduino UNO. In the
given case addition of PT and CT which brings down voltage and current level.
PT stands for potentail transformer which is discussed in All about potential
transformer
CT stands for current transformer whose details can be found here Current
transformer notes
The new schematic is shown in the figure.
Transformer (TR2) representing CT and TR1 representing PT. 33? resistor symbolize
the burden of CT. Purpose of capacitor and two resistors is to provide DC biasing
for analogue inputs. 10uF Capacitor provide low impedance path of AC signal. Two
470k? resistors serve as a voltage divider circuit to provide 2.5V DC from 5V DC
source. If one end of CT is connected to ground directly, the signal will oscillate
between positive and negative values. Since Arduino only works on positive voltage
only therefore 2.5V offset voltage is added to output of CT.
Simulation results 2
After modifying the Arduino based power factor meter, it is tested and the result
is shown in the figure.

Code
The code for Arduino based power factor meter is written in python language and
compiled in Arduino IDE compiler.
#include �EmonLib.h�
// Include Emon Library
EnergyMonitor emon1;
// Create an instance
// include the library code:

#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup()

Serial.begin(9600);
// initialize serial communication with bit rate of 9600
lcd.begin(16,2);
// set up the LCD�s number of columns and rows:
emon1.voltage(2, 234.26, 1.7);
// Voltage: input pin, calibration, phase_shift
emon1.current(1, 111.1);
// Current: input pin, calibration.
}
void loop()

emon1.calcVI(20,2000);
// Calculate all. No.of half wavelengths (crossings), time-out
emon1.serialprint();
// Print out variable power factor)
float powerFactor = emon1.powerFactor;
//extract Power Factor into Variable
lcd.setCursor(0,0);

lcd.print(�PowerFactor=�);

lcd.setCursor(7,1);

lcd.print(powerFactor*100);

lcd.print(�%�);

You might also like