Open energy monitor for pic microcontroller

Can I use open energy monitor library to measure power factor with the help of pic microcontroller. I have found a article on this link power factor measurement using pic microcontroller but I have not found code. Can you please tell me how to use open energy monitor library to measure power factor with pic microcontroller?

You should be able to use emonLib almost exactly as it stands, the only changes you might need will be to pick up the correct input pins, and the correct ADC reference voltage (for calibration purposes).

I did not read that article carefully, but it appears to show a common misconception: power factor is only cos(φ) for a pure sine wave (which generally is not true for the a.c. mains - especially for the current waveform). EmonLib calculates power factor according to the definition: the ratio of real power to apparent power.

I think someone has already used emonLib with a PIC - you could try searching the “Archived” section to see if you can find something that might help you.

EmonLib, and the example sketches for the Arduino, are on GitHub (via “Resources”).

ok thanks for clarification. I am searching that link I will check it and comment here

thanks :slight_smile: