• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

A circuit to measure Phase Angle difference

Status
Not open for further replies.

Finzi

New Member
Hi people. Great forum you have here.
I need a circuit able to measure the phase shift between 2 input voltage signals. The circuit must provide me an output voltage sign which is proportional to the phase angle between the two inputs. I´ve already search the forum and I couldn´t find any circuit like this.

Can anyone help me?
 

ericgibbs

Well-Known Member
Most Helpful Member
Hi people. Great forum you have here.
I need a circuit able to measure the phase shift between 2 input voltage signals. The circuit must provide me an output voltage sign which is proportional to the phase angle between the two inputs. I´ve already search the forum and I couldn´t find any circuit like this.

Can anyone help me?
hi,
You need to specify the nature of the two signals to be compared.

eg: amplitude, frequency, sine or square etc, any dc offset voltage etc..

Need more info.:)
 

Boncuk

New Member
hi,
You need to specify the nature of the two signals to be compared.

eg: amplitude, frequency, sine or square etc, any dc offset voltage etc..

Need more info.:)
Hi Eric,

(objections your Honour)

sad to say, but in my opinion it makes no difference if the phase shift of a sine, square, triangle or even octagon :) signal has to be measured, as well as signal amplitude.

I'd vote for frequency to be measured to decide about the type of MCU to employ. :)

To solve for phase shift (angle) accurate time measurement is necessary between incoming pulses.

Kind regards

Hans
 

ericgibbs

Well-Known Member
Most Helpful Member
Hi Eric,

(objections your Honour)

sad to say, but in my opinion it makes no difference if the phase shift of a sine, square, triangle or even octagon :) signal has to be measured, as well as signal amplitude.

I'd vote for frequency to be measured to decide about the type of MCU to employ. :)

To solve for phase shift (angle) accurate time measurement is necessary between incoming pulses.

Kind regards

Hans
hi Hans,
You objection duly noted.:)

I was mainly concerned about any signal preconditioning that the signal may require, prior to the phase being measured.

Only 2 days to go.!! :rolleyes:
 

Sceadwian

Banned
Yeah Boncuk but he wants an analog out. It is highly dependent on frequency for a micro controller because the quantization noise on the ADC may screw up the desired output. If this was done properly on opamps you would eliminate all the ADC processing and DAC errors, and get a true analog signal, it would follow the incoming signals better without the delay that would be introduced in a micro controller. Lets wait for the poster to state his parameters are little better before we give him suggestions =) This is definitly one situation where I wouldn't just throw a micro controller at it => Too many unknowns.
 

Roff

Well-Known Member
There are many ways of building phase detectors.
What is the phase range that you need to measure?
What is the frequency range?
What is the signal amplitude?
What is the waveform?
 

Finzi

New Member
hi,
You need to specify the nature of the two signals to be compared.

eg: amplitude, frequency, sine or square etc, any dc offset voltage etc..

Need more info.:)
Hi ericgibbs. The singnals are tow sinewave, 1k - 200kHz, V1 = 2Vpp, V2 = 0.5Vpp - 10Vpp

This circuit will be used as part of a impedance analyser that I am projecting.
 

Finzi

New Member
Hi Eric,

(objections your Honour)

sad to say, but in my opinion it makes no difference if the phase shift of a sine, square, triangle or even octagon :) signal has to be measured, as well as signal amplitude.

I'd vote for frequency to be measured to decide about the type of MCU to employ. :)

To solve for phase shift (angle) accurate time measurement is necessary between incoming pulses.

Kind regards

Hans
Hi Boncuck. I prefer not to use a MCU to solve this problem, since i could use the AD5934. An analog circuit would be cheaper ;).
 

Finzi

New Member
Yeah Boncuk but he wants an analog out. It is highly dependent on frequency for a micro controller because the quantization noise on the ADC may screw up the desired output. If this was done properly on opamps you would eliminate all the ADC processing and DAC errors, and get a true analog signal, it would follow the incoming signals better without the delay that would be introduced in a micro controller. Lets wait for the poster to state his parameters are little better before we give him suggestions =) This is definitly one situation where I wouldn't just throw a micro controller at it => Too many unknowns.
Hi Sceadwian. Those are exactly my concerns about using a MCU. Here are the working parameters again.

- Sinewaves at the same frequancy = 1kHz - 200kHz
- V1 = 2Vpp
- V2 = 0.5Vpp - 10Vpp
- Phase to be measured = 0 - 90 degrees.
Thanks for everybody whos is helping.
 

Sceadwian

Banned
My analog skills aren't particularly good, I'm not even sure where to start with that. roff or eric might be able to help better. Have you tried googling for phase comparator circuits?
 

Roff

Well-Known Member
Run both the signals through comparators (LM393 is a dual comparator). Connect the comparator outputs to the inputs of a CMOS exclusive OR. The output will be duty-cycle modulated proportional to the phase difference. Lowpass filter the output to get an analog value.
 

Finzi

New Member
My analog skills aren't particularly good, I'm not even sure where to start with that. roff or eric might be able to help better. Have you tried googling for phase comparator circuits?
Yes, i've done it a lot. But I couldn´t find any circuit that works above 20 kHz.
 

Roff

Well-Known Member
Yes, i've done it a lot. But I couldn´t find any circuit that works above 20 kHz.
See my last post. That method should work fairly well to 200kHz. If you need better accuracy, use faster comparators and a 74HC86 XOR.
 

Finzi

New Member
Run both the signals through comparators (LM393 is a dual comparator). Connect the comparator outputs to the inputs of a CMOS exclusive OR. The output will be duty-cycle modulated proportional to the phase difference. Lowpass filter the output to get an analog value.
Hi Roff. That's a good idea. I just tryed but a i've found a problem. The response time of LM393 is not good enough at 200kHz. There is a delay of 0,4µs between zero-crossing and the pulse provided by the comparator. This means an error of at least 30 degrees :(.
 
Last edited:

Roff

Well-Known Member
Hi Roff. That's a good idea. I just tryed but a i've found a problem. The response time of LM393 is not good enough at 200kHz. There is a delay of 0,4µs between zero-corssing and the pulse provided for the comparator. This means an error of at least 30 degrees :(.
Both comparators will have nearly the same delay, cancelling most of the error. As I said, if you need more accuracy, choose a faster comparator.
 

Roff

Well-Known Member
Thanks Roff. I´ll try it.
If you use a single supply, you'll have to AC-couple the inputs to the comparators. Be careful to keep your inputs within the common mode range of the comparator. You may need to clip or otherwise limit the 10V p-p signal.
 

ccurtis

Well-Known Member
You might want to consider the phase detector sections of the 74HC4046. One of the three phase comparators provided (phase comparator #2) has an output voltage centered at Vcc/2 for zero phase difference, with the output going below that for lag, and above that for leading phase. Thus, you will have a phase difference measurement provided as an analog voltage from which you can also know the sign of the difference as well as the difference. It provides a voltage follower to buffer the output of the RC integrator (low pass filter). Of course, you will have to condition the inputs to fall between GND and VCC (6V maximum). It will accept capacitor coupled sinewave inputs within those voltages. Pulse inputs need not be 50% duty cycle.

Phase comparator #1 is the XOR type that Roff described.
 

Finzi

New Member
If you use a single supply, you'll have to AC-couple the inputs to the comparators. Be careful to keep your inputs within the common mode range of the comparator. You may need to clip or otherwise limit the 10V p-p signal.
Ok Roff. I´ve just tryed it and worked i worked well. Thanks a lot.
 

Finzi

New Member
You might want to consider the phase detector sections of the 74HC4046. One of the three phase comparators provided (phase comparator #2) has an output voltage centered at Vcc/2 for zero phase difference, with the output going below that for lag, and above that for leading phase. Thus, you will have a phase difference measurement provided as an analog voltage from which you can also know the sign of the difference as well as the difference. It provides a voltage follower to buffer the output of the RC integrator (low pass filter). Of course, you will have to condition the inputs to fall between GND and VCC (6V maximum). It will accept capacitor coupled sinewave inputs within those voltages. Pulse inputs need not be 50% duty cycle.

Phase comparator #1 is the XOR type that Roff described.
Hi ccurtis. I´ve considered using this PLL once before but i coundn´t find an application note that suits my needs. Could you sugest one? Thankyou for your help.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top