# Measuring phase between voltage and current(HELP!!)

Discussion in 'General Electronics Discussion' started by lamela, Jun 19, 2015.

1. ### lamela

3
0
Jun 19, 2015
Hey guys! I'm stuck with my project(assignment) and I'm required to measure voltage, current and phase from an AC source with any equipment that is connected.
I've heard from my supervisor it's difficult to measure the phase angle and I've googled a lot but I'm still stuck.
I'll have to draw out the circuit connection schematic first before doing the actual connection(hardware).

Really appreciate if you guys can help me with the sourcing of phase angle, any samples or guidance will help too!
Thank you!

Similar circuit: http://openenergymonitor.org/emon/buildingblocks/how-to-build-an-arduino-energy-monitor

Last edited: Jun 19, 2015
2. ### Harald KappModeratorModerator

11,981
2,807
Nov 17, 2011
Welcome to electronicspoint.

Measuring the phase angle between two sinusoidal signals basically means measuring the time difference between zero crossings of the two signals and converting this time difference to a phase angle by comparing it to the period of the signal. The equation is simple, but I won't disclose it since this is an assignment and you should be able to infer it yourself.
However, measuring the time difference between zero crossings of the two signals can be tricky, depending on the accuracy required.

What kind of instruments are available to you for this task?

3
0
Jun 19, 2015
4. ### Harald KappModeratorModerator

11,981
2,807
Nov 17, 2011
Which given circuit? The arduino as in post #1? If so, the signals are obviously digitized using the ADC in the processor.
As far as I know the arduiono has only one ADC, this will complicate matters, as you can digitize the two signals only sequentially (one after another), not simultaneously.
You will have to digitize the two signals, reconstruct the zero crossing from the digitized values by interpolation, then calculate the time difference (aka phase angle) between the two interpolated zero crossings.

hevans1944 likes this.
5. ### hevans1944Hop - AC8NS

4,647
2,169
Jun 21, 2012
The Arduino has six (Uno), eight (Mini), or sixteen (Mega) analog input channels. Analog-to-digital conversion rate tops out at about 100 μsec per sample, or about 10,000 samples per second. Using two channels, an effective sampling rate of 5,000 samples per second on each channel could possibly be achieved for two conversions in quick succession. With an uncertainty of about ±100 μsec, If these are 60 Hz AC waveforms like the example at the OP's first link, then it is possible to determine the relative phase shift to within about four degrees by digitizing the AC waveforms to find the zero-crossings and then measuring the time-differences between the zero-crossings of each waveform. I wouldn't do it that way though. I would use a circuit to generate pulses at each zero-crossing of the two waveforms, and then use the Arduino to measure the time interval between pulses for the two waveforms. That's much easier than trying to find the zero crossings in software.

An Arduino sketch to measure the voltage, current, and phase angle (by either method) and display the results via a serial connection to your computer is best left as an exercise for the student.

You will also need a means to safely attenuate and measure the line voltage and another means to measure the load current of any equipments connected. It is suggested that a step-down transformer is the safest means to lower the peak-to-peak line voltage to a zero to +5 V range the Arduino will accept. After obtaining an acceptably attenuated waveform, representative of the line voltage, you will also need to offset the waveform so the zero-crossings occur at about +2.5 V, the mid-point of the Arduino A/D conversion range. A signal representative of the load-current waveform can be obtained with either an amplified current shunt (to avoid placing too much resistance in series with the load for sensing current) or with an amplified Hall-effect current sensor. Either way, you need some analog signal conditioning to offset and scale the current waveform before applying it to the Arduino for analog-to-digital conversion.

Harald Kapp likes this.

4,647
2,169
Jun 21, 2012
7. ### lamela

3
0
Jun 19, 2015
Is there any device or components can be bought to easily measure the phase angle difference?

8. ### Harald KappModeratorModerator

11,981
2,807
Nov 17, 2011
An oscilloscope can be used with limitations in accuracy, or a dedicated phase meter.
Both are not inexpensive options.