Phase Shift Detection - Page 1
Forum section: electronics / beginners

author: rcahill
author_rank: Newbie
timestamp: June 17, 2015, 11:21:33 am
content: I'm working on a project using ultrasonic sensors (exampletransmitterandreceiver) and I'd like to detect the phase shift between the sent and received signals in hardware. I've been researching 'phase detector' and 'phase locked loop' ICs but the operating frequencies of these devices seem to be much larger than the 40 kHz that most ultrasonic devices operate at. I believe this stems from their application in RF devices.Do phase detector ICs exist that would give an output corresponding to the phase difference between two 40 kHz, ~20V amplitude sine waves? If anybody has some suggestions on what to look for I'd be very grateful. Thanks!Note: I know there are software implementations of phase shift detection, but for this project the use of a hardware method is a constraint.

author: ConKbot
author_rank: Super Contributor
timestamp: June 17, 2015, 12:14:11 pm
content: At 40khz, you could just use an amplifier and comparator to square up the received signal and make a phase frequency detector out of discreet logichttp://analog.intgckts.com/phase-locked-loop/phase-frequency-detector/The up and down outputs would then drive a charge pump (constant current source), loop filter and get your control voltage for your vco.

author: rcahill
author_rank: Newbie
timestamp: June 17, 2015, 01:07:14 pm
content: Thanks for the advice ConKbot - I'm not familiar with the first stage of symbols on the block diagram you gave (with the RefClk and FbClk inputs) but does that circuit effectively function as an XOR gate? This seems to be quite a common solution.

author: ConKbot
author_rank: Super Contributor
timestamp: June 17, 2015, 01:16:14 pm
content: Those are flip flops. Simple d type in that schematic and a nand gate. Search around online for the theory and examples of how the outputs behave. The rf theory applies, it's just the ICs are designed to run at uhf and even microwave frequencies, so they are pricy.

author: Zero999
author_rank: Super Contributor
timestamp: June 17, 2015, 02:28:45 pm
content: The CD4046 has a nice phase detector.http://www.nxp.com/documents/data_sheet/HEF4046B.pdf

author: rcahill
author_rank: Newbie
timestamp: June 17, 2015, 02:35:20 pm
content: This is all very helpful, thanks guys!

author: XFDDesign
author_rank: Frequent Contributor
timestamp: June 17, 2015, 08:22:08 pm
content: The up-down counter is a phase-frequency-detector (PFD), and is useful for a very wide range of phase errors on the input. The XOR gate is excellent when the frequencies are very close (and in your case, the same frequency with an error in phase) so long as you can give it a very close 50% duty cycle. Aggressively filtering the output of the XOR gate will give a pretty damn good volts-per-radian slope. If you run the 74HC4046 on 5V, you have 5/(pi) or 1.591V/rad.In that mode, 0 radians of error would give you 0V. pi/2 radians of error would be 2.5V (i.e. 90 degrees of error) and pi radians would be 5V. What you will find is that near the extremes, you get some "rounding" so if you need to have confidence around the fringes you would need a quadrature phase detector.Just convert those sine waves into square ones before feeding your detector.