Arduino Edge Detection

Hello, I am new to this forum just wanted to ask for advice with a project I am working on. I want to read two AC signals and determine if both signals are synchronized or not(leading or lagging). I already have the circuit that will transform these signals into square waves in order to use the method of zero crossing detection. I have some formulas in mind like phase shift, phase angle, etc. Any help is appreciated, thanks in advance. I attached the schematic that I am using.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html

OPs Circuit

Tom... :slight_smile:

Hi,
What model Arduino do you have?

Have you got any code running?
If so, can you post it so we can help you develop it towards your goal?

Thanks.. Tom.. :slight_smile:

what frequency are you measuring?
on a similar application some years ago we digitised two signals (bewteen 1 and 5MHz) using DACs and using DSP techniques determined the phase difference

We have the Arduino UNO R3, at the moment we don't have any code. The AC signals been feed into the the comparators are 60 Hz each with an amplitude of 5V, so the square waves have the same specs. We are trying to start a timer when it detects a rising edge and stop it when it detects a falling edge, and then measure the time to then implement it to the time difference formula= deltaTF360.