pic based power factor meter
"it is simple,
in your program first read voltage sample, then current sample and measure time diffrence .
if (in 50Hz & 20mS period) diffrence was smaller than 5mS current lagged,
and if diffrence was 15mS-20mS first calculate (timeDiff - 20ms)
then you get what you want!"
Can I generalized it?
For 50hz, sample first the voltage. Then let D be the time difference of voltage time minus current time. If D is less than or equal to 5ms, then current is lagging the voltage. If D is less than or equal to 15ms or if D is less than 20ms, then current is leading the voltage by 20ms minus D. I hope this is correct formula.
Any comments? Thanks...