This algorithm makes use of the two most recent sample values for voltage, and then calculates the appropriate value for the "correct" moment by linear interpolation. 5MOhm. . To calculate the power P from the current I and the voltage U you also need the cos phi ("power factor"). EmonLib voltageandcurrent. 51. LM35 power going to the 3V3 pin of the ESP32. You can check How to make a Single Phase AC voltmeter using PIC16F76. The phase calibration. All other options from Sensor. In the loop section, periodically the electrical parameters are read, these measures are based in features of Open Energy Monitor&x27;s Arduino library EmonLib. The electric power sensor designed by Pai P. .