Type 2 phase detector I came up with over the weekend.
Detects phase from zero to 2pi (radians) from A to B, outputting a PWM signal proportional to the angle (or voltage, after integration).
Speed is limited by the comparators (unless you already have squarewaves) and overlap of the one-shot pulses. Feeding relatively slow RC slopes into logic isn't the best idea, a schmitt trigger would help but the spare inversion shown seems to square it up pretty well. A current-limiting resistor on the gate input would be nice too, though for the 393 and 100pF values, the fall rate of 10V/0.1us draws at most 10mA. And, of course, if phase exceeds 0 or 2pi, you get a nasty discontinuity or unstable region, but any type 2 detector behaves the same anyway.
Tim
-- Deep Fryer: a very philosophical monk. Website: