sensing phase of an AC signal using microcontroller

Discussion in 'General Electronics Chat' started by robert.guttormson, Jan 8, 2010.

  1. robert.guttormson

    Thread Starter New Member

    Oct 3, 2009
    26
    0
    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
     
  2. russ_hensel

    Well-Known Member

    Jan 11, 2009
    818
    47
    Phase is a relative term. A single AC signal has no defined phase. Can you refine your question?
     
  3. robert.guttormson

    Thread Starter New Member

    Oct 3, 2009
    26
    0
    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
     
  4. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    How would an output lead the input signal? Do you mean lag by 90deg?
     
Loading...