Sie sind auf Seite 1von 6

Power factor metering system using Arduino

P.P. Machado Jr , T. P. Abud M.Z.Fortes, B.S.M.C.Borba


Fluminense Federal University - UFF Fluminense Federal University - UFF
Electric and Telecommunications Engineering Master Electric Engineering Department - TEE
Program – PPGEET Niterói, Rio de Janeiro, Brazil
Niterói, Rio de Janeiro, Brazil mzf@vm.uff.br, bborba@id.uff.br
paulomachado@id.uff.br, tpabud@id.uff.br

Abstract—The power factor (PF) levels are established by affordable costs of its components and the ease of
each country’s national standards. In Brazil the lower power programming it through a simplified version of C++ [6], [7].
factor level allowed is 0.92. In order to monitor this quantity, For example, in [8]-[12], Arduino is implemented for the real-
the present paper uses Arduino to develop a PF metering system. time monitoring of electrical quantities, such as current,
It presents all the necessary theories concerning the calculus of voltage, P, S, and PF.
the power factor itself, the programming logic applied to the data
acquisition, and the details of the hardware components used in The objective of this article is to develop a PF metering
this system. In the end, two tests are conducted so that the meter system using Arduino addressing a different methodology from
accuracy can be evaluated. The results are compared with other papers. Thus, the discussions in Section II relate to the
regulated measuring instruments. components of the meter hardware, the electrical connections
used, and the applied programming logic. In Section III, two
Keywords—power factor; Arduino; energy efficiency; power loads with different impedances are connected to the meter,
quality; electrical measurement. and the results are compared with regulated measuring
instruments and analyzed in Section IV. Finally, Section V
I. INTRODUCTION presents the conclusions of this paper and suggests
Power Factor (PF) is an electrical quantity which is often improvements for future works.
related to power quality and energy efficiency analyzes. A low
PF increases the losses of the conductors; contributes to the II. METHODOLOGY
occurrence of overload conditions on electrical systems; This section discusses the operating principles of the meter,
reduces the voltage level, especially when it is located on from the PF calculation to the presentation of every system
connection points that are far from the feeder; and component, including the measuring instruments used on the
compromises the capacity of transformers and feeders [1], [2]. tests in Section III.
From an economic point of view, in Brazil, extra taxes are
charged to the electric bill of group “A” consumers – those A. Theorical Introduction
whose voltage supply is equal to or higher than 2.3kV or The PF is estimated according to the instantaneous values
served by an underground distribution system – with a leading of the current and voltage measured on the load. Based on
PF lower than 0.92 from 23:30h to 6:30h and with a lagging these quantities, it is possible to calculate the rms current, the
PF below 0.92 during the complementary daily period [3]. rms voltage, P, S, and then the PF, according to (1)-(5) [8]:
According to the literature, PF is defined as the ratio
between the active power (P) and the apparent power (S) [2], n I 2
i=1 i
[4]. Alternatively, it can be expressed as the cosine of the angle IRMS = (1)
n
between the power phasors (cos φ), only for pure sinusoidal
voltage and current components [1]. In the presence of n V 2
i=1 i
nonlinear loads, the total harmonic distortion (THD) must be VRMS = (2)
n
considered in the PF calculation. In this condition, PF is
different from cos φ [1], [4].
1 n
In many industries, for example, loads with a quick P=n i=1 V𝑖 × I𝑖 (3)
dynamic operation consume high levels of reactive power (e.g.,
induction motors, welding machines, electric arc furnaces,
etc.). Therefore, there is a significant PF reduction that should S = VRMS × IRMS (4)
be fixed, usually through capacitor banks switching [1], [5].
Currently, the open-source prototyping platform Arduino is P
PF = (5)
becoming popular among students and researchers, due to the S
Where: The function analogRead( ), used in Arduino programming
for reading analog values, takes about 100 µs (0.0001 s) to read
Ii and Vi are the instantaneous values of the current and an analog input, so the maximum reading rate is about 10,000
voltage of the ith sample; times a second [13].
IRMS and VRMS are the rms values of the current and voltage; The tests determined that, on a 60 Hz cycle, Arduino can
and n is the maximum number of samples. read approximately 75 samples of instantaneous values of
Fig. 1 and 2 show the simplified and real circuit of the PF voltage and current and measure the quantities simultaneously.
meter. The measurements are displayed in Fig. 5 and 7 in Section III.

C. Current Measurement
The sensor ACS712 for currents up to 30 A was used for
the current measurement. For this current level, it has a
sensitivity of 66 mV/A. The device operating principles are
based on the Hall Effect [14]. In addition, it can read both
alternating and direct current.
There are other measurement techniques used to read
current with Arduino, such as current transformers associated
with voltage dividers. In this work, the ACS712 was chosen
because of its good accuracy and simplicity.

D. Voltage Measurement
Fig. 1. Simplified circuit of the PF meter. The circuit of Fig. 3 was used for the voltage measurement
[15]. The values of the passive elements are: R1 = 100 kΩ; R2
= 10 kΩ; R3 = R4 = 100 kΩ; C = 2.2 µF. The winding turns
ratio of the transformer (AC - AC Adapter) is approximately
2 11: 1.
1
1 1
1
1

4
1
3 1
5
1
1
1
1
1 Arduino M ega 2560
2 USB
3 ProtoBoard Fig. 3. Voltage measurement circuit.
4 ACS712 (Current Sensor)
5 AC - AC Adapter The transformer and the resistors R1 and R2 reduce the
supply voltage (127 VRMS) to safe levels regarding the Arduino
analog inputs (bellow 5 V).
Fig. 2. Real circuit of the PF meter.
On the other hand, as the values read by Arduino analog
inputs must be positive, R3 and R4 resistors are responsible for
B. Arduino the offset required, so there are no negative values on the
The board Arduino Mega 2560 was used in this article. It analog input. In other words, these resistors divide the
has 54 digital inputs and outputs, 16 analog inputs, and 256 kB continuous voltage 5 V (provided by Arduino) to 2.5 V at the
of flash memory operating at 16 MHz [13]. The device feeding node among R3, R4, R2 and C. Therefore, the instantaneous
is supplied by USB, which is connected to a computer. values of the read voltage are increased by 2.5 V, so all of these
values are positive.
The Arduino has a 10-bit analog-to-digital converter (A/D).
Therefore, the values read from 0 to 5 V (maximum The capacitor C is simply used as a low-pass filter, filtering
permissible value) in the analog inputs are converted from 0 to high frequency disturbances. Thus, the capacitor has an
1023 bits. So, the resolution obtained is 5 V/1024 bits [13]. important role in the circuit, because the voltage signal would
be floating without it, due to the high frequency components.
E. Digital Data Processing III. TESTS
The read data from both voltage and current measurements In order to verify the accuracy of the developed meter, two
are digital values from 0 to 1023 bits. Thus, it requires a tests were performed: the first one with a purely resistive load,
programming logic that centralizes the waveforms on the consisting of incandescent lamps, and the second one with an
horizontal axis and then converts these digital values to analog, inductive load, consisting of compact fluorescent lamps.
considering the Arduino resolution (item B).
On the current measurement, this data processing also A. Purely Resistive Load (R)
considers the sensor sensibility (item C). Regarding the voltage
measurement, the voltage divider and the transformer winding The load R investigated in this section is only made of an
turns ratio must be taken into account (item D). incandescent lamp set. In this test, the voltage VRMS measured
by the multimeter was 125.6 V. This voltage is assumed as the
To illustrate this process, Fig. 4 shows the waveform of the reference. Table I and Fig. 5 show the data measured by the
digital voltage (in red) and the analog voltage (in black), Arduino, and Table II and Fig. 6 show the data measured by the
properly centered on the horizontal axis and converted. The voltage source and the oscilloscope, respectively.
read values come from the distribution grid, so there is a slight
harmonic distortion on the waveforms.
TABLE I. PARAMETERS MEASURED BY THE ARDUINO (R-LOAD)

Fig. 4. Digital and analog voltage.


TABLE II. PARAMETERS MEASURED BY THE VOLTAGE SOURCE (R-
LOAD)
F. Voltage Source
Output Measurements
The voltage source Chroma 6500 was used in the tests in
Section III. Regarding the adjustment, it was adjusted to a 127 Chroma 6500
VRMS pure sinusoid for both assays. On its graphical interface, Voltage (V) = 127.05 Frequency = 60.00
this source displays the real-time measurements of IRMS, VRMS, Active Power (P) = 789.96
P, S, FP and other electrical quantities, with a 16-bit precision. Current (I) = 6.20 Reactive Power (Q) = 0.00
[16] Crest Factor (CF) = 1.403 Apparent Power (S) = 789.96
Power Factor (PF) = 1.00
G. Oscilloscope
The oscilloscope Tektronix THS3014 was used to verify if
the current and voltage waveforms read by the Arduino in the
tests in Section III were correct. This instrument has four
channels and a maximum sampling rate of 5 GS/s (5 billion
samples per second). [17]

H. Multimeter
Due to the significant voltage drop in the electrical cables, it
was necessary to measure the rms voltage at points located
near the load, in the tests in Section III. The multimeter ICEL
MD-6220 was used; it has a 0.1V resolution for the scale of
400V [18].
Fig. 5. Voltage and current waveforms measured by the Arduino (R load).
Fig. 7. Voltage and current waveforms measured by the Arduino (RL load).

Fig. 6. Waveforms of current (CH1) and voltage (CH2) measured by the


oscilloscope (R load).

B. Inductive Load (RL)


The load RL investigated in this section is made of an
incandescent and fluorescent lamp set. As fluorescent lamps
are non-linear loads, the current that flows through the load RL
presents a considerable harmonic content. In this test, the
voltage VRMS measured by the multimeter was 126.3 V. This
voltage is assumed as the reference. Table III and Fig. 7 show
the data measured by the Arduino, and Table IV and Fig. 8
show the data measured by the voltage source and the
oscilloscope, respectively.

TABLE III. PARAMETERS MEASURED BY THE ARDUINO (RL-LOAD) Fig. 8. Waveforms of current (CH1) and voltage (CH2) measured by the
oscilloscope (RL load).

IV. RESULTS ANALYSIS


In this section, the results of the tests presented in Section
III are discussed.
Comparing the graphics based on Arduino measurements
(Fig. 5 and 7) to the oscilloscope graphics (Fig. 6 and 8), it is
possible to conclude that Arduino can, with reasonable
accuracy, reproduce the voltage and current waveforms of load
R, as well as the voltage waveform of load RL. However, the
reproduction of the current waveform of load RL is limited,
due to the significant THD. Therefore, the accuracy of this
meter is restricted to low THD loads.
TABLE IV. PARAMETERS MEASURED BY THE VOLTAGE SOURCE (RL-
LOAD) In order to observe the variation in the rms values of
current and voltage measured by Arduino in Fig. 9 and 10,
Output Measurements
these quantities are represented in pu (per-unit) and are
Chroma 6500 referenced to base values, i.e., VRMS measured by the
Voltage (V) = 127.09 Frequency = 60.00 multimeter and IRMS measured by the source. Therefore, for
Active Power (P) = 138.16 load R, VRMS = 125.6 V and IRMS = 6.20 A; for load RL, VRMS
Current (I) = 1.46 Reactive Power (Q) = 123.92 = 126.3 V and IRMS = 1.46 A.
Crest Factor (CF) = 2.662 Apparent Power (S) = 185.55
Power Factor (PF) = 0.744
loads with high THD. Regardless, the meter has proved to be
able to measure the PF of the test loads, estimating a maximum
error of 0% and 4.6% for load R (linear load) and load RL
(non-linear load), respectively. The error of the rms values of
voltage and current extends slightly above 2% for load RL.
Future works may better investigate the measurement
accuracy of this meter for nonlinear loads. The errors
previously discussed are expected to be minimized by using an
A/D with a resolution higher than the one adopted in this paper.
Furthermore, the developed code can be modified in order to
obtain more accurate results and a higher computational
efficiency. Another line of research would involve adding a PF
Fig. 9. Variation of the rms values of voltage and current measured by correction function to the proposed system, turning it into a PF
Arduino regarding the reference values (R load). automatic controller.

ACKNOWLEDGMENT
The authors recognize the contributions of Daniel Flores
Silva, Daniel Henrique Nogueira Dias and Walter Vieira
Teixeira concerning the development of this article. Besides,
they are thankful for the financial support provided by CAPES
and CEPEL.

REFERENCES

[1] M.C.I.Silva, “Correção do Fator de Potência de Cargas Industriais de


Dinâmica Rápida”, Master Dissertation in Electric Engineering,
Fig. 10. Variation of the rms values of voltage and current measured by Universidade Federal de Minas Gerais (UFMG), Brazil, 2009.
Arduino regarding the reference values (RL load).
[2] M. B. Khan and M. Owais, "Automatic power factor correction unit,"
2016 International Conference on Computing, Electronic and Electrical
Comparing Fig. 9 and 10, there is a greater variation in the Engineering (ICE Cube), pp. 283-288, 2016. doi:
rms current measured by Arduino for load RL than for load R. 10.1109/ICECUBE.2016.7495239.
The maximum error of rms current and voltage for load RL is [3] ANEEL, Agência Nacional de Energia Elétrica, “Resolução ANEEL nº
slightly higher than 2%. As for load R, only the error of rms 414”, Brasília, Brazil, 2010.
voltage goes above 2%. [4] WEG Automação S.A., “Manual para Correção do Fator de Potência”,
available on: http://ecatalog.weg.net/files/wegnet/WEG-correcao-do-
Equation (6) is used in the analysis of the PF. In this way, fator-de-potencia-958-manual-portugues-br.pdf (Retrieved July 26,
the maximum error (emax) is calculated based on the PF 2016).
measured by Arduino (PFmea) – from Tables I and II – and the [5] S. Umesh, L. Venkatesha and A. Usha, "Active power factor correction
reference PF is based on PF measured by the voltage source technique for single phase full bridge rectifier," 2014 International
Conference on Manipal Advances in Energy Conversion Technologies
(PFref). The values of PFref for loads R and RL are 1.000 and (ICAECT), pp. 130-135, 2014. doi: 10.1109/ICAECT.2014.6757075.
0.744, respectively.
[6] Y. A. Badamasi. “The Working Principle of an Arduino”, 11th
FP mea − FP ref International Conference on Electronics, Computer and Computation
emax = FP ref
× 100% (6) (ICECCO), pp. 1-4, 2014. doi: 10.1109/ICECCO.2014.6997578.
[7] M. Margolis, “Arduino Cookbook”, ISBN: 978-1-449-31387-6, 2nd
Edition, USA, 2012.
Therefore, for load R, even with a small fluctuation of [8] N. Tamkittikhun, T. Tantidham and P. Intakot, “AC Power Meter
voltage and current values, emax = 0%. However, regarding load Design for Home Electrical Appliances”, 12th International Conference
RL, emax= 4.6%. This result is related to the increase of the on Electrical Engineering/Electronics, Computer, Telecommunications
current harmonics, because of the nonlinear nature of the load and Information Technology (ECTI-CON), pp. 1-6, 2015. doi:
RL. It is possible to reduce this error by using an A/D with a 10.1109/ECTICon.2015.7207005.
higher resolution than the one adopted, as observed in [8]. [9] N. Tamkittikhun, T. Tantidham and P. Intakot, “AC power meter design
based on Arduino: Multichannel single-phase approach”, International
Computer Science and Engineering Conference (ICSEC), pp. 1-5, 2015.
V. CONCLUSIONS doi: 10.1109/ICSEC.2015.7401422.
[10] R. W. Fransiska, E. M. P. Septia, W. K. Vessabhu, W. Frans, W.
In this article, a PF metering system was developed by Abednego and Hendro, “Electrical power measurement using Arduino
using Arduino. Uno microcontroller and LabVIEW”, 3rd International Conference on
Instrumentation, Communications, Information Technology, and
The performed tests verify that this meter can reasonably Biomedical Engineering (ICICI-BME), pp. 226-229, 2013. doi:
reproduce the current and voltage waveform of linear loads. 10.1109/ICICI-BME.2013.6698497.
However, due to Arduino’s low resolution (10 bits), the meter [11] A. L. Vergara and H. M. Villaruz, “Development of an Arduino-based
cannot accurately measure the current waveform of nonlinear automated household utility power monitoring system”, International
Conference on Humanoid, Nanotechnology, Information Technology,
Communication and Control, Environment and Management
(HNICEM), pp.1-6, 2014. doi: 10.1109/HNICEM.2014.7016233.
[12] W. Hernandez, C. Calderón-Córdova, E. Brito, E. Campoverde, V.
González-Posada and J. G. Zato, “A method of verifying the statistical
performance of electronic circuits designed to analyze the power
quality”, Measurement, Vol.93, pp. 21-28, 2016. doi:
10.1016/j.measurement.2016.06.061.
[13] Arduino, “Arduino Website”, Available on: www.arduino.cc (Retrieved
July 26, 2016).
[14] Allegro MicroSystems, LLC. “ACS712: Fully Integrated, Hall Effect-
Based Linear Current Sensor IC with 2.1kVRMS Isolation and a Low-
Resistance Current Conductor”, available on:
http://www.allegromicro.com/en/Products/Current-Sensor-ICs/Zero-To-
Fifty-Amp-Integrated-Conductor-Sensor-ICs/ACS712.aspx (Retrieved
July 26, 2016).
[15] Open Energy Monitor, “Measuring AC Voltage with an AC to AC
power adapter”, available on:
https://openenergymonitor.org/emon/buildingblocks/measuring-voltage-
with-an-acac-power-adapter (Retrieved July 26, 2016).
[16] Chroma Ate Inc, “Programmable AC Power Source, Model 6500
Series”, available on:
http://www.chromaate.com/chroma/webdrive/catalogue/data_sheet/pow
er_e lectronics/6500-E.pdf (Retrieved July 26, 2016).
[17] Tektronix, “Handheld Osciloscopes, THS3000 Series Dtata Sheet”,
available on:
http://www.testequipmentdepot.com/tektronix/pdf/ths3000_data.pdf
(Retrieved July 26, 2016).
[18] ICEL Manaus, “Manual de Instruções do Multímetro Digital Modelo
MD-6220”, available on: http://www.icel-
manaus.com.br/manual/335.pdf (Retrieved July 26, 2016).

Das könnte Ihnen auch gefallen