Sei sulla pagina 1di 15

7/10/2017 Power Factor Measurement Using Microcontroller - The Engineering Projects

Login
825, Alhafeez Shopping Mall, Gulberg, Lahore. +92-332-6062060
Your cart 0

theenggprojects help@theengineeringprojects.com

 HOME  CONTACT US  BLOG  SHOP  PROJECTS

Search

FORUM  F.A.Q.  PCB PRICE

Power Factor Measurement Using


Microcontroller
A complete step by step tutorial on Power Factor Measurement
Using Microcontroller in Proteus.
Home / Arduino / Power Factor Measurement Using Microcontroller

UNABLE TO FIND !!!

Custom Search

Chat to Arab Singles JOIN US !!!

Live Your Romantic Dream! Take


Dating to New Places on ArabianDate.
arabiandate.com  21871 LIKES 

 453 FOLLOWERS 
Hello friends, hope you all are fine and having fun. Today’s post is
about Power Factor Measurement using Microcontroller in Proteus
ISIS. As usual, I have this project simulation in which I have to  497 CONNECTIONS 
simulate a power factor measuring project using atmega
microcontroller. So, I use atmega8 microcontroller and the used
 497 FOLLOWERS 
Proteus ISIS as the simulating software. Power Factor Measurement
isn’t that difficult but its a quite tricky and in today’s post we are gonna

https://www.theengineeringprojects.com/2015/12/power-factor-measurement.html 1/15
7/10/2017 Power Factor Measurement Using Microcontroller - The Engineering Projects
The Engineering P
cover it in full
detail. YouTube

There are many


ways for power
factor
JOIN OUR FACEBOOK GROUPS !!
measurement
and today’s the
method we are  2862 ARDUINO 
gonna use is
called zero
crossing
detection. We will
first detect the

zero crossing of our signal and then we are Buy This Project Learn Free Pro
gonna do the power factor measurement based
on the detection of zero crossing of our voltage RSS G+

and current signal. Seems bit difficultdon’t worry we are gonna do


everything and in quite full detail so stay with me and enjoy the tutorial. Twitter

But before going into the details of power factor measurement, let’s
first discuss the basics of power factor measurement because before Receive Quality Tutorials St
that you wont understand a bit. Inbox by submitting your Em

We have designed this simulation after quite a lot of effort so its not for enter your email here...
sale but has a quite small cost of $20 so that engineering students can
SUBMIT
buy it easily. You can buy the simulation along with hex file and code
by clicking on the above button and it will lead you to Product page of
this product. So, let get started with it.

BASICS OF POWER FACTOR CATEGORIES

In AC circuits, there are total three types of loads which are


Arduino Projects
normally bear by an AC current, named as:
Resistive Loads.
Proteus Projects

Capacitive Loads.
PIC Projects
Inductive Loads.
Visual Studio Projects

8051 Projects

555 Timer Projects

https://www.theengineeringprojects.com/2015/12/power-factor-measurement.html 2/15
7/10/2017 Power Factor Measurement Using Microcontroller - The Engineering Projects

MATLAB Projects

LabView Projects

PLC Projects
We are all quite well aware of these and if you are not then I must say
you wont read further and must first get some basic knowledge about Electronics Projects
these loads. Among these three loads Resistive loads are known as
the most decent loads as they don’t mess up with the current and just C# Tutorials
simply let the current pass through it and that’s why there’s no such
power loss in these types of loads. But when it comes to Capacitive or Embedded System Projects

Inductive loads. they are quite disturbing types of loads and hence
they don’t let the current easily pass through them and slightly distort
the current signals. In case of Capactive loads, the current waveform
SUPPORT US !!!
got ahead of the voltage waveform and hence got a lead angle. In
other words, current waveform leads the voltage waveform. While in
case of Inductive loads, the scenario is quite the opposite. In
Inductive loads, current waveform lags the voltage waveform. The
below figure shown the difference between these loads output.

https://www.theengineeringprojects.com/2015/12/power-factor-measurement.html 3/15
7/10/2017 Power Factor Measurement Using Microcontroller - The Engineering Projects

https://www.theengineeringprojects.com/2015/12/power-factor-measurement.html 4/15
7/10/2017 Power Factor Measurement Using Microcontroller - The Engineering Projects

In the above figure, Red waveform is showing the current wave,


while the green waveform is showing the voltage wave. So its
quite obvious from above three figures that in case of resistive
load there’s no angle difference but in case of capacitive load,
current waveform leads the voltage waveform while in Inductive
load current waveform lags the voltage waveform and in this
case I have used a constant angle of 60 degrees for both
capacitive and inductive loads.

Now because of this angle difference there’s quite an energy


loss which is not quite good for any system so the best scenario
for any system is that this angle should be 0 which is the case of
resistive loads.

Now question is why we are reading this stuff while we are


actually interested in power factor measurement so yes now I
am coming towards it.

Power Factor is simply the cosine of this leading or lagging


angle. In simple words, if you get this leading or lagging angle
between current and voltage waveform, which in the above
figure is 60 degrees, and then take the cosine function of that
angle, you will get the Power factor for your system.

So, if we calculate the power factor for the above waveform, for
which the leading or lagging angle (both) are 60 degrees, then
we get:

Power Factor = Cos ( 60 degrees )

Power Factor = 0.5

So, the power factor of our above system is 0.5 which is quite
bad.

Now, whats the meaning of this 0.5 power factor, it means that
our system’s efficiency is 50% and the energy dissipation is also
50% so our system’s efficiency is as well 50%.

So, if we want to improve our systems’ efficiency, then we need


to increase the Power Factor of our system.

So, now we have seen the basics of power factor and have got quite
an idea about what is it so now let’s start with how to measure power
https://www.theengineeringprojects.com/2015/12/power-factor-measurement.html 5/15
7/10/2017 Power Factor Measurement Using Microcontroller - The Engineering Projects

factor using Microcontroller in Proteus ISIS.

POWER FACTOR MEASUREMENT WITH ZERO CROSSING


DETECTION

There are many methods available for Power Factor


measurement and in this post we are gonna use the zero
crossing detection in order to measure it .

HOME andcurrent
As we all know, thevoltage CONTACT US are
waveform  BLOG
basically  SHOP
the sine waves so they must cross the zero point at some time.
Search

And what we need to  do is to detectFORUM


PROJECTS the zero crossing
 F.A.Q.of both
 PCB PRICE
these waves. So, first of all we are gonna do this in Proteus.

So, design a circuit in Proteus for Power Factor Measurement as


shown in below figure:

In the above circuit design, I have used two voltage sources


which are U2 and U3, I have considered U2 as the voltage
transformer while the U3 as the current transformer, when you
are designing the actual circuit in hardware then you need to use
the current and voltage transformer.
https://www.theengineeringprojects.com/2015/12/power-factor-measurement.html 6/15
7/10/2017 Power Factor Measurement Using Microcontroller - The Engineering Projects

The reason why we need to use CT and PT is because the


normal voltage is normally of 220V or 110V which we can’t
directly give to our microcontroller because it will burn our
microcontroller.

So, we need to lower this voltage level and needs to bring it to


such level which is easily operatable by microcontroller, which in
normal case is below 5V.

So, now I suppose you have used the CT PT and you are getting
your current and voltage waveforms in the order of 5V but now
again there’s another issue that the voltage we are getting is AC
while our microcontroller works on DC so we need to find some
way to convert this AC into DC.

So,in order to do, I have used this 8 pin amplifier LM358 as a


comparator.

What LM358 is doing ?? Its simply comparing the voltage


coming at its inverting pin to the voltage at its non inverting pin
and whenever both voltages match it will send a HIGH pulse to
the output.

You can see clearly that I have placed a GND on the non
inverting pin of LM358 so whenever we get zero crossing on the
inverting side it will send us a HIGH pulse at output.

That’s how we are converting our AC signal into DC signal as


well as detecting the zero crossing. Let’s have a look at these
waveform in oscilloscope.

https://www.theengineeringprojects.com/2015/12/power-factor-measurement.html 7/15
7/10/2017 Power Factor Measurement Using Microcontroller - The Engineering Projects

The below two waveform are the current and voltage waveform,
red one is current while the green one is voltage and I have
placed a lagging angle of 30 degrees that’s why current
waveform is lagging the voltage waveform.

While the above two waveform are the output of LM358 and we
can see clearly they are giving the high peaks when the lower
waveform cut their zero axis.

So that’s how we are doing the zero crossing detection.

We have got the zero crossing detection and now what we are
gonna do in programming is to first detect the zero crossing of
current waveform and then we will start counting the time until
we get the zero crossing of voltage waveform.

So, basically what we are gonna do is we are gonna count the


time difference between current wave and voltage wave zero
crossing.

When we got the time difference between these two waves, we


can get the angle quite easily using the below formula.

We have got the time difference and we have already know the
frequency of our system which is normally 50 HZ or 60Hz.

POWER FACTOR MEASUREMENT USING MICROCONTROLLER


IN PROTEUS

Now we have already detected the zero crossing so now next


thing is to calculate the time difference which we are gonna do in
our microcontroller.

So, in order to do the time calculation, first of all we will detect


the zero crossing of current wave.

Then we will start a timer which will start counting and we will
stop this counting when we get the voltage curve.

So, in order to do these tasks, I have used the below code:

1 void pf_func(){
2 while(1)
3 {
4        if ( PINC.4==1 )
https://www.theengineeringprojects.com/2015/12/power-factor-measurement.html 8/15
7/10/2017 Power Factor Measurement Using Microcontroller - The Engineering Projects

5        {
6            TCNT1=0;
7            TCCR1B = 0x01;
8            break;
9        }
10        else {
11                continue;
12              }
13 }
14 while(1){
15      if ( PINC.3 == 1 ){
16      TCCR1B = 0x00;
17      g=TCNT1;
18      break;
19 }
20 else {
21 continue;
22 }
23 }
24 }

Now, when we detect the zero crossing of current wavform, we


simply start the timer and start counting and when we get the
zero crossing of voltage waveform, we simply stop the counter
and we get the total time difference between the current
waveform and the voltage waveform.

Now, next thing we need to do is to calculate the power factor,


whichis now quite easy because we already got the time
difference.

So, what I do in order to do that is simply used the below simple


code:

1 int powerfactor(){
2 k=0;
3 // To complete number of counts
4 g=g+1; //Value from the timer
5 //To convert into seconds
6 pf=(float)g/1000000;
7 //To convert into radians
8 pf=pf*50*360*(3.14/180);
9 //power facor
10 pf = cos(pf);
11 //power factor into percentage
12 k=abs(ceil(pf*100));
13 return k;
14 }

So, that’s how we are calculating the Power factor.

We have done quite a lot of effort to design this simulation and


code so its not for free but you can getit easily just for a price of
$20.

Now when you get the code then make your hex file and upload
it in Proteus.

https://www.theengineeringprojects.com/2015/12/power-factor-measurement.html 9/15
7/10/2017 Power Factor Measurement Using Microcontroller - The Engineering Projects

Now run your Proteus simulation and you will get something like
this:

In the above figure, current waveform leads the voltage


waveform by 30 degreesand that’s why we are getting a power
factor of 0.87 which is 87%.

Now let me reduce the difference between current and voltage


waveform to 0 and we will get a power factor of 1 as shown
below:

https://www.theengineeringprojects.com/2015/12/power-factor-measurement.html 10/15
7/10/2017 Power Factor Measurement Using Microcontroller - The Engineering Projects

Now, you have seen as we reduced the distance between


current and voltage waveform the power factor has increased
and as the angle between current and voltage waveform is 0 so
its 100%.

That’s all for today, I hope you have enjoyed today’s post on Power
Factor Measurement. You can buy the complete simulation along with
hex file and the complete code by clicking on below button.

Buy Power Factor Simulation

So, buy it and test it and hopefully you will get something big out of it.
So that’s all about Power Factor Measurement using Atmega. I will
post it on Arduino as well quite soon and may be on PIC
Microcontroller as well. So, till next tutorial take care !!!

EasyEDA: Ideas for Circuit Design,


Innovation for Electronics Access
Free Circuit Design: Schematic - Simulation -
PCB Layout - Gerber Viewer
Cheapest PCB Prototype: Only $2 for 10pcs
10×10cm PCBs, 24 hours Quick Turn, DHL
https://www.theengineeringprojects.com/2015/12/power-factor-measurement.html 11/15
7/10/2017 Power Factor Measurement Using Microcontroller - The Engineering Projects

10×10cm PCBs, 24 hours Quick Turn, DHL


Delivery in 3 Days - Components Sourcing

10kVA APC UPS @Best PIC Microcontroller TI's DualCool™ NexFet™ Receive SMS with
Price - 1 years hassle Projects Commands using
free warranty Sim900 and Arduin

Ad apcindiastore.com theengineeringprojects.com Ad ti.com theengineeringprojects.com

Power Supply Design Arduino Projects A Complete Tutorial on Seven Segment Di


Basic How To Use Proteus ISIS Using 555 Timer in
& ARES Proteus ISIS

Ad micro.rohm.com theengineeringprojects.com theengineeringprojects.com theengineeringprojects.com

Category: Arduino By Syed Zain Nasir December 7, 2015 Leave a comment

Author: Syed Zain Nasir


I am Syed Zain Nasir, the founder of The
Engineering Projects (TEP). I am a programmer
since 2009 before that I just search things, make
small projects and now I am sharing my knowledge
through this platform.I also work as a freelancer
and did many projects related to programming and
electrical circuitry. My Google Profile+

https://www.theengineeringprojects.com/2015/12/power-factor-measurement.html 12/15
7/10/2017 Power Factor Measurement Using Microcontroller - The Engineering Projects

PREVIOUS NEXT

LED BLINKING
SCROLLING TEXT
 PROJECT
8051
USING
ON LED MATRIX 
8×8 USING
MICROCONTROLLER
ARDUINO
IN PROTEUS

Related posts

Servo DC Current
Motor Sensor
Control ACS712
using Arduino
Arduino Interfacing
May 22, 2017 May 6, 2017

Scrolling Stepper
Text on Motor
LCD with Speed
Arduino Control
May 3, 2017 using
Arduino
April 24, 2017

Stepper DC Motor
Motor Speed
Direction Control
Control using
using Arduino
Arduino April 10, 2017

April 14, 2017

Leave a Reply

https://www.theengineeringprojects.com/2015/12/power-factor-measurement.html 13/15
7/10/2017 Power Factor Measurement Using Microcontroller - The Engineering Projects

Your email address will not be published. Required fields are marked *

Comment

Name*

Email*

Website

Post comment

https://www.theengineeringprojects.com/2015/12/power-factor-measurement.html 14/15
7/10/2017 Power Factor Measurement Using Microcontroller - The Engineering Projects

RECENT POSTS RECENT GET IN TOUCH !!! CONTACT INFO !!!


COMMENTS
Hackathon Events
Name * Address:
– Supported by cedric on Flame
825, Al-Hafeez
Domain.com Sensor Library for
E-mail * Shopping Mall,
Coupons Proteus
Main-Boulevard,
July 9, 2017
seid ahmed on Message Gulberg.

Introduction to Declaration of
Phone Number:
MAX232 Variables in
+92-332-6062060
July 8, 2017 MATLAB

E-mail:
Introduction to kamran kami on
info@theengineeringprojects.com
2N3906 Display ADC value
support@theengineeringprojects.
July 7, 2017 on LCD using PIC
help@theengineeringprojects.com

Introduction to fafa on Electronic


TL431 Door Locks using Submit
July 7, 2017 PIC Microcontroller

Introduction to Simon on New


1N4007 Proteus Libraries
July 5, 2017 for Engineering
Students

The Engineering Projects - Tutorials & Projects for Engineers.

https://www.theengineeringprojects.com/2015/12/power-factor-measurement.html 15/15

Potrebbero piacerti anche