sensing phase of an AC signal using microcontroller

Thread Starter

robert.guttormson

Joined Oct 3, 2009
26
Hi,

I am not sure if this has been already addressed over here, I am trying to sense the phase of an AC current(3vp-p) by connecting it to one of the mu.c's pins. I have already tested the software on mu.c using an waveform generator, but i am not sure how i can convert this 2-wire AC to be fed to a single GPIO. I appreciate your help and in case this has been already addressed please vector me to the same.

Cheers,
Bob
 

Thread Starter

robert.guttormson

Joined Oct 3, 2009
26
Oops thats true, my bad i wasnt clear enough. What i would like to do is find out the phase difference between an input AC sine wave and a square wave generated by the microcontroller. I would like the square wave to lead the sine wave by 90deg
 
Top