The document describes a microcontroller-based digital power factor and phase angle meter. It generates two signals proportional to the peak current (Im) and the current at the voltage peak (Imcosø). These signals are input to a PIC16F877A microcontroller via analog-to-digital conversion. The microcontroller calculates power factor as the ratio of the signals and phase angle as the inverse cosine of the power factor. The calculated values are displayed on an LCD screen. The design aims to continuously monitor power factor and phase angle using a simple circuit and microcontroller processing.
How to Remove Document Management Hurdles with X-Docs?
Microcontroller-Based Digital Power Factor and Phase Angle Meter
1. IOSR Journal of Electrical and Electronics Engineering (IOSR-JEEE)
e-ISSN: 2278-1676,p-ISSN: 2320-3331, Volume 11, Issue 1 Ver. III (Jan. – Feb. 2016), PP 82-86
www.iosrjournals.org
DOI: 10.9790/1676-11138286 www.iosrjournals.org 82 | Page
Microcontroller Based Digital Power Factor and Phase Angle
Meter
Kareem A. Hamad
B.Sc, M.Sc, Ph.D AL – Rafidain University College, Computer Communication Eng. Dept Baghdad – Iraq
Abstract: This paper deals with the development of an electronic power factor and phase angle meter using
pic Microcontroller. The design is based on generating two signal values, the first is proportional to the peak
value (Im) of the line current i(t), the second is proportional to the instantaneous value of the line current at the
instant of v(t)=Vm , i.e. Imcosø, where Im is the peak value of the line current and ø is the phase angle between
line voltage and line current. These two components are inserted into PIC16F877A by means of analog circuit.
The power factor is calculated by division of these two components and the phase angle is then calculated as
Cos-1
ø.The calculated values will provide a realization and displayable form on LCD screen.
Keywords: Microcontroller, Power factor, Phase angle Measurements.
I. Introduction
It is usually necessary to measure the power factor and phase angle of a power distribution system to
assess its economy of transmission. The electro – dynamic power meters are sensitive to reliance on flux
variation. The electronic design suffers from the problem of analog multiplication and division[1].
There are a lot of studies in this subject. M.F. Wagdy et al presents very simple method in phase
measurement error compensation technique for automation [2]. Shu-Chen Wang and Chi-Jui Wu present
accurate power factor measurement approach using FPGA [3]. Claudia A. da Silva et al. presents Power Factor
Calculation by the Finite Element Method [4]. Mr. A Kumar Tiwari et al illustrates development of power factor
controller using pic microcontroller [5]. Md. Shohe Rana et al proposes automatic power factor improvement by
using ATmega8 microcontroller [6]. Ren Kaichun et al. presents Matlab simulations for power factor correction
of switching power.
The digital power factor and phase angle meters described in this paper employs generation of two
values by means of analog circuit, these values are proportional to Im and Imcosø thus division by using
microcontroller will result in cosø i.e power factor, the phase angle is then calculated as Phase angle = Cos-1
ø.
II. Principle of Operation
Assuming the voltage and current waveforms are purely sinusoidal. Thus the instantaneous voltage v(t)
and current i(t) are given as follows:
And the power factor of the load is
Where Vm is the peak value of the line voltage, Im is the peak value of line current, and ø is the phase angle
between line voltage and line current (leading or lagging).
Fig (1) Voltage and current signals
(2)sin)(
(1)sin
tIti
ωtVv(t)
m
m
(3)cosP.F
2. Microcontroller Based Power Factor and Phase Angle Meter
DOI: 10.9790/1676-11138286 www.iosrjournals.org 83 | Page
Thus division of eqn. (4) by Im will give cos ø, i.e. power factor, Then
III. Hardware description
The design aims to monitor power factor and phase angle on LCD display continuously. The circuit
diagram and corresponding timing waveforms of the system are shown in Figs. 2 and 3 respectively. The basic
point in the proposed technique is to generate two values using ADC contained in the microcontroller, these
values are proportional to Im and Imcosø. This has been achieved by taking the ADC values from current signals
at its maximum value, i.e Im and at the instant of peak voltage Vm , i.e. Imcosø. To achieve this aim
electronically, We have used the step down arrangement of the transformer for voltage. Current signal can be
acquired by using current transformer connected at main AC line. The line voltage V1 and line current I1 are
shifted 90o
, squared V2 and V3 respectively and reduced ON time with monostable V4 and V5. Both Im and I1
current signals are converted in to digital signals with ADC of microcontroller, at the positive edges of V4 and
V5, both signals of i(t) i.e Im and Imcosø are held, providing two components. Thus a division scheme between
these two components is implemented to perform digital power factor (P.F = Imcosø/Im). The required division
has been achieved with microcontroller PIC16F877A, the phase angle is then calculated as Cos-1
ø. These two
outputs is digitized and displayed on LCD accordingly.
52%
RV1
5K
R2
10k
RA0/AN0
2
RA1/AN1
3
RA2/AN2/VREF-/CVREF
4
RA4/T0CKI/C1OUT
6
RA5/AN4/SS/C2OUT
7
RE0/AN5/RD
8
RE1/AN6/WR
9
RE2/AN7/CS
10
OSC1/CLKIN
13
OSC2/CLKOUT
14
RC1/T1OSI/CCP2
16
RC2/CCP1
17
RC3/SCK/SCL
18
RD0/PSP0
19
RD1/PSP1
20
RB7/PGD
40
RB6/PGC
39
RB5
38
RB4
37
RB3/PGM
36
RB2
35
RB1
34
RB0/INT
33
RD7/PSP7
30
RD6/PSP6
29
RD5/PSP5
28
RD4/PSP4
27
RD3/PSP3
22
RD2/PSP2
21
RC7/RX/DT
26
RC6/TX/CK
25
RC5/SDO
24
RC4/SDI/SDA
23
RA3/AN3/VREF+
5
RC0/T1OSO/T1CKI
15
MCLR/Vpp/THV
1
U1
PIC16F877A
R1
1k
C1
0.22uF
R12
1k
3
2
6
74
15
U2
LM741
U2(V-)
U2(V+)
41%
RV2
100k
3
2
6
74
15
U3
LM741
R3
1k
D1
BZX284C5V1
CX
10
RX/CX
11
RINT
9
A1
3
A2
4
B
5
Q
6
Q
1
U5
74121
R8(1)
R8
10k
D3
1N4148
D3(A)
R7
10k
D2
1N4148
D2(A)
D4
1N4148
A
B
C
D
D14(A)
R17
10k
D12
1N4148
D12(A)
D14
1N4148
U4(V-)
3
2
6
74
15
U4
LM741
U4(V+)
R5
10k
D5
BZX284C5V1
CX
10
RX/CX
11
RINT
9
A1
3
A2
4
B
5
Q
6
Q
1
U6
74121
R110
1k
C110
0.22uF
R120
1k
3
2
6
74
15
U20
LM741
U20(V-)
U20(V+)
39%
RV20
100k
R4
10k
D7
14
D6
13
D5
12
D4
11
D3
10
D2
9
D1
8
D0
7
E
6
RW
5
RS
4
VSS
1
VDD
2
VEE
3
LCD2
LM016L
Fig (2) Schematic diagram of measuring system
3. Microcontroller Based Power Factor and Phase Angle Meter
DOI: 10.9790/1676-11138286 www.iosrjournals.org 84 | Page
Fig (3) Timing waveforms
PIC16F877A Microcontroller
The PIC16F877A is a microcontroller from Microchip in a chip type of 40-pin DIP packages. The
principal characteristics by which this PIC was used are: digital I/O ports, analog inputs, analog to digital
converter of 10 or 8-bit resolution, serial communication USART, memory storage EEPROM [7]. The
PIC16F877A, has programmed routines process or features, such as analog to digital conversion to get the
values from the sensors, storage of historic data in the internal EEPROM when an alert happened generates a
detection range of values which can determinate whether the system suffered acceleration that cause an alert [8].
The circuit used in this work operates of 20 MHz clock frequency and runs each instruction as fast as 200 ns.
The program for the PIC16F877A microcontroller is written in Micro C and is compiled into Hex
program. Microcontroller is programmed to calculate power factor and phase angle. The flow chart of this
calculation in Hex is shown in Fig. 4. The input of the current and voltage signals are connected to pin 4, 8 and
9 as shown in Fig. 2.
IV. Software Components
This section presents the software’s used in the design of the measuring system
A. Micro C: Micro C is powerful, feature rich development tool for PIC micros. It designed to provide the
programmer with the easiest possible for developing applications for embedded systems, without compromising
performance or control [8].
B. Proteus 7 Professional: is an interactive system level simulator. Which combines mixed mode circuit
simulation, micro-processor models and interactive component models to allow the simulation of complete
micro-controller based designs [9].
4. Microcontroller Based Power Factor and Phase Angle Meter
DOI: 10.9790/1676-11138286 www.iosrjournals.org 85 | Page
Fig (4) Flowchart of power factor and phase angle measurement. Hex program
Fig (5) The microcontroller inputs of the current and voltage signals t
Read I1
Start
Configure LCD port
connections
Configure ports
directions
Configure A / D
converter
Clear LCD
V5 =1
11
I1 = Imcosø
Write PF on line 1 &
value of Phase angle
on line 2 of LCD
Y
N
Y
NV4 =1
1
I1 = Im
1-
CosanglePhase
PF
Calibrate&Calculate
Cos
I
CosI
m
m
5. Microcontroller Based Power Factor and Phase Angle Meter
DOI: 10.9790/1676-11138286 www.iosrjournals.org 86 | Page
Fig (6) System linearity curve
V. Conclusion
This paper presented a simple approach to realize a digital power factor and phase angle meter based
on PIC microcontroller. Which can be implemented in the various fields of industry and education. The circuit is
designed to display PF and phase angle of the load connected the network. Calculation process is achieved by
PIC16F877A. This approach is so straight forward that the hardware is very simple. The system has been tested
under different loading conditions using proteus simulator and has shown linear behavior under those
conditions, as shown in Fig.6
References
[1]. Al – Ani. M. S. M. , and Abdul – Karim. M.A.H. , 1982, A digital power factor meter design based on voltage – to – frequency
conversion. INT. Journal. Electronics. 52, 463 – 470.
[2]. M.F. Wagdy, M.S.P. Lucas, 1986, A Phase-measurement error compensation technique suitable for automation, IEEE Transactions
on Instrumentation and Measurement, IM-35 Vol.1, MARCH 1986.
[3]. Shu-Chen Wang and Chi-Jui Wu, 2010, Design of accurate power factor measurement approach using fpga-based chip. Wseas
Transactions on Circuits and Systems, Issue 7, Volume 9, July
[4]. Claudia A. da Silva, Francis Bidaud, Philippe Herbet, and José R. Cardoso, 2010, power factor calculation by the finite element
method. IEEE Transactions on Magnetics, Vol. 46, No. 8, August
[5]. Mr. Anant Kumar Tiwari, Mrs. Durga Sharma, Mr.Vijay Kumar Sharma, 2014, automatic power factor correction using capacitive
bank, Journal Of Engineering Research and Applications, Vol. 4, Issue 2( Version 1), February, pp.393-395
[6]. Md. Shohel Rana, Md. Naim Miah & Habibur Rahman,2013, automatic power factor improvement by using microcontroller, Global
Journal of Researches in Engineering Electrical and Electronics Engineering, Volume 13 Issue 6 Version 1.0 Year 2013
[7]. Microchip 2001, PIC 16F87X Data Sheet, USA.
[8]. Basil A., 2012, Alerting system design using PIC16F877a for power distribution system, The 4th International Engineering
Conference –Towards engineering of 21st century.
[9]. Kareem A. Hamad, 2014, Microcontroller based active and reactive power measurement, IJCER, Vol, 04, Issue, 7, July