Guide on reading energy

Hello guys,

I don't have much knowledge in this Power aspect so will need your guidance and help.

I have made the exact Dimmer Circuit as shown in the link below and my question is if it is possible to have arduino read and monitor the energy of this circuit? I have found a site whereby they teach you how to make a energy meter but is it feasible if my power is from wall socket 240V?

Would welcome all feedback. Thanks!!

Dimmer

Energy Meter

That energy monitor project is for low voltage DC only, not mains where complete isolation
is needed.

For mains you measure current with a current transformer (CT) and voltage via a small (voltage)
transformer. And with AC you have to sample often and calculate and sum the instanteous
power if you want accurate readings in the face of non-unity power factors and harmonic
pollution.

Often for domestic power measurement just a CT is used (and perhaps an opto-coupled
zero-crossing detector for power factor estimation). You assume the mains voltage is
constant which isn't too far from the truth. You then calculate rms current.

Thanks MarkT for your suggestion!

Anyways I was thinking maybe I should just use a current transformer and get the current. From there I will use the current obtained to calculate my Voltage followed by the calculation of Energy since creating a voltage measurement circuit is too dangerous. But I have issue on how to program the calculation of the voltage using arduino eg. 230√2sin(2pi**50t)*Current

Any advise?

P=VI
E=PT

power = rms voltage x rms current x power factor

or

power = mean (voltage x current) [ averaged over the cycle ]

The latter is what your equation encodes.

If you know the load is resistive only (ie a heater), then you can assume the power factor = 1