capella-ben / emon_esp32

Implementaion of emonlib for esp32
GNU General Public License v3.0
8 stars 1 forks source link

Factors deciding no. of samples #1

Closed anilx86 closed 4 years ago

anilx86 commented 4 years ago

Hi you are using 1480 samples for calculation .for correct calculation samples period should be multiple of 16.66' milliseconds for 60Hz countries and multiple of 20 milliseconds for 50Hz countries .i want to know what time period 1480 samples corresponds to and reason for selecting 1480 samples in your code.

// calculate energy double Irms = calcIrms(1480, mainsPin); // Calculate current