How Can I detect the phase shift between two sinusoidal signals

Status
Not open for further replies.

Abdullah2121

New Member
Hi .... How can i detect the phase shift between two sinusoidal signals? ... because I want the PIC to calculate the time between the + phase and the - phase ...
 
What frequency are the signals?

If the frequency is less than about 1o kHz you can read the signals with the ADC and use the timers to measure time difference and period.
 
I think you can detect the zero cross and figure it out that way. BUt I don't have time to sit down and draw a picture and figure out the relationship between the time spacing of the zero crossings and the frequency.

FOr example:

0 phase shift - the spacings are equal to the period
180 degree phase shift - intdeterminate since you get no signal due to desctructive interference.
 
dknguyen said:
You redirect the OP to another thread again in the thread you posted
I know, but for some unknown (and annoying) reason the OP in the first thread deleted his question.

Mike.
 
You may consider AD8302, by the way, I am using this chip to perform relative phase difference detection for 1MHz sine wave...
 
Hi Abdullah2121,

There's a easy way of doing this: You can mix both signals with
the same oscillator signal and pass them to equal low-pass filters.
If you use 1,65 or 1.75 MHz you'll end up with two 50 kHz signals
with the same phase difference. Do I need to say more ?

on1aag.
 
Do you have to differentiate between the phases eg signal 1 is is 10deg leading reletive to signal 2 or is it only a case of knowing what phase difference there is. If it is the last case then ADD both signals thru a opamp(RF type) when both signals are 180deg apart then there will be zero signal and if both in phase, double the signal. Feed the result into an integrator and then use the PIC ADC to read the value.
 
thanx guys for all these answers ... but all i know that all chips like PLL or XOR gate or phase comparator or the mixer deal only with the square waves not with the sine wave ... if not ,please give me the number of this chip , and i will be greatfull for this ... and I'm sorry if I bother you ..
 
Mixers and sinewaves ?

Hi Abdullah2121,


I think you should reconsider using the mixers to bring the frequency
of both signals down to manageable levels for the pic. I used 50 kHz
as an example but you could bring the frequency of the signals even
further down by selecting the frequency of the oscillator closer to
the frequency of the signals.
And the signals are all sinewaves.

on1aag.
 

Attachments

  • 90° circuit diagram.PNG
    25.9 KB · Views: 434
  • 90° input & output graphs.PNG
    23.5 KB · Views: 383
  • 90° ouput graph.PNG
    17.6 KB · Views: 339
you can also use a bandpass filter an ADC. you can remove out-of-band information and alias the signal back to baseband. from there you can determine phase with normal methods. your ADC must have an input bandwidth exceeding the frequency of interest and upper cutoff of the filter.

ideally you will sample at a fraction of the input signal's rate.

also, you can convert the sine wave into a square wave. from there you can use the xor gate. (or ideally two gates and a delayed version of one wave, this allows you to measure down to 0d of difference without worry of narrow-pulses)
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…