Proc.
of the 2018 IEEE 5th International Conference on Smart Instrumentation, Measurement and Applications (ICSIMA 2018)
28-30 November 2018, Songkhla, Thailand
Development of Power Factor Meter using Arduino
First Teddy Surya Gunawan1,2, Muhamad Hadzir Anuar1, Mira Kartiwi3, Zuriati Janin4
1
Electrical and Computer Engineering Department, International Islamic University Malaysia, 53100 Kuala Lumpur, Malaysia
2
Visiting Fellow, School of Electrical Engineering and Telecommunications, University of New South Wales, NSW, Australia
3
Information Systems Department, International Islamic University Malaysia, 53100 Kuala Lumpur, Malaysia
4
Faculty of Electrical Engineering, Universiti Teknologi MARA, 40450 Shah Alam, Malaysia
Email: tsgunawan@iium.edu.my
Abstract— Nowadays, electricity is the most important or basic circuit that used in the power factor measurement system is zero
needs of human life. In this paper, the development of power factor crossing detectors to convert and process the current and voltage
meter using Arduino will be discussed. To measure power, several signals, in which the output will be low if the difference is zero
parameters were extracted, including voltage and current from [8]. In [9], the firmware design can be used to calculate and
the alternating current (AC) source. Voltage and current sensors record power consumption data and record five outage events
outputs were interfaced to Arduino, in which the real power and with their interruption time, interruption durations and
apparent power were calculated to determine the power factor. restoration time if an outage event occurred.
Experimental results on the current measurement calibration
showed the accuracy of our proposed power factor meter. Although many researches have been conducted on the
Moreover, the measured data points were logged in an SD card, at power meter, but little research has focused on the power factor
the same time it was sent to Matlab with graphical user interface meter. Therefore, the objective of this research is to develop
(GUI) for ease of further monitoring. Finally, IoT framework power factor meter using Arduino due to its capability and low
analysis for smart meter was further discussed in this paper. cost, while providing data logging and connection features for
further analysis.
Keywords—real power;apparent power; power factor; Arduino;
IoT; smart meter; Matlab GUI.
II. POWER MEASUREMENT THEORY
I. INTRODUCTION Average power is the average of instantaneous power over
one period as shown in Eq. 1, in terms of effective or RMS value.
Nowadays electricity is the main power generator that is The average power consists of real and imaginary power. If the
needed to turn on most of the devices like electronics equipment. phase angle between the voltage and current are the same, it
Electricity enables us to use various electrical appliances like implies that the load is purely resistive and all power is being
television, oven, air condition, refrigerator and others. absorbed by the load. If 𝜃 𝜃 90 , the load is considered
Generally, electric power can be generated using renewable and as reactive and the average power is being reflected back to the
non-renewable sources. Most electric companies charge either AC (alternating current) source.
the highest kW (real power), or the highest kVA (apparent
power), whichever is greater [1]. If the power factor is low, the 𝑃 𝑉 𝐼 ∠ 𝜃 𝜃 𝑉 𝐼 𝑐𝑜𝑠 𝜃 𝜃
(1)
measured kVA will be significantly higher than the kW.
Therefore, improving the power factor through power factor Apparent power (S) is the voltage of an AC system multiplied
correction, e.g. capacitor bank connected in parallel, will lower by all the current that flows into it. It can be computed as the
the kVA requirement thus lower the electricity bill. Several other product of RMS voltage and RMS current, as shown in Eq. 2 and
advantages of power factor improvement, including increased is expressed in units of volt-amperes (VA). 𝑉 and 𝐼 values
load carrying capabilities in existing circuits, improved voltage, are calculated using Eq. 3 and Eq. 4, where 𝑁 is the number of
reduced power losses, and reduced carbon footprint [1]. samples, 𝑖 𝑛 and 𝑣 𝑛 are the samples of the electrical current
and voltage signals.
Many research have been conducted on the development of
smart meter as discussed in [2]. Due to its usage, smart meters 𝑆 𝑉 𝐼 (2)
are being developed and installed in many homes, school
buildings, universities, and industrial premises around the world 𝑖 𝑛
[3, 4]. The smart meter infrastructure, if used properly, can 𝐼 (3)
provide more than just recoding consumption of electricity, such 𝑁
as easier processing of billing, detection of energy losses due to
possible fraud, early warning of blackouts, as well as precision
real-time pricing schemes [5]. 𝑣 𝑛
𝑉 (4)
One of the advantages using the digital based power factor 𝑁
meter is that the read data by the device can be stored easily for
other applications or analysis [6, 7]. One type of the analog
Real Power (P) is the capacity of the circuit for performing
work at a time. This can only be calculated by measuring voltage
and current simultaneously and multiplying them, and averaging
over time:
1
𝑃 𝑣 𝑛 𝑖 𝑛 (5)
𝑁
The Power Factor (PF) is calculated as the ratio between
Real Power to Apparent Power. It refers to the ability of the
electrical systems on the installation to convert electric current
into useful workload such as heat, rotation, or light.
𝑅𝑒𝑎𝑙 𝑃𝑜𝑤𝑒𝑟 𝑊 𝑃
𝑃𝐹 𝑐𝑜𝑠 𝜃 (6)
𝐴𝑝𝑝𝑎𝑟𝑒𝑛𝑡 𝑃𝑜𝑤𝑒𝑟 𝑉𝐴 𝑆 Fig. 2. Hardware Design of Power Factor Meter
The PF value is ranging from 0 to 1 which represents the
load characteristics, including resistive, inductive, or capacitive. 1) Arduino Microcontroller
Maximum power transfer happens if the power factor equals to There are many single board computer (SBC) available, such
1 (cos 𝜃 0). If the current leads voltage by -90o phase, the load as Arduino, Raspberry Pi, PIC, etc. Of the many SBC, Arduino
is purely capacitive. While if the current lags voltage by 90o was selected due to its capability and low cost. Arduino used
phase, the load is purely inductive. If the power factor is poor, simplified C language to write the codes and has its own
the load will drive more current, which means more energy lost circuitry board for input and output interfacing. Furthermore, it
in the electrical distribution system. Most of the load in the could provide a serial monitor using serial communication
electrical system is having inductive characteristic [8]. connected to a PC. This feature can become very handy as it can
Therefore, the industry is normally using capacitor bank shows result or sensor values without needed to connect with the
connected in parallel to improve the power factor [1]. output display such as LCD. In this research, we used Arduino
UNO Rev 3, which has 6 analog pins, 14 digital pins, 32 kB
memory, with clock speed of 16 MHz.
III. POWER FACTOR METER DESIGN
In this section, the hardware and software design of proposed 2) Sensors (Voltage and Current) and Interface Circuit
power factor meter will be presented. To measure the output voltage from the AC source, a rectifier
circuit is used to convert from AC to DC to measure its effective
A. Hardware Design value. The Bridge Rectifier KBPC3504 is selected with the
maximum voltage and maximum current is 400 V and 35 A,
Figure 1 shows the block diagram of the proposed power respectively. Fig. 2 illustrates the bridge rectifier.
factor meter using Arduino. Arduino Uno is the main
microcontroller unit which connects to sensors and other output
for data logging.
Fig. 1. Block Diagram of Proposed Power Factor Meter Fig. 3. Op-amp Interface Circuit between Sensors and Arduino
For the proper date and time stamp of the data logging, an For the current sensor, there are two types, which is invasive
RTC (real time clock) module is utilized. It features could be and non-invasive current sensor. The invasive type could
further extended using a GPS module which could provide a provide higher accuracy, while the non-invasive type could
synchronized date and time, as well as, geo-location, as shown provide easier installation. For this reason, we selected a non
in Figure 2. The output of the power factor measurement could invasive current sensor, as shown in Fig. 2, with proper
be displayed in an LCD, recorded in an SD card, connected to calibration to improve its accuracy. In addition, the price of the
PC with Matlab using a USB cable for data plotting and further non-invasive AC current sensor is cheaper than the invasive
analysis, or sent to a server using Ethernet shield [10]. type, thus low cost development of the designed power factor
will be achieved. However, an electromagnetic interference measurement result could be displayed at LCD, logged at SD
could cause measurement error as discussed in [11]. Therefore, card, or sent to PC for plotting and monitoring in Matlab.
care must be taken to use the non-invasive current sensor by Furthermore, if the Ethernet module is activated and connected,
wrapping it with aluminum foil to simulate Faraday’s cage. the result could also be sent to a server for further analysis.
Finally, Fig. 3 shows the op-amp interface circuit between the
voltage and current sensors to the Arduino.
3) LCD Display
For the display of the designed power factor meter, LCD
16x2 JHD162A is selected due to its voltage compatibility and
ease of connectivity with Arduino Uno. The output interface
circuit between Arduino and LCD display is shown in Fig. 4,
using resistor and potentiometer to adjust the LCD brightness.
Fig. 5. Flowchart of Power Factor Meter
Automatic power factor correction could be done by
employing various capacitors connected in parallel and switched
on demand using Arduino output connected to relay circuit. This
scenario is shown in Fig. 6. The relay circuits which can toogle
switch 𝑅 , 𝑅 , 𝑅 , is connected to the digital output of Arduino.
Depends on the current power factor, the proposed device can
switch one or more capacitors to improve the power factor.
Fig. 4. Output Interface between Arduino and LCD display
4) SD Card Module and RTC Module
An SD card module along with proper software library is
used as interface between SD card and Arduino for data logging
purposes of the measured real power, apparent power, and Fig. 6. Automatic Power Factor Improvement using Capacitor Bank
power factor along with the date and time stamp obtained from
the RTC module. If multiple smart meters are deployed in IV. IMPLEMENTATION AND EXPERIMENTAL RESULTS
different location, then it would be better to use a GPS module This section will provide the actual implementation of the
which could provide a synchronize date/time and smart meters’ power factor meter and its calibration.
location.
A. Implementation
5) LiPo Battery
A LiPo battery, i.e. Zippy Flightmax 1000mAh 2S1P 15C, is
used due to its capacity which can provide 1A current and
lightweight. Therefore, the developed power factor meter could
be used anywhere due to its portability. The overall cost of this
proposed power factor meter is around RM210.
B. Software Design
Fig. 5 shows the software flowchart of the proposed power
factor meter. First, the device is connected to the electrical
appliances under test, such as laptop, fan, light bulb, etc. Then
the voltage and current sensors will measure the voltage and
current, respectively. The interfacing circuit will convert into
lower voltage and current so that it could be digitized by
Arduino’s ADC. Next, the real and apparent power will be
calculated, in which the power factor could be derived. The Fig. 7. Implementation of Power Factor Meter
Fig. 7 shows the actual implementation of the power factor There are three devices used to calibrated the proposed
meter, while Fig. 8 shows the internal components of the device. power factor meter as shown in Table I. There are two current
The actual implementation is based on the block diagram measurements, the measurement by non-invasive current sensor,
illustrated on Fig. 1. The AC connection is connected to the main and the measurement by ampere meter. The ampere meter is
electrical source, while the electrical appliances under test is connected to the ammeter port as shown in Fig. 6. The difference
connected to the device port. As mentioned in the previous between both measurements will be compensated so that the
section, the measurement output is displayed in the LCD, could non-invasive measurement will have the same value as the
be recorded in an SD card or connected to PC with USB cable manual ampere meter measurement as shown in Fig. 9. After
for plotting and monitoring using Matlab. The toggle switch is several experiments using three devices, we found that a factor
used to change the display information between power factor of 0.23 needs to be multiplied to the measured current by non-
and current, and real and apparent power. invasive sensor. Using this correction factor, the difference
between the non-invasive current sensor and the ammeter is only
around ±1.79%.
V. CONCLUSIONS
This paper has presented the development of power factor
meter using Arduino. To measure the current, a non-invasive
current sensor was used for ease of installation. The accuracy of
the selected sensor was calibrated using the manual ammeter, in
which the difference is around ±1.79%. Further research include
experiments on various electrical appliances, data logging, and
automatic power factor improvement using selected switch on
parallel connected capacitor bank.
ACKNOWLEDGMENT
Fig. 8. Internal Components of Power Factor Meter
The authors would like to thank International Islamic
University Malaysia (IIUM) and Universiti Teknologi MARA
B. Calibration (UiTM) Shah Alam for providing facilities to support the
The use of non-invasive current sensor simplify the research work.
implementation while sacrificing its accuracy. The sensor is
REFERENCES
clipped to the cable which may have different characteristics. [1] L. L. Grigsby, Electric power generation, transmission, and distribution,
Therefore, the calibration process is necessary at least once or CRC press, 2016.
when the cable used is changed. [2] D. Alahakoon and X. Yu, "Smart electricity meter data intelligence for
future energy systems: A survey," IEEE Transactions on Industrial
TABLE I. LIST OF DEVICES USED FOR CALIBRATION
Informatics, vol. 12, pp. 425-436, 2016.
NO. DEVICES CURRENT (A) POWER (W) [3] D. Alahakoon and X. Yu, "Advanced analytics for harnessing the power
of smart meter big data," in Intelligent Energy Systems (IWIES), 2013
1 Laptop ASUS Model S200E 0.17 40
IEEE International Workshop on, pp. 40-45, 2013.
2 Industrial Fan 0.96 230 [4] L. Pocero, D. Amaxilatis, G. Mylonas, and I. Chatzigiannakis, "Open
3 Light Bulb 100 W 0.42 100 source IoT meter devices for smart and energy-efficient school
buildings," HardwareX, vol. 1, pp. 54-67, 2017.
[5] T. Chou, Precision-Principles, Practices and Solutions for the Internet
of Things, McGraw-Hill Education, 2017.
[6] B. C. Kok, C. Tan, and E. Sulaiman, "Development of a cost-effective
op-amp based digital power factor meter," 2007.
[7] B. Jovanović, M. Zwolinski, and M. Damnjanović, "Low power digital
design in Integrated Power Meter IC," in Proceedings of the Small
Systems Simulation Symposium, pp. 49-55, 2010.
[8] S. Rustemli and M. Ates, "Measurement and simulation of power factor
using pic16f877," Przegląd Elektrotechniczny (Electrical Review), pp.
0033-2097, 2012.
[9] S.-W. Luan, J.-H. Teng, S.-Y. Chan, and L.-C. Hwang, "Development of
a smart power meter for AMI based on ZigBee communication," in
Power Electronics and Drive Systems, 2009. PEDS 2009. International
Conference on, pp. 661-665, 2009.
[10] T. S. Gunawan, I. R. H. Yaldi, M. Kartiwi, H. J. I. J. o. E. Mansor, and
C. Engineering, "Performance Evaluation of Smart Home System using
Internet of Things," vol. 8, pp. 400-411, 2018.
[11] F. Leferink, C. Keyer, and A. Melentjev, "Static energy meter errors
caused by conducted electromagnetic interference," IEEE
Fig. 9. Current Measurement Calibration Process electromagnetic compatibility magazine, vol. 5, pp. 49-55, 2016.