olehs / PZEM004T

Arduino communication library for Peacefair PZEM-004T Energy monitor
MIT License
225 stars 114 forks source link

power output from code not Equal to power from formula #30

Closed xang555 closed 6 years ago

xang555 commented 6 years ago

thanks for you create this library. but i have some problem with power value that i get from example code here my output:

23634544_1269072553238593_1219164822_n

i Calculated power by using P = U * I. so i test with my current and voltage data that i get but Calculated value from formula not Equal or adjacent power from example code output.

power output Equal to power from formula?.

i'm use nodemcu broad.

olehs commented 6 years ago

This formula is true only for active load. See https://en.wikipedia.org/wiki/AC_power#Active.2C_reactive.2C_and_apparent_power

pieman64 commented 6 years ago

@xang555 many "whole house" energy meters are not particularly accurate at very low power usage so that might be some of your problem. The other issue is that real power is not simply U * I.

If the load has a power factor of 1 (or 100%) then it would be U * I but some loads have a pF of 0.7 etc.

Edit: you beat me to it @olehs

xang555 commented 6 years ago

thanks for your fast reply. i'm understand and close this issue AC not DC. i'm stupid hahahah