4046's and TLV3502 (dual version) are on their way to me. I have an odd idea with diodes as switches which I'm going to try until the ICs turn up, will post more about it after trying. I'm going to give a try to each of those options before worrying about other ideas for getting the phase difference measurement from my signals.
"Why don't you let us in on the secret of the input waveforms"
Sorry I haven't described the system in full yet, I tend to see threads as a one problem area per thread discussion, but here goes:
The system is a PCB based resolver, I've challenged myself to make it all without relying on any special single function chips (there are resolver processing chips already manufactured) or highly specialised components (the type where supply suddenly disappears, this has been on my mind for even the smallest projects since the chip crisis propagated through as far as small volume buying is concerned).
The underlying principle is working REALLY well so long as the rotor is close to the coils (exactly as expected and intended given how little power it is needing), but due to ratios of inductance to capacitance for getting LC tank circuits to have decent Q factors, and with my L being limited by how much coil geometry I can fit in to certain areas of a PCB, I am forced up to 3MHz to make this work. In an ideal world I'd be down at several hundred KHz where I'm more familiar and can use pretty typical op amps, but L and C didn't want to play nicely.
I transmit a 3MHz signal from one coil and another receives it, the amplitude and "phase" of the receivied signal are controlled by the angle of a metal rotor. By "phase" I mean in-phase vs anti-phase, never does the signal shift by other relative phases*. And as far as "phase" goes I don't care about phase diferences induced in pre-transmitted or post-received areas of circuits, as they stay consistent with angle. I'm getting a receievd signal which is a sine wave, a pretty clean one indeed once I eliminated some excessive length wires and made sure to probe with the pointy tip and ground ring of an o-scope probe rather than the hook-in-cover and ground-clip part. Its amplitude after amplification (with transistors) can vary, depending on rotor angle, from around 20mVpp to 1.5Vpp (I may have quoted slightly different numbers at some points as these exact values vary with design iterations and I'm working on further improvements, but given the noise I'm seeing on signals of under 5mVpp being able to measure signals down to 20mVpp seems feasible. With further amplification measuring down to 20mVpp, despite more ampliciaftion, would be desirable as it would improve angular resolution). I can, where necessary, use capacitors to couple this 3MHz sine, whatever its amplitude at the time, on to any different reference centre level of voltage I please (within the limits of Gnd to 5V I'm designing for the final system to need as its own supply rails).
The "phase" of the recieved sine signal vs the phase of the generated (pre-outgoing) square signal tells me which half of the angular region the rotor is in, 0 to 180 or 180 to 360.
I can upload o-scope traces tomorrow perhaps, but all they show is a sine wave, amplitude variable with angle, which goes in or out of phase with the other signal (square wave, 0v to 5V, but can easily make lower voltage or inverted copies) depending on which half of the angular range it is in.
I have been working with reasonable success on peak detecting methods to track the amplitude of the signal and convert that in toa fairly constant DC level output, that level only varyng when the angle of the rotor changes. I am looking to get a similar DC level (analogue or, given I only care about in-phase vs anti-phase, digital) output to tell me whether the phase matches or opposes. I would do this by processing, separately from the peak detecting which ofcourse destroys phase information, the same amplified signal as is fed in to the peak detector, and comparing it with the signal going to the transmitting coil.
My initial hope, as I mentioend early in this thread was using a 4066 analogue switch to quickly let signal received through when the transmitted waveform was high and block them when it was low, but to my unfortunate surprise this added huge distortions to the signal with spikes and other curves far out sizing the desired signal even near maximum amplitudes. Then I tried the comparators (overly slow ones in hindsight)which I had lying around from previous (slower speed) projects. Being short of ideas, and not knowing what sort of search terms would let one find things about comparing if fast signals (everything is so much easier when slower) phases, at that point I started this thread, however with the ideas you've listed I've quite a few more things to try now, thanks for all the tips.
Thanks
*probing various signals in other places the physics is as expected, the transmiting (driving) coil's signal is 90degrees (phase) ahead of the received (driven) as is always true for resonance, but there are delay elsewhere in the circuit which make the phase at the easiest to measure pre-transmitted point and the most practical post-recieved-post-amplified point close to 180 degrees (phase) apart. I see no plausible reason for, and have found no examples in testing of, these other delays to phases varying, so they can be ignored as constant when using phase diferences to know which half of angular positions the rotor is in.
P.S. the AD8302, very good value on those adapter boards, cheaper than the chip itself. Will give that a go if these solutions don't work.