hi,

I am using arduino to measure power but I have designed my circuit differently.

In my case, the current value is measured at the mains and the voltage value is measured at some plug inside the house. The current value will be then sent to the voltage side. So basically, I have two arduinos one for current measurement and other for voltage, it may sound weird but its the demand of my experiment. I am getting voltage and current values correctly. My only concern is phase shift. Can someone please explain how the phase shift value is determined and will it be 1.7 in all cases, no matter what type of loads are running.

Thank you

There is no way that you can synchronise two separate Arduinos to measure real power. You can only have apparent power (e.g. Vrms × Irms). And in that case, the phase shift/correction has no meaning at all.

Phase shift is only meaningful when you are measuring voltage and current inside one Arduino and computing real power.

The phase correction is not just phase correction, it is a timing correction too. Both CT and VT have a phase error - that’s inherent in how transformers work, but can be minimised by careful design and expensive materials - and it is the difference between those two errors that is important. Next, the Arduino has only one ADC, therefore it measures samples of voltage and current alternately, and so there is a time difference between the two readings. (It then multiplies and averages these pairs of readings to give you real power). This time difference equates to (but strictly speaking is not the same as) another phase error. The value of PHASECAL shifts the voltage wave mathematically (see Resources > Building Blocks for an explanation) to compensate for these errors.

Unless you are measuring samples of voltage and current alternately inside the same Arduino, you cannot measure real power, because you do not know the time/phase difference between the voltage and current waves.