Plastic sand pear
The most direct method is to shape the voltage and current into square waves, and then measure the time difference between the rising or falling edges of two square waves and a single signal cycle through a timer of a processor such as a single chip microcomputer. Time difference divided by period and multiplied by 360 is the phase difference.

If a symbol is required, subtract 180 from the above result.

The method is characterize by simplicity. However, when the waveform has a large burr, the measurement error is large.

Another method is to use analog multiplier or digital multiplication (high-speed sampling, digital multiplication and multiplication) to obtain active power. Active power pays attention to apparent power to obtain power factor, and then converts the phase angle according to the power factor.