 THE POWER being dissipated in an ac circuit is one of the more difficult quantities to measure with normal laboratory equipment  unless the circuit is purely resistive. This is because the power dissipated is given by the expression P = IV cos0 where I is current, V is voltage and 0 is the phase angle between them. Theta (0) varies from 90° for an ideal inductance, through 0° for a resistance, to 90° for a capacitance. Since cos ±90 = 0, both inductance and capacitance dissipate no power at all. They store it during one half-cycle and release it to the source again during the following half-cycle.

Therefore, in order to measure power, one either needs a wattmeter  an expensive instrument if any great accuracy is desired  or a knowledge of 0, the phase angle. While 0 can be estimated from a dual trace oscilloscope, this article describes a simple and accurate way of measuring it directly. In addition to power measurements, measurement of the phase difference between two voltages is useful when working on filters, feedback loops and phase-shifting networks: it can be used to measure the Q of an inductor, and hence check for shorted turns, or the loss factor in a capacitor. A further application of growing importance in the audio field is the phase of the sound from individual drive units in a loudspeaker enclosure, or members of an array of loudspeakers. The phase relationship between two voltages is conventionally measured by detecting when each crosses zero voltage (see Fig. 1) in one direction, and arranging for one voltage to turn a flipflop ON and the other to turn it OFF. The percentage of time that the flipflop is on, and hence the average value of the flipflop output, is proportional to the phase difference between the two voltages. This method has three inherent disadvantages 

1. Voltages with little or no phase difference can give readings of 0° and 360°, or a reading which varies randomly between these limits.
2. Any noise on either signal can cause false triggering and jittery readings.
3. Any harmonic distortion can produce a shift in the zero crossing point and hence an error of initially 0.6 degrees per 1% of distortion.

The method used in the circuit described here is to form the exclusive-OR of the square waves produced by zero crossing detectors from the two voltages.

For those who have not encountered the exclusive-OR (XOR) function before, this is a logic function (in the same way that AND and OR are logic functions) that gives an output (logic 1) if its two inputs are different, but not if they are the same. Thus two square waves which are in phase will produce no output: two which are exactly out of phase will produce a maximum continuous output; and intermediate phases will produce an output proportional to the phase difference

(see Fig. 1). This system has the advantage of being almost immune from noise problems since no triggering or latching circuits are involved.

Because the circuit response is symmetrical about 0° and 180°, there are no output discontinuities or ambiguities of reading. However an additional flip-flop is required to sense which voltage is ahead of the other and indicate it. The circuit is implemented with CMOS gates which have the advantage of being able to be used in either linear or digital mode. The two inputs are first squared. For example the reference input is amplified by gates IC1/2, IC1/4 and IC1/6 (see Fig. 2) and then applied to 1C2/2, one of the spare EX.OR gates whose other input is grounded. This conveniently behaves as a Schmitt trigger type of bistable circuit. The average of the output of this gate is formed by R8 and C4, and this is inserted via R6 as the dc level at gate IC1/2.

This produces two important consequences. Firstly it forces the output of IC2/2 to a symmetrical 180°on/180°off condition which is maintained stably by almost complete dc feedback. And secondly, because we now have a true squaring circuit rather than a zero-crossing detector, all errors due to even-order harmonic distortion are cancelled. R4 and RV2 are used to adjust for input offset and set the exact 180° condition.

IC gates ICl/1, IC1/3, IC1/5 and IC2/1 process the signal from the other channel in an identical manner, and the two squared outputs are fed to gate IC2/3 which is the gate that forms the EX.OR of them. Its output is filtered by R11 and C6 and a voltage proportional to the phase difference of the inputs may be taken from across C6.

RV3 is used to set this to a convenient value  for instance it may be set to 180 mV for a 180° phase difference and read on a digital multimeter. Alternatively up to 50 pA can be drawn to give a reading on any suitable meter or multimeter. The use of an external meter is of course a much more economical proposition.

In order to detect which of the inputs is leading the other, the two voltages from the squaring circuits are also fed to the D type flip-flop IC3/2. One voltage is used for the clock input and the other as a data input. This type of flip-flop is really a data latch, and whatever bit is present at the D input at the moment when the clock voltage changes from low to high is held until the next clock pulse. Thus if the D input stays low until after the clock input goes high, the output Q will always remain low showing that the D input lags the clock input. The complementary output Q will be high and this is used to turn on the transistor and LED indicating this lag condition. Since any noise arriving at the clock input can cause spurious resetting of the flip-flop, it is preferable to- use a clean voltage to drive it. This is why this channel has been designated the reference. Noise on the other channel is almost completely ignored.

These then are the basic EX.OR functional parts of the phasemeter, and this would leave one flip-flop unused. In fact it turns out that there are two functions that these gates can usefully perform. First, for setting up the input squaring circuits: if the flip-flop is slaved to the squaring circuit, the exact 180° condition can be set when the complementary outputs Q and Q have equal average values. Secondly these gates can be arranged to turn the flip-flop on and off to give a conventional phase meter circuit output. While this does not give as accurate a reading, it does give one which is of opposite polarity for leading and lagging voltages and which can therefore be recorded graphically and unambiguously on an instrument such as a chart recorder. This is therefore designated the recorder output.

In operation one input of the EX.OR gate IC2/4 is connected through C5 to the output of one of the squaring circuits. Its other input is tied to the positive rail so that it functions as an inverter with respect to the other input With C5 connected to the output of IC2/2 (the CAL position), when IC3/2 goes negative C5 and R9 differentiate this, and IC2/4 gives a short (1/2 iisec) positive spike, which is used to set IC3/1. Since the data input of this flip-flop is always low, the clock pulse will always reset it again.

Thus the flip-flop is slaved to the reference input as it is set when IC2/2 goes low and reset when IC2/2 goes high, and this enables the 180° duty cycle to be set (see below). When C5 is connected to IC2/1 (the USE position) the flip-flop will have equal outputs at Q and Q if the two inputs are exactly in phase. It produces a positive value of Q relative to Q when the input leads the reference voltage and a negative value when it lags, the average voltage between them being proportional to the phase difference. R12, R13, C7, C9 and RV4 are used to filter this output and set it to some convenient value.

Of the other components R10 is used to delay the voltage to the clock inputs slightly to compensate for the set-up time at the data inputs, and the LM309 regulator and associated components holds the supply voltage constant at just under 6 volts. This is important as the full-scale readings from the outputs is proportional to the supply voltage. The circuit can be run from a 9 V battery and draws about 20 mA with the LED off and 40 mA with it on. Alternatively any power supply that produces between 9 and 30 volts may be used, but it should be a floating supply to simplify the measurement of the phases of currents, and R16 and the voltage rating of C10 should be increased if more than 15 volts are used.

## CALIBRATION

To calibrate the instrument, first connect capacitor C5 to the CAL position, the meter to be used to the recorder output and a signal of about 100 mV at about 1 kHz to the reference input. Adjust RV1 to give a null reading on the meter. Disconnect C5, leaving the end free, and adjust RV4 to give a convenient reading on the meter to correspond to 180° (eg 180 mV or 45 pA). If this is hard to set exactly, connect a fixed resistance in parallel with RV4 to give better control for any individual meter.

Next connect jumper leads from the positive sides of C3 and C4 to either side of C7 (i.e. one to V+, the other to V, it doesn't matter which), connect the meter to the main output and adjust RV3 to give a 180° reading (with parallel resistance if needed as in the previous paragraph). Finally, remove the two jumper leads and connect one between the two inputs, connect C5 to the USE position and adjust RV2 slowly and carefully until the LED is just on the point of turning on and off. The meter should now be reading less than half a degree: if not, repeat the calibration procedure.

As a check of proper operation, you should now be able to vary the communal input from millivolts to volts and from sub-audio to over 100 kHz without the phase difference showing more than about one degree.

Another excellent test is to connect different signal generators of different frequencies to the two inputs. The output should read exactly 90°, as the signals will be in phase exactly as often as they are out of phase. Our prototype failed this test, reading 92°, and it was only after considerable trouble that we traced this to non-linearity in our trusted (and expensive) multimeter. We guess the moral is to use a digital meter if accuracy is really important. Note that the recorder output is undefined under these conditions. Under no circumstances can 120 V be applied directly to the inputs! Use the test circuit in Figure 6.

When using the instrument for measuring phase in AC line circuits, common sense precautions should be observed to ensure no damage occurs to the instrument or the operator! First use a neon test prod to identify the hot lead: secondly always switch off the power when connecting or making any alterations to the circuit under test: thirdly make sure that the resistor R makes reliable contact and cannot accidentally become disconnected, otherwise the reference input can get the full line voltage through the load. Finally use a voltage divider or an oscilloscope X10 probe to reduce the voltage to a safe level.

The circuit shown in Fig. 6 can be set up on an insulating board with a socket for the load to be plugged into. Resistor R is chosen to give a voltage of 1 volt or less when the load current flows through it and must be rated to dissipate a few watts if large currents are to be handled. A value of 0.22R @5 W is suitable for most situations. And remember that, when set up like this, the instrument reads the phase of the voltage relative to the current.

## Assembley

Excellant information is available on the PDF File for this circuit. Included is a PCB mask and complete layout instructions.

Revised 2013 by Larry Gentleman