Measure delay between two signals

PatrikB
Posts: 16
Joined: Tue Aug 07, 2018 7:43 pm

Measure delay between two signals

Postby PatrikB » Wed Aug 07, 2019 4:06 pm

Hi,

I need to measure the delay between two repeating signals with a +-100us accuracy. The frequency is 60Hz, 50% duty cycle and the delay between the two signals can be between 0 - 5ms. The signal amplitude is 3.3V.

Is it possible to do this using the MCPWM, RMT or any other HW function in the ESP32?

Capture.PNG
Capture.PNG (11.95 KiB) Viewed 3533 times

PatrikB
Posts: 16
Joined: Tue Aug 07, 2018 7:43 pm

Re: Measure delay between two signals

Postby PatrikB » Wed Aug 07, 2019 8:20 pm

One idea could be to XOR the two signals to get one signal with twice the frequency where the pulse width will correspond to the delay.

If it would be simpler to measure the pulse width using some functionality in the ESP32.


Capture2.PNG
Capture2.PNG (18.16 KiB) Viewed 3507 times

Who is online

Users browsing this forum: No registered users and 41 guests