Help! power and Irms

I’m using the circuit from the Learn/Current Only Arduino Energy monitoring page, but using an ESP32 board
Burden : 20 Ω
Divider : 2x10kΩ
capacitor 10 microF
i have a SCT013-000 and i am I am driving a voltage divider from the 3V3 of the esp 32 wroom
I am powering the ESP32 using the USB cable out of my laptop
i am just an amateur so if you could help me with simple and clear instruction i would be glad
it showls me results like current: 4,56 WATT : 1010
thanks for any tips !

You are using calcVI( ).
CalcVI assumes that you have an a.c. adapter connected and that you are measuring voltage with it. When you do not have the a.c adapter, you should be using calcIrms( ) to get only the current.

Multiplying rms current by the nominal voltage gives you apparent power (VA), not real power (W):

Serial.print(" Apparent power (VA): ");Serial.println(calcIrms(1676) * 220);

See Sampling rate of emonLib for where “1676” came from.

Continuing the discussion from Help ! power and irms:

thanks for your help i changed the code and now it shows only zeros


Capture2

I do not understand why calcIrms( ) returns zero. Do you have the correct input pin?