Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Tools
Old 22nd September 2009, 01:48 PM   #1
Default LM565 as phase comparator/detector

Hi there,
im currently trying to calculate the phase difference between two signals:
One that im receiving from a remote location-wirelessly- and the other is locally generated.

my question is:
- can i use the LM565-PLL's phase comparator(pins 2 and 3 as the two inputs and pin 5 as the output voltage) to find the phase difference in the form of variable voltage?

thx in advance!
Mr CCE is offline  
Old 22nd September 2009, 02:15 PM   #2
Default

Yes, bear in mind you don't get a DC output, it's a variable width pulse, the smoothing components convert this to DC - and need to be carefully selected, as detailed on the datasheet.

You might also consider the 4046 PLL, it's a cheap CMOS device with a VCO and two different phase comparators.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 22nd September 2009, 04:27 PM   #3
Default

Or you can condition the two signals to be CMOS logic levels. Feed them into the two inputs of an EX-OR gate. Pass the resulting output through a low-pass filter, and you will have a voltage proportional to the phase difference.
__________________
Mike ML.
MikeMl is offline  
Old 22nd September 2009, 04:30 PM   #4
Default

Quote:
Originally Posted by MikeMl View Post
Or you can condition the two signals to be CMOS logic levels. Feed them into the two inputs of an EX-OR gate. Pass the resulting output through a low-pass filter, and you will have a voltage proportional to the phase difference.
One of the 4046 phase comparators is an XOR gate.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 22nd September 2009, 05:14 PM   #5
Default

Quote:
Originally Posted by MikeMl View Post
Or you can condition the two signals to be CMOS logic levels. Feed them into the two inputs of an EX-OR gate. Pass the resulting output through a low-pass filter, and you will have a voltage proportional to the phase difference.
Look at this
Attached Thumbnails
LM565 as phase comparator/detector-phasecomp.gif  
__________________
Mike ML.
MikeMl is offline  
Old 22nd September 2009, 05:16 PM   #6
Default about the XOR gate with low pass filter

hi again,
first thx for the reply,
second:

- i want to ask Nigel Goodwin about the smoothing components: do U mean timing resistor/ timing capacitor? and if so how to choose them?

- and about the XOR with the low pass filter: R= ?, C = ? n' would it give me variable DC according to variable phase difference ?

thx a lot in advance!
Mr CCE is offline  
Old 22nd September 2009, 06:17 PM   #7
Default

Look at my sim again. The varying phase is simulated by having the frequency of the A signal slightly different than the B signal. Note the PWM output at output of the XOR. Note the "averaged" output at Out1.

The RC time constant of the low-pass needs to balance "ripple" output vs how rapidly the phase of the two inputs can change. In a PLL, the filter output cannot have hardly any ripple, so an aggressive low-pass is used. For most applications, the low-pass filter is usually implemented as a multiple-pole active filter, such as a unity-gain Butterworth Sallen-Key filter.
__________________
Mike ML.
MikeMl is offline  
Old 22nd September 2009, 06:42 PM   #8
Default

Quote:
Originally Posted by Mr CCE View Post
hi again,
first thx for the reply,
second:

- i want to ask Nigel Goodwin about the smoothing components: do U mean timing resistor/ timing capacitor? and if so how to choose them?
Look at the datasheet, page 8, THE LOOP FILTER.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 22nd September 2009, 08:02 PM   #9
Default about the replies...

Hey guys i really can't thank U enough.Really.

you've been the most helpfull resources so far.I'm gonna experiment a bit and tell U how it turns out.

Thx again n' keep up the good work fella's
Mr CCE is offline  
Old 22nd September 2009, 08:31 PM   #10
Default

Don't forget that the apparent phase-shift depends upon accurately converting each signal to a square-wave with the transitions at (or very near) the zero crossing point of each waveform. Depending upon the frequency, you may need high-speed, low offset, analog comparators for this conversion.
__________________
Carl
Curmudgeon Elektroniker
crutschow is offline  
Old 27th September 2009, 09:17 PM   #11
Default Next step

hey guys,

After calculating phase difference if the form of variable voltage; how to interpret this voltage as distance?? in meters say?

thx in advance
Mr CCE is offline  
Old 27th September 2009, 10:53 PM   #12
Default

Would you be trying to measure distance uisng a wireless link?, I would imagine you're probably doomed to failure.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 28th September 2009, 09:55 AM   #13
Default To Mr. "probably doomed to failure"

- First of all, it's not like it's never been done before; Distance measurement through RF is used in many applications.

- Second of all, have U ever tried it? i don't so. If I were able to get an indication that two objects are distant from each other by a variable x, then this variable can absolutely be used or perhaps utilized in such a way to estimate, up to a certain accuracy, the distance in question.

- Third and last, "probably doomed to failure" has no equivalent in my dictionary.

thx a lot!
Mr CCE is offline  
Old 29th September 2009, 03:32 AM   #14
Default

Considering that you didn't state your distance range, it might be unfair to say it can't be done by a student. If you want the distance to/from the moon to the nearest kilometer, then your project certainly has been done and you could probably repeat it with a little bit of luck.

Since you're asking about the LM565, which has a maximum operating frequency of 500 kHz, you appear to be working in the realm of microsecond precision. At the speed of light, (and radio waves), a kilometer is three microseconds.

I confess my prejudice when I read of such projects comes from all the students who want to measure distances to the nearest millimeter using radio waves in a school lab. They express total shock and dismay when someone leads them to discover that a picosecond is 1/1000000th of a microsecond as a millimeter is 1/1000000th of a kilometer.

Distance measurement with RF has been done; hams do moon bounce all the time. On a student budget you might find their results difficult to reproduce, but good luck.
__________________
de KI6RWX

Last edited by mneary; 29th September 2009 at 03:47 AM.
mneary is offline  
Old 1st October 2009, 11:19 AM   #15
Default to mneary

Hi there and thx for the reply,

i didn't want my reply to be like my last but i hate it when someone, eventhough undirectly, tells me that it just won't work.

thx again for the reply.now to get to business.I'm using an RF module that is capable of reaching 100 meters, and im doing this Project at the University, so im giving it 100% of my time and effort, and as such im gonna demonstrate it on campus and on a relatively small area(a couple of meters!!)

The data that im sending is a bitstream (a byte actually) at the rate of 2.4KHz. The carrier of the RF module is 433MHz (ASK).

for phase difference im gonna try XOR with low pass filter to give me phase difference in the form of variable voltage: 0V < phase difference < 5V

If U have any suggestions, please don't hesitate.
thx in advance.
Mr CCE is offline  
Reply

Tags
comparator or detector, lm565, phase

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Phase Detector Krenzo General Electronics Chat 5 11th November 2008 12:23 AM
Phase sequence detector Problem neelam29 General Electronics Chat 5 26th June 2007 07:12 PM
3 phase sequence detector andrew2022 Electronic Projects Design/Ideas/Reviews 1 24th April 2005 05:46 PM
JK phase detector jovabiot Electronic Projects Design/Ideas/Reviews 3 24th March 2004 01:27 PM
PLL(phase detector) Oluvision Electronic Projects Design/Ideas/Reviews 2 31st January 2004 07:16 AM



All times are GMT. The time now is 03:09 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker