Professional Documents
Culture Documents
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.
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.
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(�%�);