# Calculating Phase angle from instantaneous voltage

For background info I am an EE/CE that is 10 years out of school and has since worked writing firmware and dealt mostly with digital communications and signals, so now I am having to reach back to my (very) atrophied analog knowledge.

I am working with a 4 channel ADC, and I am trying to get a rough estimate of the input skew between channels when a 'simultaneous' capture is performed.

So I got the device with all 4 channels hooked up to a single sine wave from my function generator, performed the capture, and am now trying to analyze the data.

I know the max amplitude of the sine wave, as well as the frequency. I remember calculating instantaneous voltage for known phase angles, but I can't seem to figure out how the get phase angle from voltage (I am aware that there will be two possible angles for a given voltage).

my overall game plan is to determine the angle of each reading, then using the known frequency get skew time by $$\sk = (Ch2\angle - Ch1\angle) * (360 \div hz) \$$

so I guess the short question is, how a can I get phase angle for a point on a known sine wave, or the long question is; is there a better way to go about what I am doing?

• If you have the derivative of the signal also (or an equivalent) you can get the phase angle uniquely; the sine passes the same value once when going up and once when going down. One stand-in for derivative is to take the difference with the previous sample. – AJN Jun 17 '20 at 15:41
• Are two signals guaranteed to be pure sine waves of same frequency ? Will there be significant noise ? There may be better methods of calculating skew. You may want to search for phase detection schemes. Phase detectors are part of phase-locked loops and are well researched topic. Alternately, why not just subtract once channel with time delayed version of the other channel and search for the delay which results in minimum difference signal. that delay is the time delay between the signals. – AJN Jun 17 '20 at 15:43
• +1 to what @AJN said- It's easy if you have 2 noiseless perfectly sinusoidal waveforms of known amplitude and frequency. If anything is non-ideal or noisy it becomes a much bigger challenge. – John D Jun 17 '20 at 15:48
• Phase is relative. To get absolute values you must choose stable reference at same identical frequency.. Consider a PLL. But more import why do you want to measure this? – Tony Stewart Sunnyskyguy EE75 Jun 17 '20 at 15:51
• I guess I need to elaborate on my setup. I bent component leg into a L shape, then soldered it in between the two adjacent inputs pins on the ic, then clipped my coaxial probe from my function generator to that. The skew I think I am getting is large enough, and the frequency ranges are low enough, that I any error I get will be fine. I just looking to run several trials to compare different capture methods and I thought comparing relative time would be more useful than measuring relative difference in voltage, since that wouldn't be linear. – Whistler Jun 17 '20 at 15:57