Automatic Power Factor Controller using Microcontroller

Automatic Power Factor Controller using Microcontroller

The thirst for new sources of energy is unquenchable, but we seldom realize that we are wasting a part of the electrical energy every day due to the lagging power factor in the inductive loads we use. Hence there is an urgent need to avoid this wastage of energy.

Before getting into the details of Power factor correction, lets just brush our knowledge about the term “power factor”. In simple words power factor basically states how far the energy provided has been utilized. The maximum value of power factor is unity. So closer the value of P.F to unity, better is the utility of energy or lesser is the wastage. In electrical terms Power factor is basically defined as the ratio of the active power to reactive power or it is the phase difference between voltage and current. Active power performs useful work while Reactive power does no useful work but is used for developing the magnetic field required by the device.

Most of the devices we use have power factor less than unity. Hence there is a requirement to bring this power factor close to unity. Here we are presenting a prototype for automatic power factor correction using PIC Microcontroller.

Circuit Diagram

Automatic Power Factor Controller using PIC Microcontroller Circuit Diagram

Automatic Power Factor Controller using PIC Microcontroller Circuit Diagram

Working

Comparator Section

The 230 V, 50 Hz is step downed using voltage transformer and current transformer is used to extract the waveforms of current. The output of the voltage transformer is proportional to the voltage across the load and output of current transformer is proportional to the current through the load. These waveforms are fed to Voltage Comparators constructed using LM358 op-amp. Since it is a zero crossing detector, its output changes during zero crossing of the current and voltage waveforms. These outputs are fed to the PIC which does the further power factor calculations.


Microcontroller Section

PIC 16F877A microcontroller is the heart of this Automatic Power Factor Controller, it find, displays and controls the Power Factor.. To correct power factor, first we need to find the current power factor. It can be find by taking tangent of ratio of time between zero crossing of current and voltage waveforms and two successive zero crossing of voltage waveform. Then it displays the calculated power factor in the 16×2 LCD Display and switches ON the capacitors if required.

Correction Section

When load is connected the power factor is calculated by the PIC microcontroller. If the calculated power factor is less than 0.9 then the relay switches on the capacitor. The relays are switched using ULN2003 which is basically a driver IC. ULN2003 consists of seven DARLINGTON PAIRS.
The current lead in capacitor compensates the corresponding current lag which is usually present in loads. Hence the phase difference between the current and voltage will be reduced.

Power Factor Correcting capacitor connected parallel to load through relay, if the relay is energized by microcontroller it will connect  the capacitor parallel with load, if relay deenergized it will remove the capacitor from the load. When the resistive load is on the power factor will be near to unity so the microcontroller doesn’t energize the relay coil. When the inductive load is on the power factor decrease now the microcontroller energize the relay coil in order to compensate the excessive reactive power. Hence according to the load the power factor is corrected.

MikroC Program

//LCD Module Connections
sbit LCD_RS at RB2_bit;
sbit LCD_EN at RB3_bit;
sbit LCD_D4 at RB4_bit;
sbit LCD_D5 at RB5_bit;
sbit LCD_D6 at RB6_bit;
sbit LCD_D7 at RB7_bit;
sbit LCD_RS_Direction at TRISB2_bit;
sbit LCD_EN_Direction at TRISB3_bit;
sbit LCD_D4_Direction at TRISB4_bit;
sbit LCD_D5_Direction at TRISB5_bit;
sbit LCD_D6_Direction at TRISB6_bit;
sbit LCD_D7_Direction at TRISB7_bit;
//End LCD Module Connections
int powerFactor()
{
  int a=0,b=0,t=0,x=0;
  float tm,pf;
  TMR1L=0;
  TMR1H=0;
  do
  {
    if(PORTA.F0 == 1)
    T1CON.F0 = 1;
    else if(PORTA.F0 == 0 && T1CON.F0 == 1)
    {
      T1CON.F0 = 0;
      break;
    }
  }while(1);
  a = (TMR1L | (TMR1H<<8)) * 2;
  TMR1L=0;
  TMR1H=0;
  do
  {
    if(PORTA.F0 == 1)
    {
      T1CON.F0=1;
      if(PORTA.F1==1)
      {
        T1CON.F0=0;
        break;
      }
    }
  }while(1);

  b = TMR1L | (TMR1H<<8);
  tm = (float)b/a;
  pf = cos(tm*2*3.14);
  x=abs(ceil(pf*100));

  return x;
}

void main()
{
  char c[]="0.00";
  int a,b,d,x,f,e;
  float tm,pf;

  Lcd_Init();
  Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off

  ADCON1 = 0x08; // To configure PORTA pins as digital
  TRISA.F0 = 1; // Makes First pin of PORTA as input
  TRISA.F1 = 1; //Makes Second pin of PORTA as input
  TRISD.F0 = 0; //Makes Fist pin of PORTD as output
  TRISD.F1 = 0; //Makes Second pin of PORTD as output

  while(1)
  {
    a = powerFactor();
    Delay_us(50);
    b = powerFactor();
    Delay_us(50);
    d = powerFactor();
    Delay_us(50);
    e = powerFactor();
    Delay_us(50);
    f = powerFactor();

    x = (a+b+d+f+e)/5;
    c[3]=x%10 + 0x30;
    x=x/10;
    c[2]=x%10 + 0x30;
    x=x/10;
    c[0]=x%10 + 0x30;

    Lcd_Out(1,1,"Power Factor");
    Lcd_Out(2,1,c);

    if(x<90)
    {
      PORTD.F0 = 1;
      PORTD.F0 = 1;
      Delay_ms(2000);
    }
    else
    {
      PORTD.F0 = 0;
      PORTD.F0 = 0;
    }
    Delay_ms(250);
  }
}

The function powerFactor() will find the current power factor by using the Timer 1 module of PIC 16F877a. Power Factor may be fluctuating, so to avoid it we will find power factor more than one time and its average is taken.

Note : This is only a prototype of Automatic Power Factor Controller, for practical implementation you may need to make some modifications in the program and circuit.

Share this post

Comments (204)

  • fatih

    i don’ t know why this program did not compile. can i know what exact version of mikroC it has written for. thank you?

    May 12, 2013 at 12:20 pm
  • Ligo George

    Use MikroC Pro…

    May 12, 2013 at 11:31 pm
  • Stefaev

    author put mistakes in the source code.

    May 16, 2013 at 8:51 pm
  • Ligo George

    The code is correct.& we made this project with above code.. ,for the practical implementation you need to modify the power factor correcting section of the code…. as this is only a prototype…

    May 17, 2013 at 8:20 am
  • Stefaev

    first error: missing line “sbit LCD_EN at RB5_bit;”
    compiler (mikroC PRO for PIC 6.0.1) says:

    59 404 ‘c’ Identifier redefined automatic-power-factor-controller-using-microcontroller.c
    77 318 Assigning to non-lvalue ” automatic-power-factor-controller-using-microcontroller.c
    81 324 Undeclared identifier ‘e’ in expression automatic-power-factor-controller-using-microcontroller.c
    83 324 Undeclared identifier ‘e’ in expression automatic-power-factor-controller-using-microcontroller.c
    83 317 Operator ” is not applicable to these operands ” automatic-power-factor-controller-using-microcontroller.c
    83 317 Operator ” is not applicable to these operands ” automatic-power-factor-controller-using-microcontroller.c
    60 1163 Variable ‘tm’ has been declared, but not used automatic-power-factor-controller-using-microcontroller.c
    60 1163 Variable ‘pf’ has been declared, but not used automatic-power-factor-controller-using-microcontroller.c
    0 102 Finished (with errors): 17 mai. 2013, 12:50:37 automatic-power-factor-controller-using-microcontroller.mcppi

    May 17, 2013 at 3:31 pm
  • Ligo George

    Sorry, it was a mistake while coping the code..
    all where simple C syntax errors…
    It is corrected now..

    May 17, 2013 at 8:24 pm
  • Ligo George

    Hello, Mistakes in the code is corrected…

    May 17, 2013 at 8:25 pm
  • Stefanev

    please share your hex and coff file
    i not understand:

    TRISD.F0 = 0; //Makes Fist pin of PORTD as output
    TRISD.F1 = 0; //Makes Second pin of PORTD as output

    So PORTD is output

    i simulate in proteus and program remain in endless loop:

    do
    {
    if(PORTD.F0 == 1)
    T1CON.F0 = 1;
    else if(PORTD.F0 == 0 && T1CON.F0 == 1)
    {
    T1CON.F0 = 0;
    break;
    }
    }while(1);

    how to trigger the timer1 if the inputs are PORTA0 and 1 ???

    May 19, 2013 at 11:45 am
  • Ligo George

    Sorry, 🙁 it is also a mistake..
    Actually we done this project by connecting current transformer inputs to PORTD, but changed to PORTA while drawing circuit for making the circuit diagram simple..
    Thanks…
    Also the power factor correcting section of this code is not good… We checked this project by adding a switch to capacitor, such that change in power factor can be seen on the LCD by ON and OFF the switch…

    May 19, 2013 at 8:53 pm
  • Kalpesh

    What is the value of Current Transformer ? Which Current Transformer should i use ?

    July 9, 2013 at 9:23 pm
  • Ligo George

    It will depends up on the max current required for your application..

    July 9, 2013 at 9:40 pm
  • jun

    Hi sir I understand the source code,can you give me the sample current ratio or specification detail of current transformer

    August 20, 2013 at 9:05 am
  • Ligo George

    It should be selected according to your current/load requirement…

    August 22, 2013 at 6:51 pm
  • dark

    sir which compiler shuold i use for compiling currently i use mikroc pro for pic v6.0.0 but they get an error

    August 23, 2013 at 11:52 pm
  • Ligo George

    What is the error??

    August 24, 2013 at 9:12 pm
  • sunny

    is this a prototype?

    October 5, 2013 at 8:21 pm
  • Ligo George

    The above is an academic project made by ECE students… and it is working……… for demonstration…
    but for practical implementation, I think you need to make some more changes…

    October 6, 2013 at 10:52 am
  • karthik

    Current Transformer and voltage transformer can be replaced with any other electronic circuit its possible ..

    October 9, 2013 at 11:15 pm
  • Ligo George

    Yes you can replace it with current sensor…….
    voltage transformer is an ordinary transformer….
    It is better to use transformer… as it isolates our low power circuits from high power ac….
    I think the current sensors have internal transformer…

    October 10, 2013 at 1:36 pm
  • karthik

    voltage transformer is an ordinary transformer ok . it step down 12V ,1A. transformer used its ..

    October 10, 2013 at 7:16 pm
  • karthik

    how to modify this circuit in 3 phase supply.? in 3phase supply compare
    all the phase current and all phase voltage .. how to change this
    circuit..

    October 10, 2013 at 7:16 pm
  • karthik

    what modifications is need in this program and circuit.

    October 10, 2013 at 10:18 pm
  • Ligo George

    Sorry, I don’t know how to measure power factor in 3 phase circuits…

    October 14, 2013 at 7:13 am
  • Ligo George

    I think.. no modification is needed in the circuit… but you should modify the program…… It is my logic… I have tested it only once… so you should modify the program by conducting some practical tests… and calibrating this project..

    October 14, 2013 at 7:19 am
  • mehmet çiçek

    Brother, is “int powerFactor()” a kind of interrupt? Can you explain it or give some documants?

    Conguralation and thanks for share!
    [email protected]
    Elektrik engineer.

    October 19, 2013 at 1:13 am
  • Ligo George

    No, it is not a kind of interrupt.. it is a function to evaluate power factor using internal timer modules of pic microcontroller..

    October 22, 2013 at 10:22 pm
  • naim

    i’m doing this project for my final year project.can you please share this project with me?send it to my e-mail ([email protected])

    October 27, 2013 at 11:51 pm
  • naim

    what is the value of power factor correction capacitor at the ac main output?

    October 28, 2013 at 8:41 pm
  • naim

    what is the rating of current tranformer and voltage transformer?

    October 28, 2013 at 8:50 pm
  • Ligo George

    Use them .. depending upon the application

    October 29, 2013 at 10:17 am
  • Ligo George

    It should be calculated according to your requirements..

    October 29, 2013 at 10:17 am
  • Ligo George

    The complete project details including the project files are shared above..

    October 29, 2013 at 10:18 am
  • RyRS

    Excuse me sir, but I didn’t see any download link are shared above. Thank you.

    October 29, 2013 at 11:55 pm
  • Ligo George

    Sorry, we have only that program for this project..

    October 30, 2013 at 1:28 pm
  • Azim Uddin Chowdhury

    I have an Arduino micro-controller & I creating a Power factor meter. So i need some help my brothers..

    November 7, 2013 at 1:10 pm
  • Ligo George

    What is your doubt??
    I haven’t any experience with arduino programming..

    November 8, 2013 at 8:12 am
  • Mithun

    Program compiled but not working in simulation in proteus.

    November 10, 2013 at 1:03 pm
  • Ligo George

    Did you provide the inputs (from comparators to pic) in proteus??

    November 14, 2013 at 7:36 am
  • RyRS

    Would you mind to share or send to email the hex file perhaps? My mikroc pro for pic 6.0 seems giving an hex file size 1kb only after I compile the code. Thank you.

    December 8, 2013 at 12:17 am
  • Ligo George

    Give me your mail id??
    Note : This only a prototype only for the sake of demonstration..

    December 9, 2013 at 5:54 pm
  • RyRS

    A few of modification of circuit and using ccs c compiler ccp(capture) example, i got a power factor based on comparison between two signal using proteus simulation. Hope you don’t mind that i did some modification on your circuit. I won’t share my email to public, so thank you for giving an idea about measuring power factor. 🙂

    December 12, 2013 at 6:04 pm
  • Ligo George

    OK..

    December 14, 2013 at 3:32 pm
  • Shaik Aryan

    interfacing of dc motor with 8051.. HOW DO I GET THE CIRCUIT LAYOUT TO MAKE PCB OF IT.. please help

    December 20, 2013 at 9:06 am
  • Ligo George

    Hello, we aren’t now providing pcb designing service..

    December 23, 2013 at 10:35 am
  • Cabir

    hi all
    this circuit sucks
    The in and outputs of uln2003 are on the wrong side

    December 23, 2013 at 4:28 pm
  • Ligo George

    Sorry for the inconvenience caused… It is corrected.. Please try after clearing your cache..

    December 24, 2013 at 9:41 am
  • dalwinder singh

    tm = (float)b/a;
    pf = cos(tm*2*3.14);
    x=abs(ceil(pf*100));
    can you elaborate this function i.e. what (a) and (b) shows

    December 30, 2013 at 6:20 am
  • dalwinder singh

    are you giving training on pic online?

    December 30, 2013 at 6:21 am
  • Ligo George

    It is the measured timer value of current and voltage waves…

    January 1, 2014 at 9:36 pm
  • Ligo George

    Online training means??

    January 1, 2014 at 9:43 pm
  • dalwinder

    I need pic programming training by Google talk or Skype

    January 2, 2014 at 4:08 am
  • dalwinder

    a is the pulse width or wave length of pulse

    January 2, 2014 at 4:10 am
  • Ligo George

    Wavelength of pulse..

    January 12, 2014 at 5:09 pm
  • Ligo George

    Sorry for the late replay..
    Currently we aren’t providing any training.. I am ready to provide training personally… But I am not good in speaking English.

    January 12, 2014 at 5:11 pm
  • Giscard Hangi

    Hi , I am working on a similar project but for a 3 phase system. I would like to know how did you manage the problem of linearity and phase displacement of the CT in particula?

    January 24, 2014 at 2:11 am
  • kaushal

    hi can you please send me the corrected code?
    my id is: [email protected]

    Can you please mention in my email, what current sensor and what rating voltage transformer to use

    Thank you

    February 5, 2014 at 2:55 am
  • kaushal

    can I run this code in mplab

    February 5, 2014 at 3:00 am
  • vohsty

    Hallo sir
    Please send me the corrected code because when i load his one on proteus nothing happens although it compiles without errors
    my email is [email protected]

    February 10, 2014 at 2:50 am
  • juhi

    How to calculate the value of the capacitor bank

    February 12, 2014 at 2:02 pm
  • mughees ahmed

    Please send me the corrected code because when i load his one on proteus nothing happens although it compiles without errors
    my email is [email protected]

    February 12, 2014 at 2:08 pm
  • Sandun Dhammika Perera

    There should be some header files. See your code does not include any header files , compiler crazy about where does that Lcd_init(); or Lcd_write() came from?

    February 18, 2014 at 12:42 pm
  • Sandun Dhammika Perera

    May be you could have longer delays.250ms is not enough at all. Since the power factor does not change quickly you could have delay at least 10seconds. Or give the user a configuration option to configure it.

    February 18, 2014 at 12:44 pm
  • ahmedduaa

    hey , please can you send me the file of this project i need it for my collage
    my email: [email protected]

    February 21, 2014 at 2:11 pm
  • faheem

    plz give me project detail

    February 21, 2014 at 11:50 pm
  • Nauman Safdar

    Did Some one practically implemented this? i tried but the display value changes randomly for the same load…

    March 14, 2014 at 10:19 am
  • Jigar

    can you please send me the corrected code on [email protected]

    March 15, 2014 at 12:40 pm
  • arslan rao

    i don’ t know why this program did not compile. can i know what exact version of mikroC it has written for. thank you?
    Please send me the corrected code because when i load his one on proteus nothing happens although it compiles without errors
    my email [email protected]

    March 16, 2014 at 9:14 pm
  • arslan rao

    please sir send me correct code…..here…
    [email protected]

    and kindly also specified the version of microC pro…..Thankyou…

    March 16, 2014 at 9:23 pm
  • juhi

    SEND CORRECTED CODE PLSS VERY URGENT
    [email protected]

    April 15, 2014 at 2:50 pm
  • naim

    what type of current transformer did you used?i mean the name of the transformer or no or something else that i can find and buy it

    April 20, 2014 at 12:09 pm
  • anwar

    hi im doing the project with atmega 16 . i have made the required changes in this code to be compatible with atmega. the code compiles without error but nothing happens on proteus. kindly help me out with this. i have to submit my project very soon

    May 1, 2014 at 10:54 pm
  • Angelo

    Sir can I ask complete code? please send to email: [email protected]

    really need for a project.

    Thank you very much

    Regards’

    May 18, 2014 at 5:48 am
  • aregawi

    could send me the corrected cod my sir?
    [email protected]

    May 22, 2014 at 3:18 pm
  • Stefan

    I said before this code is a joke, does not work.

    May 25, 2014 at 6:41 pm
  • Monjur Morshed

    bro,,,i worked with the pf calculation part only,,,& the code compiles fine,,,,,,,but when i tried it in proteus it gives error & Lcd is blank…

    June 4, 2014 at 12:17 am
  • lous mow

    x=abs(ceil(pf*100)); can u explain about this??

    June 4, 2014 at 10:31 am
  • ahsan

    did you get the rating of current transformer and potential transfortmer ?

    June 11, 2014 at 7:46 pm
  • ahsan

    Hey please tell me where i can find current transformer in proteus ?

    June 11, 2014 at 7:47 pm
  • ahsan

    Hey please tell me where i can find Current transformer in Proteus software ?

    June 11, 2014 at 7:48 pm
  • Ligo George

    It is not good to simulate these projects in proteus..

    June 12, 2014 at 9:05 pm
  • Ligo George

    It depends on your requirements..

    June 12, 2014 at 9:06 pm
  • Ligo George

    abs() – takes absolute value…
    ceil() – rounds to nearest integer..

    June 12, 2014 at 9:09 pm
  • Ligo George

    Check clock frequencies in mikroc project setting and pic properties in proteus.

    June 12, 2014 at 9:10 pm
  • Ligo George

    It is not a joke man. .It is 100% working… but it needs improvement.. in the power factor correction section..

    June 12, 2014 at 9:16 pm
  • Ligo George

    Above program is correct.. but it needs improvement in the power factor correcting section..

    June 12, 2014 at 9:27 pm
  • Ligo George

    I have only the above code.. It is written for MikroC Pro compiler..
    It is working code.. only thing is it need improvement in the power factor correction section..

    June 12, 2014 at 9:34 pm
  • Monjur Morshed

    both clock frequency’s are same…btw i am not using CT & PT

    June 18, 2014 at 7:04 pm
  • Ligo George

    If the clock frequencies are correct in mikroc project settings and pic properties in proteus..
    Check the PIC used in mikroc project settings and proteus are same.. PIC 16F877A..

    Note : 16F877 and 16F877A are different microcontrollers..

    June 19, 2014 at 11:51 am
  • fazz

    Hi mr. ligo,appreciate if you able to send the full correct code to my email [email protected]…need to do for my house use.

    June 25, 2014 at 6:27 pm
  • Ligo George

    I have only above code.

    June 26, 2014 at 10:21 am
  • ahsan

    what rating you use of current transformer and voltage transformer please reply. i m waiting for your concideration.

    June 26, 2014 at 10:31 pm
  • Ligo George

    For voltage transformer you can use a 230/3V, 500mA transformer available in the market…
    For current transformer.. you can wind depending on your requirements.. provide a secondary voltage about 3V.

    June 30, 2014 at 11:27 am
  • ahsan

    alright thank you so much, please guide me can i use normal step down 12v, 2A transformer in series for current measuring in lm358 ?

    July 5, 2014 at 4:09 pm
  • ahsan

    Hey Ligo please send me the corrected code too.
    at my email adress
    [email protected]

    July 5, 2014 at 7:34 pm
  • ahsan

    can you send me the correct of APFC.
    at [email protected]

    July 6, 2014 at 1:04 am
  • bdzah

    hie can i have the correct code please. [email protected]

    September 17, 2014 at 4:23 pm
  • Ligo George

    We have no other codes.

    September 18, 2014 at 11:28 am
  • Santosh

    hi sir
    i dont know how to create a hex file
    i am doing the project in protecus???
    is this good on going for that or whether i need to change the software ???
    i dont how miroC works?????? can we build this same circut over there

    September 18, 2014 at 11:44 pm
  • santosh

    did use multisim for this project???????

    September 18, 2014 at 11:50 pm
  • Ligo George

    MikroC is a compiler while proteus is a simulator.. You can compile your code with MikroC to generate hex file.

    September 21, 2014 at 10:51 am
  • Ligo George

    Yes, you can use it.

    September 21, 2014 at 10:51 am
  • Jaya Krishna G

    sir . please send me the two capacitor ratings .

    October 9, 2014 at 9:15 pm
  • Ligo George

    Design the capacitor ratings as per your power factor requirements..

    October 10, 2014 at 10:28 am
  • ahsan

    Ligo please help me, when i running this code in simulation it give an error of “stack underflow” please correct this error or send me the correct code its not working.
    please i have to submit my project at the end of this month.

    October 19, 2014 at 8:17 pm
  • Ligo George

    Hello,
    The above code is correct, it will work…. only problems is that power factor correction section needs improvement… There is no errors..

    I think, it is not good to simulate projects like this…. Try in real hardware..

    October 22, 2014 at 9:04 am
  • ahsan

    Okay Mr.Ligo thanks for positive response. my hardware its almost ready i hope it will work.

    October 22, 2014 at 7:43 pm
  • Fantan Moja

    the code compiled successfully, just be smart on how you go about it in Micro C pro.

    October 31, 2014 at 2:21 pm
  • pranay

    I have tried this programme but it isn’t working with proteus simulation. Can you send me hex file for this programme?
    My email id is: [email protected].

    November 22, 2014 at 11:05 am
  • Ligo George

    You might not be able to simulate above project in proteus properly… Try in real hardware..

    November 22, 2014 at 1:24 pm
  • bhaskar

    what are ratings of potential &current transformers

    December 19, 2014 at 2:37 pm
  • bhaskar

    what is rating of current transformer

    December 19, 2014 at 2:39 pm
  • Shivendra Kr. Sahu

    pl tell me here whats its conflagration bit setting ?

    December 21, 2014 at 8:32 pm
  • Ligo George

    use a 3V output transformer.

    December 22, 2014 at 12:26 pm
  • Ligo George

    use a 3V transformer.

    December 22, 2014 at 12:26 pm
  • Ligo George

    Use default mikroc settings.

    December 22, 2014 at 12:32 pm
  • Shivendra Kr. Sahu

    ur mean to say both rating (potential transformer & current transformer) are equal (same) ?

    December 23, 2014 at 12:35 am
  • Shivendra Kr. Sahu

    when i Compiled it . error as
    error: 0 434 Demo Limit Demo Limit
    error: 0 102 Finished (with errors): 23 Dec 2014, 01:25:07 Automatic Power Factor Controller.mcppi

    its means generated hex file limit exceed to 2k .
    so pl post it hi-tech or xc8 ver. code

    December 23, 2014 at 1:37 am
  • Ligo George

    No, I said the output voltage rating of both transformers.

    December 28, 2014 at 2:32 pm
  • Ligo George

    Sorry, I don’t have Hi-Tech or XC8 codes.

    December 28, 2014 at 2:32 pm
  • Shivendra Kr. Sahu

    that’s what I’m asking is that the op voltage of the both should be equal .

    December 29, 2014 at 3:21 am
  • Ligo George

    Output voltage always depends on the input … I said about maximum / rms.

    January 3, 2015 at 8:39 am
  • noufal

    Plz send hex code
    [email protected]

    January 4, 2015 at 9:16 am
  • Ligo George

    You can build the above code to generate hex.

    January 10, 2015 at 9:04 am
  • rajesh

    what should the rating of CT and PT

    January 15, 2015 at 11:58 pm
  • kaustubh

    will u please tell about the CT and PT ratings, i mean their turn ratio and current rating

    January 18, 2015 at 3:45 pm
  • Ligo George

    It depends on your applications… You can use transformers with 3V secondary voltage..

    January 21, 2015 at 11:02 am
  • Ligo George

    You should wind transformers depending on your current and voltage ratings… … Design with 3V secondary voltage.

    January 21, 2015 at 11:03 am
  • Ligo George

    These are built in library functions of MikroC Pro compiler… they don’t require header files..

    January 23, 2015 at 6:55 pm
  • habtamu

    can you give more explanation on the program please

    January 25, 2015 at 4:15 pm
  • Ligo George

    Basic function is explained in the article itself. The configuration of Timer 1 is not explained.. it differs from microcontroller to microcontroller.

    January 27, 2015 at 5:25 pm
  • ibrahim

    Please send me a correct [email protected]……tq

    March 8, 2015 at 2:35 pm
  • Udit Jain

    Please send me the corrected code
    @[email protected]

    March 9, 2015 at 11:35 pm
  • Ligo George

    Sorry we don’t have any other codes.

    March 11, 2015 at 10:18 am
  • habtamutolasa

    can you help me with pic microcontroller based ic tester for 74 series
    here is my email “[email protected]

    March 18, 2015 at 6:29 pm
  • madhu

    sir whenever i tried to built the programme its showing demo limit in micro c pro …so iam not able to generate hex file because my compiler is a demo version …so plz send me the hex file or suggest wat to do to generate hex file ….if u tel me to buy original version of micro c pro …its costlier..i can’t afford tat much moneyy so kindly give me some other option
    mail id: [email protected]

    March 30, 2015 at 1:22 am
  • Noor Ahmed

    plz send me hex file
    [email protected]

    April 23, 2015 at 5:20 pm
  • mukesh gupta

    sir i am getting these errors…what to do

    April 24, 2015 at 2:22 am
  • Ligo George

    It is not a Syntax Error…
    It is MikroC Demo Limit error…

    April 27, 2015 at 10:22 pm
  • Ankur Chakraborty

    The program is only showing black boxes on the LCD when done on hardware..what to do? I checked all my connections

    June 20, 2015 at 11:18 am
  • Ligo George

    1. Verify All Connections.
    2. Adjust the Contrast of LCD
    3. Make sure that PIC Program is running, check crystal, power supply etc.

    July 1, 2015 at 7:03 pm
  • vikas

    current transformer is not avilable so as well as pulse wave genrator use it

    October 17, 2015 at 6:13 am
  • Ligo George

    Current transformers are commonly available now a days. You can even get it online.

    November 21, 2015 at 1:21 pm
  • Ligo George

    Sorry, I don’t have this project with any other microcontrollers.

    November 21, 2015 at 1:46 pm
  • zeeshan akbar

    plz send me the proteus file of this project

    November 21, 2015 at 9:18 pm
  • zeeshan akbar

    @@lijoppans:disqus sir plz send me the proteus version of this project

    November 21, 2015 at 9:26 pm
  • Ligo George

    Sorry, currently we don’t have any files of this project.

    November 22, 2015 at 9:25 am
  • agbor roland

    hello please sir what is the reference values of the voltage and current transformers on the power factor correction circuit you can reply me on [email protected] thanks sir.

    January 19, 2016 at 10:34 am
  • agbor roland

    sir please tell me the reference values of the current and voltage transformers

    January 21, 2016 at 11:28 am
  • avinash

    Please send hex file

    January 26, 2016 at 1:14 pm
  • avinash

    Upload the hex file of this code this would be easier to dump to PIC

    January 26, 2016 at 1:15 pm
  • Rahul Raju

    Iam doing this project now can you please send more information about this project and the program i really dont have much program skill so please help my mail id [email protected]

    February 21, 2016 at 12:20 am
  • Karthick Selvan

    The secondary winding of the transformer is connected to LM358. transformer out is AC is this affect LM358.Or it required any rectifer.please tell me.

    February 25, 2016 at 4:26 pm
  • Ligo George

    No need of rectifier. The comparator will compare and will produce pulses.

    February 27, 2016 at 8:08 pm
  • Karthick Selvan

    thanks sir and i have another doubt is this program corrects the pf automatically.

    February 29, 2016 at 11:20 pm
  • swapnil pandey

    Hey can u tell the rating of ct for above circuit . I just need a reference as to by what value current should be reduced???

    March 1, 2016 at 3:29 pm
  • Ligo George

    No you need to improve that section. It is not completely correct. But reading section is correct.

    March 19, 2016 at 10:42 am
  • Ligo George

    You can use a CT depending on the maximum current required for your load.

    March 19, 2016 at 10:43 am
  • Karthick Selvan

    how i made corrections or improve that sections.

    if u dont mine please give me an idea.

    March 20, 2016 at 9:18 am
  • Mouin Zwayni

    how to download this project

    March 21, 2016 at 6:21 pm
  • sai teja

    sir! im getting difficlty in running the program! can u plz check and send me the exact code?
    mail : [email protected] please! a kind request!

    April 13, 2016 at 12:05 am
  • Ligo George

    You need to select proper power factor selection capacitors depending on your load requirements.
    You need to improve power factor correction mechanism of the program.

    April 15, 2016 at 7:30 am
  • Ligo George

    There is no download for this. You can take the program above.

    April 15, 2016 at 7:41 am
  • nanjegowda

    Sir plzzz tell how to burn this code to controller…
    And how to create .hex file

    April 17, 2016 at 3:15 pm
  • nanjegowda

    iam not able to generate hex file because my compiler is a demo version …so plz send me the hex file or suggest wat to do to generate hex file ….if u tel me to buy original version of micro c pro …its costlier..i can’t afford tat much moneyy so kindly give me some other option
    mail id: [email protected]

    April 17, 2016 at 4:02 pm
  • nanjegowda

    Sir plzz can u share me the .hex file… Email.I’d:- [email protected]

    April 20, 2016 at 6:49 am
  • melese

    pleas send me the materials and theire properties that you use on proteus software on “[email protected]” i make mistak when i constract the circuit.

    May 31, 2016 at 5:23 am
  • Ligo George

    You can use the compiler MikroC Pro for doing it.

    June 2, 2016 at 6:02 pm
  • Ligo George

    We are not providing the hex file as the project is not complete. Its power factor measuring section is correct, but correction is not correct.

    June 2, 2016 at 6:03 pm
  • Ligo George

    Sorry, we don’t have the hex file. You can compile and generate it.

    June 2, 2016 at 6:11 pm
  • Ligo George

    You can generate it using MikroC Pro compiler.

    June 2, 2016 at 6:17 pm
  • Tapiwanashe Augustine

    Hey man thanks for the code, got it kicking on Proteus 8. Have had an exciting past day since i couldn’t use microc (2k limit). So I translated your code into Hitech C. And just a pointer,,,,, ADCON1 = 0x06 if you want to make all of PORTA pins digital input. Again, thanks for sharing, really helpful you guys.

    September 23, 2016 at 7:26 am
  • Uzer

    Lots of error when I complied program I’m micro c pro

    October 8, 2016 at 11:15 am
  • Tapiwanashe Augustine

    email me at [email protected]

    October 27, 2016 at 1:25 pm
  • Ligo George

    Thanks for the feedback.

    November 27, 2016 at 12:40 pm
  • Ligo George

    It will work fine in MikroC Pro.

    November 27, 2016 at 1:08 pm
  • Ligo George

    I didn’t do any simulation for this project. Only tested in real hardware.

    November 27, 2016 at 1:17 pm
  • shaker

    Sir can I ask complete code? please send to email: [email protected]

    February 4, 2017 at 5:06 pm
  • shaker

    i don’ t know why this program did not compile. can i know what exact version of mikroC it has written for. thank you?

    February 4, 2017 at 5:08 pm
  • shaker

    in the last of the code write demo limit ? what is mean how can i remove this error

    February 5, 2017 at 1:26 am
  • Rahul Wagh

    please send me your hitech compiler code, i want this code because i use hitech compiler and mplab IDE… [email protected]

    February 10, 2017 at 6:30 pm
  • Rahul Wagh

    sir, i try but not propery work, please send corrected code

    February 10, 2017 at 6:46 pm
  • I have error in float tm,of;

    vignesh

    February 20, 2017 at 8:39 am
  • I have error in float tm,of;

    I am Vignesh I have error in float tm,pf;

    February 20, 2017 at 8:39 am
  • melkamu

    Ligo please help me, when i running this code in simulation it give
    an error of “stack underflow” please correct this error or send me the
    correct code its not working.

    March 3, 2017 at 3:45 am
  • melkamu

    how to improve power factor correction using pic 8051

    March 3, 2017 at 3:53 am
  • melkamu

    Ligo please help me, when i running this code in simulation it give
    an error of “stack underflow” please correct this error or send me the
    correct code its not working and how to improve power factor correction using pic 8051

    March 3, 2017 at 3:54 am
  • Ardian

    This is only a prototype of Automatic Power Factor Controller, for practical implementation you may need to make some modifications in the program and circuit.

    March 12, 2017 at 7:18 am
  • Vaibhav Chauhan

    sir can i get the simulation file for this project
    kindly send it to [email protected]

    March 12, 2017 at 11:23 pm
  • HamzaSaeed

    What is the rating of CT and PT, what inductance should i use on primary and secondary side transformer?

    August 17, 2017 at 3:57 pm
  • HamzaSaeed

    Can you send me proteus simulation. Thanks

    August 17, 2017 at 4:03 pm
  • ted korczak

    Dear

    How to adopt your code for STM32F103 ?

    August 24, 2017 at 1:47 am
  • KAUSHIK SAMANTA

    how u get current pulse?

    September 15, 2017 at 8:15 pm
  • KAUSHIK SAMANTA

    Sir how can i get Current transformer in proteus?
    thank you.

    September 15, 2017 at 8:16 pm
  • deepalps

    how to caliberate?

    March 2, 2018 at 7:53 pm
  • charan

    hey man i will be thankfull wholeheartedly if u can send me the .hex file of this programm to my mail [email protected].i urgently need it man

    March 26, 2018 at 9:31 pm
  • Ligo George

    You can build the above program with MikroC Pro compiler.

    April 2, 2018 at 12:32 pm
  • D P singh

    Hi, Divya shamka I am working in NFL , I want ask you that the above programm for automatic power controller by pic , can be written in assembly language , if yes please write it in assembly.
    Thanks with regards.

    April 25, 2018 at 4:00 pm
  • Sagar

    hello sir, have you a coding of this practical in 8051 family controller like AT89s51?

    June 28, 2018 at 4:44 pm
  • Anand M N

    Hello. Is the program for the correction part correct?

    August 9, 2018 at 7:43 pm
  • Pawan Rana

    Sir, how can we write th abovecode using AVR

    August 28, 2018 at 12:48 am
  • Megha Asundi

    We are getting error for abs and cos tetms in mikroC complier…wt to do??

    Is this the correct code?

    November 15, 2018 at 2:31 pm
  • Anand M N

    I am planning to simulate this in proteus as i don’t require to do this in real hardware. Is the pf correction section now correct? and how to insert a load to make pf low in proteus?

    November 21, 2018 at 12:38 am
  • Anand M N

    Hi ..It compiled with out any error for me. But i don’t know how to put a load in proteus to make low pf in supply
    pls help

    November 21, 2018 at 12:39 am
  • Rabin samanta

    Hello sir can you please send me the corrected code .
    My E-mail is – [email protected]

    May 20, 2019 at 6:27 pm

Leave a Reply

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