I'm trying to detect the phase difference between two signals (voltage and current) given from the same source (an ultrasound generator) which works at 20kHz approximately.
I found a circuit that is supposed to do that, but when I do the simulation with LTSpice I think that I'm doing it wrong because it does not works as it's told in the page. I think that the D-Flip Flop is not working as expected.
I "test it" using different phases for one of the signals and it gives me very different results in the different simulations.
Can anyone look at the file and give me some help so I can do the simulation correctly?
I attach the LTSpice file:
Image obtained from: www.next.gr/meter-counter/meters/measuring-phase-difference-l12144.html